Computer System Structures

Get Started. It's Free
or sign up with your email address
Computer System Structures by Mind Map: 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. Each device controller has a local buffer.

1.4. The CPU and device controllers can execute concurrently.

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

1.6. 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.1.1. fixed location contains the starting address of the interrupt service routine.

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.

2.5. After the interrupt is serviced, the saved return address is loaded into the program counter.

2.5.1. The interrupted computation resumes.

3. Synchronous I/O Structure

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

3.1.1. Wait instruction idles the CPU until the next interrupt

3.1.2. Wait loop (contention for memory access).

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

4. Asynchronous I/O Structure

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

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

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

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

5. Storage Structure

5.1. Main memory

5.1.1. only large storage media that the CPU can access directly. volatile storage device that loses its contents when power is turned off.

5.2. Secondary storage

5.2.1. extension of main memory that provides nonvolatile storage capacity. It is capable to hold large quantities of data permanently

6. Storage Hierarchy

6.1. Storage systems organized in hierarchy.

6.1.1. Speed

6.1.2. Cost

6.1.3. Volatility

6.2. Caching

6.2.1. copying information into faster storage system; main memory can be viewed as a last cache for secondary storage.

7. Dual-Mode Operation

7.1. In order to ensure the proper execution of the operating system, the computer system must be able to distinguish between the execution of operating system code and user-defined code.

7.2. Provide hardware support to differentiate between at least two modes of operations.

8. Modes of Operation

8.1. User Mode

8.1.1. user program executes in user mode

8.1.2. certain areas of memory are protected from user access

8.1.3. certain instructions may not be executed

8.2. Kernel Mode

8.2.1. monitor executes in kernel mode

8.2.2. privileged instructions may be executed

8.2.3. protected areas of memory may be accessed

9. I/O Protection

9.1. All I/O instructions are privileged instructions; user program cannot issue I/O instructions directly.

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

10. Memory Protection

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

10.2. Base register

10.2.1. holds the smallest legal physical memory address.

10.3. Limit register

10.3.1. contains the size of the range

11. Hardware Address Protection

11.1. When executing in kernel mode, the operating system has unrestricted access to both monitor and user’s memory.

11.2. The load instructions for the base and limit registers are privileged instructions.

12. CPU Protection

12.1. Timer

12.1.1. interrupts computer after specified period to ensure operating system maintains control over CPU.

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

12.3. Load-timer is a privileged instruction.