0% found this document useful (0 votes)
57 views2 pages

TEST Review 1 Hour and A Half The Test Is 6 Questions Covering The Topics Below: Questions

The test covers 6 topics: 1) interrupts and kernel/user stacks, 2) memory allocation algorithms, 3) virtual vs physical memory, 4) file I/O and disk compaction, 5) context switching, and 6) process scheduling for batch and interactive systems. Questions will involve explaining interrupts and stacks, identifying which memory chunk a process would receive using different algorithms, describing virtual memory translations and optimizations, file I/O and disk fragmentation, saving/restoring process contexts, and analyzing scheduling algorithms like round robin.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views2 pages

TEST Review 1 Hour and A Half The Test Is 6 Questions Covering The Topics Below: Questions

The test covers 6 topics: 1) interrupts and kernel/user stacks, 2) memory allocation algorithms, 3) virtual vs physical memory, 4) file I/O and disk compaction, 5) context switching, and 6) process scheduling for batch and interactive systems. Questions will involve explaining interrupts and stacks, identifying which memory chunk a process would receive using different algorithms, describing virtual memory translations and optimizations, file I/O and disk fragmentation, saving/restoring process contexts, and analyzing scheduling algorithms like round robin.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

TEST Review

1 hour and a half


The test is 6 questions covering the topics below:

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.

4. Understand what is involved in creating/reading/writing/deleting file from disk and


what is involved in optimizing disk compaction to ensure contiguous files allocation?

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

-All files are contiguous so accessing is very fast

5. Understand what is involved in context switching 2 processes (save and restore


process context)?

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

Task Time units

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)

Turn around time (23+16+26+21)/4 = 21.5 ignoring CS

Waiting (15+12+17+16)/4 = 15 ignoring CS

Throughput 4/(26 + 9CS)

Response Time (0+3+6+9)/4 = 4.5 ignoring CS

You might also like