linker 1. why is main first in the final linking step and why are libraries linked last? 2. what does PIC mean and why do we do it to shared libraries? 3. is PIC code more or less efficient than normal machine code? 4. which one of these two models is favored for linking code and then loading it at runtime? . the linker has a static address model for all relocation . the linker must somehow fix up all relocateable symbols at load time 5. how does virtual memory help with question #4? 6. given the following parts of an a.out ELF format file. what function do they serve: header text data bss symtab 7. which if the parts of the ELF executable format are actually loaded by execvp? which parts are ignored totally? what role does the header play at loadtime? 8. why don't we just link in libc.o as opposed to using libc.a? 9. give one pro and one con of shared libraries. 10. what do the following programs do: 1. size 2. nm 3. readelf 4. strip memory hierarchy 1. what kind of memory is used for an L1 cache and how it different from main RAM memory. 2. what are the 3 traditional levels of memory and how do they differ in cycle latencies? give approximate sizes for each in bytes. 3. if a disk has 4 platters, with 100 tracks per platter, and 100 sectors per track, how many sectors are there total? 4. why is it good for a file to be laid out on the same cylinder? 5. define seek time, rotational latency, and transfer time. 6. what can you say about the overall speed increases over the last several decades for CPU, main memory, disk speeds? 7. give examples of caching in the memory hierarchy BESIDES register to L1 and L2 caches cache arch. 1. explain the difference between 4-way set associative and direct mapped caches and fully associative caches 2. what are the S-bits and why do they sit in the middle of the word. 3. given the following 4 bits words, and the following cache makeup, assuming the cache is empty, explain whether each word is a hit or a miss, also explain where the word goes in the cache: Refer to the cache set/line combos as 0.0, 0.1, 1.0, 1.1 The first one is done for you. cache architecture: 2 bit tag: 1 bit s: 1 bit block offset: 0000 - miss as there is nothing in the cache, 0.0 0101 - 0001 - 1010 - 1011 - 0110 - 4. what is the difference between write-through and write-back caching strategies? 5. what role do the tag bits and block offset bits play in the cache architecture? 6. define spatial locality and give a code example that would exhibit it. give a code example that would NOT exhibit it. 7. what does "set line" mean? 8. what is wrong with the direct mapped cache idea?