[an error occurred while processing this directive]
COMP3231 Sample Examination Paper
- Time allowed: 2 hours
- Total number of questions: 5
- Answer all questions
- The questions are not of equal value
- Provide answers to multiple choice questions (questions 1-2) in the
space provided on the examination paper itself
- Use a separate answer book for each of questions 3-5
- This paper may not be retained by the candidate
- Answers must be written in ink, with the exception of graphs
- Drawing instruments or rules may be used
- Electronic caluclators provided by the University may be used
Question 1 - 12 marks
Multiple choice single answer
Circle the label of the most appropriate answer. You will get
full marks if you selected the correct choice and no other, you will get
zero marks if you selected a wrong choice or none at all.
A) - 3 marks
Which UNIX system call creates a new process:
-
fork
-
exec
-
creat
-
nproc
-
system
B) - 3 marks
What is the meaning of the ``execute'' permission bit for a directory in
UNIX?
-
allows execution of files in that directory
-
allows access to a file in the directory if the file's name is known
-
allows listing of directory contents
-
no meaning, as directories are not executable files
C) - 3 marks
Which of the following process scheduling algorithms do you expect to produce
the smallest average waiting time (ignoring context switching and scheduling
time):
-
SJF
-
FCFS
-
non-preemptive priority
-
preemptive priority
-
round-robin
-
all are the same
D) - 3 marks
Which of the following process scheduling algorithms do you expect to produce
the smallest total execution time (ignoring context switching and scheduling
time):
-
SJF
-
FCFS
-
non-preemptive priority
-
preemptive priority
-
round-robin
-
all are the same
Question 2 - 18 marks
Multiple choice multiple answer
Classify each answer as true, by crossing the
box, or false, by crossing the
box. You will receive one mark for each correct classification, and loose
one mark for each incorrect classification. You gain zero marks for each
answer left unclassified. The overall mark for a question will not be negative,
i.e. the minimum mark for a question is zero.
For example, assume that of a five choice question, answers 1, 3 and
5 are correct, and you mark
for 3 and 5,
for 1 and leave 2 and 4 unmarked. You gain two marks for correct treatment
of choices 3, and 5, loose one mark for incorrect treatment of choice 1,
for a net of 1 mark.
A) - 6 marks
Which of the following statements are correct:
|
| a smaller page size leads to smaller page tables
|
|
| a smaller page size leads to less fragmentation
|
|
| a smaller page size leads to fewer TLB misses
|
|
| a smaller page size leads to fewer page faults
|
|
| a smaller page size reduces the cost of handling a page fault
|
|
| a smaller page size reduces the number of I/O operations
|
B) - 6 marks
Which of the following statements about user-level threads are correct:
|
| threads are cheaper to create than processes
|
|
| kernel-scheduled are cheaper to create than user-level threads threads
|
|
| threads are cheaper to context switch than processes
|
|
| a blocking kernel-scheduled thread blocks the process
|
|
| a blocking user-level thread blocks the process
|
|
| different user-level threads of the same process can have
different scheduling priorities
|
|
| all kernel-scheduled threads of a process share the same virtual
address space
|
C) - 6 marks
Attempts to gain unauthorised access to computers is often referred to
as ``hacking''. Which of the following statements about hacking are correct:
|
| hacking is like ``unauthorised use of a typewriter'' (Richard
M. Stallman)
|
|
| hacking is the IT equivalent of breaking into someone's home
|
|
| hacking is a harmless activity which helps hackers to learn
about the internals of operating systems
|
|
| hacking is acceptable if it is used to find and expose security
leaks, and if no damage is done
|
|
| hacking is a crime, which carries jail sentences even if no
damage is done
|
|
| hacking is unprofessional behaviour
|
Question 3 - 18 marks
Answer this question in a separate book.
A) - 12 marks
Macrohype Inc has hired you as a consultant to design the message-passing
based IPC system of their new Doors-OT TM
operating system. The design goal is to make the overhead of IPC operations
as low as possible. You need to address the following questions:
-
What are the pros and cons of blocking vs. non-blocking IPC?
-
For either type, does it make sense to implement it without message
buffering by the kernel?
-
Which other aspect of Doors-OT's process management system will significantly
impact your decision on which type (blocking or non-blocking) of IPC to
implement? (Hint: which feature could remove the most significant drawback
of one type?)
B) - 6 marks
Consider a demand-paging system with a paging disk that has an average
access and transfer time of 5 milliseconds for a single page. Addresses
are translated through a page table in main memory, with an access time
of 100 nanoseconds per memory access. Thus, each memory reference through
the page table takes two accesses. The system has a 48-entry TLB to speed
up memory accesses.
Assume that 99% of memory accesses result in a TLB hit, and of the remaining
1%, 5 percent (or 0.05% of the total) cause page faults. What is the effective
memory access time?
Question 4 - 32 marks
Answer this question in a separate book.
A) - 10 marks
Most operating systems use a a memory cache for disk blocks to improve
file system performance. An LRU replacement algorithm is often used for
such a cache. Describe a scenario (certain files with particular access
pattern) where this algorithm would exhibit poor performance. Name a better
alternative for such a case.
B) - 10 marks
Some versions of UNIX store the first part of each file is in the same
disk block as the inode. Discuss the advantages/drawbacks.
C) - 12 marks
Suppose that the head of a moving-head disk with 192 tracks, numbered 0
to 191, is currently serving a request at track 80 and has just finished
a request at track 62. The queue of requests is kept in the FIFO order:
119, 58, 114, 28, 111, 55, 103, 30, 75.
What is the total number of head movements needed to satisfy these requests
for the following disk-scheduling algorithms?
-
FCFS scheduling,
-
SSTF scheduling,
-
SCAN scheduling,
-
LOOK scheduling,
-
C-LOOK scheduling?,
What are the drawbacks of the fastest two algorithms?
Question 5 - 20 marks
Answer this question in a separate book.
A) - 10 marks
List the main advantages of access control lists vs. capabilities and
vice versa.
B) - 10 marks
In a distributed file system, it may be possible to support multiple copies
of a single file.
-
Give two reasons why multiple copies are desirable.
-
Explain two problems that may arise in implementing this feature.
[an error occurred while processing this directive]