Components of O S
Components of O S
●
●
●
An Operating system is an interface between users and the hardware of a computer system. It
is a system software that is viewed as an organized collection of software consisting of
procedures and functions, providing an environment for the execution of programs. The
operating system manages system software and computer hardware resources. It allows
computing resources to be used in an efficient way. Programs interact with computer hardware
with the help of operating systems. A user can interact with the operating system by making
system calls or using OS commands.
Process Management
A process is a program in execution. It consists of the followings:
● Executable program
● Program data
● Stack and stack pointer
● Program counter and other CPU registers
● Details of opened files
A process can be suspended temporarily and the execution of another process can be taken up.
A suspended process can be restarted later. Before suspending a process, its details are saved
in a table called the process table so that it can be executed later on. An operating system
supports two system calls to manage processes Create and Kill –
● Create a system call used to create a new process.
● Kill system call used to delete an existing process.
A process can create a number of child processes. Processes can communicate among
themselves either using shared memory or by message-passing techniques. Two processes
running on two different computers can communicate by sending messages over a network.
Files Management
Files are used for long-term storage. Files are used for both input and output. Every operating
system provides a file management service. This file management service can also be treated
as an abstraction as it hides the information about the disks from the user. The operating
system also provides a system call for file management. The system call for file management
includes:
● File creation
● File deletion
● Read and Write operations
Files are stored in a directory. System calls provide to put a file in a directory or to remove a file
from a directory. Files in the system are protected to maintain the privacy of the user. Below
shows the Hierarchical File Structure directory.
File Structure Directory
Command Interpreter
There are several ways for users to interface with the operating system. One of the approaches
to user interaction with the operating system is through commands. Command interpreter
provides a command-line interface. It allows the user to enter a command on the command
line prompt (cmd). The command interpreter accepts and executes the commands entered by a
user. For example, a shell is a command interpreter under UNIX. The commands to be executed
are implemented in two ways:
System Calls
System calls provide an interface to the services made by an operating system. The user
interacts with the operating system programs through System calls. These calls are normally
made available as library functions in high-level languages such as C, Java, Python etc. It
provides a level of abstraction as the user is not aware of the implementation or execution of the
call made. Details of the operating system is hidden from the user. Different hardware and
software services can be availed through system calls.
● Process Management
● Memory Management
● File Operations
● Input / Output Operations
Signals
Signals are used in the operating systems to notify a process that a particular event has
occurred. Signals are the software or hardware interrupts that suspend the current execution of
the task. Signals are also used for inter-process communication. A signal follows the following
pattern :
● A signal is generated by the occurrence of a particular event it can be the clicking of the
mouse, the execution of the program successfully or an error notifying, etc.
● A generated signal is delivered to a process for further execution.
● Once delivered, the signal must be handled.
● A signal can be synchronous and asynchronous which is handled by a default handler or
by the user-defined handler.
The signal causes temporarily suspends the current task it was processing, saves its registers
on the stack, and starts running a special signal handling procedure, where the signal is
assigned to it.
Network Management
The complexity of networks and services has created modern challenges for IT professionals
and users. Network management is a set of processes and procedures that help organizations
to optimize their computer networks. Mainly, it ensures that users have the best possible
experience while using network applications and services.
Security Management
The security mechanisms in an operating system ensure that authorized programs have access
to resources, and unauthorized programs have no access to restricted resources. Security
management refers to the various processes where the user changes the file, memory, CPU,
and other hardware resources that should have authorization from the operating system.
The purpose of the I/O system is to hide the details of hardware devices from the application
programmer. An I/O device management component allows highly efficient resource utilization
while minimizing errors and making programming easy on the entire range of devices available
in their systems.