What is the producer consumer problem? Give an example of its occurence in operating
systems.(Answered)
A semaphore is a blocking synchronisation primitive. Describe how they work with the
aid of pseudo-code. You can assume the existance of a thread_block() and a thread_wakeup()
function(Answered)
Describe how to implement a lock using semaphores.(Answered)
What are monitors and condition variables?(Answered)
What is deadlock? What is startvation? How do they differ from each other?(Answered)
What are the four conditions required for the deadlock to occur?(Answered)
Describe four general strategies for dealing with deadlocks(Answered)
For single unit resources, we can model resource allocation and requests as a directed
graph connecting processes and resources. Given such a graph, what is involved in deadlock
detection(Answered)
Assuming the operating system detects the system is deadlocked, what can the operating
system do to recover from deadlock?(Answered)
What must the banker's algorithm know a priori in order to prevent deadlock?(Answered)
Describe the general strategy behind deadlock prevention, and give an example of a
practical deadlock prevention method(Answered)
Filesystems can support sparse files, what does this mean? Give an example of an
application's file organisation that might benefit from a file system's sparse file support(Answered)
Give an example of a scenario that might benefit from a file system supporting an
append-only access write(Answered)
Give a scenario where choosing a large filesystem block size might be a benefit; give an
example where it might be a hinderance(Answered)
Give an example where contiguous allocation of file blocks on disks can be used in
practice.(Answered)
What file access pattern is particularly suited to chained file allocation on disk?(Answered)
What file allocation strategy is most appropriate for random access files?(Answered)
Compare bitmap-based allocation of blocks on disk with a free block list(Answered)
How can the block count in an inode differ from the (file size / block size) rounded up to
the nearest integer. Can the block count be greater, smaller, or both(Answered)
Why might the direct blocks be stored in the inode itself?(Answered)
Given that the maximum file size of combination of direct, single indirection, double
indirection, and triple indirection in an inode-based filesystem is approximately the same as a filesystem solely using triple indirection, why not simply use only triple indirection to locate all file blocks?(Answered)
What is the maximum file size supported by a file system with 16 direct blocks, single,
double, and triple indirection? The block size is 512 bytes. Disk block numbers can be stored
in 4 bytes.(Answered)
The Berkeley Fast Filesystem (and Linux Ext2fs) use the idea of block groups. Describe
what this idea is and what improvements block groups have over the simple filesystem layout
of the System V file system (s5fs).(Answered)
What is the reference count field in the inode? You should consider its relationship to
directory entries in your answer.(Answered)
The filesystem buffer cache does both buffering and caching. Describe why buffering is
needed. Describe how buffering can improve performance (potentially to the detriment of file
system robustness). Describe how the caching component of the buffer cache improves
performance(Answered)
What does flushd do on a UNIX system?(Answered)
Why might filesystems managing external storage devices do write-through caching
(avoid buffering writes) even though there is a detrimental affect on performance(Answered)
Describe the difference between external and internal fragmentation. Indicate which of
the two are most likely to be an issues on a) a simple memory memory mangement machine
using base limit registers and static partitioning, and b) a similar machine using dynamic
partitioning(Answered)
List and describe the four memory allocation algorithms covered in lectures. Which two
of the four are more commonly used in practice?(Answered)
Base-limit MMUs can support swapping. What is swapping? Can swapping permit an
application requiring 16M memory to run on a machine with 8M of RAM?(Answered)
Describe page-based virtual memory. You should consider pages, frames, page
tables, and Memory Management Units in your answer.(Answered)
Give some advantages of a system with page-based virtual memory compared to a simply
system with base-limit registers that implements swapping.(Answered)
Describe segmentation-based virtual memory. You should consider the components of a
memory address, the segment table and its contents, and how the final physical address is
formed in your answer(Answered)
What is a translation look-aside buffer? What is contained in each entry it contains?(Answered)
Some TLBs support address space identifiers (ASIDS), why?(Answered)
Describe a two-level page table? How does it compare to a simple page table array?(Answered)
What is an inverted page table? How does it compare to a two-level page table?(Answered)
What are temporal locality and spatial locality?(Answered)
What is the working set of a process?(Answered)
How does page size of a particular achitecture affect working set size?(Answered)
What is thrashing? How might it be detected? How might one recover from it once
detected?(Answered)
Enumerate some pros and cons for increasing the page size.(Answered)
Describe two virtual memory page fetch policies. Which is less common in practice?
Why?(Answered)
Name and describe four page replacement algorithms. Critically compare them with each
other.(Answered)
Describe buffering in the I/O subsystem of an operating system. Give reasons why it is
required, and give a case where it is an advantage, and a case where it is a disadvantage(Answered)
Device controllers are generally becoming more complex in the functionality they provide
(e.g. think about the difference between implementing a serial port with a flip-flop controlled
by the CPU and a multi-gigabit network adapter with the TCP/IP stack on the card itself).
What effect might this have on the operating system and system performance?(Answered)
Compare I/O based on polling with interrupt-driven I/O. In what situation would you
favour one technique over the other?(Answered)
Explain how the producer-consumer problem is relevant to operating system I/O.(Answered)
What is disk interleaving? What problem is it trying to solve?(Answered)
Name four disk-arm scheduling algorithms. Outline the basic algorithm for each.(Answered)
Why is it generally correct to favour I/O bound processes over CPU-bound processes?(Answered)
What is the difference between preemptive scheduling and non-preemptive scheduling?
What is the issue with the latter?(Answered)
Describe round robin scheduling. What is the parameter associated with the scheduler?
What is the issue in chosing the parameter(Answered)
The traditional UNIX scheduler is a priority-based round robin scheduler (also called a
multi-level round robin schduler). How does the scheduler go about favouring I/O bound jobs
over long-running CPU-bound jobs?(Answered)
In a real-time system with a periodic task set,, how are priorities assigned to each of the
periodic tasks?(Answered)
What is an EDF scheduler? What is its advantage over a rate monotic scheduler?(Answered)
Advantages of Round Robin Scheduling algorithm(Answered)