0% found this document useful (0 votes)
184 views

OS PPT Introduction

The document discusses different types of operating systems: 1. Batch operating systems manage processes submitted as batches and execute them sequentially, with the operating system transferring control from one job to the next. 2. Multiprogramming systems allow multiple processes to reside in memory simultaneously and the operating system switches between them to avoid idle CPU time. 3. Time-sharing systems further improve on multiprogramming by allocating short time slices to different processes to share the CPU, providing a perception of simultaneous execution. 4. Real-time operating systems ensure tasks are completed within strict time constraints and prioritize responsive execution over throughput, making them suitable for applications like robotics and air traffic control.

Uploaded by

Kukum Chouhan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views

OS PPT Introduction

The document discusses different types of operating systems: 1. Batch operating systems manage processes submitted as batches and execute them sequentially, with the operating system transferring control from one job to the next. 2. Multiprogramming systems allow multiple processes to reside in memory simultaneously and the operating system switches between them to avoid idle CPU time. 3. Time-sharing systems further improve on multiprogramming by allocating short time slices to different processes to share the CPU, providing a perception of simultaneous execution. 4. Real-time operating systems ensure tasks are completed within strict time constraints and prioritize responsive execution over throughput, making them suitable for applications like robotics and air traffic control.

Uploaded by

Kukum Chouhan
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

Operating System

Books:
1. Operating System design and Implementation:
Andrew S. Tannenbaum
2. Operating System Concepts (2012) : Silberschatz,
Galvin and Gagne
3. Operating System: D. M. Dhamadhere
4. Operating Systems: Internals and Design
Principles: William Stallings

A. Frank - P. Weisberg
Operating System
Few questions:
1.When there is only one processor in computer, Who manages the processes
especially when there are number of processes submitted

2. Main memory is very small, who manages the memory so that computer
gives maximum efficiency

3. Who manages various files in the memory?

4. Who manages various peripheral devices attached to the computer


system
What is an Operating System ?
• A modern computer consists of:
 One or more processors
 Main memory
 Disks
 Various input/output devices.
• Managing all these varied components
requires a layer of software – the
Operating System (OS).

A. Frank - P. Weisberg
Definitions:
Operating system acts as an intermediator between user and computer
hardware

Provides the Interface to hide the complexities of the system from the
programmer

It provides an environment in which a user can execute the programs

Operating system controls all the resources of the computer


system
Manager

Operating system acts as a Resource allocator

Conflict Resolver
Goals of operating System

Convenience to the user Efficient operation of computer system

Protect the user program and data from


accidental or malicious destruction and
unauthorized disclosure.
Functions of Operating System

1. Process Management
• Creation and deletion of both user and system processes
• Provision of mechanism for process synchronization
• Provision of mechanism for process communication
• Provision of mechanism for deadlock handling.

2. Memory Management
• Keep track of which parts of memory are currently being used and by whom.
• Decide which process are to be loaded into memory when memory space is
available
• Allocate and deallocate memory space as needed.
• Free space management
File Management
• Creation and deletion of files
• Creation and deletion of directories
• Mapping of files onto storage
• Back up management

Device Management
• Managing various devices attached to the computer system
Attribute of Operating System:
1. Usability: Easy to use and design for user convenience.
2. Generality: OS should be useful in many ways.
3. Efficiency: Optimal utilization of resources
4. Visibility: Reveal the users all they must know
5.Transparency: Property of allowing user to remain unaware of all details
6. Security: Security of data from data and from instruction. Unauthorized user cannot
access the information stored
7. Protection: Protecting itself and users from any type of damage.
8. Serviceability: Property of being easily repaired.
9.Extensibility: To include those feature which are not included
Factors contributing the effectiveness of an operating system

1. Throughput time: Percentage of actual runtime to the total available system time

2. Turnaround time: Elapsed time between Job submission and Job completion

3. Response Time: Time from submission of a request until the first response is
obtained

Minimum turnaround
time

Ideal system should Maximum throughput


have time

Minimum response time


Where does the OS fit in?

A. Frank - P. Weisberg
Batch Systems
Batch Processing:
• In Batch processing same type of jobs batch (BATCH- a set of
jobs with similar needs) together and execute at a time.
• The OS was simple, its major task was to transfer control from
one job to the next.
• The job was submitted to the computer operator in form of
punch cards. At some later time the output appeared.
• The OS was always resident in memory. (Ref. Fig. next slide)
• Common Input devices were card readers and tape drives.
Batch Processing (Contd…):
• Common output devices were line printers, tape drives, and
card punches.
• Users did not interact directly with the computer systems, but
he prepared a job (comprising of the program, the data, &
some control information).
OS

User
program
area
advantages of Batch Operating System:
• It is very difficult to guess or know the time required by 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 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 sometime costly
• The other jobs will have to wait for an unknown time if any job fails
Multiprogramming
System
Multiprogramming:
• Multiprogramming is a technique to execute number of
programs simultaneously by a single processor.
• In Multiprogramming, number of processes reside in main
memory at a time.
• The OS picks and begins to executes one of the jobs in the
main memory.
• If any I/O wait happened in a process, then CPU switches from
that job to another job.
• Hence CPU in not idle at any time.
Multiprogramming (Contd…):
OS • Figure
dipicts the layout of
multiprogramming system.
Job 1
• The main memory consists of 5
Job 2 jobs at a time, the CPU executes
one by one.
Job 3 Advantages:
Job 4 •Efficient memory utilization
•Throughput increases
Job 5
•CPU is never idle, so performance
increases.
Time Sharing System
Time Sharing Systems:
• Time sharing, or multitasking, is a logical extension of
multiprogramming.
• Multiple jobs are executed by switching the CPU between
them.
• In this, the CPU time is shared by different processes, so it is
called as “Time sharing Systems”.
• Time slice is defined by the OS, for sharing CPU time between
processes.
• Examples: Multics, Unix, etc.,
Advantages of Time-Sharing OS:
• Each task gets an equal opportunity
• Less chances of duplication of software
• CPU idle time can be reduced
Disadvantages of Time-Sharing OS:
• Reliability problem
• One must have to take care of security and integrity of user
programs and data
• Data communication problem
Examples of Time-Sharing OSs are: Multics, Unix etc.

The use of Virtual Memory technique allows the execution of a job that may not be
completely in main memory, so even if the program is larger than the memory, it will
work.
Real-Time Operating System

An RTOS is architected to ensure that every application, every service, every


message and every task and thread is handled in a way that guarantees prompt,
consistent and assured execution – a concept known as determinism.
These types of OSs serves the 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 are very strict like
missile systems, air traffic control systems, robots etc.
There are actually two flavors of RTOS,

Hard Real-Time: Designed to guarantee that response deadlines are always met.
Missing a deadline is considered a total system failure

Soft Real-Time: Optimized to meet response deadlines. Missing a deadline results in


incremental degradation in performance of the system, which can result in system
failure if deadlines are repeatedly missed.

The most demanding scenarios require hard real-time operating systems.


Advantages of RTOS:

Maximum Consumption: Maximum utilization of devices and system, thus more


output from all the resources

Task Shifting: Time assigned for shifting tasks in these systems are very less. For
example in older systems it takes about 10 micro seconds in shifting one task to
another and in latest systems it takes 3 micro seconds.

Focus on Application: Focus on running applications and less importance to


applications which are in queue.

Real time operating system in embedded system: Since size of programs are small,
RTOS can also be used in embedded systems like in transport and others.

Error Free: These types of systems are error free.

Memory Allocation: Memory allocation is best managed in these type 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 interrupt signals to response earliest to interrupts.
The emergence of the Industrial Internet of Things (IIoT) has ushered in a
new generation of devices that rely on RTOS frameworks to enable
effective decision making and process automation. As embedded systems
become “smarter”, the need for an increased degree of autonomy makes
real-time decision making a vital component of efficient hardware
management
Parallel VS Distributed System
Network Operating System
An operating system that provides the connectivity among a number of
autonomous computers is called a network operating system. A typical
configuration for a network operating system is a collection of personal
computers along with a common printer, server and file server for archival
storage, all tied together by a local network.
Some of the features of Network Operating System are to:

• It allows multiple computers to connect so that they can share data, files and
hardware devices.
• Provide basic operating system features such as support for
processors, protocols, automatic hardware detection and support multi-
processing of applications.
• Provide security features such as authentication, logon restrictions and access
control.
Special Purpose – Embedded OS
An embedded system is a microcontroller or microprocessor based system which is
designed to perform a specific task.
An embedded system has three components −

• It has hardware.
• It has application software.
• It has Real Time Operating system (RTOS) that supervises the application
software and provide mechanism to let the processor run a process as per
scheduling by following a plan to control the latencies.
• RTOS defines the way the system works. It sets the rules during the execution
of application program.
• A small scale embedded system may not have RTOS.

So we can define an embedded system as a Microcontroller based, software


driven, reliable, real-time control system.
What is System Call in Operating System?

A system call is a mechanism that provides the interface between a process and the
operating system. It is a programmatic method in which a computer program
requests a service from the kernel of the OS.
System call offers the services of the operating system to the user programs via API
(Application Programming Interface). System calls are the only entry points for the
kernel system.

Example of System Call


For example if we need to write a program code to read data from one file, copy that
data into another file. The first information that the program requires is the name of
the two files, the input and output files.

In an interactive system, this type of program execution requires some system calls by
OS.
•First call is to write a prompting message on the screen
•Second, to read from the keyboard, the characters which define the two files.
Process Control
This system calls perform the task of process creation, process termination, etc.
Functions:
•End and Abort
•Load and Execute
•Create Process and Terminate Process
•Wait and Signed Event
•Allocate and free memory

File Management
File management system calls handle file manipulation jobs like creating a file,
reading, and writing, etc.
Functions:
•Create a file
•Delete file
•Open and close file
•Read, write, and reposition
•Get and set file attributes
Device Management
Device management does the job of device manipulation like reading from device
buffers, writing into device buffers, etc.
Functions
•Request and release device
•Logically attach/ detach devices
•Get and Set device attributes

Information Maintenance
It handles information and its transfer between the OS and the user program.
Functions:
•Get or set time and date
•Get process and device attributes

Communication
These type of System calls are specially used in IPC

•Create, delete communications connections


•Send, receive message
•Help OS to transfer status information
•Attach or detach remote devices
•Interrupt Handling

lling • The operating system preserves the state of the CPU by storing registers

S Po and the program counter

ptV • Determines which type of interrupt has occurred:

e rru • Separate segments of code determine what action should be taken for each
Int type of interrupt

You might also like