TEST Review 1 Hour and A Half The Test Is 6 Questions Covering The Topics Below: Questions
TEST Review 1 Hour and A Half The Test Is 6 Questions Covering The Topics Below: Questions
Questions:
1. Study process interrupts and how the kernel gets involved and how stacks are used
in serving the interrupt? Why do we need separate kernel stack from the stack of the
interrupted process?
-When interrupts happen, you want to change the code from your code to that one. And
change it back. Save context in a stack. Branch to interrupt handle, and then see frame
to continue from
-Why use the kernel stack for interrupt handling rather than a user stack? If you’re going
to serve interrupts for all processes, you cannot find out what other people are doing
because not running in privileged mode
2. Study and understand memory allocation algorithms, i.e., given set of free memory
chunks and given memory allocation algorithm which memory you will get your desired
memory?
-Get a fixed size memory. Tell which stack you are going to get the memory from. For
best fit, which chunk will you get the memory, etc.
3. Understand virtual memory versus Physical memory including Page Table and TLB.
-TLB is very small. Translation L* Bluffing (mapping from virtual address to physical
address).
Every time you want to do read, doing it twice.
-De-fragmentation is also called disk compaction. Because you want files chunked
together and then space is all together. When fragmented, there are spaces all between
and it won’t help you when you need space.
-Context switch is save and restore. Save context in some private memory of use. Then
restore the old contents of the new process which is going to run. Saving data from
current running process somewhere in memory. Get new process from memory to
hardware then continue running.
6. To understand process scheduling algorithms for both Batch and Interactive
systems?
-Turnaround time is the amount of time elapsed from the time of submission to the time
of completion whereas Response time is the Average time elapse from submission till
the first response is produced (start execution).
Wait time = (turnaround time - Execution time)
To illustrate it, suppose the scheduler is given 4 tasks, A, B, C and D. Each task
requires a certain number of time units to complete.
A 8
B 4
C 9
D 5
- RR assigns time quanta (i.e. time slot) to each process waiting to be run. For the jobs
A, B,C and D in the previous example, RR’ s Gantt chart would be:
If time quanta = 3
A B D D A B C D A C
0~3 3~6 6~9 9~12 12~15 15~16 16~19 19~21 21~23 23~26
RR
Utilization 26/(26+9CS)