Operating system notes 4th-semester CSE- AKTU

Operating system notes 4th-semester CSE- AKTU

Define the Operating system and its functions?

An operating system is the core set of software on a device that keeps everything together.
Operating systems communicate with the device’s hardware.
They handle everything from your keyboard and mice to the Wi-Fi radio, storage devices, and display.
In other words, an operating system handles input and output devices. Operating systems use device drivers written by hardware creators to communicate with their devices.

Functions of Operating System:-

· Managing Resources: Programs that manage the resources of a computer such as a printer, mouse, keyboard, memory, and monitor.
· Providing User Interface: Graphical user interface (GUI) is something developers create to allow users to easily click something without having to understand how or why they clicked an icon. Each icon on a desktop represents code linking to the spot in which the icon represents. It makes it very easy for uneducated users.
· Running Applications is the ability to run an application such as a Word processor by locating it and loading it into the primary memory. Most operating systems can multitask by running many applications at once.
· Support for built-in Utility Programs: This is the program that finds and fixes errors in the operating system.
· Control Computer Hardware: All programs that need computer hardware must go through the operating system which can be accessed through the BIOS (basic input-output system) or the device drivers.

Classification of Operating systems:

Multiuser Operating System: In a multiuser OS, more than one user can use the same system at the same time through the multi-I/O terminal or through the network.
For example windows, Linux, Mac, etc.
A multiuser OS uses timesharing to support multiple users.
Multiprocessing Operating System: A multiprocessing OS can support the execution of multiple processes at the same time. It uses multiple CPUs. It is expensive in cost however, the processing speed will be faster. It is complex in its execution. An operating system like Unix, 64-bit edition of windows, server edition of windows, etc. is multiprocessing.
Multiprogramming Operating: In a multiprogramming OS more than one program can be used at the same time. It may or may not be multiprocessing. In a single CPU system, multiple programs are executed one after another by dividing the CPU into small-time slices.
example: Windows, Mac, Linux, etc.
Multitasking Operating System: In a multitasking system more than one task can be performed at the same time but they are executed one after another through a single CPU by time-sharing.
For example Windows, Linux, Mac, Unix, etc.
Multitasking OS are of two types:
a) Preemptive multitasking
b) Co-operative multitasking
In the pre-empetive multitasking, the OS allows CPU times to slice to each program. After each time slice, the CPU executes another task. Example: Windows XP
In co-operative multitasking, a task can control the CPU as long as it requires. However, it will free the CPU to execute another program if it doesn’t require a CPU. Exaample: windows 3.x, multifinder,etc.
Multithreading Operating System: A program in execution is known as a process. A process can be further divided into multiple sub-processes. These sub-processers are known as threads. A multi-threading OS can divide processes into threads and execute those threads. This increases operating speed but also increases complexity. For example Unix, Server edition of Linux, and windows.
Batch Processing: A batch processing is a group of a processing systems in which all the required input of all the processing tasks is provided initially. The result of all the tasks is provided after the completion of all the processing. Its main functions are:
1. Multiple tasks are processed
2. User cannot provide input in between the processing
3. It is appropriate only when all the inputs are known in advance
4. It requires large memory
5. CPU ideal time is less
6. Printer is the appropriate output device
7. It is old processing technique and rarely used at present

Define Operating System Structure

Layered Structure: 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 layers that are above and below it. The lowest layer handles the hardware and the uppermost layer deals with the user applications.
Details about the six layers are:
Details about the six layers are:

Details about the six layers are:

Hardware

This layer interacts with the system hardware and coordinates with all the peripheral devices used such as a printer, mouse, keyboard, scanner, etc. The hardware layer is the lowest layer in the layered operating system architecture.

CPU Scheduling

This layer deals with scheduling the processes for the CPU. There are many scheduling queues that are used to handle processes. When the processes enter the system, they are put into the job queue. The processes that are ready to execute in the main memory are kept in the ready queue.

Memory Management

Memory management deals with memory and the moving of processes from disk to primary memory for execution and back again. This is handled by the third layer of the operating system.

Process Management

This layer is responsible for managing the processes i.e assigning the processor to a process at a time. This is known as process scheduling. The different algorithms used for process scheduling are FCFS (first come first served), SJF (shortest job first), priority scheduling, round-robin scheduling, etc.

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.

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.
Define Operating System Component:
 Process Management
 Memory Management
 Secondary Storage Management
I/O System
File Management
Protection System
Networking
Command Interpreter System

Define Operating System Services

User interface -Almost all operating systems have a user interface (UI), Varies between Command-Line (CLI), Graphics User Interface (GUI), Batch
Program execution -The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error)
I/O operations -A running program may require I/O, which may involve a file or an I/O device
File-system manipulation -The file system is of particular interest. Obviously, programs need to read and write files and directories, create and delete them, search them, list file Information, permission management.
Communications –Processes may exchange information, on the same computer or between computers over a network
Communications may be via shared memory or through message passing (packets moved by the OS)
Error detection –OS needs to be constantly aware of possible errors

May occur in the CPU and memory hardware, in I/O devices, in the user program

For each type of error, OS should take the appropriate action to ensure correct and consistent computing


Debugging facilities can greatly enhance the user’s and programmer’s abilities to efficiently use the system.

Define Reentrant Kernels:

 A re-entrant kernel enables processes (or, to be more precise, their corresponding kernel threads) to give away the CPU while in kernel mode. They do not hinder other processes from also entering kernel mode.

  • In the case of single-processor systems, multiple may be scheduled together
  • An example of this case is a disk read.  User program issues a system call for a disk read the scheduler will assign the CPU to another process (kernel thread) until an interrupt from the disk controller indicates that the data is available and our thread can be resumed. This process can still access I/O (which needs kernel functions), like user input. The system stays responsive and CPU time waste due to IO wait is reduced.
  • In a nonreentrant kernel, the original function (whatever requested data) would be blocked until the disk read was complete.

Define Monolithic operating System: 

The monolithic operating system is a very basic operating system in which file management, memory management, device management, and process management are directly controlled within the kernel. All these components like file management, memory management, etc. are located within the kernel.Monolithic

Define Microkernel System

A microkernel is a piece of software or even code that contains the near-minimum amount of functions and features required to implement an operating system.
It provides a minimal number of mechanisms, just enough to run the most basic functions of a system, in order to maximize the implementation flexibility so it allows for other parts of the OS to be implemented efficiently since it does not impose a lot of policies.

Leave a Comment

error: Content is protected !!