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. 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. Two types of Structures Simple Structure Layered Structure Operating System
Simple Structure There are many operating systems that have a rather simple structure. These started as small systems and rapidly expanded much further than their scope. A common example of this is MS-DOS. MS-DOS is an operating system created for personal computers. It was developed by Microsoft. MS-DOS operating system is split into various layers and each of the layers have different functionalities. Layering provides a distinct advantage in the MS-DOS operating system because all the layers can be defined separately and interact with each other as required. Also, it is easier to create, maintain and update the system if it is done in the form of layers. Change in one layer specification does not affect the rest of the layers. However, the layers in MS-DOS are not that sharply defined and the layer specifications often bleed into each other.
Email Web Browser Media Player Application Program These programs perform a particular function directly for the users. Some of the common application programs include Email, web browsers, gaming software, word processors, graphics software, media player and etc. So they are known as application programs. The requests for service and application communication systems used in an application by a programmer is known as an A pplication Program Interface (API) .
System Program The system programs are used to program the operating system software. While application programs provide software that is used directly by the user, system programs provide software that are used by other systems such as SaaS applications, computational science applications and etc.
MS-DOS Device Drivers MS-DOS ( M icro S oft D isk O perating S ystem) is an operating system for x86-based personal computers, which was purchased by Microsoft. It was the main operating system for personal computers during the 1980s up to mid 1990s. Most of the device drivers on MS-DOS are part of the operating system such as keyboard and screen console drivers, floppy and hard-disk drivers, printer port driver, serial port driver etc .
ROM BIOS device drivers The BIOS drivers are the programs stored in the EPROM or EEPROM memory chips on the motherboard. These are the basic drivers needed to start the computer system. BIOS stands for Basic Input/Output System. Usually the motherboard holds the ROM and ROM contain the BIOS program module. The BIOS is initiated when power is turned on and it checks for the basic hardware components in the system to start the operating system. Normally the BIOS is programmed in a way as non-rewritable block of code. Because it is the first program to be executed and deals directly with the hardware components; if it’s misused or damaged, the entire PC becomes useless and worth for none. ROM – Read only memory PROM – Programmable Read Only Memory EPROM – Erasable Programmable Read Only Memory EEPROM – Electronically Erasable Programmable Read Only Memory
Layered Structure The layered structure approach breaks up the operating system into different layers and retains much more control on the system. Layering provides a distinct advantage in an Operating System . All the layers can be defined separately and interact with each other as required. Also, it is easier to create, maintain and update the system if it is done in the form of layers. Change in one layer specification does not affect the rest of the layers. Each of the layers in the operating system can only interact with the above and below layers. The lowest layer handles the hardware, and the uppermost layer deals with the user applications.
There are six layers in the layered operating system. A diagram demonstrating these layers is as follows:
Hardware: This layer interacts with the system hardware and coordinates with all the peripheral devices such as printer, mouse, keyboard, Scanner and etc. These types of hardware devices are managed in the hardware layer. It is attached directly to the core of the system. CPU Scheduling: This layer deals with scheduling the processes for the CPU. The processes that are ready to execute in the main memory are kept in the ready queue. This layer is responsible for managing how many processes will be allocated to the CPU and how many will stay out of the CPU.
3. Memory Management: Memory management deals with memory and moving processes from disk to primary memory for execution and back again. This is handled by the third layer of the operating system. All memory management is associated with this layer. There are various types of memories in the computer like RAM, ROM. 4. Process Management: This layer is responsible for managing the processes, i.e., assigning the processor to a process and deciding how many processes will stay in the waiting schedule. The priority of the processes is also managed in this layer. The different algorithms used for process scheduling are FCFS (first come, first served), SJF (shortest job first), priority scheduling, round-robin scheduling, etc.
5. I/O Buffer: I/O devices are very important in computer systems. They provide users with the means of interacting with the system. This layer handles the buffers for the I/O devices and makes sure that they work correctly. Suppose you are typing from the keyboard. There is a keyboard buffer attached with the keyboard, which stores data for a temporary time. 6. User Programs: This is the highest layer in the layered operating system. This layer deals with the many user programs and applications that run in an operating system, such as word processors, games, browsers, etc. You can also call this an application layer