Operating System
Operating System
Operating System
System View
• According to the computer system, the operating system is the bridge between applications and
hardware.
• It is most intimate with the hardware and is used to control it as required.
• The different types of system view for operating system can be explained as follows:
• The system views the operating system as a resource allocator. There are many resources such as CPU time,
memory space, file storage space, I/O devices etc. that are required by processes for execution. It is the duty of
the operating system to allocate these resources judiciously to the processes so that the computer system can
run as smoothly as possible.
• The operating system can also work as a control program. It manages all the processes and I/O devices so that
the computer system works smoothly and there are no errors. It makes sure that the I/O devices work in a proper
manner without creating problems.
• Operating systems can also be viewed as a way to make using hardware easier.
• Computers were required to easily solve user problems. However it is not easy to work directly with the
computer hardware. So, operating systems were developed to easily communicate with the hardware.
• An operating system can also be considered as a program running at all times in the background of a
computer system (known as the kernel) and handling all the application programs. This is the definition of the
operating system that is generally followed.
Operating System Components (Concepts):
• Process Management
• Main Memory Management
• File Management
• I/O System Management
• Secondary Storage Management
• Network Management
• Protection System
• Command-Interpreter System
O/S Concepts: Process Management
• A process is a program in execution.
• A process needs certain resources, including CPU time, memory, files,
and I/O devices, to accomplish its task.
• The operating system is responsible for the following activities in
connection with process management.
– Process creation and deletion.
– process suspension and resumption.
– Provision of mechanisms for:
• process synchronization
• process communication
O/S Concepts: Memory Management
• Memory is a large array of words or bytes, each with its own address.
• It is a repository of quickly accessible data shared by the CPU and I/O
devices.
• Main memory is a volatile storage device. It loses its contents in the case of
system off/failure.
• The operating system is responsible for the following activities in
connections with memory management:
– Keep track of which parts of memory are currently being used and
by whom.
– Decide which processes to load when memory space becomes
available.
– Allocate and deallocate memory space as needed.
O/S Concepts: File Management
• A file is a collection of related information defined by its creator.
• Commonly, files represent programs (both source and object forms) and
data.
• The operating system is responsible for the following activities in
connections with file management:
– File creation and deletion.
– Directory creation and deletion.
– Support of primitives for manipulating files and directories.
– Mapping files onto secondary storage.
– File backup on stable (nonvolatile) storage media.
O/S Concepts: I/O System Management
• Much of the OS kernel is concerned with I/O.
• The OS provides a standard interface between programs (user or
system) and devices.
• Device drivers are the processes responsible for each device type.
– A driver encapsulates device-specific knowledge, e.g., for
device initiation and control, interrupt handling, and errors.
• There may be a process for each device, or even for each I/O request,
depending on the particular OS.
O/S Concepts: Secondary Storage Mgnt
• Since main memory (primary storage) is volatile and too small to
accommodate all data and programs permanently, the computer
system must provide secondary storage to back up main memory
• Most modern computer systems use disks as the principal online
storage medium, for both programs and data.
• The operating system is responsible for the following activities in
connection with disk management:
– Free space management
– Storage allocation
– Disk scheduling
O/S Concepts: Protection System
• Protection refers to a mechanism for controlling access by programs,
processes, or users to both system and user resources.
• The protection mechanism must:
– distinguish between authorized and unauthorized usage.
– specify the controls to be imposed.
– provide a means of enforcement.
• protection mechanisms help to detect errors as well as to prevent
malicious destruction
O/S Concepts: Command-Interpreter System
• Many commands are given to the operating system by control
statements which deal with:
– process creation and management
– I/O handling
– secondary-storage management
– main-memory management
– file-system access
– protection
– networking
Operating System Structures:
• An operating system is a construct that allows the user application
programs to interact with the system hardware.
• Since the operating system is such a complex structure, it should be
created with utmost care so it can be used and modified easily.
• An easy way to do this is to create the operating system in parts.
• Each of these parts should be well defined with clear inputs, outputs and functions.
• These subsystems can then be arranged in various architectural configurations:
• Simple Structure
• Monolithic (one unstructured program)
• Layered
• Microkernel
• Virtual Machines
O/S Structures: Simple Structure