You are on page 1of 21

Computer-System Structure

ICT 215

Dr. ir. S S Dr ir S. S. Msanjila

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

Input / output structure


Device controllers are responsible for moving data between peripheral devices that they control and the local buffer storage Size of buffer depends on the devices being controlled

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

Synchronous & Asynchronous I/O


Synchronous I/O: All processes related to input and output actions must be completed by the system before the control is return to the user programs No other operations can occur in parallel Asynchronous I/O: Control may be returned to the user program without waiting the I/O to complete g / p Other operations can continue in parallel

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)

Direct memory access - DMA


Every I/O device needs to fetch data from the memory in order to send it to the CPU Every time data needs to be fetched the CPU will be interrupted. This may cause inefficiency

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

Operating system services

Operating system services - 2

Operating system services - 3

User operating system interface


Command line interface (CLI)

User operating system interface


Graphical user interface (GUI)

System calls

System calls - example

Types of system calls

System programs

System programs

System programs

You might also like