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:
Consider a paging system with the page table stored in memory:
Fragmentation:
Consider a system with a 10 bit physical address space divided into 128 frames. The logical address space for each process has 8 pages:
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
Suppose that the head of a disk with 20 tracks, numbered 0-19, is currently serving a request at track 14 and has just finished a request at track 12. The queue of requests is kept in FIFO order:
8, 14, 9, 17, 9, 15, 9, 17, 13
What is the total number of head movements needed to satisfy these requests for the following disk-scheduling algorithms?
Shortest Seek Time First (SSTF) scheduling?
SCAN (elevator) scheduling?
Assume in your project 2 (Hide) assignment you stored a
field named isHidden
to the struct
task_struct
to indicate whether or not a process was hidden.
Place the following pseudo-system calls and statements:
p = find_task_by_pid(pid) if (!p->isHidden) if (p->isHidden) unhide(pid) proc_register() sys_unhide(pid) hide(pid) p->isHidden = 1 for_each_task(p) p->isHidden = 0 pids[nr_pids] = pid sprintf(buff, "%d\t", p->pid) sys_hide(pid) pid = getpid() proc_unregister()Into the following user files:
radar.c
(the module),
hide.c
(the system calls), test-hide.c
(the user level testing of hide-ing), root.c
(the proc
filesystem). The calls may be used more than once, as needed.
Consider your project 3 (Remote Shell). For each of the client and server programs separately, place the following system calls in the right order. The calls may be used more than once, as needed.
fork() connect() accept() while (!done) end /* while */ close() send() if (child) end /* if */ exec() recv()