Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4 Computer Organization Vishal Shah Vishal Pinto.

Similar presentations


Presentation on theme: "Chapter 4 Computer Organization Vishal Shah Vishal Pinto."— Presentation transcript:

1 Chapter 4 Computer Organization Vishal Shah Vishal Pinto

2 Contents The Von Neumann Architecture The Central Processing Unit The Primary Memory I/O devices Interrupts Conventional Contemporary Computers Mobile Computers Multiprocessors and Parallel Computers

3 Interrupts Why Device Drivers? read ( devID, myData, dataLength ); x = f ( myData, dataLength, …)

4 … // Start the device … while ((busy = = 1) || ( done = = 1)) wait( ); //Device I/O complete … done = 0; busy done … while (( busy = = 0) && (done = = 1)) wait( ); // Do the I/O operation busy = 1; … Software Hardware

5 I/O Polling A process in which a number of I/O devices are interrogated, one at a time, to determine if service is required. Introduces Busy-wait situation.

6 ... Device... CPU InterruptRequest flag Detecting an Interrupt

7 Fetch-Execute cycle with an Interrupt while (haltFlag not set during execution) { IR = memory[PC]; PC = PC + 1; execute (IR); if ( InterruptRequest) { memory[0] = PC; PC = memory [1]; } Conceptually,hardware connects all device-done flags to the interrupt request flag using inclusive-OR logic

8 The Interrupt handler Interrupt_Handler { SaveProcessorState( ); for ( i = 0; i<Number_of_devices; i++) if (device[i].done = = 1) goto device_handle(i); /* Something wrong if we get here }

9 Extension to detect interrupt more rapidly? Interrupt vector. Race condition ? Interrupt occurs while the Interrupt handler is in the midst of execution. Solution: Avoid it.

10 Disabling Interrupts If ( InterruptRequest && InterruptEnabled ) { /* Interrupt current process */ disableInterrupts ( ); memory [0] = PC; PC = memory[1]; }

11 Trap Instruction Used by a process running in user mode that wants to perform an operation that requires privileged instructions trap S Mode 1 2 3 UserSupervisor Trusted Code

12 Von Neumann Architecture Primary Memory Unit Device Controller Device CUALU Address Bus Data Bus CPU

13 Bootstrapping the Machine CMOS POST BIOS Boot Prog Loader OS Power UP ROM RAM Boot Device

14 Boot Loader Program Fixed_LOC:// Bootstrap loader entry point load R1, =0 load R2, =LENGTH_OF_TARGET /*The next instruction is really more like a procedure call than a machine instruction. It copies a block from BOOT_DISK to BUFFER_ADDRESS.*/ read BOOT_DISK, BUFFER_ADDRESS Loop:load R3, [BUFFER_ADDRESS, R1] store R3,[FIXED_DEST, R1] incr R1 bleq R1, R2, loop br FIXED_DEST

15 Mobile Computers Features: Physically light and small Severely constrained in the rate at which it can consume power O/P devices are small and usually is speaker Does not contain a storage device Has removable devices like CF cards, NIC..

16 System-on-chip Technology Set of memory and device functions that is needed by the onboard processor on a single chip.

17 Power Management Notebook computers –Switch OFF LCD display –Power down Disks Mobile computers –Switch OFF or dim displays –Reducing the clock speed of processor

18 Multiprocessors and Parallel Computers Parallel instruction Execution Pipelined function unit Function Unit Operand 1 Operand 2 Result Operand 1 Operand 2 Result

19 Array processors ALU Control Unit Conventional ArchitectureSIMD Architecture

20 Shared Memory Multiprocessors Processors are Interconnected with one another with primary memory using specialized hardware Popular among programmers tools used to develop s/w for single process could easily be used with the shared memory architecture Distinct from Von Neumann architecture but rely upon it.

21 Distributed memory Multiprocessors Collection of CPU’s with their memory interconnected using high-speed n/w –High speed LAN or High speed fiber optic n/w Do not support ordinary sequential Programming languages like Shared memory machines do Exchanges data as messages

22 Network of workstations PC’s interconnected with a network Usually individual computers with autonomous executing units with their own OS


Download ppt "Chapter 4 Computer Organization Vishal Shah Vishal Pinto."

Similar presentations


Ads by Google