Operating Systems
More Short Answers
Task
Task 1 [4 marks]
a) State the four conditions necessary for deadlock to occur.
b) Explain how each of these conditions is represented for the situation depicted in the diagram below.
c) Suggest a method to prevent deadlock occurring in the situation depicted in the diagram.
Task 2 [6 marks]
A 2 MB block of memory is allocted using the buddy system.
a) Show the results of the following allocation sequence in a figure (similar to Figure 7.6 in the textbook). (4 marks)
Request (A=328K); Request (B=345KB); Request (C=90KB); Request (D=234KB); Return A; Request (E=120KB); Request (F=360KB); Return B; Return D; Return C.
b) Show the binary tree representation (similar to Figure 7.7 in the textbook) following Return D. (2 marks)
Figure 7.6 from Textbook
Figure 7.7 from Textbook
Task 3 [8 marks]
Consider the following page reference string:
1, 2, 3, 4, 1, 2, 3, 5, 6, 1, 2, 3, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
How many page faults would occur for each of the following replacement algorithms, for each of the cases of two page frames and of four page frames? Remember all frames are initially empty, so your first unique pages will all cost one fault each. Show all working.
a) LRU replacement
b) FIFO replacement
c) Optimal replacement
d) Clock (indicate the status of the use bit in each frame)
Task 4 [2 marks]
Consider a simple paging system with the following parameters: 232 bytes of physical memory; page size of 210 bytes; 216 pages of logical address space.
a) How many bits are in a logical address?
b) How many bytes are in a frame?
c) How many bits in the physical address specify the frame?
d) How many entries are in the page table?
Rationale
This assignment aligns with the learning outcomes:
• be able to identify the design decisions and functionality of several modern operating systems.
• be able to define specific concepts such as multiprogramming processes and threads, virtual memory, scheduling and file systems.
Marking criteria
All questions in this assignment involve the proper executive of steps and processes within operating systems. These are marked using the following criteria:
Criteria Description
Correctness Evidence of completing tasks without any errors.
Completeness The indicated task is carried out completely.
Communication/Working You have made it clear what you have done using an appropriate mix of text, neat diagrams and code excerpts.
The mark for each question is determined by the proportion of your answers that satisfies these criteria:
Full Marks Partial Marks Zero Marks
Correct answer written clearly, concisely and cogently; displaying your in-depth understanding of the concepts using appropriate terminology. Referencing style has no errors. Partially correct answer with incomplete and inadequate answer to question task, lack of appropriate reasoning. Minor referencing style errors. Answers to questions are incorrect; absence of referencing style.
The application of these general principles to each individual question is given with the questions themselves. Please read them to maximise your marks.
Grade allocations:
Marks for all questions will be totalled and grades awarded based on percentage of the 20 total available marks. (FL <50%; PS 50-64%; CR 65-74%; DI 75-84%; HD 85-100%).
Presentation
The material must be word processed and submitted as a Word or PDF file (NOT both). Good quality hand draw diagrams may be scanned and embedded in the document. Hand written material will not be accepted.
Requirements
To complete this assessment item, you should have read chapters 6 to 10 of the textbook.