Exam questions Flashcards
compared to CISC processors, what two features of RISC processors have that can be directly attributed to Moores Law
RISC benefits by
1. having many registers
2. regular ISA
how does a microarchitecture relate to an ISA and explain why it is useful to separate the two
a microarchitecture is an instance of the ISA
many microarchitectures can exist for a given ISA, giving a range of products (can have different price, power etc) and still be binary compatible
state an interesting feature of the exponent
it is bias - avoiding the need for negative numbers and simplifies comparisons
state an interesting feature of the mantissa
it is normalised - simplifies comparisons and allows for a more compact representation
one pro and con about 2s complement
+ simplifies arithmetic circuits, single 0
- range is asymmetric
how does a computer know that a given word is a floating point value, integer of ASCII character
it does not
the instructions tell it what to do with a given word
what is functional completeness
a set of gates sufficient to implement any logical boolean function
name the memory hierarchy from smallest to largest
registers, cache, memory, disk
how is register to cache memory managed
software - compiler
there are very few registers, so explicit management is needed.
need global knowledge to manage scarce register resources
no time for decision making
how is to cache to main memory managed
hardware
cache is not visible to the software
hardware manages them, filling and spilling data from memory
how is memory to disk managed
software -
operating system manages page movement between disk and memory
OS manages virtual memory page swapping
note that file accesses could also be stated to come from the OS (since is manages disk mappings) or the user (who may give the command to open or save a file,
disk is slow therefore software is good enough
what two problems does virtual memory address
limited capacity of physical memory
- multiple programs sharing limited physical memory (solved by OS managed paging between memory and disk(TLB))
memory safety
solution is protection bits in OS and TLB that are checked on every memory access
which is more expensive - cache miss or TLB miss
TLB miss because it involves at least one memory access (same as a cache miss) but also requires a context switch to the kernel to access the page table
list the sequence of events associated with the execution of a lw instruction from the perspective of the memory system
- search the TLB
1.2. on a miss search the page table
1.2.3. on a miss transfer block from disk to memory and update the page table - update the TLB with a V to P translation
- search the cache
3.1. on a miss access the memory and update the cache - return the requested word from the cache to the processor
what is the TLB
translation lookaside buffer
a address translation table contained in the memory management unit of the CPU
it is small and fast
it is a table of triplets in the form [SB, P, F]
SB - status bits (residence, access, modification - RAM)
P - virtual memory page number
F - physical memory frame buffer
why do modern computers have a memory hierarchy rather than a single main memory
the hierarchy achieves a better average case time