SUNY Poly CS 521 - Computer Organization

Unformatted text preview:

Chapter 4 Computer OrganizationContentsInterruptsSlide 4I/O PollingSlide 6Fetch-Execute cycle with an InterruptThe Interrupt handlerSlide 9Disabling InterruptsTrap InstructionVon Neumann ArchitectureBootstrapping the MachineBoot Loader ProgramMobile ComputersSystem-on-chip TechnologyPower ManagementMultiprocessors and Parallel ComputersArray processorsShared Memory MultiprocessorsDistributed memory MultiprocessorsNetwork of workstationsChapter 4Computer OrganizationVishal ShahVishal PintoContents•The Von Neumann Architecture•The Central Processing Unit•The Primary Memory•I/O devices•Interrupts•Conventional Contemporary Computers•Mobile Computers•Multiprocessors and Parallel ComputersInterruptsWhy Device Drivers?read ( devID, myData, dataLength );x = f ( myData, dataLength, …)…// 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 operationbusy = 1;…SoftwareHardwareI/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.. . . Device DeviceDevice. . . CPUInterruptRequest flagDetecting an InterruptFetch-Execute cycle with an Interruptwhile (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 logicThe Interrupt handlerInterrupt_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}•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.Disabling InterruptsIf ( InterruptRequest && InterruptEnabled ) {/* Interrupt current process */disableInterrupts ( );memory [0] = PC;PC = memory[1];}Trap InstructionUsed by a process running in user mode that wants to perform an operation that requires privileged instructionstrapSMode123UserSupervisorTrusted CodeVon Neumann ArchitecturePrimary Memory UnitDevice ControllerDeviceCUALUAddress BusData BusCPUBootstrapping the MachineCMOSPOSTBIOSBoot ProgLoaderOSPower UPROMRAMBoot DeviceBoot Loader ProgramFixed_LOC:// Bootstrap loader entry pointload R1, =0load 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_ADDRESSLoop: load R3, [BUFFER_ADDRESS, R1]store R3,[FIXED_DEST, R1]incr R1bleq R1, R2, loopbr FIXED_DESTMobile ComputersFeatures:•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..System-on-chip TechnologySet of memory and device functions that is needed by the onboard processor on a single chip.Power Management•Notebook computers–Switch OFF LCD display–Power down Disks•Mobile computers–Switch OFF or dim displays–Reducing the clock speed of processorMultiprocessors and Parallel Computers•Parallel instruction Execution•Pipelined function unitFunction UnitOperand 1Operand 2ResultOperand 1Operand 2ResultArray processorsALUALUALUALUALUControl UnitControl UnitConventional Architecture SIMD ArchitectureShared 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.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 messagesNetwork of workstations•PC’s interconnected with a network•Usually individual computers with autonomous executing units with their own


View Full Document

SUNY Poly CS 521 - Computer Organization

Download Computer Organization
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Computer Organization and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Computer Organization 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?