Professional Documents
Culture Documents
Lecture 2
Operating System Concepts – 9th Edition 1.1 Silberschatz, Galvin and Gagne ©2013
Computer System
Management
Operating System
Structure
Operating System Concepts – 9th Edition 1.2 Silberschatz, Galvin and Gagne ©2013
Computer System
Management
Operating System
Structure
Operating System Concepts – 9th Edition 1.3 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Multiprocessors systems
Clustered systems
Operating System Concepts – 9th Edition 1.4 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Single Processor Systems
General-purpose processor
• Most systems use a single general-purpose processor
(one process at a time)
Special-purpose processors
• Most systems have special-purpose processors as
device-specific processors
• For example, a disk-controller microprocessor
receives a sequence of requests from the main CPU and
implements its own disk queue and scheduling
algorithm.
• Also, Digital Signal Processors (DSP), Graphic
Processing Unit (GPU)
Operating System Concepts – 9th Edition 1.5 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Multiprocessors systems
Operating System Concepts – 9th Edition 1.6 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Types of multiprocessors
Operating System Concepts – 9th Edition 1.7 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Multiprocessors systems
• Dual core
• Multi-core
• Blade system
Operating System Concepts – 9th Edition 1.8 Silberschatz, Galvin and Gagne ©2013
A Dual-Core Design
A dual-core processor is a CPU with
two processors or "execution cores" in
the same integrated circuit.
Each processor has its own cache and
controller, which enables it to function
as efficiently as a single processor
Operating System Concepts – 9th Edition 1.9 Silberschatz, Galvin and Gagne ©2013
A Multi-Core Design
A multicore processor is a single
computing component comprised
of two or more CPUs that read and
execute the actual program
instructions.
The cores can
execute multiple instructions in
parallel, increasing the
performance of software
Operating System Concepts – 9th Edition 1.10 Silberschatz, Galvin and Gagne ©2013
Blade Servers
Blade servers are a relatively recent development
in which multiple processor boards, I/O boards,
and networking boards are placed in the same
chassis.
The difference between these and traditional
multiprocessor systems is that each blade-
processor board boots independently and runs its
own operating system.
Some blade-server boards are multiprocessor as
well, which blurs the lines between types of
computers.
Operating System Concepts – 9th Edition 1.11 Silberschatz, Galvin and Gagne ©2013
Blade Servers
Operating System Concepts – 9th Edition 1.12 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Clusters systems
• The clustered systems are a combination of
hardware clusters and software clusters.
Operating System Concepts – 9th Edition 1.13 Silberschatz, Galvin and Gagne ©2013
Clustered Systems
Operating System Concepts – 9th Edition 1.14 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Single Processor
Systems
Multiprocessors
systems
Clustered systems
Operating System Concepts – 9th Edition 1.15 Silberschatz, Galvin and Gagne ©2013
Computer System
Management
Operating System
Structure
Operating System Concepts – 9th Edition 1.16 Silberschatz, Galvin and Gagne ©2013
Operating System Structure
• Single user cannot keep CPU and I/O devices busy at
all times
Multiprogramming • Multiprogramming organizes jobs (code and data) so
(Batch system) CPU always has one to execute
needed for • A subset of total jobs in system is kept in memory
efficiency • One job selected and run via job scheduling
• When it has to wait (for I/O for example), OS switches
to another job
• 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
• Each user has at least one program executing in
Timesharing memory process
(multitasking) • 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
Operating System Concepts – 9th Edition 1.17 Silberschatz, Galvin and Gagne ©2013
Memory Layout for Multiprogrammed System
Operating System Concepts – 9th Edition 1.18 Silberschatz, Galvin and Gagne ©2013
Operating-System Operations
There are three main concepts
Interrupt
Dual mode
Timer
Operating System Concepts – 9th Edition 1.19 Silberschatz, Galvin and Gagne ©2013
Operating-System Operations
Interrupt driven (hardware and software)
Hardware interrupt
Operating System Concepts – 9th Edition 1.20 Silberschatz, Galvin and Gagne ©2013
Operating-System Operations (cont.)
We must be able to distinguish between the execution of
operating-system code and user defined code.
Operating System Concepts – 9th Edition 1.21 Silberschatz, Galvin and Gagne ©2013
Operating-System Operations (cont.)
Timer
Timer to prevent infinite loop / process hogging resources,
take or use most or all of resources in an unfair or selfish
way
Timer is set to interrupt the computer after some time
period
Keep a counter that is decremented by the physical clock.
Operating system set the counter (privileged instruction)
When counter is zero, OS generates an interrupt
Set up before scheduling process to regain control or
terminate program that exceeds allotted time
Operating System Concepts – 9th Edition 1.22 Silberschatz, Galvin and Gagne ©2013
Operating System
Operating System Concepts – 9th Edition 1.23 Silberschatz, Galvin and Gagne ©2013
Operating-System Resources Managment
Process management
Memory management
Storage management
Operating System Concepts – 9th Edition 1.24 Silberschatz, Galvin and Gagne ©2013
Process Management
A process is a program in execution. It is a unit of work within
the system. Program is a passive entity, process is an active
entity.
Process needs resources to accomplish its task
CPU, memory, I/O, files
Initialization data
Process termination requires reclaim of any reusable
resources
Single-threaded process has one program counter specifying
location of next instruction to execute
Process executes instructions sequentially, one at a time,
until completion
Multi-threaded process has one program counter per thread
Typically system has many processes, some user, some
operating system running concurrently on one or more CPUs
Operating System Concepts – 9th Edition 1.25 Silberschatz, Galvin and Gagne ©2013
Process Management Activities
Operating System Concepts – 9th Edition 1.26 Silberschatz, Galvin and Gagne ©2013
Memory Management
Operating System Concepts – 9th Edition 1.27 Silberschatz, Galvin and Gagne ©2013
Storage Management
OS provides logical view of information storage
Abstracts physical properties to logical storage unit - file
Each medium is controlled by device (i.e., disk drive, tape drive)
Varying properties include access speed, capacity, data-
transfer rate, access method (sequential or random)
File-System management
Files usually organized into directories
Access control on most systems to determine who can access
what
OS activities include
Creating and deleting files and directories
Mapping files onto secondary storage
Backup files onto stable (non-volatile) storage media
Operating System Concepts – 9th Edition 1.28 Silberschatz, Galvin and Gagne ©2013
Mass-Storage Management
Usually disks used to store data that does not fit in main
memory or data that must be kept for a “long” period of
time
Entire speed of computer operation depends on disk
subsystem and its algorithms (First Come First Serve
(FCFS), Shortest Seek Time First (SSTF), SCAN)
OS activities
Free-space management
Storage allocation
Disk scheduling (
Some storage need not be fast
storage includes optical storage, magnetic tape
Still must be managed – by OS or applications
Operating System Concepts – 9th Edition 1.29 Silberschatz, Galvin and Gagne ©2013
Migration of data “A” from Disk to Register
Operating System Concepts – 9th Edition 1.30 Silberschatz, Galvin and Gagne ©2013
Protection and Security
Operating System Concepts – 9th Edition 1.31 Silberschatz, Galvin and Gagne ©2013
Computer
Environment
Operating System Concepts – 9th Edition 1.32 Silberschatz, Galvin and Gagne ©2013
Computing Environments - Traditional
Operating System Concepts – 9th Edition 1.33 Silberschatz, Galvin and Gagne ©2013
Computing Environments – Mobile devices
Operating System Concepts – 9th Edition 1.34 Silberschatz, Galvin and Gagne ©2013
Computing Environments – Distributed
Distributed computing
Collection of separate, possibly
heterogeneous, systems networked together
Network is a communications path, TCP/IP
protocol most common
– Local Area Network (LAN)
– Wide Area Network (WAN)
– Metropolitan Area Network (MAN)
Operating System Concepts – 9th Edition 1.35 Silberschatz, Galvin and Gagne ©2013
Computing Environments – Client-Server
Client-Server Computing
Dummy terminals supplanted by smart PCs
Servers are responding to requests generated
by clients
Operating System Concepts – 9th Edition 1.36 Silberschatz, Galvin and Gagne ©2013
Computing Environments - Peer-to-Peer
Operating System Concepts – 9th Edition 1.37 Silberschatz, Galvin and Gagne ©2013
Computing Environments - Virtualization
Operating System Concepts – 9th Edition 1.38 Silberschatz, Galvin and Gagne ©2013
Computing Environments - Virtualization
Operating System Concepts – 9th Edition 1.39 Silberschatz, Galvin and Gagne ©2013
Computing Environments - Virtualization
Operating System Concepts – 9th Edition 1.40 Silberschatz, Galvin and Gagne ©2013
Computing Environments – Cloud Computing
Operating System Concepts – 9th Edition 1.41 Silberschatz, Galvin and Gagne ©2013
Computing Environments – Cloud Computing
Many types
Public cloud – available via Internet to anyone willing to
pay
Private cloud – run by a company for the company’s
own use
Hybrid cloud – includes both public and private cloud
components
Categories of cloud computing
Software as a Service (SaaS) – one or more
applications available via the Internet (i.e., word
processor)
Platform as a Service (PaaS) – software stack ready for
application use via the Internet (i.e., a database server)
Infrastructure as a Service (IaaS) – servers or storage
available over Internet (i.e., storage available for backup
use)
Operating System Concepts – 9th Edition 1.42 Silberschatz, Galvin and Gagne ©2013
Computing Environments – Cloud Computing
Cloud computing
environments composed of
traditional OSes, plus VMMs,
plus cloud management
tools
Internet connectivity
requires security like
firewalls
Load balancers spread
traffic across multiple
applications
Operating System Concepts – 9th Edition 1.43 Silberschatz, Galvin and Gagne ©2013
End of Chapter 2
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013