ch1 Lec 1-1
ch1 Lec 1-1
ch1 Lec 1-1
Operating System Concepts Essentials – 2nd Edition Silberschatz, Galvin and Gagne ©2013
book
1. Operating System Concept by Abraham Silberschatz, Peter B. galvin, Greg Gange
2. Operating Systems - William Stalling 6th edition
Operating System Concepts Essentials – 2nd Edition 1.2 Silberschatz, Galvin and Gagne ©2013
Operating System Definition (Cont.)
Operating System Concepts Essentials – 2nd Edition 1.3 Silberschatz, Galvin and Gagne ©2013
Computer-System Organization
Computer-System Operation
bootstrap program is loaded at power-up or reboot
Typically stored in ROM or EPROM, generally known
as firmware
Initializes all aspects of system
Loads operating system kernel and starts execution
Operating System Concepts Essentials – 2nd Edition 1.4 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 Essentials – 2nd Edition 1.5 Silberschatz, Galvin and Gagne ©2013
Computer System Organization
Computer-system operation
When system is fully booted:
The system waits for some event to occur. The occurrence
of an event is usually signaled by an interrupt from either
the hardware or the software.
Hardware interrupt: Hardware may trigger an
interrupt at any time by sending a signal to the
CPU, usually by way of the system bus.
Software interrupt: Software may trigger an
interrupt by executing a special operation called a
system call (also called a monitor call).
Operating System Concepts Essentials – 2nd Edition 1.6 Silberschatz, Galvin and Gagne ©2013
Computer System Organization
Interrupt driven (hardware and software)
Hardware interrupted by one of the devices
Software interrupt (exception or trap):caused either by an
error or a user request
modern operating systems are interrupt driven. If there
are no processes to execute, no I/O devices to service,
and no users to whom to respond, an operating system
will sit quietly, waiting for something to happen. Events
are almost always signaled by the occurrence of an
interrupt or a trap.
A trap (or an exception) is a software-generated
interrupt caused either by an error (for example,
division by zero or invalid memory access).
Operating System Concepts Essentials – 2nd Edition 1.7 Silberschatz, Galvin and Gagne ©2013
Computer System Organization
Interrupt handling:
The operating system preserves the state of the CPU by
storing registers and the program counter
Determines which type of interrupt has occurred:
polling
vectored interrupt system
Separate segments of code determine what action should be
taken for each type of interrupt
Operating System Concepts Essentials – 2nd Edition 1.8 Silberschatz, Galvin and Gagne ©2013
Computer System Organization
Storage Structure:
Main memory
Random access Typically volatile
Secondary storage – extension of main memory that provides large
nonvolatile storage capacity
magnetic disk and Hard disks – rigid metal or glass platters covered
with magnetic recording material
Disk surface is logically divided into tracks, which are subdivided into
sectors
The disk controller determines the logical interaction between the device
and the computer
Solid-state disks – faster than hard disks, nonvolatile
Various technologies
Becoming more popular
Operating System Concepts Essentials – 2nd Edition 1.9 Silberschatz, Galvin and Gagne ©2013
Computer System Organization
Storage Structure:
Storage systems organized in hierarchy
Speed
Cost
Volatility
Caching – copying information into faster storage system;
main memory can be viewed as a cache for secondary
storage
Operating System Concepts Essentials – 2nd Edition 1.10 Silberschatz, Galvin and Gagne ©2013
Storage-Device Hierarchy
Operating System Concepts Essentials – 2nd Edition 1.11 Silberschatz, Galvin and Gagne ©2013
How a Modern Computer Works
Operating System Concepts Essentials – 2nd Edition 1.12 Silberschatz, Galvin and Gagne ©2013
Operating-System Architecture
Single-Processor Systems
Most personal computers and laptops are single-processor systems, with a
single CPU performing all tasks.
Operating System Concepts Essentials – 2nd Edition 1.13 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Multi-Processor Systems
Inhigh-performance systems, multiple processors work together to
execute instructions simultaneously, increasing computing power.
Two types:
1. Asymmetric Multiprocessing – each processor is assigned a
special task.
2. Symmetric Multiprocessing – each processor performs all tasks
Operating System Concepts Essentials – 2nd Edition 1.14 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
A Dual-Core Design:
Multi-chip and multicore
Systems containing all chips
Chassis containing multiple separate systems
Operating System Concepts Essentials – 2nd Edition 1.15 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Clustered Systems:
Clustered systems connect multiple computers to act as a single, powerful
system, providing fault tolerance and scalability.
Like multiprocessor systems, but multiple systems working together
Usually sharing storage via a storage-area network (SAN)
Provides a high-availability service which survives failures
Asymmetric: one machine is in hot-standby mode while the other is
running the applications. The hot-standby host machine does
nothing but monitor the active server. If that server fails, the hot-
standby host becomes the active server.
Symmetric clustering In symmetric clustering, two or more hosts
are running applications and are monitoring each other.
Operating System Concepts Essentials – 2nd Edition 1.16 Silberschatz, Galvin and Gagne ©2013
Computer-System Architecture
Some clusters are for high-performance computing (HPC)
Applications must be written to use parallelization
which divides a program into separate components that run in parallel on
individual computers in the cluster. Parallel clusters allow multiple hosts to
access the same data on shared storage.
Some have distributed lock managers (DLM) to avoid conflicting operations
Operating System Concepts Essentials – 2nd Edition 1.17 Silberschatz, Galvin and Gagne ©2013