Professional Documents
Culture Documents
Chapter 1: Introduction: 1.2 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edition
Chapter 1: Introduction: 1.2 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts - 9 Edition
Chapter 1: Introduction
Operating-System Structure
Operating-System Operations
Process Management
Memory Management
Storage Management
Protection and Security
Kernel Data Structures
Computing Environments
Open-Source Operating Systems
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.2 Silberschatz, Galvin and Gagne ©2013
To describe the basic organization of computer systems A program that acts as an intermediary between a user of a
To provide a grand tour of the major components of computer and the computer hardware
operating systems Operating system goals:
To give an overview of the many types of computing Execute user programs and make solving user problems
environments easier
To explore several open-source operating systems Make the computer system convenient to use
Use the computer hardware in an efficient manner
Operating System Concepts – 9th Edition 1.3 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.4 Silberschatz, Galvin and Gagne ©2013
Computer System Structure Four Components of a Computer System
Operating System Concepts – 9th Edition 1.5 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.6 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.7 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.8 Silberschatz, Galvin and Gagne ©2013
Operating System Definition (Cont.) Computer Startup
Operating System Concepts – 9th Edition 1.9 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.10 Silberschatz, Galvin and Gagne ©2013
Computer-system operation I/O devices and the CPU can execute concurrently
One or more CPUs, device controllers connect through common Each device controller is in charge of a particular device type
bus providing access to shared memory Each device controller has a local buffer
Concurrent execution of CPUs and devices competing for CPU moves data from/to main memory to/from local buffers
memory cycles
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 Edition 1.11 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.12 Silberschatz, Galvin and Gagne ©2013
Common Functions of Interrupts I/O Structure
Interrupt transfers control to the interrupt service routine After I/O starts, control returns to user program only upon I/O
generally, through the interrupt vector, which contains the completion
addresses of all the service routines Wait instruction idles the CPU until the next interrupt
Interrupt architecture must save the address of the Wait loop (contention for memory access)
interrupted instruction At most one I/O request is outstanding at a time, no
A trap or exception is a software-generated interrupt simultaneous I/O processing
caused either by an error or a user request After I/O starts, control returns to user program without waiting
An operating system is interrupt driven for I/O completion
System call – request to the OS to allow user to wait for
I/O completion
Device-status table contains entry for each I/O device
indicating its type, address, and state
OS indexes into I/O device table to determine device
status and to modify table entry to include interrupt
Operating System Concepts – 9th Edition 1.13 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.14 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.15 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.16 Silberschatz, Galvin and Gagne ©2013
Storage Hierarchy Storage-Device Hierarchy
Operating System Concepts – 9th Edition 1.17 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.18 Silberschatz, Galvin and Gagne ©2013
Important principle, performed at many levels in a computer Used for high-speed I/O devices able to transmit
(in hardware, operating system, software) information at close to memory speeds
Information in use copied from slower to faster storage Device controller transfers blocks of data from buffer
temporarily storage directly to main memory without CPU
Faster storage (cache) checked first to determine if intervention
information is there Only one interrupt is generated per block, rather than
If it is, information used directly from the cache (fast) the one interrupt per byte
If not, data copied to cache and used there
Cache smaller than storage being cached
Cache management important design problem
Cache size and replacement policy
Operating System Concepts – 9th Edition 1.19 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.20 Silberschatz, Galvin and Gagne ©2013
How a Modern Computer Works Computer-System Architecture
Operating System Concepts – 9th Edition 1.21 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.22 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.23 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.24 Silberschatz, Galvin and Gagne ©2013
Clustered Systems
Operating System Concepts – 9th Edition 1.25 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.27 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.28 Silberschatz, Galvin and Gagne ©2013
Operating-System Operations Operating-System Operations (cont.)
Interrupt driven (hardware and software) Dual-mode operation allows OS to protect itself and other system
Hardware interrupt by one of the devices components
Software interrupt (exception or trap): User mode and kernel mode
Software error (e.g., division by zero) Mode bit provided by hardware
Request for operating system service Provides ability to distinguish when system is running user
Other process problems include infinite loop, processes code or kernel code
modifying each other or the operating system Some instructions designated as privileged, only
executable in kernel mode
System call changes mode to kernel, return from call resets
it to user
Increasingly CPUs support multi-mode operations
i.e. virtual machine manager (VMM) mode for guest VMs
Operating System Concepts – 9th Edition 1.29 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.30 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.31 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.32 Silberschatz, Galvin and Gagne ©2013
Process Management Activities Memory Management
The operating system is responsible for the following activities in To execute a program all (or part) of the instructions must be in
connection with process management: memory
Creating and deleting both user and system processes All (or part) of the data that is needed by the program must be in
memory.
Suspending and resuming processes
Memory management determines what is in memory and when
Providing mechanisms for process synchronization
Optimizing CPU utilization and computer response to users
Providing mechanisms for process communication
Memory management activities
Providing mechanisms for deadlock handling
Keeping track of which parts of memory are currently being
used and by whom
Deciding which processes (or parts thereof) and data to
move into and out of memory
Allocating and deallocating memory space as needed
Operating System Concepts – 9th Edition 1.33 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.34 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.35 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.36 Silberschatz, Galvin and Gagne ©2013
Migration of data “A” from Disk to Register
Operating System Concepts – 9th Edition 1.38 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.39 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.40 Silberschatz, Galvin and Gagne ©2013
Computing Environments - Traditional Computing Environments - Mobile
Operating System Concepts – 9th Edition 1.43 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.44 Silberschatz, Galvin and Gagne ©2013
Computing Environments – Distributed
Distributed computiing
Collection of separate, possibly heterogeneous, systems
networked together
Network is a communications path, TCP/IP most common
– Local Area Network (LAN)
– Wide Area Network (WAN)
– Metropolitan Area Network (MAN)
– Personal Area Network (PAN)
Network Operating System provides features between
systems across network
Communication scheme allows systems to exchange
messages
Illusion of a single system
Operating System Concepts – 9th Edition 1.45 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.48 Silberschatz, Galvin and Gagne ©2013
Computing Environments - Virtualization
Operating System Concepts – 9th Edition 1.49 Silberschatz, Galvin and Gagne ©2013
Operating System Concepts – 9th Edition 1.51 Silberschatz, Galvin and Gagne ©2013
Computing Environments – Real-Time Embedded Systems Open-Source Operating Systems
Real-time embedded systems most prevalent form of computers Operating systems made available in source-code format rather
Vary considerable, special purpose, limited purpose OS, than just binary closed-source
real-time OS Counter to the copy protection and Digital Rights
Use expanding Management (DRM) movement
Many other special computing environments as well Started by Free Software Foundation (FSF), which has “copyleft
Some have OSes, some perform tasks without an OS ” GNU Public License (GPL)
Examples include GNU/Linux and BSD UNIX (including core of
Real-time OS has well-defined fixed time constraints
Mac OS X), and many more
Processing must be done within constraint
Can use VMM like VMware Player (Free on Windows), Virtualbox
Correct operation only if constraints met (open source and free on many platforms -
http://www.virtualbox.com)
Use to run guest operating systems for exploration
Operating System Concepts – 9th Edition 1.53 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9th Edition 1.54 Silberschatz, Galvin and Gagne ©2013
End of Chapter 1
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013