Operating System Structure
An operating system contains a kernel, command processor or shell and graphical user interface.
Kernel
- It is the control module of an operating system.
- It is that part of the operating system, that loads first and remains in the main memory.
- It is a bridge between applications and the actual data processing done at the hardware level.
- It is responsible for memory management, process and task management, and disk management.
- Thus Kernel’s primary function is to manage the computer’s resources and allow other programs to run and use these resources.
- Kernel provides the lowest level abstraction layer for various resources like processors and I/O devices that application software must control to perform it function.
- When a user gives command for performing any operation, then the request goes to the shell.
- The shell translates these human programs into machine language and then transfers the request to the kernel.
- The kernel receives the request from shell, processes it and displays the result on the Screen.
- All these functions are performed by kernel in a transparent manner.
The various functions performed by kernel are:
- To run an application, it sets up an address space for the application, loads the file containing the application code into memory, sets up a stack for the program and branches to a given location inside the program, thus starting its execution.
- It controls the state of the processes i.e. checks whether the process is running, waiting or blocked.
- Kernels also provide methods for process synchronization and process communication (IPC).
- Kernel performs memory management and provides the memory for processes that are running on the system.
- The kernel maintains a time table for all the processes that are running. Thus, in a multitasking system, kernel decides the schedule for various processes for how long each process will get CPU. It also maintains waiting and suspended processes in different memory areas.
- When a kernel determines that the logical memory does not fit to store the program. It then uses the concept of the physical memory which will store the program into temporary manner.
- It also maintains all the files and decide the manner in which they are stored into the computer system. It also provides the facility to password protect the various files.
- The kernel manages and controls the various I/O devices and their drivers installed on the system and allocates these devices in efficient manner to various processes.
Shell
- A shell is a software that provides an interface for users of an operating system which provides access to the services of a Kernel.
- The name shell originated from shells being an outer layer of interface between the user and the internals of the operating system (the kernel).
- Operating system shells are divided into two categories command line and graphical.
- Command line shell is used in MS-DOS and graphical shells are used in Windows that provides GUI facilities.
Command Processor
- It is that part of an operating system which receives and executes operating system commands.
- Whenever a command prompt is displayed the command processor waits for a command.
- After the user enters a command, the command processor makes sure that command is valid and then either executes it or issues an error message.
- For an operating system with graphical user interface, the command processor interprets mouse operations and executes the appropriate command. It is also known as command line interpreter.
Graphical user Interface
- It is provided so that the user need not remember tedious syntax of the command language, instead pointing to an option by means of a mouse can do his/her job.