



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Instructions Answer FIVE questions. All questions are worth equal marks.
Examiners: Mr. G. McSweeney Dr. J. Buckley Dr. A. Kinsella Dr. M. O Cinneide Mr. M. Donnelly
(a) Write down the principal requirements of memory management. ( 5 Marks ) (b) In the context of memory management, what is meant by the term external fragmentation? ( 2 Marks ) (c) In dynamic memory partitioning, name and describe three algorithms for placing data. ( 6 Marks ) (d) Why do you think fixed partitioning is no longer used in memory management? ( 2 Marks ) (e) What is meant by the term address mapping? ( 2 Marks ) (f) What is the Principle of Locality? ( 2 Marks ) (g) What is the principal advantage of the Principle of Locality? ( 1 Mark )
(a) Explain what is meant by deadlock. ( 2 Marks ) (b) In the context of deadlock, give an example of a reusable resource. ( 1 Mark ) (c) Explain the difference between deadlock avoidance and deadlock prevention. ( 2 Marks ) (d) What is meant by mutual exclusion? ( 2 Marks ) (e) Apart from mutual exclusion, state two other conditions necessary for deadlock prevention. ( 2 Marks ) (f) Suggest two possible strategies once deadlock is detected. ( 2 Marks ) (g) What is a reusable resource? Give an example. ( 2 Marks )
A system with four processes and three resource types is characterised by the Total Resource Vector and Current Resource Allocation as follows:
Total Resource Vector
R1 R2 R 7 7 7
Current Resource Allocation
R1 R2 R P1 2 0 3 P2 1 3 2 P3 2 1 2 P4 1 1 0
(h) Calculate the available resource vector. ( 1 Mark )
(i) The following matrix describes the Total Resource Claims for each of the current processes. Is the system currently in a safe state? Explain how you derived your answer. ( 6 Marks )
(a) The chmod command is used to assign permissions to files. How might you grant the file keyFile01 the following permissions using the octal notation:
(a) Write down an expression to represent Amdahl’s Law. ( 3 Marks )
(b) Why is Amdahl’s Law often expressed as an inequality? ( 1 Mark )
(c) If a program consists of eighty operations and fifty can be done in parallel:
(i) Calculate the speedup if there are five processors available. ( 2 Marks )
(ii) Calculate the efficiency of the system. ( 2 Marks )
(d) What are the characteristics of a real-time operating system? ( 4 Marks )
(e) In a real-time system, explain the terms periodic task and aperiodic task? ( 4 Marks ) (f) In a real-time system, what is meant by a soft deadline? ( 2 Marks ) (g) Write down an example of a task which might have a soft deadline. ( 2 Marks )
(a) On most Linux systems, what is the usual run-level? ( 1 Mark )
(b) Why is the default run-level never set to 0 or 6? ( 2 Marks )
(c) When might the run-level be set to 1? ( 1 Mark )
(d) What is the purpose of an independent boot loader when loading up an operating system? ( 2 Marks )
(e) What are the conditions of mutual exclusion? ( 6 Mark )
(f) What is meant by starvation? ( 2 Marks )
(g) Consider the following code which was Dekker’s first attempt at ensuring mutual exclusion
turn = 0;
/* Process 0 / while (turn != 0) do {/ nothing /} /critical section*/ turn = 1;
/* Process 1 / while (turn != 1) do {/ nothing /} /critical section*/ turn = 0;
What are the two disadvantages of this system ( 6 Marks )