A Review of Chapter 5 and Chapter 6
Chapter 5 Computer Systems Organization Von Neumann Architecture 4 Components Memory Input/output ALU Control Unit Two major features Stored program concept Sequential execution of instructions
Memory Functional unit of a computer that stores and retrieves the instructions and the data being executed RAM ROM Information is prerecorded during manufacture
Memory
Memory
Memory
Cache Memory Memory access is much slower than processing Faster memory is too expensive to use for all memory cells Locality principle Once a value is used, it is likely to be used again Small size, fast memory just for values currently/recently in use to balance the speed of memory and processor
Input/Output Unit Communication with outside world and external data storage Human interfaces Monitor, keyboard, mouse, printer Mass storage systems floppy disks flash memory hard disks CDs DVDs floppy disks, flash memory, hard disks, CDs, DVDs, and streaming tapes
Two type of storage Devices Volatile storage RAM Nonvolatile storage Mass storage devices such as disks and tapes
Three types of access method for storage devices Random access Unique address for each unit Equal access time for each unit RAM Direct access Unique address for each unit access time for each unit not the same Hard disks, floppy disks, CDs, DVDs Sequential access No unique address for each unit Information stored sequentially Tapes
Access time for Direct Access Storage devices Seek time time needed to position the read/write head over the correct track Latency (After finishing seeking,) time for the beginning of the desired sector to rotate under the read/write head Transfer time time for the entire sector to pass under the read/write head and have its contents read into or written from memory
I/O controller Intermediary between central processor and I/O devices Processor sends request and data, then goes on with its work I/O controller interrupts processor when request is complete
The Arithmetic/Logic Unit Subsystem that performs mathematical and logical operations such as addition, subtraction, and comparison for equality Components Registers interconnections between components ALU circuitry
Register Storage cell that holds the operands of an arithmetic operation and holds its result Features do not have a numeric memory address but are accessed by a special register designator Can be accessed much more quickly than regular memory cells Used for specific purposes
ALU process Values for operations copied into ALU s input register locations All circuits compute results for those inputs Multiplexor selects the one desired result from all values Result value copied to desired result register
Control Unit Manages stored program execution Task Fetch from memory the next instruction to be executed Decode it: Determine what is to be done Execute it: Issue appropriate command to ALU, pp p, memory, and I/O controllers
Parts of control unit Links to other subsystems Instruction decoder circuit Two special registers Program counter (PC) Stores the memory address of the next instruction to be executed Instruction register (IR) Stores the code for the current instruction
Putting All the Pieces Together the Von Neumann Architecture Program execution phases Fth Fetch, decode, d and execute l Von Neumann cycle The repetition of the fetch/decode/execute phase
Fetch Phase
Decode Phase
Execute Phase (of ADD X)
Chapter 6 An Introduction to System Software and Virtual Machines System software Assembly language and Assembler e Operating system
System software collection of computer programs that manage the resources of a computer and facilitate access to those resources Virtual machine Set of services and resources created by the system software and seen by the user
Types of System software
Assembly language and Assembler Source program An assembly language program Object program A machine language program Assembler Translates a source program into a corresponding object program
The Translation/Loading/Execution Process
Writing assembly language program The sturcture
Translation and Loading Before a source program can be run, an assembler and a loader must be invoked Assembler Translates a symbolic assembly language program into machine language Loader Reads instructions from the object file and stores j them into memory for execution
Translation and Loading Assembler tasks Convert symbolic op codes to binary Convert symbolic addresses to binary Perform assembler services requested by the pseudo-ops ops Put translated instructions into a file for future use
Operating System Five most important responsibilities of the operating system User interface management Program scheduling and activation Control of access to system and files Efficient resource allocation Deadlock detection and error detection
Deadlock There is a set of programs, each of which is waiting for an event to occur before it may proceed, but that event can be caused only by another waiting program in the set. How to handle deadlocks? Two examples