SlideShare a Scribd company logo
1
Sultan S. FCSE 2021
Chapter- 1
INTRODUCTION TO OPERATING SYSTEM
A modern computer system consists of one or more processors, some main memory, disks,
printers, a keyboard, a display, network interfaces, and other input/output devices. All in all, a
complex system. Writing programs that keep track of all these components and use them correctly,
is an extremely difficult job. For this reason, computers are equipped with a layer of software
called the operating system, whose job is to manage all these devices and provide user programs
with a simpler interface to the hardware
An operating System is an intermediary between users and computer hardware and controls the
execution of all kinds of programs.
• It provides users an environment in which a user can execute programs conveniently and
efficiently.
• In technical terms, it is software which manages hardware.
• An operating System controls the allocation of resources and services such as memory,
processors, devices and information.
Generally, the OS perform two basically unrelated functions
OPERATING SYSTEM AS AN EXTENDED MACHINE:
• In general, to make a system with set of physical devices work, systems architecture
including instruction set, memory organization, I/O and bus structures must be known in-
order to write the machine language that commands the physical devices to work.
• But due to the amount of complexity among different architectures and need to master the
machine language that varies from one architecture to another, it became difficult for
common peoples to access the system.
• Hence operating system was created whose function is to present the user with the
equivalent of an extended machine or virtual machine that is easier to program than the
underlying hardware. This is achieved by variety of services that programs can obtain
using special instructions called system calls.
OPERATING SYSTEM AS A RESOURCE MANAGER:
• The job of the operating system is to provide for an orderly and controlled allocation of
the processors, memories, and I/O devices among the various programs competing for
them.
• As an example, what would happen if three programs running on some computer all tried
to print their output simultaneously on the same printer? The first few lines of printout
might be from program 1, the next few from program 2, then some from program 3, and
so forth. The result would be chaos. So operating system buffers all the output destined
2
Sultan S. FCSE 2021
for the printer on the disk. When one output is printed completely, then the next output
stored is taken and printed.
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
Computer System Components
1. Hardware - provides basic computing resources (CPU, memory, I/O devices).
2. Operating system - controls and coordinates the use of the hardware among the various
application programs for the various users.
3. Applications programs - define the ways in which the system resources are used to solve the
computing problems of the users (compilers, database systems, video games, business
programs).
4. Users (people, machines, other computers).
What are the functions of the operating system?
The following are the important function of the operating system.
Memory Management
Processor Management
Device Management
File Management
Security
Control over system performance
Job accounting
Error detecting aids
Coordination between other software and users
o Memory Management
An operating system manages the allocation and deallocation of the memory to various
processes and ensures that the other process does not consume the memory allocated to one
process.
Operating System does the following activities for memory management.
• Keeps tracks of primary memory i.e. what part of it are in use by whom, which part are not in
use.
• In multiprogramming, OS decides which process will get memory when and how much.
• Allocates the memory when the process requests it to do so.
• De-allocates the memory when the process no longer needs it or has been terminated.
3
Sultan S. FCSE 2021
o Processor Management
An operating system manages the processor’s working by allocating various jobs to it and
ensuring that each process receives enough time from the processor to function properly. OS
decides which process gets the processor when and how much time.
Operating System does the following activities for processor management.
• Keeps tracks of processor and status of process. Program responsible for this
task is known as traffic controller.
• Allocates the processor (CPU) to a process.
• De-allocates processor when processor is no longer required.
o Device Management
There are various input and output devices. An operating system controls the working of these
input-output devices. It receives the requests from these devices, performs a specific task, and
communicates back to the requesting process.
Operating System does the following activities for device management.
o Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.
Decides which process gets the device when and for how much time.
o Allocates the device in the efficient way.
o De-allocates devices.
o File Management
An operating system keeps track of information regarding the creation, deletion, transfer, copy,
and storage of files in an organized way. It also maintains the integrity of the data stored in
these files, including the file directory structure, by protecting against unauthorized access
Operating System does the following activities for file management.
• Keeps track of information, location, uses, status etc. The collective facilities are often
known as file system.
• Decides who gets the resources.
• Allocates the resources.
• De-allocates the resources.
Security – The operating system provides various techniques which assure the integrity and
confidentiality of user data
Following security measures are used to protect user data:
Protection against unauthorized access through login.
Protection against intrusion by keeping Firewall active.
4
Sultan S. FCSE 2021
Protecting the system memory against malicious access.
Displaying messages related to system vulnerabilities.
Job Scheduling: In a multitasking operating system where multiple programs run
simultaneously, the operating system determines which applications should run in which order
and how time should be allocated to each application.
Error detecting aids From time to time, the operating system checks the system for any
external threat or malicious software activity. It also checks the hardware for any type of
damage. This process displays several alerts to the user so that the appropriate action can be
taken against any damage caused to the system
Coordination between other software and users -- Coordination and assignment of compilers,
interpreters, assemblers and other software to the various users of the computer systems.
Control over system performance -- Recording delays between request for a service and
response from the system.
Types of operating system (Historical development of Operating System)
Operating systems are there from the very first computer generation. Operating systems keep
evolving over the period of time. Following are few of the important types of operating system
which are most commonly used.
Early Systems - bare machine (early 1950s) - First Generation.
Bare machine is logical hardware which is used to execute the program in the processor
without using the operating system
• Initially, when the operating systems are not developed, the execution of an instruction is
done by directly on hardware without using any interfering hardware, at that time the only
drawback was that the Bare machines accepting the instruction in only machine language, due
to this those person who has sufficient knowledge about Computer field are able to operate a
computer. so after the development of the operating system Bare machine is referred to as
inefficient.
• Early Software o Assemblers, loaders, Linkers, Libraries of common subroutines, Compilers,
Device drivers.
Inefficient use of expensive resources
✓ Low CPU utilization
✓ Significant amount of setup time.
Simple Batch Systems - Second Generation.
Batch processing is a technique in which Operating System collects one programs and data
together in a batch before processing starts.
5
Sultan S. FCSE 2021
The users of batch operating system do not interact with the computer directly. Each user
prepares his job on an off-line device like punch cards and submits it to the computer operator.
Operating system does the following activities related to batch processing.
✓ OS defines a job which has predefined sequence of commands, programs and data as
a single unit.
✓ OS keeps a number a jobs in memory and executes them without any manual
information.
✓ Jobs are processed in the order of submission i.e. first come first served fashion.
✓ When job completes its execution, its memory is released and the output for the job
gets copied into an output spool for later printing or processing.
Advantages batch processing
✓ Batch processing takes much of the work of the operator to the computer.
✓ Increased performance as a new job gets started as soon as the previous job finished without
any manual intervention.
Disadvantages
✓ Difficult to debug program.
✓ If a job fails, then the other jobs have to wait for an unknown time till the issue is
resolved.
✓ Lack of interaction between the user and the job.
✓ CPU is often idle, because the speed of the mechanical I/O devices is slower than the
CPU.
To speed up processing, jobs with similar needs are batched together and run as a group. Thus,
the programmers left their programs with the operator. The operator then sorts programs into
batches with similar requirements.
• Use an operator (somebody to work the machine)
• Add a card reader (a device to read programs written on punched cards)
• Reduce setup time by batching similar jobs
• Automatic job sequencing - automatically transfers control from one job to
another. First rudimentary operating system.
6
Sultan S. FCSE 2021
• Resident monitor is a type of system software program that was used in many
early computers from the 1950s to 1970s. The name is derived from a program
which is always present in the computer's memory, thus being "resident"
• The resident monitor works like an operating system that controls the
instructions and performs all necessary functions. It also works like job
sequencer because it also sequences the job and sends them to the processor.
• After scheduling the job Resident monitors loads the programs one by one into
the main memory according to their sequences. One most important factor
about the resident monitor is that when the program execution occurred there
is no gap between the program execution and the processing is going to be
faster
Parts of resident monitor
• Control language interpreter - responsible for reading and carrying out instructions on
the cards.
• Loader - Loads all the necessary system and application programs into the main
memory.
• Device drivers. is used to managing the connecting input-output devices to the system.
So basically it is the interface between the user and the system.
• Interrupt Processing. it processes the all occurred interrupt to the system.
Problems:
1. How does the monitor know about the nature of the job (e.g., FORTRAN versus
Assembly) or which program to execute?
7
Sultan S. FCSE 2021
2. How does the monitor distinguish
a) Job from job?
b) Data from program?
Solution: introduce control cards
• Special cards that tell the resident monitor which programs to run
• Problem: Slow Performance - since I/O and CPU could not overlap, and card reader very slow.
• Solution: Off-line operation - speed up computation by loading jobs into memory from tapes
and card reading and line printing done off-line using smaller machines. This removes the need
for relatively slow input devices. Instead, data is stored in files on a high-speed data storage
device.
Advantage of off-line operation - main computer not constrained by the speed of the card
readers and line printers, but only by the speed of faster magnetic tape units.
• No changes need to be made to the application programs to change from direct
to off-line I/O operation.
• Process input to faster device
• More efficient use of CPU Device
• Independence - program uses logical devices, not physical devices
Overlap of I/O and CPU Processing
• After CPU reads info from buffer, input device begins next input immediately
• Doesn’t wait for CPU to initiate it
• specialized card readers and printers
• satellite processing - small computer does transfer from/to mag tape or disk
Spooling (Simultaneous Peripheral Operation On-Line) - overlap the I/O of one job with the
computation of another job.
• While executing one job, the operating system:
✓ Reads the next job from the card reader into a storage area on the disk (job queue).
✓ Outputs the printout of previous job from disk to the line printer.
✓ CPU & I/O Utilization much higher
• Job pool - data structure that allows the operating system to select which job to run next, in
order to increase CPU utilization, Job Scheduling
8
Sultan S. FCSE 2021
Multiprogramming and Time Sharing- Third Generation
Multiprogramming
• When two or more programs are residing in memory at the same time.
Multiprogramming increases CPU utilization by organizing jobs. The CPU is shared
between them.
Following figure shows the memory layout for a multiprogramming system.
Operating system 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 job in the memory.
✓ Multiprogramming operating system monitors 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
Advantages of Multiprogramming
❖ High and efficient CPU utilization.
❖ User feels that many programs are allotted CPU almost simultaneously.
Disadvantages of Multiprogramming
❖ CPU scheduling is required.
❖ To accommodate many jobs in memory, memory management is required.
OS Features Needed for Multiprogramming
• Memory management - the system must allocate the memory to several jobs.
• CPU scheduling - the system must choose among several jobs ready to run.
• Allocation of devices.
9
Sultan S. FCSE 2021
Time-Sharing Systems- Interactive Computing
✓ User Interaction is the key
✓ Give each user the illusion that she/he has full use of the entire machine.
✓ Job Switching
The CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is
allocated to a job only if the job is in memory).
• A job is swapped in and out of memory to the disk.
• Put limit on how long each job can use CPU before a job switch occurs
Time sharing is a technique which enables many people, located at various terminals, to use a
particular computer system at the same time. Time-sharing or multitasking is a logical extension
of multiprogramming. Processor's time which is shared among multiple users simultaneously is
termed as time-sharing. The main difference between Multi programmed Batch Systems and Time-
Sharing Systems is that in case of multi programmed batch systems, objective is to
maximize processor use, whereas in Time-Sharing Systems objective is to minimize response time.
Multiple jobs are executed by the CPU by switching between them, but the switches occur so
frequently. Thus, the user can receive an immediate response. For example, in a transaction
processing, processor execute each user program in a short burst or quantum of computation. That
is if n users are present, each user can get time quantum. When the user submits the command, the
response time is in few seconds at most. Operating system uses CPU scheduling and
multiprogramming to provide each user with a small portion of a time. Computer systems that
were designed primarily as batch systems have been modified to time-sharing systems.
• Most efficient for many users to share a large computer.
• The CPU is shared between several processes.
• Each process belongs to a user and I/O is to/from a separate terminal for each user.
• On-line file system must be available for users to access data and code
Multitasking
Multi-tasking refers to term where multiple jobs are executed by the CPU simultaneously by
switching between them. Switches occur so frequently that the users may interact with each
program while it is running.
Operating system does the following activities related to multitasking.
✓ Multitasking Operating Systems are also known as Time-sharing systems.
✓ A time-shared operating system uses concept of CPU scheduling and
multiprogramming to provide each user with a small portion of a time-shared CPU.
10
Sultan S. FCSE 2021
✓ When a process executes, it typically executes for only a very short time before it either
finishes or needs to perform I/O. During this time a CPU can be utilized by another process.
✓ Operating system allows the users to share the computer simultaneously. Since each
action or command in a time-shared system tends to be short, only a little CPU time is
needed for each user.
✓ As the system switches CPU rapidly from one user/program to the next, each user is
given the impression that he/she has his/her own CPU, whereas actually one CPU is
being shared among many users.
Advantages of Timesharing operating systems are following
✓ Provide advantage of quick response.
✓ Avoids duplication of software.
✓ Reduces CPU idle time.
Disadvantages of Timesharing operating systems are following.
✓ Problem of reliability.
✓ Question of security and integrity of user programs and data.
✓ Problem of data communication.
The Fourth Generation (1980-Present) Personal Computers operating system:
When personal computers were introduced, there was a need for an operating system for this new
type of computer. The personal computer operating system job is to provide a good interface to a
single user.
• Single user systems, portable.
• I/O devices - keyboards, mice, display screens, small printers.
• Laptops and palmtops, Smart cards, Wireless devices.
• Advantages:
user convenience, responsiveness, ubiquitous
They are widely used for word processing, spreadsheets, and Internet access. Common examples
are Windows 98, Windows 2000, the Macintosh operating system, and Linux
11
Sultan S. FCSE 2021
Parallel systems
The need for more speed and efficiency led to the design of parallel systems: multiple CPUs on
the same machine. Each CPU can be used to serve one program or a part of a program, which
means that many tasks can be accomplished in parallel instead of serially. The operating systems
required for this are more complex than those that support single CPUs.
Distributed operating System
Distributed systems use multiple central processors to serve multiple real time application and
multiple users. Data processing jobs are distributed among the processors accordingly to which
one can perform each job most efficiently. The processors communicate with one another
through various communication lines (such as high-speed bus or telephone lines). These are
referred as loosely coupled systems or distributed systems.
Loosely coupled system - each processor has its own local memory; processors communicate
with one another through various communication lines, such as high-speed networks.
Operating system does the following activities related to distributed environment.
✓ OS Distributes computation logics among several physical processors.
✓ The processors do not share memory or a clock.
✓ Instead, each processor has its own local memory.
✓ OS manages the communications between the processors.
✓ They communicate with each other through various communication lines.
The advantages of distributed systems are following.
• Resource sharing facility
• Computation Speedup via electronic mail.
• Reliability.
• Load Balance
Network/server operating System
In a network operating system, the users are aware of the existence of multiple computers and can
log in to remote machines and copy files from one machine to another. Each machine runs its own
local operating system and has its own local user.
Server operating system run on servers, which are either very large personal computers,
workstations, or even mainframes and provides server the capability to manage data, users, groups,
security, applications, and other networking functions. They serve multiple users at once over a
network and allow the users to share hardware and software resources. Servers can provide print
service, file service, or Web service. Internet providers run many server machines to support their
customers and Web sites use servers to store the Web pages and handle the incoming requests.
Examples of network/server operating systems are Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, and Mac OS
12
Sultan S. FCSE 2021
The advantages of network/server operating systems are.
• Centralized servers are highly stable.
• Security is server managed.
• Upgrades to new technologies and hardware can be easily integrated into the system.
• Remote access to servers is possible from different locations and types of systems.
The disadvantages of network/server operating systems are.
• High cost of buying and running a server.
• Dependency on a central location for most operations.
• Regular maintenance and updates are required.
Real Time operating System
• Real time operating systems focusses on completing some job/process in an exact time in
which the job has to be completed. Real-time operating system has well-defined, fixed
time constraints otherwise system will fail. For example, if a car is moving down an
assembly line, certain actions must take place at certain instants of time, if a welding
robot, welds too early or too late, the car will be ruined.
• The Operating system must guarantee response to events within fixed periods of time
to ensure correct performance
• So hard real time system are systems in which deadline cannot be missed, If deadlines are
missed it leads to failure.
• Another kind of real-time system is a soft real-time system, in which missing an occasional
deadline is acceptable. Digital audio or multimedia systems fall in this category.
• VxWorks and QNX are well-known real-time operating systems
Interactivity
Interactivity refers that a User is capable to interact with computer system.
Operating system does the following activities related to interactivity.
OS provides user an interface to interact with system.
OS manages input devices to take inputs from the user. For example, keyboard.
OS manages output devices to show outputs to the user. For example, Monitor.
OS Response time needs to be short since the user submits and waits for the result.
Operating System Services
An Operating System provides services to both the users and to the programs.
➢ It provides programs, an environment to execute.
➢ It provides users, services to execute the programs in a convenient manner.
13
Sultan S. FCSE 2021
The following are few common services provided by operating systems.
❖ Program execution
❖ I/O operations
❖ File System manipulation
❖ Communication
❖ Error Detection
❖ Resource Allocation
❖ Protection
Program execution
Operating system handles many kinds of activities from user programs to system programs like
printer spooler, name servers, file server etc. Each of these activities is encapsulated as a
process. A process includes the complete execution context (code to execute, data to manipulate,
registers, OS resources in use). Following are the major activities of an operating system with
respect to program management.
✓ Loads a program into memory.
✓ Executes the program and handles program's execution
✓ Provides a mechanism for process synchronization, communication and deadlock
handling.
I/O Operation
I/O subsystem comprised of I/O devices and their corresponding driver software. Drivers hides the
peculiarities of specific hardware devices from the user as the device driver knows the peculiarities
of the specific device. Operating System manages the communication between user and device
drivers.
Following are the major activities of an operating system with respect to I/O Operation.
✓ I/O operation means read or write operation with any file or any specific I/O device.
✓ Program may require any I/O device while running.
✓ Operating system provides the access to the required I/O device when required.
File system manipulation
A file represents a collection of related information.
A file system is normally organized into directories for easy navigation and usage.
Following are the major activities of an operating system with respect to file management.
✓ Program needs to read a file or write a file.
✓ The operating system gives the permission to the program for operation on file.
✓ Operating System provides an interface to the user to create/delete files or directories.
✓ Operating System provides an interface to create the backup of file system.
14
Sultan S. FCSE 2021
Communication
Operating system manages communications between processes. OS handles routing and
connection strategies and the problems of contention and security.
Following are the major activities of an operating system with respect to communication.
✓ Two processes often require data to be transferred between them.
✓ Communication may be implemented by two methods either by Shared Memory or by
Message Passing.
Error handling
Error can occur anytime and anywhere in CPU, in I/O devices or in the memory.
Following are the major activities of an operating system with respect to error handling.
✓ OS constantly remains aware of possible errors and takes the appropriate action to ensure
correct and consistent computing.
Resource Management
In case of multi-user or multi-tasking environment, resources such as main memory, CPU cycles
and files storage are to be allocated to each user or job.
Following are the major activities of an operating system with respect to resource management.
✓ OS manages all kind of resources using schedulers/algorithm for better utilization of CPU.
Protection
Protection refers to mechanism or a way to control the access of programs, processes, or users to
the resources defined by computer systems.
Following are the major activities of an operating system with respect to protection.
✓ OS ensures that all access to system resources is controlled.
✓ OS ensures that external I/O devices are protected from invalid access attempts.
✓ OS provides authentication feature for each user by means of a password.
===================End of Chapter- 1===============

More Related Content

Similar to Ch1 - OS.pdf

unit1 part1.ppt
unit1 part1.pptunit1 part1.ppt
unit1 part1.ppt
suresh554942
 
Operating System Unit 1
Operating System Unit 1Operating System Unit 1
Operating System Unit 1
bhartigole1
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
VandanaGaria
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.ppt
Kirti Verma
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
Soumit Ghosh
 
Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2
Ismail Mukiibi
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)
NehaTadam
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
Jaleto Sunkemo
 
OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...
OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...
OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...
ApurvaLaddha
 
os assignment -individual presenation.pptx
os assignment -individual presenation.pptxos assignment -individual presenation.pptx
os assignment -individual presenation.pptx
EngrAliSarfrazSiddiq
 
PROJECT 3.pptx
PROJECT 3.pptxPROJECT 3.pptx
PROJECT 3.pptx
EngrAliSarfrazSiddiq
 
Os unit 1
Os unit 1Os unit 1
Os unit 1
Krupali Mistry
 
R20CSE2202-OPERATING-SYSTEMS .pdf
R20CSE2202-OPERATING-SYSTEMS        .pdfR20CSE2202-OPERATING-SYSTEMS        .pdf
R20CSE2202-OPERATING-SYSTEMS .pdf
cVan3
 
Operating system notes pdf
Operating system notes pdfOperating system notes pdf
Operating system notes pdf
Jasleen Kaur (Chandigarh University)
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
krishnajoshi70
 
Basic operating systems in computer and it's uses
Basic operating systems in computer and it's usesBasic operating systems in computer and it's uses
Basic operating systems in computer and it's uses
Surya Vishnuram
 
e.pdf
e.pdfe.pdf
e.pdf
ay3539355
 
Lecture1423726024
Lecture1423726024Lecture1423726024
Lecture1423726024
deepakjeetu
 
Chp 03 - Software PTI - (Shared).pdf
Chp 03 - Software PTI - (Shared).pdfChp 03 - Software PTI - (Shared).pdf
Chp 03 - Software PTI - (Shared).pdf
YUSRA FERNANDO
 
Operating system
Operating systemOperating system
Operating system
marar hina
 

Similar to Ch1 - OS.pdf (20)

unit1 part1.ppt
unit1 part1.pptunit1 part1.ppt
unit1 part1.ppt
 
Operating System Unit 1
Operating System Unit 1Operating System Unit 1
Operating System Unit 1
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.ppt
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
 
Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
 
OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...
OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...
OVERVIEW OF OPERATING SYSTEM -Basic concepts of operating system like functio...
 
os assignment -individual presenation.pptx
os assignment -individual presenation.pptxos assignment -individual presenation.pptx
os assignment -individual presenation.pptx
 
PROJECT 3.pptx
PROJECT 3.pptxPROJECT 3.pptx
PROJECT 3.pptx
 
Os unit 1
Os unit 1Os unit 1
Os unit 1
 
R20CSE2202-OPERATING-SYSTEMS .pdf
R20CSE2202-OPERATING-SYSTEMS        .pdfR20CSE2202-OPERATING-SYSTEMS        .pdf
R20CSE2202-OPERATING-SYSTEMS .pdf
 
Operating system notes pdf
Operating system notes pdfOperating system notes pdf
Operating system notes pdf
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
 
Basic operating systems in computer and it's uses
Basic operating systems in computer and it's usesBasic operating systems in computer and it's uses
Basic operating systems in computer and it's uses
 
e.pdf
e.pdfe.pdf
e.pdf
 
Lecture1423726024
Lecture1423726024Lecture1423726024
Lecture1423726024
 
Chp 03 - Software PTI - (Shared).pdf
Chp 03 - Software PTI - (Shared).pdfChp 03 - Software PTI - (Shared).pdf
Chp 03 - Software PTI - (Shared).pdf
 
Operating system
Operating systemOperating system
Operating system
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

Ch1 - OS.pdf

  • 1. 1 Sultan S. FCSE 2021 Chapter- 1 INTRODUCTION TO OPERATING SYSTEM A modern computer system consists of one or more processors, some main memory, disks, printers, a keyboard, a display, network interfaces, and other input/output devices. All in all, a complex system. Writing programs that keep track of all these components and use them correctly, is an extremely difficult job. For this reason, computers are equipped with a layer of software called the operating system, whose job is to manage all these devices and provide user programs with a simpler interface to the hardware An operating System is an intermediary between users and computer hardware and controls the execution of all kinds of programs. • It provides users an environment in which a user can execute programs conveniently and efficiently. • In technical terms, it is software which manages hardware. • An operating System controls the allocation of resources and services such as memory, processors, devices and information. Generally, the OS perform two basically unrelated functions OPERATING SYSTEM AS AN EXTENDED MACHINE: • In general, to make a system with set of physical devices work, systems architecture including instruction set, memory organization, I/O and bus structures must be known in- order to write the machine language that commands the physical devices to work. • But due to the amount of complexity among different architectures and need to master the machine language that varies from one architecture to another, it became difficult for common peoples to access the system. • Hence operating system was created whose function is to present the user with the equivalent of an extended machine or virtual machine that is easier to program than the underlying hardware. This is achieved by variety of services that programs can obtain using special instructions called system calls. OPERATING SYSTEM AS A RESOURCE MANAGER: • The job of the operating system is to provide for an orderly and controlled allocation of the processors, memories, and I/O devices among the various programs competing for them. • As an example, what would happen if three programs running on some computer all tried to print their output simultaneously on the same printer? The first few lines of printout might be from program 1, the next few from program 2, then some from program 3, and so forth. The result would be chaos. So operating system buffers all the output destined
  • 2. 2 Sultan S. FCSE 2021 for the printer on the disk. When one output is printed completely, then the next output stored is taken and printed. 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 Computer System Components 1. Hardware - provides basic computing resources (CPU, memory, I/O devices). 2. Operating system - controls and coordinates the use of the hardware among the various application programs for the various users. 3. Applications programs - define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). 4. Users (people, machines, other computers). What are the functions of the operating system? The following are the important function of the operating system. Memory Management Processor Management Device Management File Management Security Control over system performance Job accounting Error detecting aids Coordination between other software and users o Memory Management An operating system manages the allocation and deallocation of the memory to various processes and ensures that the other process does not consume the memory allocated to one process. Operating System does the following activities for memory management. • Keeps tracks of primary memory i.e. what part of it are in use by whom, which part are not in use. • In multiprogramming, OS decides which process will get memory when and how much. • Allocates the memory when the process requests it to do so. • De-allocates the memory when the process no longer needs it or has been terminated.
  • 3. 3 Sultan S. FCSE 2021 o Processor Management An operating system manages the processor’s working by allocating various jobs to it and ensuring that each process receives enough time from the processor to function properly. OS decides which process gets the processor when and how much time. Operating System does the following activities for processor management. • Keeps tracks of processor and status of process. Program responsible for this task is known as traffic controller. • Allocates the processor (CPU) to a process. • De-allocates processor when processor is no longer required. o Device Management There are various input and output devices. An operating system controls the working of these input-output devices. It receives the requests from these devices, performs a specific task, and communicates back to the requesting process. Operating System does the following activities for device management. o Keeps tracks of all devices. Program responsible for this task is known as the I/O controller. Decides which process gets the device when and for how much time. o Allocates the device in the efficient way. o De-allocates devices. o File Management An operating system keeps track of information regarding the creation, deletion, transfer, copy, and storage of files in an organized way. It also maintains the integrity of the data stored in these files, including the file directory structure, by protecting against unauthorized access Operating System does the following activities for file management. • Keeps track of information, location, uses, status etc. The collective facilities are often known as file system. • Decides who gets the resources. • Allocates the resources. • De-allocates the resources. Security – The operating system provides various techniques which assure the integrity and confidentiality of user data Following security measures are used to protect user data: Protection against unauthorized access through login. Protection against intrusion by keeping Firewall active.
  • 4. 4 Sultan S. FCSE 2021 Protecting the system memory against malicious access. Displaying messages related to system vulnerabilities. Job Scheduling: In a multitasking operating system where multiple programs run simultaneously, the operating system determines which applications should run in which order and how time should be allocated to each application. Error detecting aids From time to time, the operating system checks the system for any external threat or malicious software activity. It also checks the hardware for any type of damage. This process displays several alerts to the user so that the appropriate action can be taken against any damage caused to the system Coordination between other software and users -- Coordination and assignment of compilers, interpreters, assemblers and other software to the various users of the computer systems. Control over system performance -- Recording delays between request for a service and response from the system. Types of operating system (Historical development of Operating System) Operating systems are there from the very first computer generation. Operating systems keep evolving over the period of time. Following are few of the important types of operating system which are most commonly used. Early Systems - bare machine (early 1950s) - First Generation. Bare machine is logical hardware which is used to execute the program in the processor without using the operating system • Initially, when the operating systems are not developed, the execution of an instruction is done by directly on hardware without using any interfering hardware, at that time the only drawback was that the Bare machines accepting the instruction in only machine language, due to this those person who has sufficient knowledge about Computer field are able to operate a computer. so after the development of the operating system Bare machine is referred to as inefficient. • Early Software o Assemblers, loaders, Linkers, Libraries of common subroutines, Compilers, Device drivers. Inefficient use of expensive resources ✓ Low CPU utilization ✓ Significant amount of setup time. Simple Batch Systems - Second Generation. Batch processing is a technique in which Operating System collects one programs and data together in a batch before processing starts.
  • 5. 5 Sultan S. FCSE 2021 The users of batch operating system do not interact with the computer directly. Each user prepares his job on an off-line device like punch cards and submits it to the computer operator. Operating system does the following activities related to batch processing. ✓ OS defines a job which has predefined sequence of commands, programs and data as a single unit. ✓ OS keeps a number a jobs in memory and executes them without any manual information. ✓ Jobs are processed in the order of submission i.e. first come first served fashion. ✓ When job completes its execution, its memory is released and the output for the job gets copied into an output spool for later printing or processing. Advantages batch processing ✓ Batch processing takes much of the work of the operator to the computer. ✓ Increased performance as a new job gets started as soon as the previous job finished without any manual intervention. Disadvantages ✓ Difficult to debug program. ✓ If a job fails, then the other jobs have to wait for an unknown time till the issue is resolved. ✓ Lack of interaction between the user and the job. ✓ CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU. To speed up processing, jobs with similar needs are batched together and run as a group. Thus, the programmers left their programs with the operator. The operator then sorts programs into batches with similar requirements. • Use an operator (somebody to work the machine) • Add a card reader (a device to read programs written on punched cards) • Reduce setup time by batching similar jobs • Automatic job sequencing - automatically transfers control from one job to another. First rudimentary operating system.
  • 6. 6 Sultan S. FCSE 2021 • Resident monitor is a type of system software program that was used in many early computers from the 1950s to 1970s. The name is derived from a program which is always present in the computer's memory, thus being "resident" • The resident monitor works like an operating system that controls the instructions and performs all necessary functions. It also works like job sequencer because it also sequences the job and sends them to the processor. • After scheduling the job Resident monitors loads the programs one by one into the main memory according to their sequences. One most important factor about the resident monitor is that when the program execution occurred there is no gap between the program execution and the processing is going to be faster Parts of resident monitor • Control language interpreter - responsible for reading and carrying out instructions on the cards. • Loader - Loads all the necessary system and application programs into the main memory. • Device drivers. is used to managing the connecting input-output devices to the system. So basically it is the interface between the user and the system. • Interrupt Processing. it processes the all occurred interrupt to the system. Problems: 1. How does the monitor know about the nature of the job (e.g., FORTRAN versus Assembly) or which program to execute?
  • 7. 7 Sultan S. FCSE 2021 2. How does the monitor distinguish a) Job from job? b) Data from program? Solution: introduce control cards • Special cards that tell the resident monitor which programs to run • Problem: Slow Performance - since I/O and CPU could not overlap, and card reader very slow. • Solution: Off-line operation - speed up computation by loading jobs into memory from tapes and card reading and line printing done off-line using smaller machines. This removes the need for relatively slow input devices. Instead, data is stored in files on a high-speed data storage device. Advantage of off-line operation - main computer not constrained by the speed of the card readers and line printers, but only by the speed of faster magnetic tape units. • No changes need to be made to the application programs to change from direct to off-line I/O operation. • Process input to faster device • More efficient use of CPU Device • Independence - program uses logical devices, not physical devices Overlap of I/O and CPU Processing • After CPU reads info from buffer, input device begins next input immediately • Doesn’t wait for CPU to initiate it • specialized card readers and printers • satellite processing - small computer does transfer from/to mag tape or disk Spooling (Simultaneous Peripheral Operation On-Line) - overlap the I/O of one job with the computation of another job. • While executing one job, the operating system: ✓ Reads the next job from the card reader into a storage area on the disk (job queue). ✓ Outputs the printout of previous job from disk to the line printer. ✓ CPU & I/O Utilization much higher • Job pool - data structure that allows the operating system to select which job to run next, in order to increase CPU utilization, Job Scheduling
  • 8. 8 Sultan S. FCSE 2021 Multiprogramming and Time Sharing- Third Generation Multiprogramming • When two or more programs are residing in memory at the same time. Multiprogramming increases CPU utilization by organizing jobs. The CPU is shared between them. Following figure shows the memory layout for a multiprogramming system. Operating system 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 job in the memory. ✓ Multiprogramming operating system monitors 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 Advantages of Multiprogramming ❖ High and efficient CPU utilization. ❖ User feels that many programs are allotted CPU almost simultaneously. Disadvantages of Multiprogramming ❖ CPU scheduling is required. ❖ To accommodate many jobs in memory, memory management is required. OS Features Needed for Multiprogramming • Memory management - the system must allocate the memory to several jobs. • CPU scheduling - the system must choose among several jobs ready to run. • Allocation of devices.
  • 9. 9 Sultan S. FCSE 2021 Time-Sharing Systems- Interactive Computing ✓ User Interaction is the key ✓ Give each user the illusion that she/he has full use of the entire machine. ✓ Job Switching The CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is allocated to a job only if the job is in memory). • A job is swapped in and out of memory to the disk. • Put limit on how long each job can use CPU before a job switch occurs Time sharing is a technique which enables many people, located at various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a logical extension of multiprogramming. Processor's time which is shared among multiple users simultaneously is termed as time-sharing. The main difference between Multi programmed Batch Systems and Time- Sharing Systems is that in case of multi programmed batch systems, objective is to maximize processor use, whereas in Time-Sharing Systems objective is to minimize response time. Multiple jobs are executed by the CPU by switching between them, but the switches occur so frequently. Thus, the user can receive an immediate response. For example, in a transaction processing, processor execute each user program in a short burst or quantum of computation. That is if n users are present, each user can get time quantum. When the user submits the command, the response time is in few seconds at most. Operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time. Computer systems that were designed primarily as batch systems have been modified to time-sharing systems. • Most efficient for many users to share a large computer. • The CPU is shared between several processes. • Each process belongs to a user and I/O is to/from a separate terminal for each user. • On-line file system must be available for users to access data and code Multitasking Multi-tasking refers to term where multiple jobs are executed by the CPU simultaneously by switching between them. Switches occur so frequently that the users may interact with each program while it is running. Operating system does the following activities related to multitasking. ✓ Multitasking Operating Systems are also known as Time-sharing systems. ✓ A time-shared operating system uses concept of CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared CPU.
  • 10. 10 Sultan S. FCSE 2021 ✓ When a process executes, it typically executes for only a very short time before it either finishes or needs to perform I/O. During this time a CPU can be utilized by another process. ✓ Operating system allows the users to share the computer simultaneously. Since each action or command in a time-shared system tends to be short, only a little CPU time is needed for each user. ✓ As the system switches CPU rapidly from one user/program to the next, each user is given the impression that he/she has his/her own CPU, whereas actually one CPU is being shared among many users. Advantages of Timesharing operating systems are following ✓ Provide advantage of quick response. ✓ Avoids duplication of software. ✓ Reduces CPU idle time. Disadvantages of Timesharing operating systems are following. ✓ Problem of reliability. ✓ Question of security and integrity of user programs and data. ✓ Problem of data communication. The Fourth Generation (1980-Present) Personal Computers operating system: When personal computers were introduced, there was a need for an operating system for this new type of computer. The personal computer operating system job is to provide a good interface to a single user. • Single user systems, portable. • I/O devices - keyboards, mice, display screens, small printers. • Laptops and palmtops, Smart cards, Wireless devices. • Advantages: user convenience, responsiveness, ubiquitous They are widely used for word processing, spreadsheets, and Internet access. Common examples are Windows 98, Windows 2000, the Macintosh operating system, and Linux
  • 11. 11 Sultan S. FCSE 2021 Parallel systems The need for more speed and efficiency led to the design of parallel systems: multiple CPUs on the same machine. Each CPU can be used to serve one program or a part of a program, which means that many tasks can be accomplished in parallel instead of serially. The operating systems required for this are more complex than those that support single CPUs. Distributed operating System Distributed systems use multiple central processors to serve multiple real time application and multiple users. Data processing jobs are distributed among the processors accordingly to which one can perform each job most efficiently. The processors communicate with one another through various communication lines (such as high-speed bus or telephone lines). These are referred as loosely coupled systems or distributed systems. Loosely coupled system - each processor has its own local memory; processors communicate with one another through various communication lines, such as high-speed networks. Operating system does the following activities related to distributed environment. ✓ OS Distributes computation logics among several physical processors. ✓ The processors do not share memory or a clock. ✓ Instead, each processor has its own local memory. ✓ OS manages the communications between the processors. ✓ They communicate with each other through various communication lines. The advantages of distributed systems are following. • Resource sharing facility • Computation Speedup via electronic mail. • Reliability. • Load Balance Network/server operating System In a network operating system, the users are aware of the existence of multiple computers and can log in to remote machines and copy files from one machine to another. Each machine runs its own local operating system and has its own local user. Server operating system run on servers, which are either very large personal computers, workstations, or even mainframes and provides server the capability to manage data, users, groups, security, applications, and other networking functions. They serve multiple users at once over a network and allow the users to share hardware and software resources. Servers can provide print service, file service, or Web service. Internet providers run many server machines to support their customers and Web sites use servers to store the Web pages and handle the incoming requests. Examples of network/server operating systems are Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, and Mac OS
  • 12. 12 Sultan S. FCSE 2021 The advantages of network/server operating systems are. • Centralized servers are highly stable. • Security is server managed. • Upgrades to new technologies and hardware can be easily integrated into the system. • Remote access to servers is possible from different locations and types of systems. The disadvantages of network/server operating systems are. • High cost of buying and running a server. • Dependency on a central location for most operations. • Regular maintenance and updates are required. Real Time operating System • Real time operating systems focusses on completing some job/process in an exact time in which the job has to be completed. Real-time operating system has well-defined, fixed time constraints otherwise system will fail. For example, if a car is moving down an assembly line, certain actions must take place at certain instants of time, if a welding robot, welds too early or too late, the car will be ruined. • The Operating system must guarantee response to events within fixed periods of time to ensure correct performance • So hard real time system are systems in which deadline cannot be missed, If deadlines are missed it leads to failure. • Another kind of real-time system is a soft real-time system, in which missing an occasional deadline is acceptable. Digital audio or multimedia systems fall in this category. • VxWorks and QNX are well-known real-time operating systems Interactivity Interactivity refers that a User is capable to interact with computer system. Operating system does the following activities related to interactivity. OS provides user an interface to interact with system. OS manages input devices to take inputs from the user. For example, keyboard. OS manages output devices to show outputs to the user. For example, Monitor. OS Response time needs to be short since the user submits and waits for the result. Operating System Services An Operating System provides services to both the users and to the programs. ➢ It provides programs, an environment to execute. ➢ It provides users, services to execute the programs in a convenient manner.
  • 13. 13 Sultan S. FCSE 2021 The following are few common services provided by operating systems. ❖ Program execution ❖ I/O operations ❖ File System manipulation ❖ Communication ❖ Error Detection ❖ Resource Allocation ❖ Protection Program execution Operating system handles many kinds of activities from user programs to system programs like printer spooler, name servers, file server etc. Each of these activities is encapsulated as a process. A process includes the complete execution context (code to execute, data to manipulate, registers, OS resources in use). Following are the major activities of an operating system with respect to program management. ✓ Loads a program into memory. ✓ Executes the program and handles program's execution ✓ Provides a mechanism for process synchronization, communication and deadlock handling. I/O Operation I/O subsystem comprised of I/O devices and their corresponding driver software. Drivers hides the peculiarities of specific hardware devices from the user as the device driver knows the peculiarities of the specific device. Operating System manages the communication between user and device drivers. Following are the major activities of an operating system with respect to I/O Operation. ✓ I/O operation means read or write operation with any file or any specific I/O device. ✓ Program may require any I/O device while running. ✓ Operating system provides the access to the required I/O device when required. File system manipulation A file represents a collection of related information. A file system is normally organized into directories for easy navigation and usage. Following are the major activities of an operating system with respect to file management. ✓ Program needs to read a file or write a file. ✓ The operating system gives the permission to the program for operation on file. ✓ Operating System provides an interface to the user to create/delete files or directories. ✓ Operating System provides an interface to create the backup of file system.
  • 14. 14 Sultan S. FCSE 2021 Communication Operating system manages communications between processes. OS handles routing and connection strategies and the problems of contention and security. Following are the major activities of an operating system with respect to communication. ✓ Two processes often require data to be transferred between them. ✓ Communication may be implemented by two methods either by Shared Memory or by Message Passing. Error handling Error can occur anytime and anywhere in CPU, in I/O devices or in the memory. Following are the major activities of an operating system with respect to error handling. ✓ OS constantly remains aware of possible errors and takes the appropriate action to ensure correct and consistent computing. Resource Management In case of multi-user or multi-tasking environment, resources such as main memory, CPU cycles and files storage are to be allocated to each user or job. Following are the major activities of an operating system with respect to resource management. ✓ OS manages all kind of resources using schedulers/algorithm for better utilization of CPU. Protection Protection refers to mechanism or a way to control the access of programs, processes, or users to the resources defined by computer systems. Following are the major activities of an operating system with respect to protection. ✓ OS ensures that all access to system resources is controlled. ✓ OS ensures that external I/O devices are protected from invalid access attempts. ✓ OS provides authentication feature for each user by means of a password. ===================End of Chapter- 1===============