chapter 4 os: computer organization

16
CHAPTER 4 OS: COMPUTER ORGANIZATION TOPICS: The Von Neumann Architecture The CPU

Upload: hidi

Post on 24-Feb-2016

72 views

Category:

Documents


0 download

DESCRIPTION

TOPICS: The Von N eumann Architecture The CPU. Chapter 4 OS: Computer Organization. 4.1 The von Neumann Architecture. Stored program computers are often referred to as “general-purpose computers ”. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 4 OS: Computer Organization

CHAPTER 4 OS: COMPUTER ORGANIZATION

TOPICS:The Von Neumann Architecture

The CPU

Page 2: Chapter 4 OS: Computer Organization

4.1 THE VON NEUMANN ARCHITECTURE

Stored program computers are often referred to as “general-purpose computers”.•Meaning: can adapted to do many types of computational and information storage task independent of the hardware details.•Von Neumann architecture designed a specific organization for stored program computers.

Page 3: Chapter 4 OS: Computer Organization

THE VON NEUMANN ARCHITECTURE

3 Components in a Von Neumann computer:

1. CPU (CU & ALU)

2. Primary Memory

3. I/O devices

Page 4: Chapter 4 OS: Computer Organization
Page 5: Chapter 4 OS: Computer Organization

THE VON NEUMANN ARCHITECTURE

Programs and data are brought into the machine from the external world using the device controllers and devices. Eg; disk,pendrive.

When program or data ready to be used, they are copied into the primary memory unit from either the external environment or storage device.

Storage(pendrive)

Primary Memory

CU/ALU-read instruction, decode,

execute

Page 6: Chapter 4 OS: Computer Organization

THE VON NEUMANN ARCHITECTURE

Once the program has been loaded into the primary memory, the control unit reads each instruction in the program, decodes the instruction.

The ALU performs all arithmetic operations such as adding, subtracting, multiplying and dividing numbers. It also performs logical operations such as comparing two numbers, detecting if a number is zero and so on.

ALU: +,*,/ logical: comparison

Page 7: Chapter 4 OS: Computer Organization

Bus carry electronic signals from unit to other.

Bus Address Bus

Data Bus

Page 8: Chapter 4 OS: Computer Organization

The ALU contains a function unit to perform the arithmetic and logical operations and various registers—to hold information being processed by the CPU

Page 9: Chapter 4 OS: Computer Organization

General registers are loaded from a specified primary memory location.

general registers provide the operands to the function unit and accept the result of an operation by the function unit.

Status registers are used by various parts of the CPU to store the status of operations.eg. such as “the result of the last function unit operation was equal to 0”.

performing operations on the registers, and then saving the results back into memory.

Page 10: Chapter 4 OS: Computer Organization

THE MEMORY ORGANIZATION1. The memory unit stored the contents of the MDR (98765) into the memory location loaded in the MAR (1234).

2. A read operation is accomplished by placing address in the MAR and placing a read command into the command register.

3. After a memory cycle, the memory unit copies the contents of the designated memory cell into the MDR.

CPU Registers Memory

the memory address register (MAR), the memory data register (MDR), and the command register (Cmd).

Page 11: Chapter 4 OS: Computer Organization

Devices

The I/O-devices of the von Neumann machine are used to place data into the primary memory and to store its contents on a more permanent medium

The device may be the storage device such as magnetic disk or tape; a character device such as a terminal display, a mouse, or a keyboard; or a communication device such as a serial port connected to a modem or a network interface.

Page 12: Chapter 4 OS: Computer Organization

General Device Characteristics

characterized as block-oriented

character-oriented,

storage devices (permanently storing

information )

communications devices (interconnecting computers and/or terminals. introduce data into the machine and pass data from one machine to another.)

depending on the number of bytes transferred on an

individual operation (many or one, respectively).

Page 13: Chapter 4 OS: Computer Organization

Device Controllers Part of motherboard. Function as bridge between the

device and the operating system.

Hardware that understands software input. It translates software input into something a hardware device understand.Controller sometimes have their own memory & own CPU.

The Device Controller receives the data from a connected device and stores it temporarily in some special purpose registers (i.e. local buffer) inside the controller. Then it communicates the data with a Device Driver .

- Any device connected to the computer is connected by a plug and socket, and the socket is connected to a device controller.

- It communicates with the CPU by interrupts.

http://simple.wikipedia.org/wiki/Device_controller

Page 14: Chapter 4 OS: Computer Organization

DEVICE CONTROLLERS

Function of device controllers.

To observe status

To provide detailed commands

To correct for minor errors

Page 15: Chapter 4 OS: Computer Organization

DEVICE DRIVERS The device controller provides an interface to be used

by the high level machine software.

Purely software and communicate between OS and the physical device controller.

Drivers for different devices impalement a similar interface.

Eg. Printer use specific device driver (need to install)

Mouse and keyboard use generic device driver.(no need to install)

Page 16: Chapter 4 OS: Computer Organization

INTERRUPT

the most efficient overlap between the device and the CPU could be obtained if the device would signal the processor as soon as it has completed the I/O operation.

The von Neumann architecture can be modified to implement this approach by incorporating device interrupts through which a device notifies the processor when it has completed an I/O operation.

signal from the hardware to the software—the interrupt—causes the processor to cease executing the sequence of instructions addressed by the PC