Sample Exam Questions
CSE2302 Operating Systems, Semester 2, 2005
The examination paper is out of 267 marks has two sections.
Only integral marks are given.
Part A contains 33 multi-set questions, where more than one alternative can
be correct. Each question is worth 3 marks, giving a possible 99 marks in all.
You answer by circling what you think are the correct answers.
To get full marks all and only correct alternatives must be circled.
Part B contains 8 questions with written answers worth a possible 168 marks.
Answers are written in within the examination paper.
The following instructions to candidates are taken from the examination
paper:
Instructions to Candidates
- Write your student ID and desk number in the section above.
- Answer all questions in the space provided.
Reverse side of question paper may be used for rough
working but will not be marked.
- There are two sections: A and B.
Section A is worth 99 marks and
Section B is worth 168 marks.
- Total marks for this examination are 267.
- Calculators are NOT allowed.
- This paper is NOT to be removed from the examination room.
Sample Questions for Part A
Sample answers to these quesions can be found here.
-
1. The Windows and UNIX shell programs
- a. are not processes at all
- b. provide the user with system administrator privileges
- c. are executed by users and provide user privileges
- d. are the programs which provide a command line interface
for all users
- e. none of the above
-
2. The operating system
- a. is important because it provides an interface between the user
and the computer hardware
- b. is difficult to define
- c. is defined as the composition of process manager, memory manager and
I/O manager
- d. causes the termination of a processe which has a
runtime SEGFAULT error
- e. is/does none of the above
-
3. Which of the following can be described as a resource managed
by the operating system:
- a. the number of keys on the keyboard
- b. the amount of memory for a process
- c. the number of instructions which can executed by the CPU per second
- d. the file-system
- e. the file-system interface
-
4. Which OS strategy assures users that a service will be delivered at
a pre-specified time?
- a. batch processing
- b. timesharing
- c. interactive data processing
- d. real time scheduling
- e. none of the above
-
5. Which if the following statements is true about multiprogramming?
- a. it makes threads obsolete
- b. it can be used to save memory
- c. it increases the systems throughput
- d. it increases the efficiency of the CPU
- e. it increases the efficiciency of memory
-
6. Turn-around time is
- a. time taken to load a program into memory
- b. time from arrival of the process to termination of the process
- c. time from arrival of the process to first access to the CPU
- d. is not a usefull concept
- e. is measured in microseconds
-
7. On a single CPU multiprogrammed system,
- a. we can have several processes in the run state at once
- b. there is a queue of running processes
- c. there is a queue of ready processes
- d. only one process can be blocked for I/O at any time
- e. there is a queue for processes that are blocked for I/O
-
8. Processes that are sleeping
- a. are in the ready queue
- b. can wake themselves
- c. must be woken by an external event
- d. are executing a spin-lock
- e. can be waiting for I/O
-
9. The short-term scheduler
- a. schedules suspended processes
- b. is used to schedule processes between the ready
ready state and the running state
- c. allocate process IDs
- d. blocks processes for I/O operations
- e. none of the above
-
10. A directory is
- a. a file that contains only file names
- b. a data structure that allows indexed access to
file contents
- c. a data structure that provides indexed access to file names
- d. able provide for a hierarchical organisation of filenames
- e. only useful when using UNIX
-
11. A file is
- a. the underlying storage mechanism for a database management system
- b. a named, linear sequence of bytes
- c. is used to contain persistent data
- d. is used to protect persistent data
- e. none of the above
-
12. Which of the following are distinct components of a process?
- a. the run-time image on the disk
- b. code and data only
- c. code, data and stack
- d. list of resources
- e. the process control block
-
13. The CPU can execute code
- a. from the disk drive
- b. only when it resides in memory
- c. only after the process control block has been generated and
the code is in memory
- d. only when the execute permission is enabled
-
14. When a process is terminated
- a. it removes itself from memory
- b. it is dequeued from the ready queue
- c. it is removed from memory and put in swap space on a disk
- d. it stops executing but remains in memory
-
15. A CPU protection mechanism
- a. is not really a problem for the OS
- b. is critical for the safe and correct execution of the OS
- c. protects users from the OS
- d. protects the OS from inadvertant damage cause by user processes
-
16. Segmented virtual memory
- a. divides memory into fixed sized frames
- b. divides code into fixed sized segments
- c. allows for variable sized segments
- d. reduces the amount of internal fragmentation
-
17. A user mode program can invoke OS services by:
- a. having system administrator permission
- b. message passing
- c. executing a trap instruction
- d. executing a system call
- e. none of the above
-
18. Consider the relationships amongst the major OS components:
- a. the process manager is inseparable from the file manager
- b. the device manager relies on the memory manager
- c. the UNIX file manager uses the device manager
- d. none of the above
-
19. In a paged (fixed size) memory partitioning scheme what causes
fragmentation?
- a. very large processes
- b. large number of very small processes
- c. a mismatch between memory requests and the size of memory
partitions
- d. processes which are one byte larger than an integral number
of pages
-
20. The DMA controller is used to
- a. increase the efficiency of the CPU
- b. transfer data from peripheral to peripheral
- c. cannot be used directly by the OS
- d. transfer data from peripherals to memory
- e. transfer code from memory to swap space
-
21. The translation look-aside buffer
- a. provides a means of managing access to data on the disk
- b. is a cache used to hold recently referenced page table entries
- c. reduces the frequency of access to main memory to retrieve
page table entries
- d. is implemented in the memory management unit of the CPU
- e. none of the above
-
22. A page fault
- a. is an error in the code within a page in main memory
- b. is used to begin the execution of code that brings a page into
memory
- c. will be the cause of thrashing when memory is over allocated
- d. is usually going to lead to a process switch
-
23. A context switch is
- a. the procedure of saving the execution state of a process
and restoring the execution state of another process
- b. to turn the computer off
- c. the procedure of moving a program out of memory
- d. caused by a periodic timer interrupt
- e. none of the above
-
24. A CPU with interrupts usually includes instructions to
enable and disable interrups
- a. so that we can synchronize with the power cycle
- b. to prevent race conditions in a multiprogrammed system
- c. to prevent overhead due to slow devices
- d. to manage serial access to critical sections in processes
-
25. Interrupts allow more efficient use of the CPU because
- a. the CPU can continue with code execution when
slow peripherals are responding to an I/O request
- b. polling would cause the CPU to spin-lock
while waiting for a peripheral to respond
- c. interrupt flags are checked inside the CPU without
signicant impact on the fetch-decode-execute cycle
- d. they occur very infrequently when compared with the frequency
of the CPU executional cycle
- e. none of the above
-
26. Scheduling the movements of the read/write head of a disk
- a. is good because disks are expensive
- b. is good because the disk is not rotating fast enough
- c. is good because rotational latency increases the seek time
- d. is good since rapid changes in direction of motion
of the read write head means that it is stationary and
not reading or writing
- e. is only possible if we queue block requests
-
27. Possible causes for a process to relinquish access to the CPU are:
- a. it has finished processing
- b. it is preempted
- c. it is blocked for an I/O operation
- d. it has caused a security violation
- e. none of the above
-
28. The wait-time for a process is
- a. the amount of time a process needs to be in the running queue
before it is completed
- b. the time a process waits for all required resources to be allocated to it
- c. the amount of time between arrival of a process in the ready queue
and the moment that the process exits from the ready queue
- d. the amount if time a process spends waiting in the ready queue
- e. none of the above
-
29. A scheduling policy may attempt to optimize
- a. the average throughput rate
- b. the average turn-around time
- c. CPU utilization
- d. the average waiting time
- e. none of the above
-
30. Non-preemptive scheduling algorithms
- a. are a preferred class of algorithms to support
real-time computing
- b. rely on cooperative sharing mechanisms to multiplex the CPU
- c. are most widely used because of their simplicity
- d. rely on interrupts to multiplex the CPU
- e. none of the above
-
31. FCFS CPU scheduling
- a. maximizes throughput
- b. maximizes equitability
- c. minimizes wait time
- d. is better for long processes
- e. none of the above
-
32. A critical section
- a. can be managed by enabling and disabling interrupts
- b. is a trusted piece of code inside the OS kernel
- c. is a section of code which can only be accessed
by a single process at a time
- d. once begun must be executed to completion
- e. none of the above
-
33. A race condition
- a. is a computing environment for benchmarking system programs
- b. is a condition in which the order that processes execute
certain sections of code determines the outcome of the computation
- c. must execute as quickly as possible
- d. none of the above
-
34. An acceptable solution to the critical section problem is achieved
- a. if a critical section is free and a set of processes indicates a
need to enter into the critical section, then only those processes
competing for access to the critical section participate in the
selection of a process to enter the critical section
- b. if only one process at a time should be allowed into its critical
section
- c. if after a process requests entry into its critical section,
only a bounded number of other processes is allowed to
enter their related critical sections before the original
process enters its critical section
- d. if once a process attempts to enter its critical section,
it cannot be postponed
indefinitely even if no other process is in its critical section
- e. by none of the above
-
35. A semaphore is
- a. accessed only by two access routines
- b. incremented by the signal (or V) operation
- c. decremented by the wait (or P) operation
- d. always a non-negative integer
- e. none of the above
-
36. If the initial value of a semaphore is 1 and it is
implemented as a non-negative integer then if
the value of the semaphore is 0, we know
- a. that another process is in its critical section and our process
must wait
- b. we can enter our critical section immediately
- c. nothing, it depends on the code which we want to execute
- d. we need to wait in a spin lock till the semaphore value returns to 1
- e. none of the above
-
37. In the deadlock prevention strategy
- a. we need to ensure that at least one of the necessary
conditions for deadlock is false at all times
- b. the Banker's algorihm is the best know implementation
- c. mutual exclusion is not one of the necessary conditions
that can be invalidated
- d. prevention must be based on falsifying hold-and-wait, circular
wait and no preemption of access to resources
- e. none of the above
-
38. In a deadlock avoidance strategy
- a. each process make its maximum claims known to
memory manager when the process begins
- b. the resource manager avoids deadlocks by staying in safe states
- c. the Banker's algorithm is the best known implementation
- e. none of the above
-
39. Which of the following are functions of the memory manager?
- a. define a processes address space
- b. allocate primary memory space to processes
- c. minimize access times using a cost-effective amount of
primary memory
- d. map the process's address space into the allocated portion
of primary memory
- e. none of the above
Sample Questions for Part B
The textbook - Silberschatz, Galvin and Gagne, Operating System Concepts,
Sixth Edition - has good examples of this type of written question.
Some selected examples are:
Chapter 1: Exercises 1.2, 1.3
Chapter 2: Exercises 2.2, 2.3, 2.9
Chapter 3: Exercises 3.6, 3.7
Chapter 4: Exercises 4.2, 4.4
Chapter 6: Exercises 6.2, 6.3
Chapter 7: Exercises 7.1, 7.2, 7.3
Chapter 8: Exercises 8.8, 8.11, 8.13
Chapter 9: Exercises 9.7, 9.8, 9.10, 9.12
Chapter 10: Exercises 10.3, 10.5, 10.11, 10.14
Chapter 11: Exercises 11.1, 11.3, 11.10
Chapter 12: Exercises 12.1, 12.2, 12.4, 12.9
Chapter 13: Exercises 13.2, 13.4
Chapter 14: Exercises 14.1, 14.2, 14.9
Trevor Dix
Last modified: 23 May 2005
© Trevor Dix, Monash University, 2005