COLLEGE of INFORMATICS and ELECTRONICS


Department of Computer Science

and Information Systems


End-of-Semester Assessment Paper


Academic Year:

2004/05

Semester:

Resits

Module Title:

Operating Systems

Module Code:

CS4145

Duration of Exam:

2½ Hours

Percent of Total Marks:

100

Lecturer(s):

J. Sturdy

Paper marked out of :

100



Instructions to Candidates:

  • Answer any FIVE questions

  • All questions carry equal marks

  • No marks are given for irrelevant material.


Q1.

a)

What are the differences, and the similarities, between processes and threads? What are the relationships between processes and threads?

10 Marks

b)

What are the advantages of splitting a program into multiple threads or processes?

4 Marks

c)

What Operating System facility can make available to processes an important feature of threads?

1 Mark

d)

In developing an application suite, where would you use processes, and where would you use threads?

3 Marks

e)

It is possible to implement threads as a user-level library, without the involvement of the kernel. What is the main disadvantage of this? Why might it still be useful despite this?

2 Marks

Q2.

a)

Handheld computer systems may have a multi-tasking operating system but no backing store (disk drive etc). On such a system, only one application is usable at a time, but others may be suspended in the background. Is it still appropriate for its operating system to provide virtual memory? If so, what are the differences between this and virtual memory with backing store?

9 Marks

b)

If flash memory (which is writable a limited number of times) is added to the system, is it appropriate to use it as backing store, and if so, are there any limitations on this?

3 Marks

c)

If the handheld computer has communications facilities such as wireless internet and a smartphone capability, what extra requirements does this place on the Operating System? Are these different for wireless internet and for voice?

4 Marks

d)

In some small computer systems, there is no interrupt system. What is used instead? And on what kinds of systems is this appropriate? What are its main advantages and disadvantages?

4 Mark


Q3.

a)

Describe the operation of the system calls "fork" and "exec" as provided on systems such as Unix and Linux.

8 Marks

b)

Write some sample code for how "fork" could be used in a multi-tasking application that creates some child processes to do some of its work.

4 Marks

c)

Write some sample code for how a shell could use "fork" and "exec" to start up a child process to run a program.

4 Marks

d)

What do the return values from "fork" and "exec" mean?

4 Marks


Q4.

a)

In what ways is the kernel of an operating system important for security of the system as a whole? What mechanisms are typically used to help provide this security (including both those within the kernel, and the means to access the kernel from other software)?

10 Marks

b)

Explain the Unix/Linux model of file permissions. How does the permission model link user, process, file, and access level?

6 Marks

c)

Explain the "setuid bit" used in Unix/Linux file permissions. Give an example of how it may be used.

2 Marks

d)

Give some examples of file permission systems other than the Unix/Linux "permission bits"

2 Marks


Q5.

a)

Explain what priority in scheduling is. What are the uses of priority? And what are its possible implementations?

7 Marks

b)

What is deadlock? How many processes can be involved in one deadlock? What can be done about it?

10 Marks

c)

What is priority inversion?

3 Marks


Q6.

Explain, with brief notes, the following concepts:

a) File

b) Directory

c) File System

d) Inode

e) Interrupt

f) Scheduling

g) Process

h) Process table

i) Device driver

j) Device queue

2 Marks Each