We discussed four ways in which operating systems are structured. Which of these structures is easiest to extend to a distributed system? Briefly explain why.
What is context switching? How is the process table used in context switching?
Consider the following processes, given their burst times and arrival times:
Process Arrival Time Burst Time ------- ------------ ---------- A 0 8 B 1 4 C 2 9 D 3 5
What does the operating system do at process scheduling time when no processes are ready to run?
What are all the possible outputs when the following code is run on a Unix system?
int n; /* shared variable */ main(int argc, char **argv) { n = 0; if (fork() == 0) n = n + 5; else n = n + 7; printf("n = %d\n", n); }
Explain the difference between a preemptive and a non-preemptive process scheduling policy. Why do all interactive systems use premptive polcies even though these policies have a higher overhead?
Processes can be in one of three states: running, ready and blocked. Show the possible transitions between these states and the reason for each transition.
Explain the difference between busy waiting and blocking.
Consider the code below as a variation of the critical region solution we saw in class:
shared int turn; /* set to i or j */ shared boolean flag[2]; /* set to T or F */ while(1) { ... flag[i] = true; turn = i; /* traditionally set to j */ while (turn==j && flag[j]==true) { /* no-op */ } ... /* critical region */ ... flag[i] = false; turn = j; /* not usually done */ ... /* remainder region */ ... }
Does the above solution satisfy the 3 required critical region conditions? If not, which property or properties is violated?
Consider a logical address space of eight pages of 1024 words each, mapped onto a physical memory of 32 frames.
Consider a paging system with the page table stored in memory.
Consider the following segment table:
Segment Base Length _______ ____ ______ 0 219 600 1 2300 14 2 90 100 3 1327 580 4 1952 96What are the physical addresses for the following logical addresses?
Consider the paper "Removing Priority Inversion from an Operating System". What are the disadvantages of simply raising the priority of servicing threads?
Consider the papers on "Inside the Windows NT Scheduler". When does the NT Scheduler put a Thread on the front of it's priority queue rather than the end?
Consider the paper "The Chorus Microkernel". Name two advantages to using a microkernel archetecture?