Professional Documents
Culture Documents
System Bus
Computer System Operation (cont’d)
◼ CPU and device controllers are connected through
common busses or system bus (data, address, and
control).
◼ CPU and device controllers can execute
concurrently.
◼ Each device controller is responsible of a particular
device type.
◼ Each device controller has a local buffer (memory).
◼ Memory controller synchronizes access to memory.
Computer System Operation (cont’d)
◼ Disable interrupts
while an interrupt is
being processed
❑ Processor ignores any
new interrupt request
signals
Multiple Interrupts
Sequential Order
◼ Disable interrupts so processor can complete
task.
◼ Interrupts remain pending until the processor
enables interrupts.
◼ After interrupt handler routine completes, the
processor checks for additional interrupts.
Multiple Interrupts
Priorities
◼ Higher priority interrupts cause lower-priority
interrupts to wait.
◼ Causes a lower-priority interrupt handler to
be interrupted.
◼ Example when input arrives from
communication line, it needs to be absorbed
quickly to make room for more input.
Example
◼ Controllers:
❑ Is in charge of a specific type of device
❑ Moves data between device and local buffer
❑ A controller may have more than one device
❑ Buffer size varies
Two I/O Methods
◼ Synchronous I/O:
❑ Process request I/O operation
❑ I/O operation is started
❑ I/O Operation is complete
❑ Control is returned to the user process
◼ Asynchronous I/O:
❑ Process Request I/O operation
❑ I/O operation is started
❑ Control is returned immediately to the user
process
❑ I/O continues while system operations occur
Types of I/O
Direct Memory Access (DMA)
◼ Main memory
❑ Only large storage media that the CPU can
access directly.
◼ Secondary storage
❑ Extension of main memory that provides large
nonvolatile storage capacity.
Storage-Device Hierarchy
23
Magnetic Hard Drives
Magnetic Hard Drives(cont’d)
◼ Reading and writing data:
❑ Obstacles on a hard-disk system can damage the
surface and read/write head.
Operating System Structure
Outline
◼ System Components
◼ Operating-System Services
◼ System Calls
◼ System Programs
◼ System Structure
◼ Virtual Machines
◼ System Design and Implementation
Common System Components
◼ Process Management
◼ Main Memory Management
◼ Secondary-Storage Management
◼ I/O System Management
◼ File Management
◼ Protection System
◼ Networking
◼ Command-Interpreter System
Process Management
◼ A process is a program in execution. A process needs
certain resources, including CPU time, memory, files,
and I/O devices, to accomplish its task.
◼ The operating system should be responsible for the
following activities in connection with process
management.
❑ Process creation and deletion.
❑ Process suspension and resumption.
❑ Provision of mechanisms for:
◼ Process synchronization
◼ Process communication
Main-Memory Management
◼ Memory is a large array of words or bytes, each with
its own address. It is a repository of quickly
accessible data shared by the CPU and I/O devices.
◼ Main memory is a volatile storage device. It loses its
contents in the case of system failure.
◼ The operating system is responsible for the following
activities in connections with memory management:
❑ Keep track of which parts of memory are currently being
used by whom.
❑ Decide which processes to load when memory space
becomes available.
❑ Allocate and de-allocate memory space as needed.
Secondary-Storage Management
◼ Since main memory (primary memory) is volatile and
too small to accommodate all data and programs
permanently, the computer system must provide a
secondary storage to back up main memory.
◼ Most modern computer systems use disks as the
principle on-line storage medium, for both programs
and data.
◼ The operating system should be responsible for the
following activities in connection with disk
management:
❑ Free space management
❑ Storage allocation
❑ Disk scheduling
I/O System Management
◼ The I/O system consists of:
❑ A buffer-caching system
❑ A general device-driver interface
❑ Drivers for specific hardware devices