Computer-System Structure: DR Ir S S Msanjila Dr. Ir. S. S. Msanjila
Computer-System Structure: DR Ir S S Msanjila Dr. Ir. S. S. Msanjila
ICT 215
Computer-system operation
General purpose computers consist of: C t l processing unit (CPU) Central i it Device controllers Bus connections Memory Each device E h d i controller handles specific devices: t ll h dl ifi d i Disk drives Audio or video devices External memory devices Printers Network resources
Tasks execution
Usually a simple computer execute one task at a time e.g. file transfer or mathematical computation Interruption: Depending on the execution policy, a CPU might be interrupted to allow a priority task to be computed Th address of i The dd f interrupted tasks must b saved to d k be d be invoked later
I/O interrupts Input/output devices interact with the CPU when their put/output de ces te act t t e C U e t e respective controller interrupts the CPU CPU loads all the registers needed Controller starts the required operation by Controller selecting the appropriate register When the operation is completed the controller triggers an interrupt
Device table
Device-status table: Stores the current status of each process being executed by the CPU: Device type Address State (not functioning, idle, or busy)
DMA allows each I/O devices to transfer the entire block of data to its own buffer storage Only one interrupt per block Buffer, pointers and buffer need to be set
Hardware protection
Dual-Mode protection: Types User mode Monitor mode Dual-Mode protection: Means of protecting the operating system from errant users and errant users from one another Protection is achieved by classifying instruction that can cause harm to the operating system as Privileged instructions Privileged instructions can be executed in monitor mode only
Hardware protection
I/O protection A user program may disrupt the normal operation by: Issuing illegal I/O instructions Accessing memory locations By refusing to release the CPU T protect such operation, user programs cannot issue instructions To t t h ti ti i t ti directly They must issue them via the operating system Memory protection Without proper protection user programs can write any address in the memory T Two registers Base and Li it are set t d fi i t B d Limit t to define possible ibl address range CPU protection A task may run infinitely, and so need to be terminates A time is set to interrupt the CPU after a specified time
System calls
System programs
System programs
System programs