Chapter 2 : Computer System Structures

Get Started. It's Free
or sign up with your email address
Chapter 2 : Computer System Structures by Mind Map: Chapter 2 : Computer System Structures

1. Computer-System Operation

1.1. A general-purpose computer system consists of one or more CPUs and a number of device controllers

1.2. Each device controller is in charge of a specific type of device

1.3. Device controller informs CPU that it has finished its operation by causing an interrupt

1.4. Interrupt indicates the occurrence of an event from either the hardware or software

2. Interrupt Handling

2.1. When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a fixed location

2.2. Interrupt vector provide the address of the interrupt service routine for the interrupting device

2.3. Separate segments of code determine what action should be taken for each type of interrupt

2.4. The OS preserves the state of the CPU by storing registers and the program counter

3. Dual-Mode Operation

3.1. Mode bit is added to computer hardware to indicate the current mode: kernel (0) or user (1)

3.2. When an interrupt or fault occurs, hardware switches to kernel mode

3.3. In the kernel mode, the software has complete control of the processor and all instruction, registers and memory

4. Memory Protection

4.1. The computer system must provide memory protection at least for the interrupt vector and the interrupt service routines

4.2. In order to have memory protection, two registers are used to determine the range of legal addresses a program may access

4.2.1. Base register

4.2.2. Limit register

5. I/O Structures

5.1. Synchronous I/O Structure

5.1.1. After I/O starts, control returns to user program only upon I/O completion

5.1.2. Wait instruction idles the CPU until the next interrupt

5.1.3. Wait loop (contention for memory access)

5.1.4. At most one I/O request is outstanding at a time, no simultaneous I/O processing

5.2. Asynchronous I/O Structure

5.2.1. After I/O starts, control returns to user program without waiting for I/O completion

5.2.2. System call – request to the operating system to allow user to wait for I/O completion

5.2.3. Device-status table contains entry for each I/O device indicating its type, address, and state

5.2.4. Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt

6. Storage Structure

6.1. Main memory – only large storage media that the CPU can access directly

6.1.1. A volatile storage device that loses its contents when power is turned off

6.2. Secondary storage – extension of main memory that provides nonvolatile storage capacity

6.2.1. It is capable to hold large quantities of data permanently

7. Storage Hierarchy

7.1. Speed

7.2. Cost

7.3. Volatility

8. I/O Protection

8.1. User program must executes a system call to request that the operating system to perform I/O

8.2. Must ensure that a user program could never gain control of the computer in monitor mode

9. CPU Protection

9.1. Timer – interrupts computer after specified period to ensure operating system maintains control over CPU

9.2. When timer interrupts, control transfers to the operating system

9.3. Load-timer is a privileged instruction