final studying Flashcards
exceptions
events that cause the currently running program to be stopped and the operating system code to be run
exception types
system calls : request to the operating system to perform some service on behalf of the application program
Internally generated : unexpected events (signed overflow for add instructions)
externally generated : interrupts , I/O device interupting processor when it has finished an operation
how does the hardware determine what memory words to copy into cache?
most programs exhibit locality of reference
spatial locality
words adjacent in memory to words recently accessed are likely to be accessed in the near future
TLB
translation lookaside buffer : a cache for page table entries, implemented on the processor chip
Each entry on a TLB consists of
a page table entry
a tag field that specifies which virtual page this entry is for
Whats the point of a TLB
makes address translation fast
First 2 steps of every instruction
send program counter to memory that contains the code and fetch in struction form memory
Read 1 or 2 registers, using fiels of the instruction to select registers to read. (lw only requires one register
All instructions except _____ use the alu after________
jump
reading the registers
multiplexor
a logic element that chooses from among multiple sources and steers one of those sources to its destination
combinational element
an operational element such as an AND gate or an ALU
state element
a memory element such as a register or memory
D flip-flop
a state element with 2 inputs and one output
program counter
a register that holds the address of the current instruction
R-format instructions
arithmetic logical instructions
read two registers, perform an ALU operation on the contents of the
registers, and write the result to a register
register file
a state element that consists of a set of registers that can be read and written by supplying a register number to be accessed
The two elements needed to implement R-format ALU operations
register file and the ALU
Branch datapath must do 2 operations
compute the branch target address
compare the register operands
registers
primitives used in hardware design that are also visible to the programmer when the computer is completed
word
groups of 32 bits
reasons to not use too many registers
would increase cct
increase # of bits passed 32
arithmetic operations occur
registers in mips instructions
data transfer instructions
instructions that move data between memory to registers
overflow
when the number that is the result of an operation cannot be represented by the rightmost hardware bits
when the leftmost retained bit of the of the binary bit pattern is not the same as the infinite # of digits to the left
Two’s complement is used for
storing binary representations for signed numbers
sign extension
copy the sign repeatedly to fill the rest of the register
register file
collection of registers in which any register can be read or written
* stores the 32 general purpose registers of of a processor
A law that quantifies how the system performance enhancement possible with a given improvement is limited by the amount that the improved feature is used
Amdahl’s law
outputs from assembly (and inputs to linking) are
object files
object files
must contain debugging information and information for the linker to do its job
- external label inforamtion
- external reference information
- relocation information
- in addition to machine code and data