Operating Systems - Introduction and unit 1

bhargavivarala99 30 views 124 slides Aug 22, 2024
Slide 1
Slide 1 of 124
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108
Slide 109
109
Slide 110
110
Slide 111
111
Slide 112
112
Slide 113
113
Slide 114
114
Slide 115
115
Slide 116
116
Slide 117
117
Slide 118
118
Slide 119
119
Slide 120
120
Slide 121
121
Slide 122
122
Slide 123
123
Slide 124
124

About This Presentation

Introduction Architecture, Goals & Structures of O.S, Basic functions, Interaction of O. S.
& hardware architecture, System calls, Batch, multiprogramming. Multitasking, time sharing,
parallel, distributed & real -time O.S Process Management Process Concept, Process states,
Process co...


Slide Content

- Bhargavi Varala

What is an Operating System? The most important program that runs on your computer. It manages all other programs on the machine. Every PC has to have one to run other applications or programs. It’s the first thing “loaded”.

Operating System It performs basic tasks, such as: Recognizing input from the keyboard or mouse, Sending output to the monitor,

Why are Operating Systems Used? Operating System is used as a communication channel between the Computer hardware and the user. It works as an intermediate between System Hardware and End-User.

Keeping track of files and directories on the disk, and Controlling peripheral devices such as disk drives and printers. Why are Operating Systems Used?

Evolution of Windows …

Why are Operating Systems Used? Operating System handles the following responsibilities: It controls all the computer resources. It provides valuable services to user programs. It coordinates the execution of user programs. It provides resources for user programs. It provides an interface (virtual machine) to the user. It hides the complexity of software. It supports multiple execution modes. It monitors the execution of user programs to prevent errors.

Functions of Operating Systems Memory Management Process Management Device Management File Management Security GUI Booting Control Over System Performance 9. Job Accounting 10. Resource Management 11. Networking 12. Backup & Recovery 13. Virtualization 14. Error – Detecting Aids 15. Time Sharing 16. System Calls

1. Memory Management The operating system manages the computer’s primary memory and provides mechanisms for optimizing memory usage. The operating system manages the Primary Memory or Main Memory. Main memory is made up of a large array of bytes or words where each byte or word is assigned a certain address. Main memory is fast storage and it can be accessed directly by the CPU. For a program to be executed, it should be first loaded in the main memory. An operating system manages the allocation and deallocation of memory to various processes and ensures that the other process does not consume the memory allocated to one process.

An Operating System performs the following activities for  Memory Management : It keeps track of primary memory, i.e., which bytes of memory are used by which user program. The memory addresses that have already been allocated and the memory addresses of the memory that has not yet been used.  In multiprogramming, the OS decides the order in which processes are granted memory access, and for how long.  It Allocates the memory to a process when the process requests it and deallocates the memory when the process has terminated or is performing an I/O operation. 

A computer has different memory types it could use; memory registers, cache, RAM and disk storage. The OS is responsible for checking; which memory if free which memory is to be allocated and de- allocated how to swap between the main memory and secondary memory

When the OS swaps between main memory and secondary memory we call this Virtual Memory management Virtual memory creates a memory slot acting as RAM when the RAM is too full Virtual memory is much slower than RAM

2. Process Management The operating system is responsible for starting, stopping, and managing processes and programs. It also controls the scheduling of processes and allocates resources to them. In a multi-programming environment, the OS decides the order in which processes have access to the processor, and how much processing time each process has. This function of OS is called  Process Scheduling .

An Operating System performs the following activities for  Processor Management .  An operating system manages the processor’s work by allocating various jobs to it and ensuring that each process receives enough time from the processor to function properly. Keeps track of the status of processes. The program which performs this task is known as a traffic controller. Allocates the CPU that is a processor to a process. De-allocates processor when a process is no longer required.

New State - A process is said to be in new state when a program present in the secondary memory is initiated for execution. Ready State - A process moves from new state to ready state after it is loaded into the main memory and is ready for execution. - In ready state, the process waits for its execution by the processor. Run State - A process moves from ready state to run state after it is assigned the CPU for execution. Terminate - A process moves from run state to terminate state after its execution is completed. - After entering the terminate state, context (PCB) of the process is deleted by the operating system.

Block / Wait State - A process moves from run state to block or wait state if it requires an I/O operation or some blocked resource during its execution. - After the I/O operation gets completed or resource becomes available, the process moves to the ready state. Suspend Ready State - A process moves from ready state to suspend ready state if a process with higher priority has to be executed but the main memory is full. - Moving a process with lower priority from ready state to suspend ready state creates a room for higher priority process in the ready state. - The process remains in the suspend ready state until the main memory becomes available. - When main memory becomes available, the process is brought back to the ready state. Suspend Wait State - A process moves from wait state to suspend wait state if a process with higher priority has to be executed but the main memory is full. Moving a process with lower priority from wait state to suspend wait state creates a room for higher priority process in the ready state. After the resource becomes available, the process is moved to the suspend ready state. After main memory becomes available, the process is moved to the ready state.

3. Device Management The operating system manages input/output devices such as printers, keyboards, mice, and displays. It provides the necessary drivers and interfaces to enable communication between the devices and the computer. An OS manages device communication via its respective drivers.

An Operating System performs the following activities for Device management .  Keeps track of all devices connected to the system. Designates a program responsible for every device known as the Input/Output controller. Decide which process gets access to a certain device and for how long. Allocates devices effectively and efficiently. Deallocates devices when they are no longer required. There are various input and output devices. An OS controls the working of these input-output devices. It receives the requests from these devices, performs a specific task, and communicates back to the requesting process .

4. File Management The operating system is responsible for organizing and managing the file system, including the creation, deletion, and manipulation of files and directories. A file system is organized into directories for efficient or easy navigation and usage. These directories may contain other directories and other files.

An Operating System performs the following activities for File management .  It keeps track of where information is stored, user access settings, the status of every file, and more. These facilities are collectively known as the file system.  An OS keeps track of information regarding the creation, deletion, transfer, copy, and storage of files in an organized way. It also maintains the integrity of the data stored in these files, including the file directory structure, by protecting against unauthorized access.

5. Security The operating system provides a secure environment for the user, applications, and data by implementing security policies and mechanisms such as access controls and encryption. The operating system uses password protection to protect user data and similar other techniques. It also prevents unauthorized access to programs and user data.  The operating system provides various techniques which assure the integrity and confidentiality of user data.

The following security measures are used to protect user data: Protection against unauthorized access through login. Protection against intrusion by keeping the firewall active. Protecting the system memory against malicious access. Displaying messages related to system vulnerabilities.

6. GUI The operating system provides a user interface that enables users to interact with the computer system. This can be a Graphical User Interface (GUI), a Command-Line Interface (CLI), or a combination of both. The user interacts with the computer system through the operating system. Hence OS acts as an interface between the user and the computer hardware. This user interface is offered through a set of commands or a  graphical user interface (GUI) . Through this interface, the user makes interacts with the applications and the machine hardware.

7. Booting The process of starting or restarting the computer is known as booting. If the computer is switched off completely and if turned on then it is called cold booting. Warm booting is a process of using the operating system to restart the computer.

What happens in the Process of Booting? Let's understand What happens when the computer switch is pressed? How does our computer get started? What all things go in the backend so that our computer is ready to run the application programs?

Whenever we press the power button of our computer system, all the devices get the power and they are initialized. Our main memory which is responsible for holding the instructions will be initially empty as RAM is volatile memory. So, there will be a small set of instructions present in the non-volatile memory called ROM. These instructions will be passed to the CPU and the execution of instructions takes place which will check all the hardware connected with the system. If there are any problems with the hardware, we will get the alert by beep sounds or even on-screen messages. After the testing of the hardware is completed, the booting process continues and loads the operating system.

8. Control Over System Performance Operating systems play a pivotal role in controlling and optimizing system performance. They act as intermediaries between hardware and software, ensuring that computing resources are efficiently utilized. One fundamental aspect is resource allocation, where the OS allocates CPU time, memory, and I/O devices to different processes, striving to provide fair and optimal resource utilization. Process scheduling, a critical function, helps decide which processes or threads should run when preventing any single task from monopolizing the CPU and enabling effective multitasking.

9. Job Accounting It keeps track of time and resources used by various jobs or users. The operating system Keeps track of time and resources used by various tasks and users, this information can be used to track resource usage for a particular user or group of users.  In a multitasking OS where multiple programs run simultaneously, the OS determines which applications should run in which order and how time should be allocated to each application.

10. Resource Management The operating system manages and allocates memory, CPU time, and other hardware resources among the various programs and processes running on the computer. Coordination Between Other Software and Users Operating systems also coordinate and assign  interpreters, compilers, assemblers, and other software to the various users of the computer systems.

In simpler terms, think of the operating system as the traffic cop of your computer. It directs and manages how different software programs can share your computer’s resources without causing chaos. It ensures that when you want to use a program, it runs smoothly without crashing or causing problems for others. So, it’s like the friendly officer ensuring a smooth flow of traffic on a busy road, making sure everyone gets where they need to go without any accidents or jams.

11. Networking The operating system provides networking capabilities such as establishing and managing network connections, handling network protocols, and sharing resources such as printers and files over a network.

Network Communication:  Think of them as traffic cops for your internet traffic. Operating systems help computers talk to each other and the internet. They manage how data is packaged and sent over the network, making sure it arrives safely and in the right order. Settings and Monitoring:  Think of them as the settings and security guard for your internet connection. They also let you set up your network connections, like Wi-Fi or Ethernet, and keep an eye on how your network is doing. They make sure your computer is using the network efficiently and securely, like adjusting the speed of your internet or protecting your computer from online threats.

12 & 13. Backup, Recovery & Virtualization Backup and Recovery:  The operating system provides mechanisms for backing up data and recovering it in case of system failures, errors, or disasters. Virtualization:  The operating system provides virtualization capabilities that allow multiple operating systems or applications to run on a single physical machine. This can enable efficient use of resources and flexibility in managing workloads.

14. Error-detecting Aids These contain methods that include the production of dumps, traces, error messages, and other debugging and error-detecting methods. The operating system constantly monitors the system to detect errors and avoid malfunctioning computer systems.  From time to time, the operating system checks the system for any external threat or malicious software activity. It also checks the hardware for any type of damage. This process displays several alerts to the user so that the appropriate action can be taken against any damage caused to the system.

15. Time-Sharing Time-Sharing:  The operating system enables multiple users to share a computer system and its resources simultaneously by providing time-sharing mechanisms that allocate resources fairly and efficiently.

16. System Calls The operating system provides a set of system calls that enable applications to interact with the operating system and access its resources. System calls provide a standardized interface between applications and the operating system, enabling portability and compatibility across different hardware and software platforms.

What is Kernel? A kernel is the core part of an operating system. It acts as a bridge between software applications and the hardware of a computer . The kernel manages system resources, such as the CPU, memory, and devices, ensuring everything works together smoothly and efficiently. It handles tasks like running programs, accessing files, and connecting to devices like printers and keyboards.

Introduction of System Call A system call  is a programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on / interact with the operating system . A computer program makes a system call when it requests the operating system’s kernel . System call  provides  the services of the operating system to the user programs via the Application Program Interface(API). To allow a website or mobile app to retrieve data from a database or external service, such as social media platforms, cloud storage or payment gateways. It provides an interface between a process and an operating system to allow user-level processes to request services of the operating system. System calls are the only entry points into the kernel system. All programs needing resources must use system calls. 

Before an understanding of the working of system calls in OS let us understand the important concept of modes of operation. In our computer system, we have two modes available. User Mode: In this mode, execution is done on behalf of the user. Monitor/Kernel-Mode: In this mode, execution is done on behalf of OS.

What is a System Call? A system call is a mechanism used by programs to request services from the operating system (OS). In simpler terms, it is a way for a program to interact with the underlying system, such as accessing hardware resources or performing privileged operations. A user program can interact with the operating system using a system call. A number of services are requested by the program, and the OS responds by launching a number of systems calls to fulfill the request. A system call can be written in high-level languages like C or Pascal or in assembly language. If a high-level language is used, the operating system may directly invoke system calls, which are predefined functions.

What is a System Call? A system call is initiated by the program executing a specific instruction, which triggers a switch to kernel mode, allowing the program to request a service from the OS. The OS then handles the request, performs the necessary operations, and returns the result back to the program. System calls are essential for the proper functioning of an operating system, as they provide a standardized way for programs to access system resources. Without system calls, each program would need to implement its methods for accessing hardware and system services, leading to inconsistent and error-prone behavior.

Services Provided by System Calls Process Control: It handles the system calls for process creation, deletion, etc. Examples of process control system calls are: Load, Execute, Abort, and Wait for Signal events for process. File Management:  File manipulation events like Creating, Deleting, Reading Writing etc are being classified under file management system calls. Device Management: Device Management system calls are being used to request the device, release the device, and logically attach and detach the device. Information Maintenance This type of system call is used to maintain the information about the system like time and date. Communication: In order to have inter-process communications like send or receive the message, create or delete the communication connections, to transfer status information etc. communication system calls are used.

Features of System Calls Interface:  System calls provide a well-defined interface between user programs and the operating system. Programs make requests by calling specific functions, and the operating system responds by executing the requested service and returning a result. Protection:  System calls are used to access privileged operations that are not available to normal user programs. The operating system uses this privilege to protect the system from malicious or unauthorized access. Kernel Mode:  When a system call is made, the program is temporarily switched from user mode to  kernel  mode. In kernel mode, the program has access to all system resources, including hardware, memory, and other processes. Context Switching:  A system call requires a  context switch , which involves saving the state of the current process and switching to the kernel mode to execute the requested service. This can introduce overhead, which can impact system performance. Error Handling:  System calls can return error codes to indicate problems with the requested service. Programs must check for these errors and handle them appropriately. Synchronization:  System calls can be used to synchronize access to shared resources, such as files or network connections. The operating system provides synchronization mechanisms, such as locks or  semaphores , to ensure that multiple programs can access these resources safely.

How does System Call Work? Here is a detailed explanation step by step how system calls work: Users need special resources:  Sometimes programs need to do some special things that can’t be done without the permission of the OS like reading from a file, writing to a file, getting any information from the hardware, or requesting a space in memory. The program makes a system call request:  There are special predefined instructions to make a request to the operating system. These instructions are nothing but just a “system call”. The program uses these system calls in its code when needed. Operating system sees the system call:  When the OS sees the system call then it recognizes that the program needs help at this time so it temporarily stops the program execution and gives all the control to a special part of itself called ‘Kernel’. Now ‘Kernel’ solves the need of the program. The operating system performs the operations:  Now the operating system performs the operation that is requested by the program. Example: reading content from a file etc. Operating system give control back to the program :  After performing the special operation, OS give control back to the program for further execution of program .

Examples of a System Call in Windows and Unix System calls for Windows and Unix come in many different forms. These are listed in the table below as follows: Process Windows Unix Process Control CreateProcess() ExitProcess() WaitForSingleObject() Fork() Exit() Wait() File manipulation CreateFile() ReadFile() WriteFile() Open() Read() Write() Close() Device Management SetConsoleMode() ReadConsole() WriteConsole() Ioctl() Read() Write() Information Maintenance GetCurrentProcessID() SetTimer() Sleep() Getpid() Alarm() Sleep() Communication CreatePipe() CreateFileMapping() MapViewOfFile() Pipe() Shmget() Mmap() Protection SetFileSecurity() InitializeSecurityDescriptor() SetSecurityDescriptorgroup() Chmod()  Umask() Chown()

Open(): Accessing a file on a file system is possible with the open() system call. It gives the file resources it needs and a handle the process can use. A file can be opened by multiple processes simultaneously or just one process. Everything is based on the structure and file system. Read(): Data from a file on the file system is retrieved using it. In general, it accepts three arguments: A description of a file. A buffer for read data storage. How many bytes should be read from the file Before reading, the file to be read could be identified by its file descriptor and opened using the open() function.

Wait(): In some systems, a process might need to hold off until another process has finished running before continuing. When a parent process creates a child process, the execution of the parent process is halted until the child process is complete. The parent process is stopped using the wait() system call. The parent process regains control once the child process has finished running. Write(): Data from a user buffer is written using it to a device like a file. A program can produce data in one way by using this system call. generally, there are three arguments: A description of a file. A reference to the buffer where data is stored. The amount of data that will be written from the buffer in bytes.

Fork():   The  fork()  system call is used by processes to create copies of themselves. It is one of the methods used the most frequently in operating systems to create processes. When a parent process creates a child process, the parent process’s execution is suspended until the child process is finished. The parent process regains control once the child process has finished running. Exit():  A system call called exit() is used to terminate a program. In environments with multiple threads, this call indicates that the thread execution is finished. After using the exit() system function, the operating system recovers the resources used by the process.

Disadvantages of System Call Performance Overhead : System calls involve switching between user mode and kernel mode, which can slow down program execution. Security Risks : Improper use or vulnerabilities in system calls can lead to security breaches or unauthorized access to system resources. Error Handling Complexity : Handling errors in system calls, such as resource allocation failures or timeouts, can be complex and require careful  programming . Compatibility Challenges : System calls may vary between different  operating systems , requiring developers to write code that works across multiple platforms. Resource Consumption : System calls can consume significant system resources, especially in environments with many concurrent processes making frequent calls.

Conclusion In conclusion, system calls are a important part of how  computer programs  interact with the operating system. They provide a way for applications to request services from the OS, such as accessing files, managing memory, or communicating over networks. System calls act as a bridge between user-level programs and the low-level operations handled by the operating system  kernel . Understanding system calls is essential for developers to create efficient and functional software that can leverage the full capabilities of the underlying operating system.

Different types of operating systems While there exist many similarities between operating systems – such as critical shell and kernel components – there is also plenty of variety. Where some OS utilize a graphical user interface (GUI), others will have a text-based, command-line interface (CLI). The Operating System types encompass various variants, each tailored to distinct needs. Different operating systems serve different purposes and have different applications. Some OS are suited for everyday tasks and functions, such as using a smartphone or personal laptop, whereas others are required for more specialized work or tasks, such as gaming. All operating systems have one common goal - to manage and organize the resources and processes of a computer. These resource managers include processes, threads, files, devices, and networks. Operating systems evolved in response to technological advances and changed over time as new hardware was developed.

Different types of operating systems The main types of operating system are: Simple batch operating system Multi-programming batch operating system Multi-tasking operating system Multi-User Operating Syetem Multi-processing operating system Time-sharing operating system Distributed operating system Network operating system Real-time operating system Mobile operating system.

1. Batch Operating System In batch operating system, Firstly, user prepares his job using punch cards. Then, he submits the job to the computer operator. Operator collects the jobs from different users and sort the jobs into batches with similar needs. Then, operator submits the batches to the processor one by one. All the jobs of one batch are executed together. This type of operating system does not interact with the computer directly. There is an operator which takes similar jobs having the same requirements and groups them into batches. It is the responsibility of the operator to sort jobs with similar needs. Batch Operating System is designed to manage and execute a large number of jobs efficiently by processing them in groups.

Advantages of Batch Operating System It saves the time that was being wasted earlier for each individual process in context switching from one environment to another environment. No manual intervention is needed. Disadvantages of Batch Operating System All the jobs of a batch are executed sequentially one after the other. The output is obtained only after all the jobs are executed. Thus, priority can not be implemented if a certain job has to be executed on an urgent basis. The jobs of a particular batch might take long time for their execution. This might lead to starvation to other jobs in other batches. If the jobs of a batch require some I/O operation, then CPU must wait till the I/O operation gets completed. Since I/O devices are very slow, CPU remains idle for a long time. CPU can not take any other job and execute it. Once a batch is submitted for execution, the user is not able to interact with any of his jobs. If a job requires the user to input data during run time, then user must wait till the other jobs of the batch get executed. This also increases the overall execution time. Examples of Batch Operating Systems: Payroll Systems, Bank Statements, etc.

2. Multi-programming Batch operating system On a single processor computer, a multiprogramming OS can run many programs. In a multiprogramming OS, if one program must wait for an input/output transfer, the other programmes are ready to use the CPU. As a result, different jobs may have to split CPU time. However, their jobs are not scheduled to be completed at the same time. When software is run, it is referred to as a “Task,” “Process,” or “Job.” When compared to serial or batch processing systems, concurrent program executions reduce system resource usage and increase throughput. Multiprogramming’s main purpose is to manage all of the system’s resources. The file system, transient area, command processor, and I/O control system are the main components of a multiprogramming system. As a result, the multiprogramming OS is built to store many programs based on sub-segmenting the transient area. The operating system’s essential functions are tied to the resource management processes.

Multiprogramming operating systems are divided into two categories, and they are: Multitasking Operating System A multitasking OS allows two or more programmes to run simultaneously. This is accomplished by the operating system transferring each program into or out of memory one by one. When a program is switched out of the memory, it is saved on the disc temporarily until it is needed again. Multiuser Operating System A multiuser operating system allows multiple users from various terminals to share the processing time on a certain powerful central machine. The operating system achieves this by frequently switching between terminals, each of which is allotted a certain amount of processor time on a central computer. Because the operating system on each terminal changes so frequently, each user appears to have constant access to the central computer. When a system has a large number of users, the time it takes for the central computer to respond becomes more apparent.

Advantages of Multiprogramming Operating System It has a faster response time. It may be beneficial to run multiple jobs in a single application at the same time. It aids in the computer’s overall optimization of job throughput. The multiprogramming system can be used by multiple people at the same time. In comparison to long-term work, short-term jobs are completed swiftly. It may aid in reducing turnaround time for short-duration tasks. It contributes to higher CPU utilisation and is never idle. The resources are wisely allocated. Disadvantages of Multiprogramming Operating System It’s quite complex and sophisticated. CPU scheduling is necessary. Since all types of tasks get stored in the main memory, memory management is required in the operating system. The more difficult challenge is managing all procedures and tasks. Long-term jobs will demand a long wait if it has a high number of jobs.

Examples of Multiprogramming Operating Systems Desktop operating systems, including Windows, macOS, and various Linux distributions. These are contemporary operating systems that make use of a variety of multiprogramming concepts. A system running one of these (or more) operating systems allows a user to run multiple jobs at once. For instance, many games have been developed to utilize just one processor core.  One can send and receive text messages while simultaneously listening to music on a phone running Android, iOS, or another mobile operating system. Application software, including media players, Office, and well-known web browsers. Any modern web browser would allow a user to open as many windows or tabs as necessary in order to visit multiple websites at once.

3. Multi-Processing Operating System Multiprocessing helps in performing parallel computing. There are several processors in a system, and each of them can run multiple processes simultaneously. The system’s throughput will be significantly increased. Multiprocessor operating systems are used in operating systems to boost the performance of multiple CPUs within a single computer system. Multiple CPUs are linked together so that a job can be divided and executed more quickly. When a job is completed, the results from all CPUs are compiled to provide the final output. Jobs were required to share main memory, and they may often share other system resources. Multiple CPUs can be used to run multiple tasks at the same time, for example, UNIX. One of the most extensively used operating systems is the multiprocessing operating system. The following diagram depicts the basic organisation of a typical multiprocessing system.

Advantages of Multiprocessing OS Increased reliability:  Processing tasks can be spread among numerous processors in the multiprocessing system. This promotes reliability because if one processor fails, the task can be passed on to another. Increased throughout:  More work could be done in less time as the number of processors increases. The economy of scale:  Multiprocessor systems are less expensive than single-processor computers because they share peripherals, additional storage devices, and power sources. Disadvantages of Multiprocessing OS Multiprocessing operating systems are more complex and advanced since they manage many CPUs at the same time.

Symmetrical Each processor in a symmetrical multiprocessing system runs the same copy of the OS, makes its own decisions, and collaborates with other processes to keep the system running smoothly. CPU scheduling policies are straightforward. Any new job that is submitted by a user could be assigned to the least burdened processor. It also means that at any given time, all processors are equally taxed. Since the processors share memory along with the I/O bus or data channel, the symmetric multiprocessing OS is sometimes known as a “shared everything” system. The number of processors in this system is normally limited to 16. Characteristics Any processor in this system can run any process or job. Any CPU can start an Input and Output operation in this way. Pros These are fault-tolerant systems. A few processors failing does not bring the whole system to a standstill. Cons It is quite difficult to rationally balance the workload among processors. For handling many processors, specialised synchronisation algorithms are required.

Asymmetrical The processors in an asymmetric system have a master-slave relationship. In addition, one processor may serve as a master or supervisor processor, while the rest are treated as illustrated below. Characteristics In the asymmetric processing system represented above, CPU n1 serves as a supervisor, controlling the subsequent CPUs. Each processor in such a system is assigned a specific task, and the actions of the other processors are overseen by a master processor. Pros Because several processors are available for a single job, the execution of an I/O operation or application software in this type of system may be faster in some instances. Cons The processors are burdened unequally in this form of multiprocessing operating system. One CPU may have a large job queue while another is idle. If a process handling a specific task fails in this system, the entire system will fail.

4. Time-Sharing Operating Systems Time-sharing enables many people, located at various terminals, to use a particular computer system at the same time. Multitasking or Time-Sharing Systems is a logical extension of multiprogramming. Processor’s time is shared among multiple users simultaneously is termed as time-sharing. The main difference between Time-Sharing Systems and Multiprogrammed Batch Systems is that in case of Multiprogrammed batch systems, the objective is to maximize processor use, whereas in Time-Sharing Systems, the objective is to minimize response time. Multiple jobs are implemented by the CPU by switching between them, but the switches occur so frequently. So, the user can receive an immediate response. For an example, in a transaction processing, the processor executes each user program in a short burst or quantum of computation, i.e.; if n users are present, then each user can get a time quantum. Whenever the user submits the command, the response time is in few seconds at most. An operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time. Computer systems which were designed primarily as batch systems have been modified to time-sharing systems.

Advantages of Timesharing operating systems are − It provides the advantage of quick response. This type of operating system avoids duplication of software. It reduces CPU idle time. Disadvantages of Time-sharing operating systems are − Time sharing has problem of reliability. Question of security and integrity of user programs and data can be raised. Problem of data communication occurs.

5. Distributed Operating System These types of operating system is a recent advancement in the world of computer technology and are being widely accepted all over the world and, that too, at a great pace. Various autonomous interconnected computers communicate with each other using a shared communication network. Independent systems possess their own memory unit and CPU. These are referred to as loosely coupled systems or distributed systems . These systems’ processors differ in size and function. The Distributed Operating system is not installed on a single machine, it is divided into parts, and these parts are loaded on different machines. A part of the distributed Operating system is installed on each machine to make their communication possible. Distributed Operating systems are much more complex, large, and sophisticated than Network operating systems because they also have to take care of varying networking protocols. The major benefit of working with these types of the operating system is that it is always possible that one user can access the files or software which are not actually present on his system but some other system connected within this network i.e., remote access is enabled within the devices connected in that network.

Advantages of Distributed Operating System Failure of one will not affect the other network communication, as all systems are independent of each other. Electronic mail increases the data exchange speed. Since resources are being shared, computation is highly fast and durable. Load on host computer reduces. These systems are easily scalable as many systems can be easily added to the network. Delay in data processing reduces. Disadvantages of Distributed Operating System Failure of the main network will stop the entire communication. To establish distributed systems the language is used not well-defined yet. These types of systems are not readily available as they are very expensive. Not only that the underlying software is highly complex and not understood well yet.

Examples of Distributed Operating Systems are LOCUS, etc. Issues With Distributed Operating Systems Networking causes delays in the transfer of data between nodes of a distributed system. Such delays may lead to an inconsistent view of data located in different nodes, and make it difficult to know the chronological order in which events occurred in the system. Control functions like scheduling, resource allocation, and deadlock detection have to be performed in several nodes to achieve computation speedup and provide reliable operation when computers or networking components fail. Messages exchanged by processes present in different nodes may travel over public networks and pass through computer systems that are not controlled by the distributed operating system. An intruder may exploit this feature to tamper with messages, or create fake messages to fool the authentication procedure and masquerade as a user of the system.

6. Network Operating System These systems run on a server and provide the capability to manage data, users, groups, security, applications, and other networking functions. These types of operating systems allow shared access to files, printers, security, applications, and other networking functions over a small private network. One more important aspect of Network Operating Systems is that all the users are well aware of the underlying configuration, of all other users within the network, their individual connections, etc. and that’s why these computers are popularly known as tightly coupled systems . The OS specializes in network devices such as a router, switch, or firewall. The OS manages these network resources. The OS supports workstations, Personal Computers (PCs), older terminals connected on a Local Area Network (LAN). Examples of Network OSs are Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, etc. The OS thus facilitates connecting and communicating various autonomous computers over a network. Its purpose is to support workstations, share databases, sharing of application, and sharing of file and printer access amongst computers in a network.

Advantages of Network Operating System Highly stable centralized servers. Security concerns are handled through servers. New technologies and hardware up-gradation are easily integrated into the system. Server access is possible remotely from different locations and types of systems. Disadvantages of Network Operating System Servers are costly. User has to depend on a central location for most operations. Maintenance and updates are required regularly.

7. Real-Time Operating System These types of OSs serve real-time systems. The time interval required to process and respond to inputs is very small. This time interval is called response time . Real-time systems are used when there are time requirements that are very strict like missile systems, air traffic control systems, robots, etc. All real time operating systems are designed to execute their task within a particular time interval, and thus they have to be fast enough to be up to their deadline. Time constraints related with real-time systems simply means that time interval allotted for the response of the ongoing program. This deadline means that the task should be completed within this time interval. Hence, they are used in air traffic control systems. Correctness of result is also a crucial feature of real time systems and they not only need to produce correct result but that too needs to be produced in the given time limit and deadline else even if correct result is delivered but after deadline it’s considered a failure of the OS. Real-time systems are concurrent that means it can respond to a several number of processes at a time. There are several different tasks going on within the system and it responds accordingly to every task in short intervals. This makes the real-time systems concurrent systems. Even if the load is heavy on a system like it has to respond to multiple processes then also it must meet every deadline . It still responds to every query within time this provides stability to the Real time OS. There are several different tasks going on within the system and it responds accordingly to every task in short intervals. This makes the real-time systems concurrent systems. Types of Real-Time Operating Systems Hard Real-Time Systems: Hard Real-Time OSs are meant for applications where time constraints are very strict and even the shortest possible delay is not acceptable. These systems are built for saving life like automatic parachutes or airbags which are required to be readily available in case of an accident. Virtual memory is rarely found in these systems. Soft Real-Time Systems: These OSs are for applications where time-constraint is less strict.

The Application of a Real-Time system exists in the case of military applications, if you want to drop a missile, then the missile is supposed to be dropped with a certain precision.

Advantages of RTOS Maximum Consumption: Maximum utilization of devices and systems, thus more output from all the resources. Task Shifting: The time assigned for shifting tasks in these systems is very less. For example, in older systems, it takes about 10 microseconds in shifting from one task to another, and in the latest systems, it takes 3 microseconds. Focus on Application: Focus on running applications and less importance on applications that are in the queue. Real-time operating system in the embedded system: Since the size of programs is small, RTOS can also be used in embedded systems like in transport and others. Error Free: These types of systems are error-free. Memory Allocation: Memory allocation is best managed in these types of systems.

Disadvantages of RTOS Limited Tasks: Very few tasks run at the same time and their concentration is very less on a few applications to avoid errors. Use heavy system resources: Sometimes the system resources are not so good and they are expensive as well. Complex Algorithms: The algorithms are very complex and difficult for the designer to write on. Device driver and interrupt signals: It needs specific device drivers and interrupts signal to respond earliest to interrupts. Thread Priority: It is not good to set thread priority as these systems are very less prone to switching tasks. Examples of Real-Time Operating Systems are Scientific experiments, medical imaging systems, industrial control systems, weapon systems, robots, air traffic control systems, etc.

Conclusion Operating systems come in various types, each used for specific needs. Whether it’s managing large batches of jobs, enabling multiple users to work simultaneously, coordinating networked computers, or ensuring timely execution in critical systems. Understanding these types helps in choosing the right operating system for the right job, ensuring efficiency and effectiveness.

Operating Systems Structures The operating system can be implemented with the help of various structures. The structure of the OS depends mainly on how the various standard components of the operating system are interconnected and melded into the kernel. A design known as an operating system enables user application programs to communicate with the machine’s hardware. Given its complex design and need to be easy to use and modify, the operating system should be constructed with the utmost care. A straightforward way to do this is to supernaturally develop the operating system. These parts must each have unique inputs, outputs, and functionalities. This article discusses a variety of operating system implementation structures, including those listed below, as well as how and why they function. Additionally, the operating system structure is defined.

What is a System Structure for an Operating System? A system structure for an operating system is like the blueprint of how an OS is organized and how its different parts interact with each other. 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.

Types of Operating Systems Structures Depending on this, we have the following structures in the operating system: Simple/Monolithic Structure Micro-Kernel Structure Hybrid-Kernel Structure Exo-Kernel Structure Layered Structure Modular Structure Virtual Machines

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. 

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.

Exo-Kernel Structure Exokernel is an operating system developed at MIT to provide application-level management of hardware resources. By separating resource management from protection, the exokernel architecture aims to enable application-specific customization. Due to its limited operability, exokernel size typically tends to be minimal. The OS will always have an impact on the functionality, performance, and scope of the apps that are developed on it because it sits in between the software and the hardware. The exokernel operating system makes an attempt to address this problem by rejecting the notion that an operating system must provide abstractions upon which to base applications. The objective is to limit developers use of abstractions as little as possible while still giving them freedom.

Advantages of Exo-Kernel Support for improved application control. Separates management from security. It improves the performance of the application. A more efficient use of hardware resources is made possible by accurate resource allocation and revocation. It is simpler to test and create new operating systems. Each user-space program is allowed to use a custom memory management system. Disadvantages of Exo-Kernel A decline in consistency. Exokernel interfaces have a complex architecture.

Layered Structure An OS can be broken into pieces and retain much more control over the system. In this structure, the OS is broken into a number of layers (levels). The bottom layer (layer 0) is the hardware, and the topmost layer (layer N) is the user interface. These layers are so designed that each layer uses the functions of the lower-level layers. This simplifies the debugging process, if lower-level layers are debugged and an error occurs during debugging, then the error must be on that layer only, as the lower-level layers have already been debugged.  The main disadvantage of this structure is that at each layer, the data needs to be modified and passed on which adds overhead to the system. Moreover, careful planning of the layers is necessary, as a layer can use only lower-level layers.  UNIX  is an example of this structure. 

Advantages of Layered Structure Layering makes it easier to enhance the operating system, as the implementation of a layer can be changed easily without affecting the other layers. It is very easy to perform debugging and system verification. Disadvantages of Layered Structure In this structure, the application’s performance is degraded as compared to simple structure.  It requires careful planning for designing the layers, as the higher layers use the functionalities of only the lower layers.

Modular Structure It is considered as the best approach for an OS. It involves designing of a modular kernel. The kernel has only a set of core components and other services are added as dynamically loadable modules to the kernel either during runtime or boot time. It resembles layered structure due to the fact that each kernel has defined and protected interfaces, but it is more flexible than a layered structure as a module can call any other module. For example Solaris OS is organized as shown in the figure.

VMs (Virtual Machines) Based on our needs, a virtual machine abstracts the hardware of our personal computer, including the CPU, disc drives,  RAM , and NIC (Network Interface Card), into a variety of different execution contexts, giving us the impression that each execution environment is a different computer. An illustration of it is a virtual box. An operating system enables us to run multiple processes concurrently while making it appear as though each one is using a different processor and virtual memory by using  CPU scheduling  and virtual memory techniques. The fundamental issue with the virtual machine technique is disc systems. Let’s say the physical machine only has three disc drives, but it needs to host seven virtual machines. The program that creates virtual machines would need a significant amount of disc space in order to provide virtual memory and spooling, so it should be clear that it is impossible to assign a disc drive to every virtual machine. The answer is to make virtual discs available.

Conclusion Operating systems  can be built using various structures, each affecting how components interact within the  kernel . These structures include Simple/Monolithic, Micro-Kernel, Hybrid-Kernel, Exo-Kernel, Layered, Modular, and Virtual Machines. The structure chosen influences the ease of use, modification, and overall efficiency. By breaking down the OS into manageable parts, developers can create more adaptable and robust systems. Understanding these structures helps in designing operating systems that meet specific needs while maintaining functionality and performance.