Sample midterm exam
Started: Apr 28 at 7:13am
Quiz Instructions
Question 1 5 pts
Copyright By PowCoder代写 加微信 powcoder
What will happen in a forked child process if neither the parent nor the child later call exec ?
The child process will continue to run the same program as the parent process The child process will crash
The child process will share the same memory space as the parent process The child process will cause the parent process to wait until the child exits
The child process will run the same lines of code as the parent process does
Question 2 5 pts
Match each library type with the time at which it becomes bound to the executable/executing image.
shared library
static library
dynamically loadable library
[ Choose ]
[ Choose ]
[ Choose ]
Question 3 5 pts
Match the following free-list search algorithms with their correct descriptions.
Question 4 5 pts
Match the following possible outcomes of a memory reference to the conditions under which it occurs
Protection fault
Page fault
Segmentation fault
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
Question 5 5 pts
Match the following situations with processes that need to communicate with the IPC mechanism best suited for the situation.
High performance data transfer between cooperating processes on the same machine
[ Choose ]
Question 6 5 pts
Choose the algorithm that has each of the following characteristics
potentially poor response time due to convoy formation
potential starvation
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
Simple communication between parent and child processes
[ Choose ]
[ Choose ]
[ Choose ]
Communications between processes that might not be on the same machine
Simple rendezvous between unrelated processes on the same machine
Question 7 5 pts
Match each address space segment type with the appropriate description.
[ Choose ]
[ Choose ]
[ Choose ]
Question 8 5 pts
Match the following terms with their definitions:
Mutual exclusion
Transaction
Critical section
[ Choose ]
[ Choose ]
[ Choose ]
[ Choose ]
Question 9 5 pts
Which of the following would likely be included in an ABI specification? Choose all correct answers.
data type size, layout, and alignment exception propagation mechanism load module format
associated include files
system call invocation mechanism routine names
parameter meaning, order, and types return type and values
[ Choose ]
Question 10 5 pts
Given a set of pages, which will Belady’s Algorithm choose?
the last page to be referenced (in the future)
the next page to be referenced
the page that has been referenced most recently the page last referenced least recently
the page referenced most frequently
the page referenced least frequently
Question 11 5 pts
Which of the following are characteristics of base/bounds relocation?
Base and bounds values are stored in hardware registers. The segment size cannot be changed after the program loads.
It cannot handle a situation where a segment swapped out from one location is swapped back in to a different location.
It can be used for code and/or data
The compiler/loader generates all addresses as offsets, relative to the start of the segment. Base and bounds registers can typically be loaded with ordinary instructions.
Question 12 5 pts
Which of the following are true statements about the relationship between real-time scheduling and traditional time-sharing?
Some hard-real time applications do not even require a scheduler.
Knowing expected completion times makes it easier to do better scheduling.
Question 13 5 pts
Which of these is the best definition for coalescing?
The recombination of adjacent free memory chunks.
A variable partition free-list management technique to counter internal fragmentation. Adding memory back to the free list after it is no longer needed.
Maintaining a free list sorted by address.
Combining all free areas of memory by moving allocated segments to new locations.
Question 14 5 pts
Which of the following is true of the cooperative approach to process switching?
The operating system cannot ensure that misbehaving processes give up the CPU
Processes switch when the operating system tells them to
Processes switch when they have exceeded a time limit they set when they start executing
Processes negotiate with each other on when each should release the CPU and who should get it next. Cooperative scheduling is required to achieve fair share scheduling.
Starvation is an acceptable outcome
Assuring low response time will probably require accepting a low CPU utilization. The most important performance metric is mean response time.
In most cases, we can achieve adequate timeliness by simply giving a high priority to the hard real time processes.
Question 15 5 pts
Which of these is the best definition for a dirty page?
Question 16 5 pts
Which of the following might be included included in the OS-managed process state?
general registers stack
open files
L3 cache contents Processor cores Screen Saver timeout
Question 17 5 pts
Which of the following is the best definition for external fragmentation?
Free memory chunks become so small as to be useless
Memory cannot be allocated due to unused memory chunks that are not on the free list Memory consists of fragments of physical memory not yet assigned to any process Memory is unusable because the OS allocated a chunk larger than required.
A condition leading to free list searches taking increasingly long because of the number of entries on the free list.
What is the best definition for a dirty page?
a physical page frame that still contains data from a previous use
a physical page whose contents have changed, and must be restored from disk before they can be used again
a physical page that has experienced multiple correctable read errors and should no longer be trusted a physical page that has been removed from service due to an uncorrectable read error
Question 18 5 pts
How can the OS ensure that it regains control to enforce time-sharing if a process refuses to yield?
Schedule timer interrupts, which will force reentry into the operating system.
Wait for the process to make a system call, which will force reentry into the operating system.
Wait for an I/O interrupt, which will force reentry into the operating system.
The operating system is always in control of the computer and can preempt any process at any time. Swap the process out to secondary storage, so that it can no longer run.
Question 19 5 pts
Which of the following are true observations about interrupt disables as a means of achieving mutual exclusion?
It is not possible for user-mode software.
It may adversely affect system performance.
it is effective against multi-processor parallelism
makes more sense with modern multi-core systems
It cannot prevent conflicts between different device drivers
Question 20 5 pts
Major problems for paging
Page table size
Speed of address translation
External fragmentation
Protecting users¡¯ address spaces from each other
Supporting sparse address spaces
Quiz saved at 7:22am
Submit Quiz
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com