Questions from Final Exam 2010/11

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.


  • 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)


  • 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.


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


  • 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.


  • 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.


  • 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?)


  • 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)


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


  • 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.

What Exam Questions Would You Set?

I have set and submitted the final exam questions for CS2106, so it is now safe to have this fun exercise: what exam questions would you set for CS2106 final exam?

Thinking about this question would help you reflect upon your own knowledge and understanding of the materials.  For instance, if you put the emphasis on the right concepts, if you can synthesize new knowledge based on what you learned, etc.

An added benefit is that your peers would also be able to test how much they learned by answering your question.