Operating systems
o Manage hardware components
o Processor
o Main memory
o System Bus
o I/O Modules
Processor
• Central Processing Unit (CPU) – if there is only 1 processor
• Controls operation of computer
• Loads and executes instructions
o Arithmetic or logical ops on data
Main memory [aka real memory primary memory]
• Stores data and apps
• Apps/programs = sequence of instructions
• Volatile (unlike disk memory)
o Memory lost when computer shuts down
I/O Modules [input and output modules]
• Moves data btwn computer and exit enviro
o Secondary memory devices (hard disk)
o Comms (keyboard, printer)
o terminals
System bus
• Communications line among processor, main memory and I/O modules
,Instruction Execution
• A program the consist of a set of instructions
• 2 step execution (with help from system bus)
1. Processor reads (fetches) instructions from memory
2. Processor executes each instruction
• Instruction cycle = process of processing 1 instruction
Instruction Fetch
• Program register example 0100
• Processor fetches instruction from the memory address and adds to instruction
register (IR)
• Program counter (PC) holds address of next instruction to be fetch
o PC increments after each fetch
,Instruction Register
• Processor interprets instruction and performs required action
• 4 categories
o Processor-memory transfer
o Processor-I/O transfer
o Operation data
o Control
Interrupts
• Mechanism by which modules (I/O) can interrupt the normal program execution of
the processor
• Improves utilization of processor
o I/O devices are slower than processor
o With interrupts processor can execute other instructions while a device
performs I/O commands
o I/O modules will send an interrupt when the command is finished and the
processor is needed by the module (short interruption)
• Classes of interrupts
o I/O
▪ Generated by I/O module, to signal that it needs the processor
, o Program
▪ Exceptions for arithmetic overflow (division by zero, etc.)
o Timer
▪ Generated by a timer
▪ Allows the OS to perform certain function on a regular basis
(automatic backups)
o Hardware
▪ Generated by a failure (i.e. power failure)