Operating Systems Exam 2
Mutex locks and couting semaphores are essentially the same thing
True
False
One necessary condition for deadlock is _____, which states that a resource can be released only voluntarily by the process holding the resource.
Circular wait
No preemption
Hold and wait
Mutual exclusion
In Peterson's solution, the ______ variable indicates if a process is ready to enter its critical section.
Turn[i]
Turn
Flag[i]
Lock
Mutex locks and binary semaphores are essentially the same thing.
True
False
The value of a counting semaphore can range only between 0 and 1.
True
False
An instruction that executes atomically _______.
Cannot be used to solve the critical section problem
Must consist of only one machine instruction
Executes as a single, uninterruptible unit
All of these
A(n) _______ refers to where a process is accessing/updating shared data
Entry section
Test-and-set
Mutex
Critical section
A solution to the critical section problem does not have to satisfy which of the following requirements?
Atomicity
Progress
Bounded waiting
Mutual exclusion
_____ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts.
RR
FCFS
SJF
Multilevel queue
The _____ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU.
Waiting time
Convoy effect
Dispatch latency
System-contention scope
________ is the number of processes that are completed per time unit.
Response time
Cpu utilization
Turnaround time
Throughput
Which of the following scheduling algorithms must be nonpreemptive?
RR
SJF
Priority algorithms
FCFS
A significant problem with priority scheduling algorithms is _________.
Determining the length of the next CPU burst
Complexity
Determining the length of the time quantum
Starvation
In preemptive scheduling, the sections of code affected by interrupts must be guarded from simultaneous use.
Ture
False
In Little's formula, λ, represents the ____.
Average arrival rate for new processes in the queue
Average CPU utilization
Average waiting time in the queue
Average queue length
____ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts.
FCFS
Multilevel queue
RR
SJF
The most complex scheduling algorithm is the multilevel feedback-queue algorithm
True
False
Round-robin (RR) scheduling degenerates to first-come-first-served (FCFS) scheduling if the time quantum is too long.
True
False
In RR scheduling, the time quantum should be small with respect to the context-switch time.
True
False
A significant problem with priority scheduling algorithms is _____.
Determining the length of the next CPU burst
Complexity
Starvation
Determining the length of the time quantum
______ allows a thread to run on only one processor.
Load balancing
Processor set
NUMA
Processor affinity
With _______ a thread executes on a processor until a long-latency event (i.e. A memory stall) occurs.
coarse-grained multithreading
Virtualization
Fine-grained multithreading
Multicore processors
The mapping of a logical address to a physical address is done in hardware by the ________.
Relocation register
Dynamic loading register
Memory address register
Memory-management-unit (MMU)
Consider a 32-bit address for a two-level paging system with an 8 KB page size. The outer page table has 1024 entries. How many bits are used to represent the second-level page table?
10
8
9
12
Assume a system has a TLB hit ratio of 90%. It requires 15 nanoseconds to access the TLB, and 85 nanoseconds to access main memory. What is the effective memory access time in nanoseconds for this system?
108.5
100
23.5
176.5
22
A relocation register is used to check for invalid memory addresses generated by a CPU.
True
False
_____ is the dynamic storage-allocation algorithm which results in the largest leftover hole in memory.
Best fit
Worst fit
First fit
None of these
Which of the following is true of compaction?
It can be done at assembly, load, or execution time.
None of these
It is possible only if relocation is dynamic and done at execution time.
It cannot shuffle memory contents.
It is used to solve the problem of internal fragmentation.
A(n) ____ page table has one page entry for each real page (or frame) of memory.
Virtual
Forward-mapping
Clustered
Inverted
_____ is the method of binding instructions and data to memory performed by most general-purpose operating systems.
Execution time binding
Load-time binding
Interrupt binding
Compile time binding
With segmentation, a logical address consists of _____.
Segment table and segment number
segment name and offset
Segment number and offset
Segment number and page number
Consider a logical address with a page size of 8 KB. How many bits must be used to represent the page offset in the logical address?
8
10
13
12
Assume the value of the base and limit registers are 1200 and 350 respectively. Which of the following addresses is legal?
1551
All of these
1200
355
Absolute code can be generated for ____.
Execution-time binding
Compile-time binding
Interrupt binding
load-time binding
Which of the following data structures is appropriate for placing into its own segment?
Heap
User code and data
All of these
Kernel code and data
What size segment will be allocated for a 39 KB request on a system using the Buddy system for kernel memory allocation?
39
42
None
64
Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and a system with three page frames, what is the final configuration of the three frames after the true LRU algorithm is applied?
4 1 2
1 3 4
1 2 3
3 1 4
Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1 3 1 4 and that there are three frames within our system. Using the FIFO replacement algorithm, what will be the final configuration of the three frames following the execution of the given reference string?
4 2 3
3 1 4
3 4 2
4 1 3
The _____ allocation algorithm allocates available memory to each process according to its size.
Global
Equal
Proportional
Slab
The _____ is an approximation of a program's locality.
None of these
Page replacement algorithm
Page fault frequency
Working set
Locality model
Belady's anomaly states that ____.
None of these
Giving more memory to a process will improve its performance
For some page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases
As the number of allocated frames increases, the page-fault rate may decrease for all page replacement algorithms
For some page replacement algorithms, the page-fault rate may decrease as the number of allocated frames increases
Which of the following statements is false with regard to allocating kernel memory?
Adjacent segments can be combined into one larger segment with the buddy system.
Slab allocation does not suffer from fragmentation.
The slab allocator allows memory requests to be satisfied very quickly.
Because the kernel requests memory of varying sizes, some of which may be quite small, the system does not have to be concerned about wasting memory.
_____ occurs when a process spends more time paging than executing.
Swapping
Demand paging
Memory-mapping
none of these
Thrashing
The ____ is the number of entries in the TLB multiplied by the page size.
TLB reach
TLB cache
Hit ratio
None of these
Page resolution
Optimal page replacement ____.
Is the page-replacement algorithm most often implemented
Is used mostly for comparison with other page-replacement schemes
Requires that the system keep track of previously used pages
Can suffer from Belady's anomaly
None of these
{"name":"Operating Systems Exam 2", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Mutex locks and couting semaphores are essentially the same thing, One necessary condition for deadlock is _____, which states that a resource can be released only voluntarily by the process holding the resource., In Peterson's solution, the ______ variable indicates if a process is ready to enter its critical section.","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}