Operating System:
An operating system (OS) is a program that acts as an interface between the system hardware and the user. Moreover, it handles all the interactions between the software and the hardware. All the working of a computer system depends on the OS at the base level. Further, it performs all the functions like handling memory, processes, the interaction between hardware and software, etc.
Various types of operating systems are UNIX/LINUX/REDHAT/UBUNTU, MS-DOS, MS-Windows – 98/XP/Vista/windows7/windows8/windows10, Windows-NT/2000/2003/2005, OS/2 and Mac OS.
Objectives of OS
The primary goals of an operating system are as follows:
- Convenience– An operating system improves the use of a machine. Operating systems enable users to get started on the things they wish to complete quickly without having to cope with the stress of first configuring the system.
- Efficiency– An operating system enables the efficient use of resources. This is due to less time spent configuring the system.
- Ability to evolve– An operating system should be designed in such a way that it allows for the effective development, testing, and introduction of new features without interfering with service.
- Management of system resources– It guarantees that resources are shared fairly among various processes and users.
Functions of Operating System:
The various Functions those are Performed by the Operating System are as Explained below:
and for how long. It also keeps track of information, location, uses, status, and so on. These groupings of resources are referred to as file systems. The files on a system are stored in different directories. The OS:
- Keeps records of the status and locations of files.
- Allocates and deallocates resources.
- Decides who gets the resources.
Types of Operating System
The operating system can be of different types. They are as follows:
- Batch OS
In this system, the OS does not forward the jobs/tasks directly to the CPU. It works by grouping together similar types of jobs under one category. Further, we name this group as a ‘batch’. Hence, the name batch OS.
Examples are the payroll system, bank statement, etc.
- Time-Shared OS
When more than one task takes place on the system it is called time-shared OS. As multiple tasks can run at the system at a time as per requirement. Hence, they all share the CPU time one by one. Therefore, we also name it multitasking. The time that each task gets is called quantum.
A fixed interval of time is decided for each task. When the first task executes for that period of time, the second task executes, and so on.
Examples are UNIX etc.
- Distributed OS
In this system, there is more than one CPU present. The OS distributes the tasks among all the processors. The processors do not share any memory or clock time. OS handles all communication between them through various communication lines.
Examples are LOCUS etc.
- Network OS
In these OS various systems are connected to a server. It allows the system to share resources such as files, printers, applications, etc. Moreover, it gives the capability to serve to manage these resources.
Examples are UNIX, LINUX, Microsoft Windows Server 2008, etc.
- Real-Time OS (RTOS)
In these systems, the time interval for processing and responding to inputs is very small. Therefore, due to this quality, these are used in real-time situations. For example in missile systems, robots, etc.
They have two categories as follows:
- a) Hard Real-Time Systems
In this, the time constraint is very short and strict. Even seconds of delay is not acceptable.
- b) Soft Real-Time Systems
In this, the time constraint is not so short and strict.
System Structure for an Operating System?
Because operating systems have complex structures, we want a structure that is easy to understand so that we can adapt an operating system to meet our specific needs. Similar to how we break down larger problems into smaller, more manageable subproblems, building an operating system in pieces is simpler. The operating system is a component of every segment. The strategy for integrating different operating system components within the kernel can be thought of as an operating system structure. As will be discussed below, various types of structures are used to implement operating systems.
Simple/Monolithic structure
Such operating systems do not have well-defined structures and are small, simple, and limited. The interfaces and levels of functionality are not well separated. MS-DOS is an example of such an operating system. In MS-DOS, application programs are able to access the basic I/O routines. These types of operating systems cause the entire system to crash if one of the user programs fails.
A diagram of the structure of MS-DOS is shown below.
Advantages of Simple/Monolithic structure
- It delivers better application performance because of the few interfaces between the application program and the hardware.
- It is easy for kernel developers to develop such an operating system.
Disadvantages of Simple/Monolithic structure
- The structure is very complicated, as no clear boundaries exist between modules.
- It does not enforce data hiding in the operating system.
Micro-kernel Structure
This structure designs the operating system by removing all non-essential components from the kernel and implementing them as system and user programs. This results in a smaller kernel called the micro-kernel. Advantages of this structure are that all new services need to be added to user space and does not require the kernel to be modified. Thus it is more secure and reliable as if a service fails, then rest of the operating system remains untouched. Mac OS is an example of this type of OS.
Advantages of Micro-kernel structure
- It makes the operating system portable to various platforms.
- As microkernels are small so these can be tested effectively.
Disadvantages of Micro-kernel structure
- Increased level of inter module communication degrades system performance.
Hybrid-Kernel Structure
Hybrid-kernel structure is nothing but just a combination of both monolithic-kernel structure and micro-kernel structure. Basically, it combines properties of both monolithic and micro-kernel and make a more advance and helpful approach. It implement speed and design of monolithic and modularity and stability of micro-kernel structure.
Advantages of Hybrid-Kernel Structure
- It offers good performance as it implements the advantages of both structure in it.
- It supports a wide range of hardware and applications.
- It provides better isolation and security by implementing micro-kernel approach.
- It enhances overall system reliability by separating critical functions into micro-kernel for debugging and maintenance.
Disadvantages of Hybrid-Kernel Structure
- It increases overall complexity of system by implementing both structure (monolithic and micro) and making the system difficult to understand.
- The layer of communication between micro-kernel and other component increases time complexity and decreases performance compared to monolithic kernel.