[an error occurred while processing this directive]

COMP3231 Sample Examination Paper


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:
  1.  fork
  2.  exec
  3.  creat
  4.  nproc
  5.  system

B) - 3 marks

What is the meaning of the ``execute'' permission bit for a directory in UNIX?
  1.  allows execution of files in that directory
  2.  allows access to a file in the directory if the file's name is known
  3.  allows listing of directory contents
  4.  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):
  1.  SJF
  2.  FCFS
  3.  non-preemptive priority
  4.  preemptive priority
  5.  round-robin
  6.  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):
  1.  SJF
  2.  FCFS
  3.  non-preemptive priority
  4.  preemptive priority
  5.  round-robin
  6.  all are the same

Question 2 - 18 marks

Multiple choice ­­ multiple answer
Classify each answer as true, by crossing the T box, or false, by crossing the F 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 T for 3 and 5, F 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:

T F a smaller page size leads to smaller page tables
T F a smaller page size leads to less fragmentation
T F a smaller page size leads to fewer TLB misses
T F a smaller page size leads to fewer page faults
T F a smaller page size reduces the cost of handling a page fault
T F 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:

T F threads are cheaper to create than processes
T F kernel-scheduled are cheaper to create than user-level threads threads
T F threads are cheaper to context switch than processes
T F a blocking kernel-scheduled thread blocks the process
T F a blocking user-level thread blocks the process
T F different user-level threads of the same process can have different scheduling priorities
T F 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:

T F hacking is like ``unauthorised use of a typewriter'' (Richard M. Stallman)
T F hacking is the IT equivalent of breaking into someone's home
T F hacking is a harmless activity which helps hackers to learn about the internals of operating systems
T F hacking is acceptable if it is used to find and expose security leaks, and if no damage is done
T F hacking is a crime, which carries jail sentences even if no damage is done
T F 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:
  1. What are the pros and cons of blocking vs. non-blocking IPC?
  2.  For either type, does it make sense to implement it without message buffering by the kernel?
  3.  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?

  1. FCFS scheduling,
  2.  SSTF scheduling,
  3.  SCAN scheduling,
  4.  LOOK scheduling,
  5.  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.
  1. Give two reasons why multiple copies are desirable.
  2.  Explain two problems that may arise in implementing this feature.
[an error occurred while processing this directive]