0% found this document useful (0 votes)
19 views91 pages

OS Unit 1

Uploaded by

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

OS Unit 1

Uploaded by

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

Unit 1: Introduction to Operating

System
 Introduction: Operating System.
 Classification of Operating systems: Batch, Interactive, Time
sharing.
 Real Time System, Multiuser Systems, Multiprocessor Systems,
Multi process Systems, Multithreaded Systems.
 Operating System: Structure-Layered structure.
 System Components.
 Operating system Services.

2
?What is an Operating System
• Computer System = Hardware + Software
• Software = Application Software + System Software(OS)
• An Operating System is a system Software that acts as an
intermediary/interface between a user of a computer and the computer
hardware.
• Operating system goals:
 Execute user programs and make solving user problems easier
 Make the computer system convenient to use
 Use the computer hardware in an efficient manner
 The operating system operates either in kernel mode or user mode. Compilers and
editors run in user mode, whereas operating system code runs in kernel mode.
3
?What is an Operating System

4
System Software vs Application Software

5
The Structure of Computer Systems
 Accessing computer resources is divided into layers.
 Each layer is isolated and only interacts directly with the layer below or
above it.
 If we install a new hardware device
 No need to change anything about the user/applications.
 However, you do need to make changes to the operating system.
 You need to install the device drivers that the operating system will
use to control the new device.
 If we install a new software application
 No need to make any changes to your hardware.
 But we need to make sure the application is supported by the operating
system
 user will need to learn how to use the new application.
 If we change the operating system
 Need to make sure that both applications and hardware will compatible
6 with the new operating system.
Kernel
 Kernel is a software code that reside in central core of OS.
It has complete control over system.
 When operation system boots, kernel is first part of OS to
load in main memory.
 Kernel remains in main memory for entire duration of
computer session. The kernel code is usually loaded in to
protected area of memory.
 Kernel performs it’s task like executing processes and
handling interrupts in kernel space.
 User performs it’s task in user area of memory.
 This memory separation is made in order to prevent user
data and kernel data from interfering with each other.
 Kernel does not interact directly with user, but it interacts
7 using SHELL and other programs and hardware.
…Kernel cont
 Kernel includes:-
1. Scheduler: It allocates the Kernel’s processing time to various processes.
2. Supervisor: It grants permission to use computer system resources to each
process.
3. Interrupt handler : It handles all requests from the various hardware
devices which compete for kernel services.
4. Memory manager : allocates space in memory for all users of kernel
service.
 kernel provides services for process management, file management, I/O
management, memory management.
 System calls are used to provide these type of services.

8
System Call
 System call is the programmatic way in which a computer
program/user application requests a service from the
kernel of the operating system on which it is executed.
 Application program is just a user-process. Due to
security reasons , user applications are not given access to
privileged resources(the ones controlled by OS).
 When they need to do any I/O or have some more
memory or spawn a process or wait for
signal/interrupt, it requests operating system to facilitate
all these. This request is made through System Call.
 System calls are also called software-interrupts.

9
Types of System Call

10
Interrupt
Interrupts are the events that can be caused by hardware or software that signals the processor to
complete the ongoing instruction and immediately handle the Interrupt Service Routine (ISR)
which contains the information for dealing with the interrupt.
Hardware Interrupts:
When an external device wants the attention of the operating system to service a certain request, it raises
an interrupt which is called a hardware interrupt. All the external devices are connected to a
single Interrupt Request Line and the Interrupt Request Line is used for the interrupts.

Software Interrupts:
Software interrupts generally take place when there are exceptions in the process or by using special
instructions that cause the interrupts. While having the system calls in our system, we generally have the
software interrupt. Division by zero throws an exception which causes the software interrupt

11
Interrupt Vs System Call

12
History of Operating System
 The First Generation (1940's to early 1950's)
 No Operating System
 All programming was done in absolute machine language, often by wiring up plug-boards to control
the machine’s basic functions.
 The Second Generation (1955-1965)
 First operating system was introduced in the early 1950's.It was called GMOS
 Created by General Motors for IBM's machine the 701.
 Single-stream batch processing systems
 The Third Generation (1965-1980)
 Introduction of multiprogramming
 Development of Minicomputer
 The Fourth Generation (1980-Present Day)
 Development of PCs
 Birth of Windows/MaC OS
13
Types of Operating Systems
1. Batch Operating System
2. Multiprogramming Operating System
3. Time-Sharing OS
4. Multiprocessing OS
5. Distributed OS
6. Network OS
7. Real Time OS
8. Multitasking OS
14
Batch Operating System .1
• In the 1970s, Batch processing was very popular. In this technique, similar types of jobs were batched together and
executed in time. People were used to having a single computer which was called a mainframe.
• In Batch operating system, access is given to more than one person; they submit their respective jobs to the system for
the execution.
• The system put all of the jobs in a queue on the basis of first come first serve and then executes the jobs one by one.
• The users collect their respective output when all the jobs get executed.

15
.. Batch Operating System cont .1
Advantages of Batch Operating System:
 Processors of the batch systems know how long the job would be when it is in queue
 Multiple users can share the batch systems
 The idle time for the batch system is very less
 It is easy to manage large work repeatedly in batch systems
Disadvantages of Batch Operating System:
 The computer operators should be well known with batch systems
 Batch systems are hard to debug
 It is sometimes costly
 The other jobs will have to wait for an unknown time if any job fails

16
:Multiprogramming Operating System .2
• Multiprogramming is an extension to batch processing where the CPU is always kept busy.
• Each process needs two types of system time: CPU time and IO time.
• In a multiprogramming environment, when a process does its I/O, The CPU can start the execution of
other processes. Therefore, multiprogramming improves the efficiency of the system.

17
Advantages of Multi Programming OS:
 Throughput of the system is increased as the CPU always has one program to
execute.
 Response time can also be reduced.

Disadvantages of Multi Programming OS:


 Multiprogramming systems provide an environment in which various systems
resources are used efficiently, but they do not provide any user interaction with the
computer system.

18
Multi-Tasking OS .3
• The multitasking operating system is a logical extension of a multiprogramming system
that enables multiple programs simultaneously.
• It allows a user to perform more than one computer task at the same time.

19
Multi-Tasking OS .3
• Advantages of Multi-Tasking OS:
• This operating system is more suited to supporting multiple users simultaneously.
• The multitasking operating systems have well-defined memory management.

• Disadvantages of Multi-Tasking OS:


• The multiple processors are busier at the same time to complete any task in a
multitasking environment, so the CPU generates more heat.

20
Time-Sharing Operating Systems .4
• Time Sharing operating system, computer resources are allocated in a time-dependent fashion to several
programs simultaneously.
• It helps to provide a large number of user's direct access to the main computer.
• In time-sharing, the CPU is switched among multiple programs given by different users on a scheduled
basis.
• A time-sharing operating system allows many users to be served simultaneously, so sophisticated CPU
scheduling schemes and Input/output management are required.
• Time-sharing operating systems are very difficult and expensive to build.

21
..Time-Sharing Operating Systems cont .4
• Advantages of Time-Sharing OS:
• The time-sharing operating system provides effective utilization and sharing of
resources.
• This system reduces CPU idle and response time.
• Disadvantages of Time-Sharing OS:
• Data transmission rates are very high in comparison to other methods.
• Security and integrity of user programs loaded in memory and data need to be
maintained as many users access the system at the same time.

22
Multi Tasking Vs Time-Sharing Operating Systems
Parameter Multi-tasking Operating System Time-sharing Operating System
The operating system that can run more Time-sharing Operating systems are the
Definition than one task at a time is called a further extension of the multi-programming
.multitasking operating system .system with the time-sharing concepts
The processor time is shared between The processor time is shared between multiple
different tasks based on the time-sharing users by integrating multi-programming with
How it works
.concept .multi-tasking
It is a type of time-sharing Operating It is an operating system that runs more than
Nature
System .one program in a single CPU parallel
It is less efficient than the time-sharing
Efficiency It is comparatively more efficient
operating system
It requires large storage to work on a time- Integration of multi-programming reduces the
Memory Storage
.sharing basis .storage need but still, it is high
The cost of a multitasking operating system
Cost is lesser than a time-sharing operating .It is comparatively expensive
.system
It can be further developed into a time- It can further be developed into a real-time
Next stage
.sharing operating system .sharing operating system

23
Multiprocessor operating systems .5
• In Multiprocessing, Parallel computing is achieved. There are more than one processors
present in the system which can execute more than one process at the same time. This
will increase the throughput of the system.

24
Multiprocessor operating systems .5
– Such systems have two or more processors in close communication, sharing the computer bus
and sometimes the clock, memory, and peripheral devices. Advantages:
– Increased throughput: By increasing the number of processors, we expect to get more work done
in less time.
– Economy of scale: Save more money than multiple single processor system.
– Increased reliability: The failure of one processor will not halt the system, only slow it down.
Disadvantages of Multiprocessor OS :
•Multiprocessing operating system is more complex and sophisticated as it takes care of multiple CPUs
simultaneously.

25
Multiprocessor operating systems .5

The multiple-processor systems in use today are of two types.

i. symmetric multiprocessing (SMP): each processor runs an identical copy of the


O.S. and these copies communicate with one another as needed (no master slave
relationship exists between processors).
ii. Asymmetric multiprocessing (ASMP): each processor is assigned a specific task. A
master processor controls the system; the other processors either look to the master
for instruction or have predefined tasks.

26
Network Operating System .6
• An Operating system, which includes software and associated protocols to communicate
with other computers via a network conveniently and cost-effectively, is called Network
Operating System.

27
Network Operating System .6
Advantages of Network Operating System:
•In this type of operating system, network traffic reduces due to the division between
clients and the server.
•This type of system is less expensive to set up and maintain.

Disadvantages of Network Operating System:


•In this type of operating system, the failure of any node in a system affects the whole
system.
•Security and performance are important issues. So trained network administrators are
required for network administration.

28
Distributed Operating System .7
• 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.

29
Distributed Operating System .7

 In a distributed system, software and data maybe distributed around the system, programs and
files maybe stored on different storage devices which are located in different geographical
locations and maybe accessed from different computer terminals.

 Client Server System:


i. Centralized systems act as server systems to satisfy request generated by client system.
ii. Server systems may be computer server systems (only request) or file server systems (file
read, write, create etc.)
 Peer to Peer System:
i. Processor communicates with one another through various communication lines such as high
speed buses or telephone lines.
ii. Peer to peer system may be tightly coupled (do not share memory or clock, have local memory
to communicate) or loosely coupled (sharable).

30
Distributed Operating System .7

• Advantages of Distributed Operating System:


• The distributed operating system provides sharing of resources.
• This type of system is fault-tolerant.
• Disadvantages Distributed Operating System:
• Protocol overhead can dominate computation cost.

31
:Clustered system .8

Like multiprocessor systems, clustered systems gather together multiple CPUs to accomplish
computational work. Clustered systems differ from multiprocessor systems, however, in that
they are composed of two or more individual systems coupled together.
Clustered computers share storage and are closely link via LAN networking.
Clustering is usually used to provide high-availability. A layer of cluster software runs on
the cluster nodes. Each node can monitor one or more of the others (over the LAN). If the
monitored machine fails, the monitoring machine can take ownership of its storage and restart
the applications that were running on the failed machine. The users and clients of the
applications see only a brief interruption of service.

32
:Clustered system .8

Distributed Lock manager (DLM) provides


access control and locking to the files to
ensure no conflicting operations occurs.
Clustering can be structured asymmetrically
or symmetrically.
A.In asymmetric clustering, one machine is
in hot-standby mode while the other is
running the applications. The hot-standby host
machine does nothing but monitor the active
server. If that server fails, the hot-standby host
becomes the active server.
B.In symmetric mode, two or more hosts are
running applications, and are monitoring each
33 other.
Real-Time Operating System .8
• In Real-Time Systems, each job carries a certain deadline within which the job is
supposed to be completed, otherwise, the huge loss will be there, or even if the result is
produced, it will be completely useless.
• 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.

34
Real-Time Operating System .8
Advantages of Network Operating System:
•Easy to layout, develop and execute real-time applications under the real-time operating
system.
•In a Real-time operating system, the maximum utilization of devices and systems.

Disadvantages of Network Operating System:


•Real-time operating systems are very costly to develop.
•Real-time operating systems are very complex and can consume critical CPU cycles.

35
Hand Held System .9
• It includes PDA (Personal Digital Assistants) such as Palm-Pilots or cellular telephones with connectivity
to a network such as internet.
• The developers of hand held systems have some limitations like less memory, less processor,
small screen display and limited power backup.

36
Operating System Modes/ Dual Mode Operations
 The User Mode (Mode Bit 1) is concerned
with the actual interface between the user
and the system.
 It controls things like running applications
and accessing files.

 The Kernel Mode (Mode Bit 1) is concerned


with everything running in the background.
 It controls things like accessing system
resources, controlling hardware functions and
processing program instructions.
 System calls are used to change mode
37 from User to Kernel.
Operating System Modes/ Dual Mode Operations
Terms User Mode Kernel Mode
Definition User Mode is a restricted mode, which Kernel Mode is the privileged mode, which the
the application programs are executing .computer enters when accessing hardware resources
.and starts

Modes User Mode is considered as the slave Kernel mode is the system mode, master mode or the
.mode or the restricted mode .privileged mode

Address Space In User mode, a process gets its own In Kernel Mode, processes get a single address
.address space .space
Interruptions In User Mode, if an interrupt occurs, only In Kernel Mode, if an interrupt occurs, the whole
.one process fails .operating system might fail

Restrictions In user mode, there are restrictions to In kernel mode, both user programs and kernel
access kernel programs. Cannot access .programs can access
.them directly

38
Functions of Operating System

39
Process Management .1
• A process is a program in execution.
• A process needs certain resources, including CPU time, memory, files, and I/O devices
to accomplish its task.
• Simultaneous execution leads to multiple processes. Hence creation, execution and
termination of a process are the most basic functionality of an OS
• If processes are dependent, than they may try to share same resources. thus task of
process synchronization comes to the picture.
• If processes are independent, than a due care needs to be taken to avoid their
overlapping in memory area.
• Based on priority, it is important to allow more important processes to execute first than
others.

40
Process Management
• The process management component is a procedure for managing many processes
running simultaneously on the operating system.
• Every running software application program has one or more processes associated with
them.
• For example, when you use a search engine like Chrome, there is a process running for
that browser program.
• Process management keeps processes running efficiently.
• It also uses memory allocated to them and shutting them down when needed.
• The execution of a process must be sequential so, at least one instruction should be
executed on behalf of the process.

41
Process Management
Functions of process management
Here are the following functions of process management in the operating system, such as:
Process creation and deletion.
Suspension and resumption.
Synchronization process
Communication process

42
Memory management .2
• Memory is a large array of words or bytes, each with its own address.
• It is a repository of quickly accessible data shared by the CPU and I/O
devices.
• Main memory is a volatile storage device. When the computer made turn
off everything stored in RAM will be erased automatically.
• In addition to the physical RAM installed in your computer, most modern
operating systems allow your computer to use a virtual memory system.
Virtual memory allows your computer to use part of a permanent storage
device (such as a hard disk) as extra memory.

43
Main Memory management
• The memory management process is conducted by using a sequence of reads or writes
of specific memory addresses.
• It should be mapped to absolute addresses and loaded inside the memory to execute a
program.
• Main memory offers fast storage that can be accessed directly by the CPU. It is costly
and hence has a lower storage capacity.

44
Function of main memory
• An Operating System performs the following functions for Memory Management in the
operating system:
• It helps you to keep track of primary memory.
• Determine what part of it are in use by whom, what part is not in use.
• In a multiprogramming system, the OS decides which process will get memory and how
much.
• Allocates the memory when a process requests.
• It also de-allocates the memory when a process no longer requires or has been
terminated.

45
Secondary-Storage management .3
 The most important task of a computer system is to execute programs. These programs
help you to access the data from the main memory during execution. This memory of
the computer is very small to store all data and programs permanently. The computer
system offers secondary storage to back up the main memory.
 Today modern computers use hard drives/SSD as the primary storage of both programs
and data. However, the secondary storage management also works with storage devices,
such as USB flash drives and CD/DVD drives. Programs like assemblers and compilers
are stored on the disk until it is loaded into memory, and then use the disk is used as a
source and destination for processing.

46
Secondary-Storage management .3
• Functions of Secondary storage management
• Here are some major functions of secondary storage management in the operating
system:
• Storage allocation
• Free space management
• Disk scheduling

47
File Management .4
• A file is a collection of related information defined by its creator.
• File systems provide the conventions for the encoding, storage and management of data on a
storage device such as a hard disk.
 FAT12 (floppy disks) – File Allocation Table
 FAT16 (DOS and older versions of Windows)
 FAT32 (older versions of Windows)
 NTFS (newer versions of Windows)- New Technology File System
 EXT3 (Unix/Linux) -EXTended file system
 HFS+ (Max OS X) - Hierarchical File System

48
File management
 It commonly represents programs (both source and object forms) and data.
 Data files can be alphabetic, numeric, or alphanumeric.

49
File management
• The operating system has the following important activities in connection with file
management:
• File and directory creation and deletion.
• For manipulating files and directories.
• Mapping files onto secondary storage.
• Backup files on stable storage media.

50
Device Management or I/O Management .5
• Device controllers are components on the motherboard (or on expansion cards) that act as an interface
between the CPU and the actual device.
• Device drivers, which are the operating system software components that interact with the devices
controllers.
• A special device (inside CPU) called the Interrupt Controller handles the task of receiving interrupt
requests and prioritizes them to be forwarded to the processor.
• Deadlocks can occur when two (or more) processes have control of different I/O resources that are needed
by the other processes, and they are unwilling to give up control of the device.
• It performs the following activities for device management.
 Keeps tracks of all devices connected to system.
 Designates a program responsible for every device known as Input/output controller.
 Decides which process gets access to a certain device and for how long.
 Allocates devices in an effective and efficient way.
 Deallocates devices when they are no longer required.

51
Security Management .6
• The various processes in an operating system need to be secured from other activities.
Therefore, various mechanisms can ensure those processes that want to operate files,
memory CPU, and other hardware resources should have proper authorization from the
operating system.
• Security refers to a mechanism for controlling the access of programs, processes, or
users to the resources defined by computer controls to be imposed, together with some
means of enforcement.
• Security can improve reliability by detecting latent errors at the interfaces between
component subsystems.
• Early detection of interface errors can prevent the foulness of a healthy subsystem by a
malfunctioning subsystem.
• An unprotected resource cannot misuse by an unauthorized or incompetent user.

52
Security & Protection .6
• The operating system uses password protection to protect
user data and similar other techniques.
• It also prevents unauthorized access to programs and user
data by assigning access right permission to files and
directories.
• The owners of information stored in a multiuser or
networked computer system may want to control use of
that information, concurrent processes should not interfere
with each other.
53
User Interface Mechanism .7
• A user interface (UI) controls how you enter data and
instructions and how information is displayed on the
screen
• There are two types of user interfaces
1. Command Line Interface
2. Graphical user Interface

54
Command-line interface
• In a command-line interface, a user types commands
represented by short keywords or abbreviations or presses
special keys on the keyboard to enter data and instructions

55
Graphical User Interface
• With a graphical user interface (GUI), you interact with
menus and visual images

56
Network management .8
 Network management is the process of administering and managing computer networks.
 It includes performance management, provisioning of networks, fault analysis, and
maintaining the quality of service.
• A distributed system is a collection of computers or processors that never share their
memory and clock.
• In this type of system, all the processors have their local memory, and the processors
communicate with each other using different communication cables, such as fibre optics
or telephone lines.
• The computers in the network are connected through a communication network, which
can configure in many different ways.
• The network can fully or partially connect in network management, which helps users
design routing and connection strategies that overcome connection and security issues.

57
Network management
Functions of Network management:
•Distributed systems help you to various computing resources in size and function. They
may involve minicomputers, microprocessors, and many general-purpose computer
systems.
•A distributed system also offers the user access to the various resources the network
shares.
•It helps to access shared resources that help computation to speed up or offers data
availability and reliability.

58
Command Interpreter system .9
One of the most important components of an operating system is its command interpreter.
The command interpreter is the primary interface between the user and the rest of the
system.

59
Command Interpreter system
• Many commands are given to the operating system by control statements. A program
that reads and interprets control statements is automatically executed when a new job is
started in a batch system or a user logs in to a time-shared system.
• The control card interpreter
• The command-line interpreter
• The shell (in UNIX), and so on
• Its function is quite simple, get the next command statement, and execute it. The
command statements deal with process management, I/O handling, secondary storage
management, main memory management, file system access, protection, and
networking.

60
Operating System services
• An operating system offers various services to both users and programs.
• It includes application programs that can be run within the operating system and provide
an environment where they can be executed seamlessly.
• The operating system also offers users the convenience of running multiple programs.
• List of standard services offered by almost all operating systems:
– User Interface
– Program Execution
– File system manipulation
– Input / Output Operations
– Communication
– Resource Allocation
– Error Detection
– Accounting
61 – Security and protection
User Interface.1
• Operating system comes in three forms or types.
• Depending on the interface, their types have been further subdivided.
• Command line interface(CLI)
• Batch based interface(BI)
• Graphical User Interface(GUI)
• The Command Line Interface (CLI) is an interface that uses text commands and a
method for entering those commands.
• The Batch Interface (BI) utilizes commands and directives to manage the commands
entered into files executed later.
• Graphical User Interface (GUI) is a window system that uses a pointing device, such as
a mouse or trackball, to interact with the interface.
• Users can choose from menus and make selections from a variety of lists. A keyboard is
62 also used to enter text.
Program Execution .2
• The operating system must be able to load a program into memory and
execute that program.
• Furthermore, the program must be able to terminate its execution, either
normally or abnormally/forcefully.

63
File System Manipulation.3
 The operating system helps in managing files also. If a program needs
access to a file, it is the operating system that grants access. These
permissions include read-only, read-write, etc.
 It also provides a platform for the user to create, and delete files.
 The Operating System is responsible for making decisions regarding the
storage of all types of data or files, i.e, floppy disk/hard disk/pen drive, etc.
 The Operating System decides how the data should be manipulated and
stored.

64
Input Output Operations.4
 When a program runs, it may need I/O (Input/Output) operations to interact
with files or other devices.
 However, users cannot directly control I/O devices for efficiency and
security reasons.
 Therefore, the operating system provides a way to perform I/O operations,
such as reading from and writing to files.

65
Communication.5
• The operating system manages the exchange of data and programs among
different computers connected over a network.
• The process needs to communicate with another process to exchange
information.
• Whether processes are executing on the same computer or different ones,
operating systems provide communication support.

66
Resources Allocations .6
• When multiple jobs are running concurrently, allocating resources to each is
necessary.
• These resources may include CPU cycles, main memory storage, file
storage, and I/O devices. CPU scheduling routines are employed to
determine the best use of the CPU.

67
Error Detection and Response .7
 An Error in a device may also cause malfunctioning of the entire device.
 These include hardware and software errors such as device failure, memory error,
division by zero, attempts to access forbidden memory locations, etc.
 To avoid error, the operating system monitors the system for detecting errors and takes
suitable action with at least impact on running applications.
 Input/ Output devices: For example, connection failure in the network, lack of paper in
the printer, etc.
 User program: For example: attempt to access illegal memory locations, divide by
zero, use too much CPU time, etc.
 Memory hardware: For example, Memory error, the memory becomes full, etc.

68
Accounting.8
• This operating system service keeps track of which users are using how
much and what kinds of computer resources have been used for accounting
or to accumulate usage statistics.
• An Operating device collects utilization records for numerous assets and tracks the
overall performance parameters and responsive time to enhance overall performance.
These personal records are beneficial for additional upgrades and tuning the device to
enhance overall performance.

69
Protection and Security.9
• System resources must be accessed in a controlled manner. For security,
users authenticate via login ID and password.

70
Operating system structures

1. Simple Structure
2. Monolithic Structure
3. Micro-Kernel Structure
4. Layered Structure
5. Virtual Machines

71
Simple Structure

▪ MS-DOS is an operating system created for personal computers.


▪ It was developed by Microsoft.
▪ It is a classic example of an operating system with a layered structure.
▪ MS-DOS operating system is split into various layers and each of the layers have
different functionalities.
▪ Layering provides a distinct advantage in the MS-DOS operating system because
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.
▪ However, the layers in MS-DOS are not that sharply defined and the layer
specifications often bleed into each other.

72 72
SIMPLE STRUCTURE

Fig: MS-DOS layer Structure


73
Simple Structure

Advantages of Simple Structure:


Because there are only a few interfaces and levels, it is simple to develop.
Because there are fewer layers between the hardware and the applications, it
offers superior performance.
Disadvantages of Simple Structure:
The entire operating system breaks if just one user program malfunctions.
Since the layers are interconnected, and in communication with one another,
there is no abstraction or data hiding.
The operating system's operations are accessible to layers, which can result
in data tampering and system failure.

74 74
Monolithic Structure

75 75
Monolithic Structure
• Advantages of Monolithic Structure:
• Because layering is unnecessary and the kernel alone is responsible for managing all
operations, it is easy to design and execute.
• Due to the fact that functions like memory management, file management, process
scheduling, etc., are implemented in the same address area, the monolithic kernel runs
rather quickly when compared to other systems. Utilizing the same address speeds up
and reduces the time required for address allocation for new processes.
• Disadvantages of Monolithic Structure:
• The monolithic kernel's services are interconnected in address space and have an impact
on one another, so if any of them malfunctions, the entire system does as well.
• It is not adaptable. Therefore, launching a new service is difficult.

76
Layered Structure
• The OS is separated into layers or levels in this kind of arrangement.
The lowest layer contains the hardware, and the highest layer contains
the user interface (layer N).
• These layers are organized hierarchically, with the top-level layers
making use of the capabilities of the lower-level ones.
• Layered structures are hierarchical, debugging is simpler, therefore all
lower-level layers are debugged before the upper layer is examined. As
a result, the present layer alone has to be reviewed since all the lower
layers have already been examined.

77
LAYERED STRUCTURE

78
LAYERED STRUCTURE

79
Layered Structure
• Advantages of Layered Structure:
• Work duties are separated since each layer has its own functionality, and there is some
amount of abstraction.
• Debugging is simpler because the lower layers are examined first, followed by the top
layers.
• Disadvantages of Layered Structure:
• Performance is compromised in layered structures due to layering.
• Construction of the layers requires careful design because upper layers only make use of
lower layers' capabilities.

80
Micro Kernel Structure
• The operating system is created using a micro-kernel framework that strips
the kernel of any unnecessary parts. Systems and user applications are used
to implement these optional kernel components. So, Micro-Kernels is the
name given to these systems that have been developed.
• Each Micro-Kernel is created separately and is kept apart from the others.
As a result, the system is now more trustworthy and secure. If one Micro-
Kernel malfunctions, the remaining operating system is unaffected and
continues to function normally.

81
Microkernel Structure
 Kernel is made as small as possible only the most important services are put inside the
kernel and rest of the OS service are present in the system application program.
 The user can easily interact with those not-so important services within the system
applications. The kernel is solely responsible for the three most important services of
operating system namely:
 Inter-Process communication

 Memory management

 CPU scheduling
 Microkernel and system applications can interact with each other by message passing
as and when required.
 This is extremely advantageous architecture since burden of kernel is reduced and less
crucial services are accessible to the user and hence security is improved too. It is being
highly adopted in the present-day systems.
82  Mac-OSX, Eclipse IDE is a good example of Microkernel Architecture.
MICROKERNEL STRUCTURE

83
Micro Kernel Structure

84
MICROKERNEL STRUCTURE
Micro Kernel Structure
• Advantages of Micro-Kernel Structure:
• It enables portability of the operating system across platforms.
• Due to the isolation of each Micro-Kernel, it is reliable and secure.
• The reduced size of Micro-Kernels allows for successful testing.
• The remaining operating system remains unaffected and keeps running properly even if
a component or Micro-Kernel fails.
• Disadvantages of Micro-Kernel Structure:
• The performance of the system is decreased by increased inter-module communication.
• The construction of a system is complicated.

86
Micro Kernel Structure

87
Micro Kernel Structure
.S. No Parameters Microkernel Monolithic kernel
.1 Address Space In microkernel, user services and In monolithic kernel, both user services and
kernel services are kept in separate kernel services are kept in the same address
.address space .space
.2 Design and .OS is complex to design .OS is easy to design and implement
Implementation
.3 Size .Microkernel are smaller in size .Monolithic kernel is larger than microkernel
.4 Functionality .Easier to add new functionalities .Difficult to add new functionalities
.5 Coding To design a microkernel, more code is Less code when compared to microkernel
.required
.6 Failure Failure of one component does not Failure of one component in a monolithic
.effect the working of micro kernel kernel leads to the failure of the entire
.system
.7 Processing Speed .Execution speed is low .Execution speed is high
88
Micro Kernel Structure
.8 Extend .It is easy to extend Microkernel .It is not easy to extend monolithic kernel

.9 Communication To implement IPC messaging queues Signals and Sockets are utilized to implement
are used by the communication .IPC in monolithic kernels
.microkernels

.10 Debugging .Debugging is simple .Debugging is difficult


.11 Maintain .It is simple to maintain Extra time and resources are needed for
.maintenance

.12 Message passing and Message forwarding and context Message passing and context switching are
Context switching switching are required by the .not required while the kernel is working
.microkernel

.13 Services The kernel only offers IPC and low- The Kernel contains all of the operating
.level device management services .system’s services

.14 Example .Example : Mac OS X .Example : Microsoft Windows 95


89
Virtual Machines
• A virtual machine (VM) is a virtual environment which functions as a virtual computer system
with its own CPU, memory, network interface, and storage, created on a physical hardware
system.
• VMs are isolated from the rest of the system, and multiple VMs can exist on a single piece of
hardware, like a server. That means, it as a simulated image of application software and
operating system which is executed on a host computer or a server.
• It has its own operating system and software that will facilitate the resources to virtual
computers.
The characteristics of the virtual machines are as follows −
• Multiple OS systems use the same hardware and partition resources between virtual computers.
• Separate Security and configuration identity.
• Ability to move the virtual computers between the physical host computers as holistically
integrated files.

90
Virtual Machines

91

You might also like