0% found this document useful (0 votes)
29 views7 pages

Operating System Unit 1

An Operating System (OS) is system software that manages computer resources and acts as an interface between software and hardware. It performs essential functions such as resource management, process management, memory management, security, and file management, and comes in various types including batch, multiprogramming, interactive, time-sharing, and real-time operating systems. The structure of an OS can be monolithic, micro-kernel, or layered, each with its own advantages and disadvantages.

Uploaded by

Shraddha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views7 pages

Operating System Unit 1

An Operating System (OS) is system software that manages computer resources and acts as an interface between software and hardware. It performs essential functions such as resource management, process management, memory management, security, and file management, and comes in various types including batch, multiprogramming, interactive, time-sharing, and real-time operating systems. The structure of an OS can be monolithic, micro-kernel, or layered, each with its own advantages and disadvantages.

Uploaded by

Shraddha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIT- I

Operating System
An Operating System is a System software that manages all the resources of the computing device.
Acts as an interface between the software and different parts of the computer or the computer hardware.
Manages the overall resources and operations of the computer.
Controls and monitors the execution of all other programs that reside in the computer, which also includes
application programs and other system software of the computer.

Functions of the Operating System


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.
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.
Memory Management: The operating system manages the computer’s primary memory and provides mechanisms
for optimizing memory usage.
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.
Job Accounting: It keeps track of time and resources used by various jobs or users.
File Management: The operating system is responsible for organizing and managing the file system, including the
creation, deletion, and manipulation of files and directories.
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.
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.
User Interface: 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.

Types of Operating System


1. Batch Operating System
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
Multiple users can share the batch systems.
The idle time for the batch system is very little.
It is easy to manage large work repeatedly in batch systems.
Disadvantages of Batch Operating System
CPU is not used efficiently. When the current process is doing IO, the CPU is free and could be utilized by other
processes waiting.
The other jobs will have to wait for an unknown time if any job fails.
In a batch operating system, average response time increases as all processes are processed one by one.

2. Multi-Programming Operating System


Multiprogramming Operating Systems can be simply illustrated as more than one program is present in the main
memory and any one of them can be kept in execution. This is used for better utilization of resources.
Advantages of, Multi-Programming Operating System
CPU is better utilized, and the overall performance of the system improves.
It helps in reducing the response time

3.Interactive Operating System?


An interactive operative system is an operating system that allows the execution of interactive programs. All PC
operating systems are interactive operating systems only.
An interactive operating system gives permission to the user to interact directly with the computer. In an Interactive
operating system, the user enters some command into the system and the work of the system is to execute it.
Programs that allow users to enter some data or commands are known as Interactive Operating Systems. Some
commonly used examples of Interactive operating systems include Word Processors and Spreadsheet Applications.

4. Time Sharing Operating System


A time-shared operating system uses CPU scheduling and multi-programming to provide each user with a small
portion of a shared computer at once. Each user has at least one separate program in memory. A program is loaded
into memory and executes, it performs a short period of time either before completion or to complete I/O. This short
period of time during which the user gets the attention of the CPU is known as time slice, time slot, or quantum. It is
typically of the order of 10 to 100 milliseconds. Time-shared operating systems are more complex than
multiprogrammed operating systems. In both, multiple jobs must be kept in memory simultaneously, so the system
must have memory management and security. To achieve a good response time, jobs may have to swap in and out of
disk from the main memory which now serves as a backing store for the main memory. A common method to achieve
this goal is virtual memory, a technique that allows the execution of a job that may not be completely in memory.
Advantages
Each task gets an equal opportunity.
Fewer chances of duplication of software.
CPU idle time can be reduced.
Disadvantages
Reliability problem.
One must have to take of the security and integrity of user programs and data.
Data communication problem.

5. Real Time Operating System (RTOS)


A real-time operating system (RTOS) is a special kind of operating system designed to handle tasks that need to be
completed quickly and on time. Unlike general-purpose operating systems (GPOS), which are good at multitasking and
user interaction, RTOS focuses on doing things in real time
Types of Real-Time Operating System
The real-time operating systems can be of 3 types –
a.Hard Real-Time Operating System
These operating systems guarantee that critical tasks are completed within a range of time. For example, a robot is
hired to weld a car body. If the robot welds too early or too late, the car cannot be sold, so it is a hard real-time
system that requires complete car welding by the robot hardly on time., scientific experiments, medical imaging
systems, industrial control systems, weapon systems, robots, air traffic control systems, etc.
b. Soft Real-Time Operating System
This operating system provides some relaxation in the time limit. For example – Multimedia systems, digital audio
systems, etc. Explicit, programmer-defined, and controlled processes are encountered in real-time systems. A
separate process is changed by handling a single external event. The process is activated upon the occurrence of the
related event signaled by an interrupt.
c. Firm Real-time Operating System
RTOS of this type have to follow deadlines as well. In spite of its small impact, missing a deadline can have unintended
consequences, including a reduction in the quality of the product. Example: Multimedia applications.

Multi Processing Operating System


Most computer systems are single processor systems i.e., they only have one processor. However, multiprocessor or
parallel systems are increasing in importance nowadays. These systems have multiple processors working in parallel that
share the computer clock, memory, bus, peripheral devices etc. An image demonstrating the multiprocessor
architecture
Types of Multiprocessors
There are mainly two types of multiprocessors i.e. symmetric and asymmetric multiprocessors. Details about them are
as follows ?
Symmetric Multiprocessors
In these types of systems, each processor contains a similar copy of the operating system and they all communicate with
each other. All the processors are in a peer to peer relationship i.e. no master - slave relationship exists between them.
An example of the symmetric multiprocessing system is the Encore version of Unix for the Multimax Computer.
Asymmetric Multiprocessors
In asymmetric systems, each processor is given a predefined task. There is a master processor that gives instruction to
all the other processors. Asymmetric multiprocessor system contains a master slave relationship.
Asymmetric multiprocessor was the only type of multiprocessor available before symmetric multiprocessors were
created. Now also, this is the cheaper option.
An operating system is a structure that allows the user application programs to interact with the system hardware. Since
the operating system is such a complex structure, it should be created with utmost care so it can be used and modified
easily. 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
Multithreading Operating Syste
Thread
A thread is also called a lightweight process. Threads provide a way to improve application performance through
parallelism. Threads represent a software approach to improving performance of operating system by reducing the
overhead thread is equivalent to a classical process.
Multithreading Models
Some operating system provide a combined user level thread and Kernel level thread facility. Solaris is a good example
of this combined approach. In a combined system, multiple threads within the same application can run in parallel on
multiple processors and a blocking system call
Need not block the entire process. Multithreading models are three types.
Many to Many Model
The many-to-many model multiplexes any number of user threads onto an equal or smaller number of kernel threads.
The following diagram shows the many-to-many threading model where 6 user level threads are multiplexing with 6
kernel level threads. In this model, developers can create as many user threads as necessary and the corresponding
Kernel threads can run in parallel on a multiprocessor machine. This model provides the best accuracy on concurrency
and when a thread performs a blocking system call, the kernel can schedule another thread for execution.
Many to One Model
Many-to-one model maps many user level threads to one Kernel-level thread. Thread management is done in user space
by the thread library. When thread makes a blocking system call, the entire process will be blocked. Only one thread can
access the Kernel at a time, so multiple threads are unable to run in parallel on multiprocessors.
If the user-level thread libraries are implemented in the operating system in such a way that the system does not
support them, then the Kernel threads use the many-to-one relationship modes.
One to One Model
There is one-to-one relationship of user-level thread to the kernel-level thread. This model provides more concurrency
than the many-to-one model. It also allows another thread to run when a thread makes a blocking system call. It
supports multiple threads to execute in parallel on microprocessors.
Disadvantage of this model is that creating user thread requires the corresponding Kernel thread. OS/2, windows NT and
windows 2000 use one to one relationship model.
Multi-User Operating System
An operating system is software that acts as an interface between the user and the computer hardware which does
multiple functions such as memory management; file management and processor management. The operating system
should have to meet the requirements of all its users in a balanced way so that if any problem would arise with a user,
it does not affect any other user in the chain.
In a multiuser operating system, multiple numbers of users can access different resources of a computer at the same
time. The access is provided using a network that consists of various personal computers attached to a mainframe
computer system. A multi-user operating system allows the permission of multiple users for accessing a single
machine at a time. The various personal computers can send and receive information to the mainframe computer
system. Thus, the mainframe computer acts as the server and other personal computers act as clients for that server.

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 merge into the
kernel. This article discusses a variety of operating system implementation structures and explains how and why they
function
Monolithic Structure
A monolithic structure is a type of operating system architecture where the entire operating system is implemented
as a single large process in kernel mode. Essential operating system services, such as process management, memory
management, file systems, and device drivers, are combined into a single code block.
Advanatages of Monolithic Structure
Performance of Monolithic structure is fast as since everything runs in a single block, therefore communication
between components is quick.
It is easier to build because all parts are in one code block.
Disadvanatges of Monolithic Architecture
It is hard to maintain as a small error can affect entire system.
There are also some security risks in the Monolithic architecture.
Micro-Kernel Structure
Micro-Kernel 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.

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.

Reentrant Kernel: In kernel mode, a reentrant kernel allows processes (or, more precisely, their corresponding kernel
threads) to give up the CPU. They have no effect on other processes entering kernel mode. Multiple processor
systems may be scheduled together in the case of single-processor systems.

You might also like