Tutorial Week 3

Questions

MIPS R3000 Questions

Q1: What is a branch delay?

Q2: What is the EPC register? What is it used for?

General Questions


Q3: A computer has a pipeline with 4 stages. Each stage takes the same time to do its work, namely, 1 nsec. How many instructions per second can this machine execute?

Q4: Compute the effective access time of the following memory hierarchy. The first level consists of accessing an entire disk block cached in main memory. It takes 10 microseconds to copy the disk block from the main memory block cache to the application. The second level of the hierarchy is the hard disk itself which takes 4 milliseconds on average to locate a block on disk and copy it to the main memory block cache. Assume a hit rate of 90% in the disk block cache.

System Calls

Q5: Why must kernel programmers be especially careful when implementing system calls?

Q6: Why is recursion or large arrays of local variables avoided by kernel programmers?

Q7: How does the 'C' function calling convention relate to the system call interface between the application and the kernel? At minimum, what additional information is required beyond that passed to the system-call wrapper function?

Q8: In the example given in lectures, the library procedure read invoked the read system call. Is it essential that both have the same name? If not, which name is important?

Q9: To a programmer, a system call looks like any other call to a library procedure. Is it important that a programmer know which library procedures result in system calls? Under what circumstances and why?