time and waiting time for accessing the resources
Throughput: - is the amount of work, in other words, the rate of completion
of processes a computer can carry out in a certain time (a unit
time). Throughput basically defines the degree of performance
of a computer/system
Processor utilisation: - indicates the percentage of time the CPU is busy
running a process, apart from waiting time for
Input/Output
b. A context switch occurs when a thread releases the processor, and whereby
the task/process of the front of the ready queue becomes the new active
task. The execution context of the previous thread has to be saved so that
the thread can be used later. Mainly, the program counter and the
execution stack associated with the executing thread is saved, so that the
context of a new thread can be restored.
c. We use concurrency because it allows multiple users to share a machine and
programming is made easier by breaking a problem into simple pieces.
Moreover, concurrency also provides other advantages such as timesharing,
parallel processing, overlapping computation with Input/Output and solution
for larger problems.
Question 3
List the responsibilities in UNIX of: a. the shell b. the kernel
3).
a. Responsibilities of the shell in UNIX:
- to provide a command line interface (CLI)
- to perform Input/Output redirection
- to perform pathname substitution
- to perform parameter/variable substitution
- to provide an interpreted the user requests and pass them on to the
kernel
- and to execute commands
b. Responsibilities of the kernel in UNIX:
- to manage processes
- to manage Input/Output
- to manage files
- to carry out user requests
- to identify and communicate with the user
Question 4
a. Give an argument in favour of manual deadlock recovery
b. State a possible problem with roll-back
c. Why must a Java programmer be always on guard for possible deadlocks
4).
a. You can perform a manual deadlock recovery by completing either one task that is running using “force quit” operation or reboot the system.
b. A possible problem with roll-back may be that if a node on which a return
transaction is to be made, but is permanently inaccessible, a roll-back
cannot proceed and this causes the agent to be blocked.
c. A Java programmer must be always on guard for possible deadlocks, since in
Java, deadlocks can occur due to the synchronized keyword, which causes
the executing thread to block while waiting for the lock or monitor. It may
be that sometimes the thread already holds locks associated with other
objects. In such case, the thread will remain waiting forever.
Question 5
A program computes the row sums Ci = ∑j ajj of an array A which is 100 by 100. The page size is 1000 words. Would there be any difference in the page fault rate if A were stored in virtual memory by rows or by columns? Explain.
5). No, there would not be any difference in the page fault rate. Being stored in the virtual memory simply means that the program can be loaded anywhere in the hard disk space, it does not have a specified location, and can therefore be stored in different memory locations each time the program loaded. In our case, the page fault rate would only differ, if the size of the array A has been changed.
Question 6
A computer systems uses segmentation and paging. When a segment is in memory, some words are wasted on the last page. A segment of size s will have s/p pages of size p. How do the page table size and the last page wastage each vary with page size? Find by calculation or otherwise the page size which will give the least overhead.
6).
Bibliography & References
Books
J. S. Swift, “Virtual Machinges II”, ©2002, School of Computing Science
Silberschatz, A., Galvin, P.B., and Gagne, G., Applied Operating Systems, Concepts, 1st Edition, J.Wiley and Sons, 2001
Tanenbaum, A. S., Modern Operating Systems, 2nd Edition, Prentice Hall, 2001
Websites