CH 1
CH 1
Reference Materials: (or use any other standard and latest books)
1. Operating Systems Concepts, 10th edition by Abraham Silberschatz
2. Modern Operating Systems, 4th edition by Andrew S. Tanenbaum
3. Operating Systems, Internals and Design Principles, 9th edition by William
Stallings
Operating System Concepts – 9th Edition 1.1 Silberschatz, Galvin and Gagne ©2013
Course Learning Outcomes
Operating System Concepts – 9th Edition 1.2 Silberschatz, Galvin and Gagne ©2013
Chapter 1: Introduction
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
Chapter 1: Introduction
What Operating Systems Do
Computer-System Organization
Computer-System Architecture
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 Edition 1.4 Silberschatz, Galvin and Gagne ©2013
Objectives
To describe the basic organization of computer systems
Operating System Concepts – 9th Edition 1.5 Silberschatz, Galvin and Gagne ©2013
What is an Operating System?
An operating system manages a computer’s hardware.
It also provides a basis for application programs and acts
as an intermediary between the computer user and the
computer hardware
Operating System Concepts – 9th Edition 1.6 Silberschatz, Galvin and Gagne ©2013
What is an Operating System?
Operating System Concepts – 9th Edition 1.7 Silberschatz, Galvin and Gagne ©2013
Computer System Structure
Computer system can be divided into four components:
Memory
I/O devices
2. Operating system
Controls and coordinates use of hardware among
various applications and users
Operating System Concepts – 9th Edition 1.8 Silberschatz, Galvin and Gagne ©2013
Computer System Structure
3. Application programs – define the ways in which the
system resources are used to solve the computing
problems of the users
– Word processors
– Compilers
– web browsers
– Database systems
– Video games
4. Users
People, machines, other computers
Operating System Concepts – 9th Edition 1.9 Silberschatz, Galvin and Gagne ©2013
Four Components of a Computer System
Operating System Concepts – 9th Edition 1.10 Silberschatz, Galvin and Gagne ©2013
What Operating Systems Do: User View
Operating System Concepts – 9th Edition 1.11 Silberschatz, Galvin and Gagne ©2013
What Operating Systems Do: User View
Operating System Concepts – 9th Edition 1.12 Silberschatz, Galvin and Gagne ©2013
Operating System Definition: System View
OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and
fair resource use
OS is a control program
Controls execution of programs to prevent errors and
improper use of the computer
Operating System Concepts – 9th Edition 1.13 Silberschatz, Galvin and Gagne ©2013
Operating System Definition (Cont.)
Operating System Concepts – 9th Edition 1.14 Silberschatz, Galvin and Gagne ©2013
Computer Startup
Operating System Concepts – 9th Edition 1.15 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 Edition 1.16 Silberschatz, Galvin and Gagne ©2013
Computer-System Operation
Operating System Concepts – 9th Edition 1.17 Silberschatz, Galvin and Gagne ©2013
Computer-System Operation
Operating System Concepts – 9th Edition 1.18 Silberschatz, Galvin and Gagne ©2013
Common Functions of Interrupts
Operating System Concepts – 9th Edition 1.19 Silberschatz, Galvin and Gagne ©2013
Interrupt Handling
Operating System Concepts – 9th Edition 1.20 Silberschatz, Galvin and Gagne ©2013
I/O Structure
Operating System Concepts – 9th Edition 1.21 Silberschatz, Galvin and Gagne ©2013
I/O Structure
After I/O starts, control returns to user program without
waiting for I/O completion
Operating System Concepts – 9th Edition 1.22 Silberschatz, Galvin and Gagne ©2013
Storage Definitions and Notation Review
Computer storage is generally measured and manipulated
in bytes and collections of bytes.
Operating System Concepts – 9th Edition 1.23 Silberschatz, Galvin and Gagne ©2013
Storage Definitions and Notation Review
The basic unit of computer storage is the bit. A bit can contain one of two values, 0 and 1.
All other storage in a computer is based on collections of bits. Given enough bits, it is
amazing how many things a computer can represent: numbers, letters, images, movies,
sounds, documents, and programs, to name a few. A byte is 8 bits, and on most computers
it is the smallest convenient chunk of storage. For example, most computers don’t have an
instruction to move a bit but do have one to move a byte. A less common term is word,
which is a given computer architecture’s native unit of data. A word is made up of one or
more bytes. For example, a computer that has 64-bit registers and 64-bit memory
addressing typically has 64-bit (8-byte) words. A computer executes many operations in its
native word size rather than a byte at a time.
Computer storage, along with most computer throughput, is generally measured and
manipulated in bytes and collections of bytes.
A kilobyte, or KB, is 1,024 bytes
a megabyte, or MB, is 1,0242 bytes
a gigabyte, or GB, is 1,0243 bytes
a terabyte, or TB, is 1,0244 bytes
a petabyte, or PB, is 1,0245 bytes
Computer manufacturers often round off these numbers and say that a megabyte is 1
million bytes and a gigabyte is 1 billion bytes. Networking measurements are an exception
to this general rule; they are given in bits (because networks move data a bit at a time).
Operating System Concepts – 9th Edition 1.24 Silberschatz, Galvin and Gagne ©2013
Metric Units
Operating System Concepts – 9th Edition 1.26 Silberschatz, Galvin and Gagne ©2013
Storage Structure
Main memory – only large storage media that the CPU
can access directly
Random access
Typically volatile
Operating System Concepts – 9th Edition 1.27 Silberschatz, Galvin and Gagne ©2013
Storage Structure
Operating System Concepts – 9th Edition 1.28 Silberschatz, Galvin and Gagne ©2013
Storage Hierarchy
Operating System Concepts – 9th Edition 1.29 Silberschatz, Galvin and Gagne ©2013
Storage-Device Hierarchy
Operating System Concepts – 9th Edition 1.30 Silberschatz, Galvin and Gagne ©2013
Caching
Important principle, performed at many levels in a
computer (in hardware, operating system, software)
Operating System Concepts – 9th Edition 1.31 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Most systems use a single general-purpose processor
Operating System Concepts – 9th Edition 1.32 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Multiprocessors: Such systems have two or more
processors in close communication, sharing the computer
bus and sometimes the clock, memory, and peripheral
devices
Operating System Concepts – 9th Edition 1.33 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Multiprocessors systems growing in use and importance
Also known as parallel systems, tightly-coupled systems
Advantages include:
1. Increased throughput
2. Economy of scale
3. Increased reliability – graceful degradation or fault
tolerance
The ability to continue providing service proportional to the
level of surviving hardware is called graceful
degradation. Some systems go beyond graceful
degradation and are called fault tolerant, because they
can suffer a failure of any single component and still
continue operation
Operating System Concepts – 9th Edition 1.34 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Multiprocessing systems are of two types:
Operating System Concepts – 9th Edition 1.35 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
More specifically, each CPU in symmetric multiprocessing
runs the same copy of the OS, while in asymmetric
multiprocessing, they split responsibilities typically,
therefore each may have specialized (different) software
and roles.
Operating System Concepts – 9th Edition 1.36 Silberschatz, Galvin and Gagne ©2013
How a Modern Computer Works
Operating System Concepts – 9th Edition 1.37 Silberschatz, Galvin and Gagne ©2013
Multi-chip and Multicore Architecture
Operating System Concepts – 9th Edition 1.38 Silberschatz, Galvin and Gagne ©2013
A Dual-Core Design
Operating System Concepts – 9th Edition 1.39 Silberschatz, Galvin and Gagne ©2013
A Dual-Core Design
Operating System Concepts – 9th Edition 1.40 Silberschatz, Galvin and Gagne ©2013
A Dual-Core Design
UMA
NUMA
Operating System Concepts – 9th Edition 1.41 Silberschatz, Galvin and Gagne ©2013
A Dual-Core Design
Operating System Concepts – 9th Edition 1.42 Silberschatz, Galvin and Gagne ©2013
Clustered Systems
They are composed of two or more individual systems—or
nodes—joined together.
Operating System Concepts – 9th Edition 1.43 Silberschatz, Galvin and Gagne ©2013
Clustered Systems
Operating System Concepts – 9th Edition 1.44 Silberschatz, Galvin and Gagne ©2013
Operating System Structure
Operating System Concepts – 9th Edition 1.45 Silberschatz, Galvin and Gagne ©2013
Operating System Structure
Operating System Concepts – 9th Edition 1.46 Silberschatz, Galvin and Gagne ©2013
Operating System Structure
Timesharing (multitasking) is the ability of an
operating system to execute more than one task
simultaneously on a single processor machine.
Operating System Concepts – 9th Edition 1.48 Silberschatz, Galvin and Gagne ©2013
Operating System Structure
Multiprocessing is the ability of an operating system
to execute more than one process simultaneously on
a multi processor machine. In this, a computer uses
more than one CPU at a time.
Operating System Concepts – 9th Edition 1.49 Silberschatz, Galvin and Gagne ©2013
Operating-System Operations
Operating System Concepts – 9th Edition 1.50 Silberschatz, Galvin and Gagne ©2013
Operating-System Operations
Operating System Concepts – 9th Edition 1.51 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.
Operating System Concepts – 9th Edition 1.53 Silberschatz, Galvin and Gagne ©2013
Process Management Activities
Operating System Concepts – 9th Edition 1.54 Silberschatz, Galvin and Gagne ©2013
Memory Management
Operating System Concepts – 9th Edition 1.55 Silberschatz, Galvin and Gagne ©2013
Memory Management
Operating System Concepts – 9th Edition 1.56 Silberschatz, Galvin and Gagne ©2013
Storage Management
File-System management
OS activities include
Creating and deleting files and directories
Operating System Concepts – 9th Edition 1.57 Silberschatz, Galvin and Gagne ©2013
Performance of Various Levels of Storage
Operating System Concepts – 9th Edition 1.58 Silberschatz, Galvin and Gagne ©2013
Migration of Integer A from Disk to Register
Operating System Concepts – 9th Edition 1.59 Silberschatz, Galvin and Gagne ©2013
I/O Subsystem
One purpose of OS is to hide peculiarities of hardware devices from the
user
Operating System Concepts – 9th Edition 1.60 Silberschatz, Galvin and Gagne ©2013
Protection and Security
Operating System Concepts – 9th Edition 1.61 Silberschatz, Galvin and Gagne ©2013
Homework
Write answers to exercise question from 1.1 to 1.11
Operating System Concepts – 9th Edition 1.62 Silberschatz, Galvin and Gagne ©2013
End of Chapter 1
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013