Download 03-60-330-01 Winter 2010 - School of Computer Science

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Spring (operating system) wikipedia , lookup

Copland (operating system) wikipedia , lookup

VS/9 wikipedia , lookup

CP/M wikipedia , lookup

Distributed operating system wikipedia , lookup

DNIX wikipedia , lookup

Burroughs MCP wikipedia , lookup

Paging wikipedia , lookup

Process management (computing) wikipedia , lookup

Transcript
MIDTERM EXAMINATION #1
OPERATING SYSTEM CONCEPTS
03-60-330-01
Winter 2010
UNIVERSITY OF WINDSOR
SCHOOL OF COMPUTER SCIENCE
PLEASE READ CAREFULLY BEFORE YOU START
1. This is a CLOSED book test; no notes, textbooks, calculators or computer aids are allowed.
2. PRINT your name legibly and clearly with your Student ID in the spaces indicated on the
Scantron sheet.
3. You will be asked to sign your name once before leaving the exam room (sign-out). By doing so
you state your agreement to the terms below
I agree to the above terms and will neither receive nor give
unauthorized help on this exam.
4. All questions are multiple choice. Circle the single response which best answers each question.
5. Place all responses on the approved Scantron marking sheet using PENCIL.
6. You are not allowed to give or receive unauthorized help with your test. Any misconduct, as
outlined by the Senate bylaw 31 article I, will be reported accordingly.
7. You have 75 minutes to complete this test.
8. You may keep this question paper following the examination. A photocopy of your Scantron
sheet will be returned to you.
9. The maximum mark is 71.
Good Luck!
TEST ID: 02
Page 1
All questions are Multiple Choice or True/False. In each Multiple Choice question, 4 responses
are provided – you are to choose only one response which best answers the question. Use the
Scantron sheet provided to indicate your answers. Circle the letter A, B, C or D (one only). For
True/False types of questions, circle either A or B. If an error is made you must carefully erase
the error and then fill in the circle you intend to choose.
USE PENCIL ONLY ON THE SCANTRON SHEET
1. In multiprocessor environments, two copies of the same data may reside in the local
cache of each CPU. Whenever one CPU alters the data, the cache of the other CPU must
receive an updated version of this data. This is called Cache _________ .
A) Coherency
B) Cooperation
C) Redundancy
D) Concurrency
2. An archived program file is _________ .
A) another name for a process
B) an active entity
C) a passive entity
D) All of the above responses are correct.
3. Thread-specific data is data that ____.
A) is not associated with any process
B) has been modified by the thread but not yet updated to the parent process
C) is copied and not shared with the parent process
D) is generated by the thread independent of the thread's process
4. The Producer-Consumer problem is related to _________ .
A) the allocation of resources to process states
B) the scheduling of process states
C) the handling of process control blocks
D) All of these responses are correct.
5. ____ is the number of processes that are completed per time unit.
A) CPU utilization
B) Response time
C) Turnaround time
D) Throughput
Page 2
6. In RR scheduling, the time quantum should be _________ the context-switch time.
A) small with respect to
B) large with respect to
C) the same size as
D) irrelevant to
7. Which of the following is true of multilevel queue scheduling?
A) Processes can move between queues.
B) Each queue has its own scheduling algorithm.
C) A queue cannot have absolute priority over lower-priority queues.
D) It is the most general CPU-scheduling algorithm.
8. Which of the following scheduling algorithms must be non-preemptive?
A) SJF
B) RR
C) FCFS
D) priority algorithms
9. Processes are capable of _______ .
A) executing concurrently
B) performing data transfer operations
C) performing logic
D) All of the above responses are correct
10. The timer construct used to ensure protection of the CPU from infinite loops in user
processes is an example of ___________ .
A) policy
B) mechanism
C) hardware
D) a design goal
11. Most often, application programs access system resources using ______ .
A) system calls
B) kernel threads
C) user threads
D) application program interfaces
Page 3
12. The two modes of operation of an operating system are called ___________ .
A) process and kernel
B) ready and running
C) interrupt and system
D) kernel and user
13. A microkernel is a kernel ____.
A) that is stripped of all essential components
B) that is compressed before loading in order to reduce its resident memory size
C) that is compiled to produce the smallest size possible when stored to disk
D) containing many components that are optimized to reduce resident memory size
14. When a process is accessing its stack space, it exists in the _________ .
A) Running state
B) Waiting state
C) Terminating state
D) Ready state
15. If a program terminates abnormally, a dump of memory may be examined by a ____ to
determine the cause of the problem.
A) module
B) debugger
C) shell
D) control card
16. Turnaround time refers to the amount of time ______ .
A) that CPU utilization is minimized
B) needed to execute a particular process
C) a process has been waiting in the ready queue
D) it takes from when a request was submitted until the first action is produced
17. ____ is the amount of time a process has been waiting to enter the ready state for the
first time.
A) Wait time
B) Response time
C) Turnaround time
D) None of these responses are correct.
Page 4
18. For a single-processor system __________ .
A) processes spend long times waiting to execute
B) there will never be more than one running process
C) input-output always causes CPU slowdown
D) process scheduling is always optimal
19. A process control block should contain __________ .
A) the process ID
B) locations to store register values
C) a list of all open files
D) All of these responses are correct
20. Which of the following pieces of information is least useful to the SYSGEN program of
an operating system?
A) the CPU being used
B) amount of memory available
C) what applications to install
D) operating-system options such as buffer sizes or CPU scheduling algorithms
21. Pthreads refers to ____.
A) the POSTFIX standard.
B) an implementation for thread behavior.
C) an API for thread creation and synchronization.
D) an algorithm for thread behavior.
22. A provably optimal job scheduling scheme is _________ .
A) RR
B) FCFS
C) SJF
D) Priority
23. When a process performs I/O, its PCB is moved to the ________ .
A) Ready queue
B) Wait queue
C) Terminate queue
D) Running queue
Page 5
24. Which of the following is an operating system?
A) Linux
B) Solaris
C) Windows XP
D) All of these responses are correct.
25. Which of the following is an example of a systems program?
A) command interpreter
B) Web browser
C) text formatter
D) database system
26. When a child process is created, which of the following is a possibility in terms of the
execution or address space of the child process?
A) The child process runs concurrently with the parent.
B) The child process may outlive the parent.
C) The child may acquire more resources than the parent.
D) None of the above responses is correct.
27. Which of the following is a property of peer-to-peer systems?
A) Separate machines act as either the client of the server but not both.
B) Clients and servers are not distinguished from one another.
C) They do not offer any advantages over traditional client-server systems.
D) They suffer from the server acting as the bottleneck in performance.
28. An example of a scheduling algorithm based on the criterion of Shortest Time
Remaining, Next Served is _________.
A) SJF
B) FCFS
C) RR
D) Multilevel queue
29. Context switching between processes is carried out by the _________ .
A) dispatcher
B) short term scheduler
C) interrupt handler
D) thread manager
Page 6
30. A ____ circuit can be used to prevent a user program from never returning control to the
operating system.
A) portal
B) program counter
C) firewall
D) timer
31. A process control block ____.
A) includes information on the process's state
B) stores the address of the last instruction processed
C) determines which process is to be executed next
D) is an example of a process queue
32. In the context of operating systems, the term Policy ____.
A) determines how to do something
B) determines what will be done
C) is not likely to change across places
D) is not likely to change over time
33. In what way is an operating system like a government?
A) It seldom functions correctly.
B) It creates an environment within which other programs can do useful work.
C) It performs most useful functions by itself.
D) It is always concerned primarily with the individual's needs.
34. The SJF scheduling scheme requires knowledge of each process’s _________ .
A) Total resource requirements
B) Algorithm
C) Total burst time
D) Priority
35. The major challenge in designing a layered operating system approach is ____.
A) making sure each layer is easily converted to modules
B) making sure that each layer hides certain data structures, hardware, and operations
from higher-level layers
C) appropriately defining the various layers
D) debugging a particular layer
Page 7
36. The ____ of a process contains temporary data such as function parameters, return
addresses, and local variables.
A) text section
B) data section
C) program counter
D) stack
37. Which of the following is considered a resource that may be allocated by an operating
system?
A) CPU
B) bus
C) DMA processor
D) Instruction register
38. The lowest cost secondary storage medium is ____.
A) portable memory card (or stick)
B) DVD ROM
C) magnetic tape
D) solid-state memory
39. A thread control block _______ .
A) is managed by the parent process
B) contains the same information as the process control block
C) has the identical structure as the process control block
D) does not include information about the parent process resource allocation
40. In a(n) ____ temporary queue, the sender must always block until the recipient receives
the message.
A) zero capacity
B) variable capacity
C) bounded capacity
D) unbounded capacity
41. Long-term scheduling is performed _________ .
A) typically on submitted jobs
B) when processes must be moved from ready to waiting state
C) on processes in the ready queue
D) None of the above responses is correct.
Page 8
42. The ____ scheduling algorithm is designed especially for time-sharing systems.
A) SJF
B) FCFS
C) RR
D) Multilevel queue
43. A FIFO queue is the most appropriate data structure for ______ scheduling.
A) RR
B) FCFS
C) SJF
D) Multi-level
44. Medium-term scheduling is performed _________ .
A) typically on submitted jobs
B) when processes must be moved from waiting to ready state
C) on processes in the ready queue
D) None of the above are correct.
45. In scheduling, the term Aging involves ___________ .
A) higher priority processes preventing low-priority processes from ever getting the
CPU.
B) gradually increasing the priority of a process so that a process will eventually
execute.
C) processes that are ready to run but stuck waiting indefinitely for the CPU.
D) processes being stuck in ready queues so long that they die.
46. In a virtual machine, each program believes that it has ____.
A) multiple processors
B) its own memory
C) another "virtual" computer to assist in its operations
D) more memory than is physically available on the machine
47. Two important design issues for cache memory are ____.
A) speed and volatility
B) size and replacement policy
C) power consumption and reusability
D) size and access privileges
Page 9
48. ____ scheduling is approximated by predicting the next CPU burst with an exponential
average of the measured lengths of previous CPU bursts.
A) Multilevel queue
B) RR
C) FCFS
D) SJF
49. A CPU-bound process _________ .
A) infrequently requests I/O operations and spends more of its time performing
computational work
B) frequently requests I/O operations and spends more of its time performing
computational work
C) infrequently requests I/O operations and spends less of its time performing
computational work
D) frequently requests I/O operations and spends less of its time performing
computational work
50. ____ is the amount of time it takes from when a request was submitted until terminated.
A) CPU utilization
B) Response time
C) Turnaround time
D) Throughput
51. Marshalling refers to ________ .
A) packaging parameters in a form suitable for network transmission
B) initiating a remote procedure call to a networked computer
C) leading the packet train in TCP/IP messaging
D) ordering processes in state queues
52. An advantage to using a higher-level language to implement an operating system is
___________ .
A) the system can be understood by all users
B) modern computer science students do not learn machine language programming
C) an operating system is far easier to port to some other hardware if it is written in a
higher-level language
D) the C and C++ languages are easy to learn and use
Page 10
53. CPU registers are often used to ________ .
A) pass parameters to the operating system
B) store values for reuse by other user programs
C) save memory for storing programs
D) All of the above responses are correct.
54. A circular queue is the most appropriate data structure for ______ scheduling.
A) RR
B) FCFS
C) SJF
D) Multi-level
55. The most volatile form of computer storage is ____.
A) random access memory
B) CPU registers
C) tape drive
D) magnetic disk
56. The resource pyramid, with CPU registers and cache memories at one point of the
pyramid and tape drive storage at an opposite point, reflects which of the following
problems of computer design and operating system management?
A) Resource Allocation and Process Scheduling
B) Speed to Cost relationship
C) Volatility to Cost relationship
D) Both B and C responses are correct.
57. The following are valid process states, including extensions to the 5-state basic model.
A) Next, Running, Halting
B) Terminating, Waiting, Threshing
C) Running, Suspended, Waiting
D) Ready, Deferred, Locked
58. A message passing model is ____.
A) easier to implement than a shared memory model for inter-computer
communication
B) is faster than the shared memory model
C) a network protocol and does not apply to operating systems
D) is only useful for small simple operating systems
Page 11
59. The list of processes waiting for a particular I/O device is called a(n) ____.
A) standby queue
B) device queue
C) wait queue
D) interrupt queue
60. An I/O-bound process _________ .
A) spends equal time seeking I/O operations and doing computational work
B) spends more of its time doing computational work than seeking I/O operations
C) spends more of its time seeking I/O operations than doing computational work
D) spends less of its time seeking I/O operations than doing computational work
61. The most responsive, or fastest, category of computer storage is ____.
A) random access memory
B) CPU registers
C) DVD/CD-ROM
D) cache memory
62. Bootstrap programs must be provided using ________ .
A) volatile memory
B) erasable-programmable memory
C) non-volatile ROM devices
D) special magnetic disk tracks
63. An operating system may be viewed as a resource allocator of such things as CPU time,
memory space, file-storage space, I/O devices, and so on, due to the requirement that
_________ .
A) such things need to allocated to be useful for operating systems to work
B) conflicts of resource usage must not be permitted to happen
C) computer users must be satisfied that resources are available on request
D) resources be used efficiently by users
64. The ______ scheduling algorithm could result in starvation.
A) FCFS
B) SJF
C) RR
D) Priority
Page 12
65. Assume the following processes, each with their arrival time and burst time.
Process
P1
P2
P3
P4
P5
Arrival Time
0.0
2.0
4.0
6.0
7.0
Burst Time
6
2
1
3
3
For SJF Non-Preemptive job scheduling, the average waiting time is
A) 2.8
B) 3.0
C) 3.2
D) 3.4
66. Assume the following processes, each with their arrival time and burst time.
Process
P1
P2
P3
P4
P5
Arrival Time
0.0
2.0
4.0
6.0
7.0
Burst Time
6
2
1
3
3
For Round Robin (RR) job scheduling with time quantum equal to 1 (and where a newly
arriving process is selected as the next running process), the average waiting time is
A) 3.4
B) 3.6
C) 3.8
D) 4.0
Page 13
67. Assume the following processes, each with their arrival time and burst time.
Process
P1
P2
P3
P4
P5
Arrival Time
0.0
2.0
4.0
6.0
7.0
Burst Time
6
2
1
3
3
For FCFS job scheduling, the average waiting time is _______ .
A) 3.0
B) 3.2
C) 3.4
D) 3.6
Following question is excluded.
68. Assume the following processes, each with their arrival time and burst time.
Process
P1
P2
P3
P4
P5
Arrival Time
0.0
2.0
4.0
6.0
7.0
Burst Time
6
2
1
3
3
For SJF Preemptive job scheduling (where a newly arriving process is included in the
selection of the next running process), the average waiting time is
A) 1.4
B) 1.6
C) 1.8 This should have been 2.2
D) 2.0
Page 14
The remaining questions all refer to the process state diagram below.
NEW
TERMINATED
READY
RUNNING
WAITING
69. The state transition from READY to RUNNING happens when a process _____ .
A) is interrupted
B) performs an I/O or event handling
C) completes an I/O or event handling
D) is dispatched by the scheduler
70. The state transition from RUNNING to READY happens when a process _____ .
A) is interrupted
B) performs an I/O or event handling
C) completes an I/O or event handling
D) is dispatched by the scheduler
Following question is excluded. READY should have been RUNNING.
71. The state transition from READY to WAITING happens when a process _____ .
A) is interrupted
B) performs an I/O or event handling
C) completes an I/O or event handling
D) is dispatched by the scheduler
** END OF EXAMINATION QUESTIONS **
Page 15