Docsity

Operating Systems Exam - Cork Institute of Technology, Exams of Operating Systems

Toggle sidebar
bg1
Cork Institute of Technology
Bachelor of Science (Honours) in Software Development & Computer
Networking – Stage 2
Bachelor of Science (Honours) in Software Development – Stage 2
(KDNET_8_Y2)(KSDEV_8_Y2)
Autumn 2008
Operating Systems
(Time: 3 Hours)
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
Q1.
(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)
pf3
pf4
pf5

Partial preview of the text

Download Operating Systems Exam - Cork Institute of Technology and more Exams Operating Systems in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Science (Honours) in Software Development & Computer

Networking – Stage 2

Bachelor of Science (Honours) in Software Development – Stage 2

(KDNET_8_Y2)(KSDEV_8_Y2)

Autumn 2008

Operating Systems

(Time: 3 Hours)

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

Q.

(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 )

R1 R2 R

P1 5 2 4

P2 5 3 6

P3 3 3 2

P4 7 7 7

(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:

  • user – read and execute
  • group – read and write
  • others – read ( 3 Marks ) (b) In a multi user environment how might a user share files in his / her home directory to other members of his / her group. ( 2 Marks ) (c) Explain why user passwords in UNIX are relatively secure. ( 3 Marks ) (d) Write down an appropriate example of the use of a single-key encryption algorithm. ( 2 Marks ) (e) What type of encryption is appropriate for sharing secrets over an open network? ( 2 Marks ) (e) Name the remote login protocol that is used for a logging onto a system over an open network. ( 2 Marks ) (f) Melissa and ILOVEYOU were two well known email viruses. Explain how they infected millions of computers. ( 4 Marks ) (g) What is a polymorphic virus and why is it so difficult to detect? ( 2 Marks )

(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 )