Aim: This assignment is designed to evaluate/improve your critical thinking and problem solving skills. It also evaluates/improves your information literacy skill (i.e. the ability to select and organise information and to communicate it clearly)
This section consists of theory questions, covering topics and content covered in lectures and the textbook.
1.There are two competing views of an operating system – that is, operating systems provide services for two different and competing audiences. Name both audiences and describe 2 services an operating system provides for each audience (total of four).
2When providing mechanisms for Inter-Process Communication (IPC) through message passing there are several issues which must be considered. For each of the following issues describe the options available, and the benefits and disadvantages of each option. Considering both the system and the application programmer level in this discussion.
d.Sending data or sending a reference
3.What is required of the wait() and signal() operations in a semaphore to ensure that mutual exclusion is provided? Support your answer.
4.You have been given a logical address space of 128 pages, and each page consists of 1024 words/bytes. This logical address space is mapped onto a physical memory of 64 frames.
a.What is the length (in bits) of the logical address?
b.What is the length (in bits) of the physical address?
This section consists of practical questions, assessing your ability to use and apply algorithms and techniques discussed in lectures and the textbook.
5.You are given a list of process below, with arrival times and burst times for all. Answer the following questions using non-preemptive scheduling, based only on the knowledge you have at the time the decision is made.
a.What is the average turnaround time for these processes using FCFS scheduling?
b.What is the average turnaround time for these processes with the SJF scheduling algorithm?
c.The SJF algorithm should improve performance, but here we see a convoy effect since we did not know that shorter processes were coming. Calculate what the average turnaround time would be if the CPU is left idle for the first 1 unit of time, and then uses SJF. Not that this will increase the waiting time for P1 and P2. We could call this algorithm future-knowledge scheduling.
6.Here is a snapshot of a system:
Using the banker’s algorithm, answer the following questions:
a.What is the content of the Need matrix?
b.Is the system in a safe state? If yes, list the sequence of processes.
c.If a request from P1 arrives for (0, 4, 2, 0), can the request be granted immediately? Explain why or why not.
7.You are given the following series of page requests:
For each of the three page replacement algorithms below, work out how many page faults would occur assuming one, two, three, four, five, six or seven frames. Remember that all frames are empty, so the first unique pages will all cost one fault each.
8.There is a file, stored on the HDD, which is currently 75 blocks in size. For each of the file modifications given below, calculate how many disk I/O operations are required for
iii. indexed (single-level)
allocation strategies. For all 3 strategies assume that the file control block is already in memory, as is the block to be added to the file (where appropriate). For the indexed strategy assume that the index block is already in memory. For the contiguous allocation strategy assume that there is room for the file to grow at the end of the currently allocated space, but NOT at the beginning.
a.Add a block of data to the end of the file
b.Add a block of data to the beginning of the file
c.Add a block of data to the middle of the file
d.Remove a block of data from the middle of the file
e.Remove a block of data from the beginning of the file
f.Remove a block of data from the end of the file
N.B - For all operations assume you start with the original 75 block file NOT a file modified by any previous operation. These are NOT a series of operations - they are separate scenarios to consider.