Operating System


1.]Operating System Definition:-

There is a body of software, in fact, that is responsible for making it easy to run programs (even allowing you to seemingly run many at the same time), allowing programs to share a memory, enabling programs to interact with devices, and other fun stuff like that. That body of software is called the operating system (OS), as it makes sure the system operates correctly and efficiently in an easy-to-use manner.

2.]Functionalities of OS:-

The primary concerns of an OS during its operation are the execution of programs, use of resources, and prevention of interference with programs and resources. Accordingly, its  principal functions are:

a)Memory and Data Management:-All operating systems provide methods for controlling data in the memory. When a job has to be performed, the operating system should allocate the memory for loading that job into the memory.

b)Program Management:- The OS initiates programs, arranges their execution on the CPU, and terminates them when they complete their execution. Since many programs exist in the system at any time, the OS performs a function called scheduling to select a program for execution. 

c)Resource Management:- The OS allocates resources like memory and I/O devices when a program needs them. When the program terminates, it deals-locates these resources and allocates them to other programs that need them.

d)Communication:-An operating system should support methods in such a manner that the various computer systems can communicate with one another for the exchange of data.

e)Time sharing:- Time-sharing enables several people to use the same computer simultaneously. A few operating systems support time-sharing features.

f)Security:- In a multi-user environment, security should be provided by the operating system. This security prevents one user from interfering with the work done or being done by another user. It also prevents unauthorized personnel from using the computer system.

g)Scheduling:- A scheduler is the heart of all multi-user operating systems. This program enables many people to use the computer simultaneously. The scheduler assigns the CPU time slice to the ready process. After that time slice, the process is stored in the wait queue, the next process in the ready queue is picked, and the CPU pays attention to it.

h)Swapping:- When several users are working simultaneously, their processes are stored in the memory. When the memory is full and a new process has to be activated, the scheduler takes the current process in the memory and copies it to the hard disk. Next, the scheduler starts a new process in the space freed in the memory. This process is known as swapping.

3.]Types of OS:-

a)Multiprocessor OS:- Multiprocessor operating system is an operating system that uses multiple processors to improve performance. This operating system is commonly found on computer systems with more than one CPU. Multiprocessor systems improve system performance by allowing the execution of tasks on multiple processors simultaneously. Overall reduces the time it takes to complete specific tasks.


b)Multi-programming OS:-The operating system which can run multiple processes on a single processor is called a multiprogramming operating system. Different programs want to get executed. So these programs are kept in the ready queue. And are assigned to the CPU one by one. If one process gets blocked then other processes from the ready queue are assigned to the CPU. The aim of this is optimal resource utilization and more CPU utilization. In the below figure, different processes are there in RAM(main memory). Some processes are waiting for the CPU, and process 2 (which was previously executed) is now doing I/O operations. So CPU is shifted to execute process 1.

c)Distributed OS:- A distributed operating system is an operating system that is designed to operate on a network of computers. Distributed systems are usually used to distribute software applications and data. Distributed systems are also used to manage the resources of multiple computers. Users could be at different sites. Multiple computers are connected via a single communication channel. Every system has its own processor and memory. Resources like disk, computer, CPU, network interface, nodes, etc are shared among different computers at different locations. It increases data availability in the entire system.


d)Multitasking OS:-Multi-tasking operating systems are designed to enable multiple applications to run simultaneously. Multi-tasking operating systems allow multiple users to work on the same document or application simultaneously. For example, a user running antivirus software, searching the internet, and playing a song simultaneously. Then the user is using a multitasking OS.


e)Client/Server Network OS:-Client/server network operating systems are those networks that contain two types of nodes, the servers, and clients. The servers host the applications or services for users while clients use these applications. In a client/server system, both the server and client computers must have certain software installed to connect to each other securely over a network connection.


f)Batch OS:-There are different users and each user prepares their work in a standalone device such as punch cards in batch operating systems and sends them to a computer operator. The various systems split and distribute similar tasks in batches to facilitate computing and faster responses. A single operator takes similar types of jobs that share similar needs and requirements, then groups them into various batches. Similar kinds of jobs share similar needs and requirements. These types of operating systems are not used nowadays.


g)Time-Sharing OS:- A time-sharing operating system is an application that provides a shared user interface with multiple users logged in simultaneously. It allows multiple users to access the same resources, such as files and applications, as long as they are logged in simultaneously. The time-sharing OS is the latest advancement in the computer science world; it is being accepted worldwide, also at an increasing rate.