The number of comments discussing the past year questions hit a record of 100 today. I thought it would be useful to summarize the confusing points from the discussion in a post here.

Q1

  • There is a confusion over Choice A.  Microkernel fits the description of A, but we may still implement things in the user space without resorting to Microkernel architecture.  One example is to schedule threads in the user space instead of kernel space (which we did not cover this semester)

Q2.

  • Running exec() will not change the pid of the current process.  Only the core image will be replaced.
  • Since exec() replaces the core image of the process, any line of code after exec() will not be printed unless there is an error.

Q3

  • Context switch can happen when you make system calls (Lecture 2) and when page fault occurs (Lecture 9)

Q4

  • The confusion is on Choice D.  Disk I/O takes longer time if there are multiple processes contending for the same disk.  The disk scheduler would have more requests to serve, and a process disk I/O request would have to wait longer.

Q8

  • The confusion is basically over the meaning of “when making a function call.”   The most direct interpretation (at least to me, anyway) is when we are already inside the function f.  If you interpret it any other way (e.g., somewhere between the caller and the callee), then it’s ambiguous.

Q10

  • Kernel code and structures are normally pinned in the physical memory, since the kernel is accessed very often and to avoid irresolvable situations (imagine if the page fault handler is paged out — who will handle the page fault now?)

Q11

  • Two things you need to consider is: (i) how to access the end of a huge file quickly?  and (ii) how to support reading a huge file backward (from end to beginning)

Q12

  • There is a confusion over Part (c).  As discussed in tutorial, size of swap space does not affect the number of page fault.

Q15

  • In RR, reducing time quantum improves the response time.  This question extends this principle to MLFQ — if we reduce the time quantum of low priority job, the high priority jobs will get to their turn faster as well.