Docsity

Computer System Overview: Understanding Operating Systems and Processors, Slides of Computer Science

Partial preview of the text

Download Computer System Overview: Understanding Operating Systems and Processors and more Slides Computer Science in PDF only on Docsity!

1

Computer System Overview

Chapter 1

2

Operating System

• Exploits the hardware resources of one

or more processors

• Provides a set of services to system users

• Manages secondary memory and I/O

devices

4

Processor

• Two internal registers

  • Memory address register (MAR)
    • Specifies the address for the next read or write
  • Memory buffer register (MBR)
    • Contains data written into memory or receives data read from memory
  • I/O address register
  • I/O buffer register

5

Top-Level Components

PC M AR I R M BR I /O AR I /O BR

CPU M ain M emory SystemBus

I /O M odule

**- •

  • •
  • • -**

Buffers

Instruction

(^01) 2

n n - 2- 1

DataData DataData

InstructionInstruction

Figure 1.1 Computer Components: Top-Level View

PCI R == Program counterI nstruction register MARMBR == Memory address registerMemory buffer register I /O AR =I /O BR = I nput/output address registerI nput/output buffer register

Executionunit

7

User-Visible Registers

• May be referenced by machine language

• Available to all programs - application

programs and system programs

• Types of registers

  • Data
  • Address
    • Index
    • Segment pointer
    • Stack pointer

8

User-Visible Registers

• Address Registers

  • Index
    • Involves adding an index to a base value to get an address
  • Segment pointer
    • When memory is divided into segments, memory is referenced by a segment and an offset
  • Stack pointer
    • Points to top of stack

10

Control and Status Registers

• Condition Codes or Flags

  • Bits set by the processor hardware as a

result of operations

  • Examples
    • Positive result
    • Negative result
    • Zero
    • Overflow

11

Instruction Execution

• Two steps

  • Processor reads instructions from memory
    • Fetches
  • Processor executes each instruction

13

Instruction Fetch and Execute

• The processor fetches the instruction

from memory

• Program counter (PC) holds address of

the instruction to be fetched next

• Program counter is incremented after

each fetch

14

Instruction Register

  • Fetched instruction is placed in the instruction

register

  • Categories
    • Processor-memory
      • Transfer data between processor and memory
    • Processor-I/O
      • Data transferred to or from a peripheral device
    • Data processing
      • Arithmetic or logic operation on data
    • Control
      • Alter sequence of execution

16

Example of Program Execution

17

Direct Memory Access

(DMA)

• I/O exchanges occur directly with

memory

• Processor grants I/O module authority to

read from or write to memory

• Relieves the processor responsibility for

the exchange

19

Classes of Interrupts

20

Program Flow of Control

Without Interrupts