Exam 1 Flashcards
What are the 4 main elements of a computer?
1) Processor (CPU)
2) Primary Storage (RAM)
3) I/O Module
4) System interconnection (bus)
What is the processor (CPU) element of a computer?
controls the operation of the computer and performs its data processing functions
What is the Primary Storage (RAM) element of a computer?
- stores data and programs
- typically volatile memory
What is the I/O Module element of a computer?
- moves data between the computer and its external environments
What is the system bus element of a computer?
provides for communication among processors, main memory, and I/O modules
What are the 2 main processor registers?
1) General Purpose (User-Visible) Registers
2) Control and Status Registers
What are General Purpose (User-Visible) Registers?
- available to both OS and user programs
- hold operands, results, and addresses
What are Control and Status Registers?
- not directly available to user programs
- used by CPU to control its own operation and to control program execution
What is a Program Counter (PC)?
- control and status register
- address of the next instruction to be fetched
What is the Instruction Register (IR)?
- control and status register
- instruction most recently fetched
What is the Program Status Word (PSW)?
- control and status register
- contains status info:
a) condition code bits (zero flag, sign flag, etc.)
b) supervisor/user mode bit
c) interrupt enable/disable bit
What are the 4 types of instructions?
1) Data Movement: transfer data from RAM to CPU (load) or from CPU to RAM (store)
2) Data Manipulation: perform arithmetic or logic operations on data
3) Control Transfer: alter the execution sequence of the program
4) Other: special purpose
What is an interrupt?
- fundamental to operation of modern computers and integral part of OS design
- Mechanism to allow other modules to interrupt CPU
What are the 2 main strategies for handling multiple interrupts?
1) Sequential interrupt processing
2) Nested interrupt processing
What is Sequential interrupt processing?
disables all other interrupts while processing the current interrupt
What is Nested interrupt processing?
allows processing in priority order (each type of interrupt is assigned a relative priority)
What are some examples of classes of interrupts?
- hardware failure (ex: memory parity error)
- Timer (ex: time slice completed)
- I/O (ex: operation completed)
- Program Exception (ex: divide by zero)
- Program Trap: (control transfer instruction to request interrupt)
As one goes down the memory hierarchy, what occurs?
- Decreasing cost per bit
- Increasing capacity
- Increasing access time
- Decreasing frequency of access to the memory by the processor
What is DMA (Direct Memory Access)?
Allow I/O modules to transfer blocks of bytes into (or out of) RAM without using the CPU to copy the bytes
- CPU initiates I/O operation
- I/O module starts processing
- CPU used for other purposes
- I/O uses interrupt to signal completion
What is cache memory?
- small cache of expensive but very fast memory interacting with slower but much larger memory
- processor first checks if word referenced to is in cache
- if not found in cache, a block of memory containing the word is moved to the cache
What is the Locality of Reference?
- memory references for both instructions and data values tend to cluster over a long period of time
- ex: once a loop is entered, there is frequent access to a small set of instructions
- hence: once a byte gets referenced, it is likely that nearby bytes will get referenced often in the near future
What are the differences between a multicore and a multiprocessor system?
multicore: is having multiple processing cores on the same chip, essentially multiple CPUs on one bit on silicon
multiprocessor: is having 2 or more separate CPUs in a machine
What is the distinction between spatial locality and temporal locality?
Spatial locality: refers to the tendency of execution to involve a number of memory locations that are clustered
Temporal locality: refers to the tendency for a processor to access memory locations that have been used recently
In general, what are the strategies for exploiting spatial and temporal locality?
Spatial locality: exploited by using larger cache blocks and by incorporating prefetching mechanisms into the cache control
Temporal locality: exploited by keeping recent used instructions and data values in cache memory and by exploiting a cache hierarchy