Operating Systems Concepts
Operating Systems Concepts
OPERATING SYSTEMS
Operating System Concepts – 9th Edition 1.1 Silberschatz, Galvin and Gagne ©2013
Interrupt-drive I/O Cycle
Operating System Concepts – 9th Edition 1.2 Silberschatz, Galvin and Gagne ©2013
Interrupt Timeline
Operating System Concepts – 9th Edition 1.3 Silberschatz, Galvin and Gagne ©2013
Storage-Device Hierarchy
Operating System Concepts – 9th Edition 1.4 Silberschatz, Galvin and Gagne ©2013
Types of OS
Batch Operating System
Multitasking/Time Sharing OS
Multiprocessing OS
Real Time OS
Distributed OS
Network OS/ Clustered
Mobile OS
Operating System Concepts – 9th Edition 1.5 Silberschatz, Galvin and Gagne ©2013
Memory Layout for Multiprogrammed System
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
Concurrency by multiplexing the CPUs among the processes / threads
Operating System Concepts – 9th Edition 1.7 Silberschatz, Galvin and Gagne ©2013
Timer
Timer to prevent infinite loop (or process hogging resources)
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 zero generate an interrupt
Set up before scheduling process to regain control or terminate program
that exceeds allotted time
Memory Management
To execute a program all (or part) of the instructions must be in memory
All (or part) of the data that is needed by the program must be in memory.
Memory management determines what is in memory and when
Optimizing CPU utilization and computer response to users
Memory management activities
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.9 Silberschatz, Galvin and Gagne ©2013
Storage Management
OS provides uniform, 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
Primitives to manipulate files and directories
Mapping files onto secondary storage
Backup files onto stable (non-volatile) storage media
Operating System Concepts – 9th Edition 1.10 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
Proper management is of central importance
Entire speed of computer operation hinges on disk subsystem and its algorithms
OS activities
Free-space management
Storage allocation
Disk scheduling
Some storage need not be fast
Tertiary storage includes optical storage, magnetic tape
Still must be managed – by OS or applications
Varies between WORM (write-once, read-many-times) and RW (read-write)
Operating System Concepts – 9th Edition 1.11 Silberschatz, Galvin and Gagne ©2013
Caching