0% found this document useful (0 votes)
24 views45 pages

OS - UNIT - 1 - PPT Notes

The document provides comprehensive notes on operating systems, covering their concepts, types, and functions. It details various operating systems such as batch, multiprogramming, time-sharing, real-time, network, mobile, and distributed systems, along with their advantages and disadvantages. Additionally, it discusses the goals of operating systems, including convenience, efficiency, and evolution ability.
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)
24 views45 pages

OS - UNIT - 1 - PPT Notes

The document provides comprehensive notes on operating systems, covering their concepts, types, and functions. It details various operating systems such as batch, multiprogramming, time-sharing, real-time, network, mobile, and distributed systems, along with their advantages and disadvantages. Additionally, it discusses the goals of operating systems, including convenience, efficiency, and evolution ability.
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/ 45

R22_CSE( AI&ML ) Operating Systems Notes

Operating Systems

Unit-I
Introduction:
 Concept of Operating Systems
 Generations of Operating systems
 Types of Operating Systems
 OS Services
 System Calls
 Structure of an OS - Layered, Monolithic, Microkernel Operating Systems
 Concept of Virtual Machine
 Case Studies-Unix system.
G.Sravan Rao, Assistant Professor
E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Concept to OS Operating Systems Notes

 An operating system is an interface between the computer user and the hardware device.
 An operating system is a construct that allows the user application programs to interact with the system
hardware.
 Operating system by itself does not provide any function but it provides an atmosphere in which different
applications and programs can do useful work.
 Operating system coordinates between the hardware and the application programs.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Computer-System Organization Operating Systems Notes

 One or more CPUs, device controllers connect through common bus providing access to shared memory
 Concurrent execution of CPUs and devices competing for memory cycles
 I/O devices and the CPU can execute concurrently
 Each device controller is in charge of a particular device type
 Each device controller has a local buffer
 CPU moves data from/to main memory to/from local buffers
 I/O is from the device to local buffer of controller
 Device controller informs CPU that it has finished its operation by causing an interrupt

G.Sravan Rao, Assistant Professor


R22_CSE( AI&ML ) Goals of OS Operating Systems Notes

 The operating system mainly controls the allocation and use of the computing System’s resources among the
various user and tasks.
 It mainly provides an interface between the computer hardware and the programmer that simplifies and
makes feasible for coding, creation of application programs and debugging
In general, an operating system has three major goals. These are:
Convenience
 An operating system should make a computer easy and convenient to use. The interface should make the
interaction with a computer system simple and hassle free.
Efficiency
 The operating system should provide hardware resources to the different application programs in such a way to
maximize efficiency.
Evolution Ability
 The operating system should not hinder the evolution of the computer system. This means that any new
functions should be easily integrated with the computer without disrupting the working of the operating
system.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Generations of OS Operating Systems Notes

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Types of Operating System Operating Systems Notes

Some Widely Used Operating Systems Are As Follows


 Batch Operating System
 Multiprogramming Operating System
 Time Sharing Operating System(Multi-Tasking)
 Multiprocessor Operating System
 Real-Time Operating System
 Network Operating System
 Mobile Operating System(Hand-Held)
 Distributed Operating System
 Clustered Operating System

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Batch Operating System Operating Systems Notes

 This type of operating system does not interact with the computer directly.
 There is an operator which takes similar jobs having the same requirement and group them into batches.
 It is the responsibility of the operator to sort jobs with similar needs.
 In these, the jobs with similar needs were batched up and executed together. Then the results of these jobs were
sent back to the respective programmer.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Batch Operating System Operating Systems Notes

Advantages:
 It is very difficult to guess or know the time required for any job to complete. 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:
 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

Examples of Batch based Operating System: Payroll System, Bank Statements, etc.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML ) Multiprogramming Operating System Operating Systems Notes

 To overcome the problem of under utilization of CPU and main memory, the multi-programming was
introduced. The multi-programming is interleaved execution of multiple jobs by the same computer.
 In Multiprogramming system, CPU will never be idle and keeps on processing. In this the operating system
picks up and begins to execute one of the jobs from memory. Once this job needs an I/O operation operating
system switches to another job (CPU and OS always busy).

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Multiprogramming Operating System Operating Systems Notes

An OS does the following activities related to multiprogramming.


 The operating system keeps several jobs in memory at a time.
 This set of jobs is a subset of the jobs kept in the job pool.
 The operating system picks and begins to execute one of the jobs in the memory.
 Multiprogramming operating systems monitor the state of all active programs and system resources using
memory management programs to ensures that the CPU is never idle, unless there are no jobs to process.

Advantages
 High and efficient CPU utilization.
 User feels that many programs are allotted CPU almost simultaneously.

Disadvantages
 CPU scheduling is required.
 To accommodate many jobs in memory, memory management is required.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Time-Sharing Operating System Operating Systems Notes

 In this operating system allows multiple users to share the system simultaneously.
 Each user is provided a time slice and the processor switches rapidly among the users according to it.
 More than one processes are being executed at a particular time with the help of the time-sharing concept.
 So, in the time-sharing environment, we decide a time that is called time quantum and when the process starts
its execution then the execution continues for only that amount of time and after that, other processes will be
given chance for that amount of time only. In the next cycle, the first process will again come for its execution
and it will be executed for that time quantum only and again next process will come. This process will
continue.

TQ= 1 min
TQ = time quantum
TASK 1

TQ= 1 min
TASK 2

TASK 3

G.Sravan Rao, Assistant Professor


TQ= 1 min E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Time-Sharing Operating System Operating Systems Notes

Advantages:
 Since equal time quantum is given to each process, so each process gets equal opportunity to execute.
 CPU will be busy in most of the cases.
 Provides the advantage of quick response.
 Avoids duplication of software.
 Reduces CPU idle time.

Disadvantages:
 Reliability problem
 One must have to take care of the security and integrity of user programs and data
 Data communication problem

Examples of Time-Sharing OSs are: Multics, Unix, etc.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML ) Multiprocessor Operating System Operating Systems Notes

 These operating systems have multiple processors working together in parallel. These processors share the
system resources such as bus, clock, memory etc.
 The main advantage of multiprocessor system is to get more work done in a shorter period of time. Moreover,
multiprocessor systems prove more reliable in the situations of failure of one processor.
 Example: Windows NT, 2000, XP, and Unix

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Real-Time Operating Systems Operating Systems Notes

 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.
Two types of Real-Time Operating System which are as follows:
 Hard Real-Time Systems: These 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 any accident. Virtual memory is
rarely found in these systems.
 Soft Real-Time Systems: These OSs are for applications where for time-constraint is less strict and executed
based on the priority.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Real-Time Operating Systems Operating Systems Notes

Advantages of RTOS:
 Maximum Consumption: Maximum utilization of devices and system, thus more output from all the resources
 Task Shifting: The time assigned for shifting tasks in these systems are very less. For example, in older systems, it takes
about 10 microseconds in shifting one task to another, and in the latest systems, it takes 3 microseconds.
 Focus on Application: Focus on running applications and less importance to applications which are in the queue.
 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 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 signals 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.
G.Sravan Rao, Assistant Professor
E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Network Operating System Operating Systems Notes

 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 of 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. (with different operating systems)

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Network Operating System Operating Systems Notes

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

Examples of Network Operating System are: Microsoft Windows Server 2003, Microsoft Windows Server
2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD, etc.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Mobile Operating System Operating Systems Notes

 It is an Operating System for mobiles, tablets, 2-in-1 PC’s (that can be convert to laptop mode or detach and
work as tablet mode.
 Mobile OS have majority use since (2017)
 Previously (1993)---Embedded systems
 1993-1999---Pen Point OS (APRIL 1993)
APPLE LAUNCHES (NEWTON OS)
 1994---MARCH---Magic Cap OS
AUG---first smart phone(IBM) with touch screen
 1996----march ---palm OS
AUG---Nokia---(PEN/GEOS)
 2019------jan /windows 10----IOS/android
September—Apple-ios13-----Iphone11
Smart Watch OS6---ipad---7th Gen
 And soon………..

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Distributed Operating Systems Operating Systems Notes

 These types of the operating system is a recent advancement in the world of computer technology and are
being widely accepted all over the world.
 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 system’s processors differ in size and function.
 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.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Distributed Operating Systems Operating Systems Notes

Advantages:
 Failure of one system will not affect the other network communication, as all systems are independent from
each other
 Electronic mail increases the data exchange speed (sending the data through Email)
 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:
 Failure of the main network will stop the entire communication
 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
Example: LOCUS(LOCUS is a distributed operating system which supports transparent access to data through a
network wide file system, permits automatic replication of storage, supports transparent distributed process
execution) , etc.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
S. Key
R22_CSE( AI&ML )
Network OS Distributed OS
Operating Systems Notes
No

Objective Network OS provides local services to remote clients. Distributed OS manages the hardware
1 (can make use of different operating systems) resources(multitasking)(same OS is used in all the
systems.

Communication Communication is file-based, shared folder based. Communication is message-based or shared memory-
2 based.

Scalability Network OS is highly scalable. A new machine can be Distributed OS is less scalable. The process to add new
3 added very easily. hardware is complex.

Fault tolerance Less fault tolerance as compared to distributed OS.(less Distributed OS has very high fault tolerance.(when
chances of tolerating the fault) something goes wrong the system will work
4 continuously without any delay)

Autonomy Each machine can acts on its own thus autonomy Distributed OS has a poor rate of autonomy.(one
5 (independency) is high. system is dependant on others)

Implementation Network OS-based systems are easy to built and Distributed OS implementation is difficult.
6 maintain.

Operating System Network OS-based systems have their own copy of Distributed OS-based nodes have the same copy of the
7 operating systems.(windows , linux , etc..) operating system.(all systems are windows)
G.Sravan Rao, Assistant Professor
R22_CSE( AI&ML )
Clustered Operating System Operating Systems Notes

 The clustered systems are a combination of hardware clusters and software clusters. The hardware clusters
help in sharing of high performance disks between the systems. The software clusters makes all the systems
work together .
 Each node in the clustered systems contains the cluster software. This software monitors the cluster system
and makes sure it is working as required. If any one of the nodes in the clustered system fail, then the rest of
the nodes take control of its storage and resources and try to restart.

Types of Clustered Systems


 Asymmetric Clustering System: In this system, one of the nodes in the clustered system is in hot standby
mode and all the others run the required applications. The hot standby mode is a failsafe in which a hot
standby node is part of the system . The hot standby node continuously monitors the server and if it fails, the
hot standby node takes its place.
 Symmetric Clustering System: In symmetric clustering system two or more nodes all run applications as
well as monitor each other. This is more efficient than asymmetric system as it uses all the hardware and
doesn't keep a node merely as a hot standby.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Clustered Operating System Operating Systems Notes

Advantages:
 Clustered system has great scalability because we can easily add new node with this system.
 It can be stopped server while managing over load from one server to another server.
 It is more reliable and easy to configure.
 It can recover automatic from failure without user intervention.
 Better resource availability
Disadvantages:
 It is more costly because it contains expensive hardware and its design.
 Required multiple servers and other hardware components for making one
 It is very hard to monitor and maintenance this system. G.Sravan Rao, Assistant Professor
E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
OS Services Operating Systems Notes

 Program execution
 User Interface
 I/O Management
 File Management
 Communication
 Error Detection
 Accounting
 Resource Allocation
 File Protection and Security

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
OS Services Operating Systems Notes

Program execution
 Loads a program into memory.
 Executes the program.
 Handles program's execution.
 Provides a mechanism for process synchronization.
 Provides a mechanism for process communication.
 Provides a mechanism for deadlock handling.

User Interface:
 GUI: graphical user interface : windows environment (ex: window interface by using the pointer
device(mouse) we will operate the system and keyboard to enter text etc…
 Batch Interface: all commands and directives are entered in to files (these files are executed to control the
commands or access the system
 CLI: Command Line Interface: user enters commands to access system (unix / linux commands in terminal )

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
OS Services Operating Systems Notes

I/O Management:
 A running program may require I/O, which may involve a file or an I/O device.
 For efficiency and protection , users cannot control I/O devices directly, therefore, the operating system must
provide a means to do I/O.(ex: user wants to take printouts OS should provide connection between file and
printer device)
File system Management:
 The file system is of particular interest (how to manage files)
 Obviously programs need to read and write files and directories.
 They also need to create and delete them by name, search for given file etc…
 Some operating systems include permissions management to allow or deny access to files or directories based
on file ownership(personal file).
Communications:
 There are many circumstances in which one process needs to exchange information with another processes
 This communication may be on the same computer or on different computers(tied into a network) via shared
memory or message passing (distributed/network OS) which is done by operating system

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
OS Services Operating Systems Notes

Error Detection:
 The OS needs to be detecting and correcting errors constantly.
Errors may occur in the
 CPU and Memory hardware(such as memory error or power failure)
 I/O devices(such as parity error on disk, a connection failure on network, or lack of paper in the printer)
 A parity error is an error that results from irregular changes to data.
 User program(such as arithmetic overflow, an attempt to access an illegal memory location etc..
 In the above cases the OS should take appropriate action to control the errors. In worst cases the system itself
will hang / struck. So we need to restart the computer.

Accounting:
 we want to keep track of which users use how much and what kind of computer resources.
 This record keeping may be used for accounting or for usage statistics (may be valuable tool for researchers
who wish to reconfigure the system to improve computing services)

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
OS Services Operating Systems Notes

Resource allocation:
 when multiple jobs or users running at same time then resources must be allocated to each of them
 The OS manages many different types of resources
 CPU cycles(scheduling algorithms), main memory, file storage (special allocation code)
 I/O devices(request and release codes)(request for printer, scanner, mouse, keyboard etc..)
File Protection and Security:
Protection:
 When several separate processes execute concurrently , it should not be possible for one process to interfere
with another (one process execution should not interrupt another process)
 Each process should access the system resources in control(resources should not be wasted unnecessarily).
Security:
 Security for system from outsiders is also important
 So each user has to authenticate himself/herself to the system
 By using password to (Access the system resources).

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
System Calls Operating Systems Notes

 a system call is the programmatic way in which a computer program requests a service from the kernel of
the operating system it is executed on.
 The interface between a process and an operating system is provided by system calls
 In general, system calls are available as assembly language instructions.
 System calls are usually made when a process in user mode requires access to a resource. Then it requests
the kernel to provide the resource via a system call.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
When a System Calls requires Operating Systems Notes

In general, system calls are required in the following situations −


 If a file system requires the creation or deletion of files. Reading and writing from files also require a system
call.
 Creation and management of new processes.
 Network connections also require system calls. This includes sending and receiving packets.
 Access to a hardware devices such as a printer, scanner etc. requires a system call.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Types of System Calls Operating Systems Notes

There are mainly five types of system calls. These are explained in detail as follows
1. Process Control
 These system calls deal with processes such as create, end, abort, terminate, allocate and free memory, etc.
Functions:
 End and Abort
 Load and Execute
 Create Process and Terminate Process
 Wait and Signed Event
 Allocate and free memory
2. File Management
 These system calls are responsible for file manipulation such as creating a file, reading a file, writing into a file etc.
Functions:
• Create a file
• Delete file
• Open and close file
• Read, write, and reposition
• Get and set file attributes
G.Sravan Rao, Assistant Professor
E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Types of System Calls Operating Systems Notes

3. Device Management: These system calls are responsible for device manipulation such as reading from device buffers,
writing into device buffers etc.
Functions:
 Request and release device
 Logically attach/ detach devices
 Get and Set device attributes
4. Information Maintenance: These system calls handle information and its transfer between the operating system and the
user program.
Functions:
 Get or set time and date
 Get process and device attributes
5. Communication: These system calls are useful for inter process communication. They also deal with creating and deleting a
communication connection.
Functions:
 Create, delete communications connections
 Send, receive message
 Help OS to transfer status information
 Attach or detach remote devices
G.Sravan Rao, Assistant Professor
E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Types of System Calls Operating Systems Notes

6. Protection and Security:


Protection:
 When several separate processes execute concurrently , it should not be possible for one process to interfere with another
(one process execution should not interrupt another process)
 Each process should access the system resources in control(resources should not be wasted unnecessarily).
Security:
 Security for system from outsiders is also important
 So each user has to authenticate himself/herself to the system
 By using password to (Access the system resources).

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Examples of System Calls Operating Systems Notes

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Structure of the OS Operating Systems Notes

Operating system can be implemented with the help of various structures. The structure of the OS depends mainly
on how the various common components of the operating system are interconnected and melded into the kernel.
Depending on this we have following structures of the operating system:
1. Simple structure:
 Such operating systems do not have well defined structure and are small, simple and limited systems.
 The interfaces and levels of functionality are not well separated.
 MS-DOS is an example of such operating system. In MS-DOS application programs are able to access the
basic I/O routines.
 These types of operating system cause the entire system to crash if one of the user programs fails.
Diagram of the structure of MS-DOS is shown below.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Structure of the OS Operating Systems Notes

2. Monolithic operating system:


• The monolithic operating system is a very basic operating system in which file management, memory
management, device management, and process management is directly controlled within the kernel. All these
components like file management, memory management etc. are located within the kernel.
• Functionality of the OS is invoked with simple function calls within the kernel, which is one large program.
• Device drivers are loaded into the running kernel and become part of the kernel.

G.Sravan Rao, Assistant Professor


R22_CSE( AI&ML ) Monolithic operating system Operating Systems Notes

Advantages:
 Simple structure: This type of operating system has a simple structure. All the components needed for
processing are embedded into the kernel.
 Works for smaller tasks: It works better for performing smaller tasks as it can handle limited resources.
 Communication between components: All the components can directly communicate with each other and
also with the kernel.
 Fast operating system: The code to make monolithic kernel is very fast and robust.

Disadvantages:
 Code written in this operating system (OS) is difficult to port.
 Monolithic OS has more tendency to generate errors and bugs. The reason is that user processes use same
address locations as the kernel.
 Adding and removing features from monolithic OS is very difficult. All the code needs to be rewritten and
recompiled to add or remove any feature.

Examples: VMS, Linux, OS/360, OpenVMS, Multics, AIX, BSD


G.Sravan Rao, Assistant Professor
E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Structure of the OS Operating Systems Notes

3.Layered structure:
 An OS can be broken into pieces and retain much more control on system.
 In this structure the OS is broken into 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 only.
 This simplifies the debugging process as 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.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Structure of the OS Operating Systems Notes

4. Micro-Kernel Operating System:


 This structure designs the operating system by removing all non-essential components from the kernel and
implementing them as system and user programs. This result in a smaller kernel called the micro-kernel.
 Moves as much from the kernel into user space
 Communication takes place between user modules using message passing
 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.

Application File Device user


Program System Driver mode

messages messages

Interprocess memory CPU kernel


Communication managment scheduling mode

microkernel

G.Sravan Rao, Assistant Professor


hardware
R22_CSE( AI&ML )
Micro-Kernel Operating System Operating Systems Notes

Kernel: A kernel is an important part of an OS that manages system resources. It also acts as a bridge between
the software and hardware of the computer. It is one of the first program which is loaded on start-up after the
bootloader. The Kernel is also responsible for offering secure access to the machine's hardware for various
programs. It also decides when and how long a certain application uses specific hardware.

Advantages:
 Easier to port the operating system to new architectures
 All new services need to be added to user space and does not require the kernel to be modified.
 More reliable (less code is running in kernel mode)
 More secure
 The architecture of this kernel is small and isolated hence it can function better.
 Expansion of the system is easier, it is simply added in the system application without disturbing the
kernel.
Disadvantages:
 Performance overhead of user space to kernel space communication
Example: Mac OS, Eclipse IDE G.Sravan Rao, Assistant Professor
E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Concept of Virtual Machine Operating Systems Notes

 Virtual Machine abstracts the hardware of our personal computer such as CPU, disk drives, memory, NIC (Network
Interface Card) etc, into many different execution environments as per our requirements, hence giving us a feel that each
execution environment is a single computer. For example, VirtualBox.
 When we run different processes on an operating system, it creates an illusion that each process is running on a different
processor having its own virtual memory, with the help of CPU scheduling and virtual-memory techniques.
 There are additional features of a process that cannot be provided by the hardware alone like system calls and a file system.
 The virtual machine approach does not provide these additional functionalities but it only provides an interface that is same
as basic hardware. Each process is provided with a virtual copy of the underlying computer system.
 We can create a virtual machine for several reasons, all of which are fundamentally related to the ability to share the same
basic hardware yet can also support different execution environments, i.e., different operating systems simultaneously.

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Concept of Virtual Machine Operating Systems Notes

Types of VMs:
 Windows virtual machines.
 Android virtual machines.
 Mac virtual machines.
 iOS virtual machines.
 Java virtual machines.
 Python virtual machines.
 Linux virtual machines.
 VMware virtual machines.
Advantages:
 There are no protection problems because each virtual machine is completely isolated from all other virtual
machines.
 Virtual machine can provide an instruction set architecture that differs from real computers.
 Easy maintenance, availability and convenient recovery.
Disadvantages:
 When multiple virtual machines are simultaneously running on a host computer, one virtual machine can be affected
by other running virtual machines, depending on the workload. G.Sravan Rao, Assistant Professor
 Virtual machines are not as efficient as a real one when accessing the hardware. E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML )
Case Studies- UNIX System Operating Systems Notes

The layers of a UNIX system


User
Interface

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
R22_CSE( AI&ML ) Operating Systems Notes

UNIX Commands

G.Sravan Rao, Assistant Professor


E. Kiran Kumar, Asst.Profesor(CSE), GNITC.
Any Doubts?
R22_CSE( AI&ML ) Operating Systems Notes

G.Sravan Rao, Assistant Professor

You might also like