Consider the StartUsingProcessTable()
function for
the Simple Operating System that we looked at in class. Is
there busy waiting? If so, why is it ok here? If not, what kind
of waiting is it?
Basic memory management:
- What is the role of the Memory Management Unit (MMU)?
- If a relocation register had a value of 1200 and
a limit register had a value of 1000, give the
physical addresses for a logical address of: 20, 850, 1100.
-
Consider a paging system with the page table stored in
memory:
- If the effective memory access time is 200 nanoseconds with paging,
how long is the physical (raw) memory access time?
- If we add associative registers, and we have a 96 percent
hit-ratio what is the effective memory access time?
Assume access to the associative registers takes 10 nanoseconds.
- What is the worst-case effective memory access time we could
have (using the associative registers from (b))? What is the
best effective memory access time we could have (again, using
the associative registers from (b))?
-
Fragmentation:
- What kind of fragmentation do we have with fixed sized partitions?
Given N processes each in size M memory partitions how
much fragmentation do we have?
- What kind of fragmentation do we have with variable-sized
partitions? Given N processes in memory, how much
fragmentation do we have?
Consider a system with a 10 bit
physical address space divided into 128 frames. The logical address
space for each process has 8 pages:
- How many bits are required for the frame number?
- How many bits are required for the page number?
- How many bits are in the offset?
- How many bits are required for a logical memory address?
- How big is the page table (in bits) for each process?
Consider a system with 32 bits for a memory access. Assume a
2 level paging scheme with 8 bits for the outer page table and 12 bits
for the inner page table. How big is each page?
Assume pure demand paging. Consider a process with 3
frames of memory and a reference string of 1 2 3 4 1 2 3 4
- How many page faults would a FIFO page replacement algorithm have?
- How many page faults would an LRU page replacement algorithm have?
- How many page faults would the optimum page replacement algorithm have?
- Using a working set model with a past reference time of 4, explain
why the process is thrashing. What steps might the OS take to help?
Explain the principles behind the "top half" of an interrupt
handler and the "bottom half" of an interrupt handler.
Assume a system using using i-nodes with all file
descriptors currently cached in memory. The data to be added
is currently in memory, too.
- What is the minimum number of disk I/O operations (counting
each read or write as 1 operation) required to add a block to the
beginning of the file?
- What is the maximum number of disk I/O operations
required to add a block to the beginning of the file?
Assume in your project 2 (Cloak) assignment you stored a
field named isCloaked
to the struct
task_struct
to indicate whether or not a process was cloaked.
Place the following pseudo-system calls and statements:
p = find_task_by_pid(pid)
if (!p->isCloak)
if (p->isCloak)
uncloak(pid)
proc_register()
sys_uncloak(pid)
cloak(pid)
p->isCloak = 1
for_each_task(p)
p->isCloak = 0
pids[nr_pids] = pid
sprintf(buff, "%d\t", p->pid)
sys_cloak(pid)
pid = getpid()
proc_unregister()
Into the following user files: radar.c
(the module),
cloak.c
(the system calls), test-cloak.c
(the user level testing of cloaking), root.c
(the proc
filesystem). The calls may be used more than once, as needed.