Computer System Organization
Computer System Organization
Organization
Computer System Organization
• Consists of one or more CPUs and a
number of device controllers connected
through a common bus that provides
access to shared memory.
• Device controller
– In charge of a specific type of device
– Responsible for moving data from one
controller to another. Each device
controller has a local buffer.
Computer System Operation
Computer System Operation
• CPU and device controller executes
concurrently competing for memory cycles.
• Page fault
Traps
• A trap is an abnormal condition
detected by the CPU (software
generated) that is indicative of an error
(synchronous with CPU).
OS
2
1
Intp
4 3
t.
I/O Structure
I/O in progress
I/O device
I/O is completed
CPU
CPU periodically
CPU issues an I/O CPU resumes
checks for the
operation execution
completion of I/O
operation
Direct Memory Access (DMA)
request request
Input Output
File management
Memory Device
Process mgmt Storage mgmt
mgmt mgmt Networking
Protection mechanisms
HARDWARE
Process Management
• Process
– Program in execution; unit of work in a
system, active entity with the program
counter specifying the next instruction
to execute.
• A process needs certain resources:
– CPU time
– Memory
– Files
– I/O devices
Process Management
• Program: a passive entity while
process is an active entity.
• Single-threaded process
– Has one program counter (PC)
– Single instruction, sequential execution
• Multithreaded process
– Has multiple PC
OS Responsibilities
• Creating and deleting both user and
system processes
• Suspending and resuming the execution
of the processes.
• Mechanism for process synchronization
• Mechanism for process communication
• Mechanism for deadlock handling.
Memory Management
• OS allocate the main memory to
several processes with the aim of
making sure that a process that is
about to take control of the CPU is
already in the memory