160 likes | 272 Views
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 ”.
E N D
TOPICS: The Von Neumann 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”. • 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.
The Von Neumann Architecture 3 Components in a Von Neumann computer: • 1. CPU (CU & ALU) • 2. Primary Memory • 3. I/O devices
The Von Neumann Architecture Storage(pendrive) Primary Memory • 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. CU/ALU-read instruction, decode, execute
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
Bus carry electronic signals from unit to other. • Bus Address Bus Data Bus
The ALU contains a function unit to perform the arithmetic and logical operations and various registers—to hold information being processed by the CPU
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.
The Memory Organization The memory unit stored the contents of the MDR (98765) into the memory location loaded in the MAR (1234). A read operation is accomplished by placing address in the MAR and placing a read command into the command register. After a memory cycle, the memory unit copies the contents of the designated memory cell into the MDR. Memory CPU Registers the memory address register (MAR), the memory data register (MDR), and the command register (Cmd).
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.
General Device Characteristics depending on the number of bytes transferred on an individual operation (many or one, respectively). • 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.)
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
Device Controllers • Function of device controllers. • To observe status • To provide detailed commands • To correct for minor errors
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)
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