Chapter 1 Introduction
Chapter 1 Introduction
•Operating System Concepts – 9th •1.2 •Silberschatz, Galvin and Gagne ©2013
Objectives
•Operating System Concepts – 9th •1.3 •Silberschatz, Galvin and Gagne ©2013
What is an Operating System?
•Operating System Concepts – 9th •1.4 •Silberschatz, Galvin and Gagne ©2013
What is an Operating System?
•Operating System Concepts – 9th •1.5 •Silberschatz, Galvin and Gagne ©2013
Why should we learn OS as a student?
•Operating System Concepts – 9th •1.6 •Silberschatz, Galvin and Gagne ©2013
Computer System Structure
●Computer system can be divided into four components:
1) Hardware – provides basic computing resources
CPU, memory, I/O devices
2) Operating system
Controls and coordinates use of hardware among
various applications and users
Client
Client
Client
Server Client
Client Client
Client
•Operating System Concepts – 9th •1.8 •Silberschatz, Galvin and Gagne ©2013
Four Components of a Computer System
•Operating System Concepts – 9th •1.9 •Silberschatz, Galvin and Gagne ©2013
What Operating Systems Do
•Operating System Concepts – 9th •1.10 •Silberschatz, Galvin and Gagne ©2013
Operating System Definition
•Operating System Concepts – 9th •1.11 •Silberschatz, Galvin and Gagne ©2013
Operating System Definition (Cont.)
•Operating System Concepts – 9th •1.12 •Silberschatz, Galvin and Gagne ©2013
Computer Startup
•Operating System Concepts – 9th •1.13 •Silberschatz, Galvin and Gagne ©2013
Computer System Organization
●Computer-system operation
●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
•Operating System Concepts – 9th •1.14 •Silberschatz, Galvin and Gagne ©2013
Computer-System Operation
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
•Operating System Concepts – 9th •1.15 •Silberschatz, Galvin and Gagne ©2013
Common Functions of Interrupts
Interrupt Service Routine. It's a specialized function within an operating system that gets
triggered in response to an interrupt.
•Operating System Concepts – 9th •1.16 •Silberschatz, Galvin and Gagne ©2013
Interrupt Handling
•Operating System Concepts – 9th •1.17 •Silberschatz, Galvin and Gagne ©2013
Direct Memory Access Structure
•Operating System Concepts – 9th •1.18 •Silberschatz, Galvin and Gagne ©2013
How a Modern Computer Works
•Operating System Concepts – 9th •1.19 •Silberschatz, Galvin and Gagne ©2013
Batch operating system
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.
•Operating System Concepts – 9th •1.20 •Silberschatz, Galvin and Gagne ©2013
•Operating System Concepts – 9th •1.21 •Silberschatz, Galvin and Gagne ©2013
Batch Operating System
Jo
bs
3
Job
Use Batch 2
r3
•Operating System Concepts – 9th •1.22 •Silberschatz, Galvin and Gagne ©2013
Operating System Structure
A multiprogramming
operating system is a
type of operating
system that allows Memory Layout for
multiple programs to Multiprogrammed System
run simultaneously on
a single CPU.
•Operating System Concepts – 9th •1.23 •Silberschatz, Galvin and Gagne ©2013
Working of Multiprogrammed System
Main Memory
Process 1
Process 2
Process 3 CPU
Operating System
•Operating System Concepts – 9th •1.24 •Silberschatz, Galvin and Gagne ©2013
Operating System Structure
●Timesharing (multitasking) is logical extension in which CPU switches jobs so
frequently that users can interact with each job while it is running, creating
interactive computing
●Response time should be < 1 second
Processor's time which is shared among multiple users simultaneously is
termed as time-sharing.
●Each user has at least one program executing in memory 🢡process
●If several jobs ready to run at the same time 🢡 CPU scheduling
●If processes don’t fit in memory, swapping moves them in and out to run
●Virtual memory allows execution of processes not completely in memory
Process time
Time Quanta = 2
P1 2
P1 P2 P3
P2 3 P1
0 2 4 6
P3 2 7
CPU time
•Operating System Concepts – 9th •1.25 •Silberschatz, Galvin and Gagne ©2013
The main difference between Multiprogrammed Batch
Systems and Time-Sharing Systems is that in case of
multiprogrammed systems, objective is to maximize
processor use, whereas in Time-Sharing Systems objective is
to minimize response time.
•Operating System Concepts – 9th •1.26 •Silberschatz, Galvin and Gagne ©2013
Operating-System Operations
●Interrupt driven by hardware
●Software error or request creates exception or trap
●Division by zero, request for operating system service
•Operating System Concepts – 9th •1.27 •Silberschatz, Galvin and Gagne ©2013
Transition from User to Kernel Mode
System calls provide the means for a user program to ask the operating system to perform tasks
reserved for the operating system on the user program’s behalf.
•Operating System Concepts – 9th •1.28 •Silberschatz, Galvin and Gagne ©2013
Virtualization
•Operating System Concepts – 9th •1.29 •Silberschatz, Galvin and Gagne ©2013
Computing Environments – Cloud Computing
•Operating System Concepts – 9th •1.30 •Silberschatz, Galvin and Gagne ©2013
Computing Environments – Cloud Computing
•Operating System Concepts – 9th •1.32 •Silberschatz, Galvin and Gagne ©2013
Computing Environments – Real-Time Embedded Systems
•Operating System Concepts – 9th •1.33 •Silberschatz, Galvin and Gagne ©2013
Computing Environments – Real-Time Embedded Systems
•Operating System Concepts – 9th •1.34 •Silberschatz, Galvin and Gagne ©2013
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.
•Operating System Concepts – 9th •1.35 •Silberschatz, Galvin and Gagne ©2013
Distributed operating System
•Operating System Concepts – 9th •1.36 •Silberschatz, Galvin and Gagne ©2013
Network operating System
Network Operating System runs on a server and and provides server the capability
to manage data, users, groups, security, applications, and other networking
functions.
The primary purpose of the network operating system is to allow shared file
and printer access among multiple computers in a network, typically a local area
network (LAN), a private network or to other networks. Examples of network
operating systems are Microsoft Windows Server 2003, Microsoft Windows Server
2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.
•Operating System Concepts – 9th •1.37 •Silberschatz, Galvin and Gagne ©2013
Open-Source Operating Systems
•Operating System Concepts – 9th •1.38 •Silberschatz, Galvin and Gagne ©2013
End of Chapter 1