OS Test 2
Quiz yourself by thinking what should be in
each of the black spaces below before clicking
on it to display the answer.
Help!
|
|
||||
---|---|---|---|---|---|
show | results when several threads try to access and modify the same data concurrently
🗑
|
||||
show | Peterson's solution
🗑
|
||||
show | atomicity
🗑
|
||||
_______ refers to where a process is accessing/updating shared data. | show 🗑
|
||||
_____ can be used to prevent busy waiting when implementing a semaphore. | show 🗑
|
||||
show | It ensures mutual exclusion.
🗑
|
||||
How many philosophers at most may eat simultaneously in the Dining Philosophers problem with 5 philosophers? | show 🗑
|
||||
show | executes as a single, uninterruptible unit
🗑
|
||||
show | Several processes could be active in their critical sections at the same time.
🗑
|
||||
show | It enters a synchronized method.
🗑
|
||||
show | It exits a synchronized method.
🗑
|
||||
show | The thread that has been waiting the longest becomes the new owner of the lock.
🗑
|
||||
A semaphore ____. | show 🗑
|
||||
show | does not require a context switch when a process must wait on a lock
🗑
|
||||
In Peterson's solution, the ____ variable indicates if a process is ready to enter its critical section. | show 🗑
|
||||
show | requires that no reader will be kept waiting unless a writer has already obtained permission to use the shared database.
🗑
|
||||
show | monitor
🗑
|
||||
show | every process in a set is waiting for an event that can only be caused by another process in the set
🗑
|
||||
show | An unsafe state may lead to a deadlocked state.
🗑
|
||||
show | It is not safe.
🗑
|
||||
show | It is safe.
🗑
|
||||
show | Available
🗑
|
||||
show | R2, R1, R3.
🗑
|
||||
A _____ could be preempted from a process. | show 🗑
|
||||
show | Mutual Exclusion
🗑
|
||||
The circular-wait condition for a deadlock implies the hold-and-wait condition. | show 🗑
|
||||
One necessary condition for deadlock is ______, which states that a process must be holding one resource and waiting to acquire additional resources. | show 🗑
|
||||
show | False
🗑
|
||||
Protocols to prevent hold-and-wait conditions typically also prevent starvation. | show 🗑
|
||||
The wait-for graph scheme is not applicable to a resource allocation system with multiple instances of each resource type. | show 🗑
|
||||
show | False
🗑
|
||||
show | True
🗑
|
||||
show | False
🗑
|
||||
Deadlock prevention and deadlock avoidance are essentially the same approaches for handling deadlock. | show 🗑
|
||||
show | True
🗑
|
||||
show | no preemption
🗑
|
||||
One necessary condition for deadlock is ______, which states that there is a chain of waiting processes whereby P0 is waiting for a resource held by P1, P1 is waiting for a resource held by P2, and Pn is waiting for a resource held by P0. | show 🗑
|
||||
The witness software product is a ____. | show 🗑
|
||||
show | a directed edge from a process to a resource is called a request edge
🗑
|
||||
show | a necessary and sufficient condition for a deadlock in the case that each resource has exactly one instance
🗑
|
||||
show | pretend that deadlocks never occur
🗑
|
||||
If the current value of counter = 5, what are its possible values if the producer consumer processes run concurrently? | show 🗑
|
||||
What is the term for describing the situation where shared data may be manipulated concurrently and the outcome of the execution depends upon the order of access? | show 🗑
|
||||
show | Critical Section
🗑
|
||||
show | Mutual exclusion, Progress, Bounded waiting
🗑
|
||||
A nonpreemptive kernel is essentially free from race conditions. | show 🗑
|
||||
True or False? There are no guarantees Peterson's solution works correctly on modern computer architectures. | show 🗑
|
||||
show | acquire() and release()
🗑
|
||||
show | True
🗑
|
||||
show | True
🗑
|
||||
What are the two operations that can be performed on a semaphore? | show 🗑
|
||||
A binary semaphore is functionally equivalent to a mutex lock. | show 🗑
|
||||
show | Producer and Consumer
🗑
|
||||
How many writers may concurrently share the database with the readers-writers problem? | show 🗑
|
||||
show | Deadlock - each philosopher is waiting infinitely for the next.
🗑
|
||||
What are the two operations that can be performed on a condition variable? | show 🗑
|
||||
show | Java
🗑
|
||||
show | Signaled, Nonsignaled
🗑
|
||||
show | atomic_t type, atomic integers.
🗑
|
||||
show | False. On single processor systems kernel preemption is enabled/disabled in place of acquiring/releasing a spinlock.
🗑
|
||||
What are the Pthreads operations for locking and unlocking a mutex lock? | show 🗑
|
||||
show | CPU-burst and IO-burst
🗑
|
||||
Under preemptive scheduling, when a process switches from the running to the ready state, it may lose control of the CPU. | show 🗑
|
||||
show | CPU utilisation (%), Throughput (# of processes completed), Turnaround time (time to complete a process), Waiting time (time spent in waiting in the ready queue), Response time (time from submission to first response)
🗑
|
||||
What scheduling algorithm assigns the CPU to the process with the highest priority? | show 🗑
|
||||
The multilevel feedback queue scheduling algorithm allows processes to migrate between different queues. | show 🗑
|
||||
What scheduling algorithm assignments the CPU to the process that first requested it? | show 🗑
|
||||
What scheduling algorithm assignments the CPU to a process for only its time slice (or time quantum)? | show 🗑
|
||||
What scheduling algorithm assigns the CPU to the process with the shortest burst? | show 🗑
|
||||
show | Process-contention scope, System-contention scope
🗑
|
||||
show | test_and_set(), compare_and_swap()
🗑
|
||||
show | True
🗑
|
||||
What are the four necessary conditions for characterising deadlock? | show 🗑
|
||||
Describe one strategy for dealing with deadlocks. | show 🗑
|
||||
What is the only reasonable condition that can be used to prevent deadlocks from occurring? | show 🗑
|
||||
show | Safe state
🗑
|
||||
What is the name of the classic deadlock avoidance algorithm? | show 🗑
|
||||
show | True
🗑
|
||||
Provide at least one method for recovering from deadlock. | show 🗑
|
||||
show | Relocation register, Limit register
🗑
|
||||
show | Compile time, Load time, Execution time
🗑
|
||||
show | False. An address generated by the CPU is a logical or virtual address, an address in memory is a physical address
🗑
|
||||
What is the hardware device that maps virtual to physical addresses? | show 🗑
|
||||
What is the backing store? | show 🗑
|
||||
Mobile systems typically use swapping. | show 🗑
|
||||
What are the three strategies for selecting a free hole from the set of available holes? | show 🗑
|
||||
show | External fragmentation, Internal fragmentation
🗑
|
||||
List at least two possible parts of a program that may be assigned separate segments. | show 🗑
|
||||
What are the two parts of an address generated by the CPU? | show 🗑
|
||||
show | The base address of each page in physical memory.
🗑
|
||||
show | True. Internal fragmentation can occur. External cannot.
🗑
|
||||
show | TLB miss. A memory reference to the page table is made, and the page and frame number are added to the Translation Look-aside Buffer (TLB)
🗑
|
||||
What are frame protection bits? | show 🗑
|
||||
show | Reentrant. I.e. code is non-self modifying: it never changes during execution.
🗑
|
||||
List the three common Page Table Structures. | show 🗑
|
||||
Assume an adaptive mutex is used for accessing shared data on a Solaris system with multiprocessing capabilities. Which of the following statements is not true? | show 🗑
|
||||
show | performs a single logical function
🗑
|
||||
show | True
🗑
|
||||
Mutex locks and binary semaphores are essentially the same thing. | show 🗑
|
||||
Monitors are a theoretical concept and are not practiced in modern programming languages | show 🗑
|
||||
Race conditions are prevented by requiring that critical regions be protected by locks. | show 🗑
|
||||
Which of the following statements is NOT true? | show 🗑
|
||||
show | True
🗑
|
||||
A deadlock-free solution eliminates the possibility of starvation. | show 🗑
|
||||
show | serial schedule
🗑
|
||||
The value of a counting semaphore can range only between 0 and 1. | show 🗑
|
||||
Every object in Java has associated with it a single lock. | show 🗑
|
||||
Windows XP, when accessing a global variable on a uniprocessor system, ____. | show 🗑
|
||||
In multithreaded programs, the kernel informs an application about certain events using a procedure known as a(n) ____. | show 🗑
|
||||
show | False
🗑
|
||||
show | False
🗑
|
||||
Fragmentation does not occur in a paging system. | show 🗑
|
||||
show | 13
🗑
|
||||
_____ is the dynamic storage-allocation algorithm which results in the largest leftover hole in memory. | show 🗑
|
||||
A(n) ______ matches the process with each entry in the TLB. | show 🗑
|
||||
Which of the following data structures is appropriate for placing into its own segment? | show 🗑
|
||||
show | segment number and offset
🗑
|
||||
show | compile-time binding
🗑
|
||||
Reentrant code cannot be shared. | show 🗑
|
||||
Hashed page tables are commonly used when handling addresses larger than 32 bits. | show 🗑
|
||||
Hashed page tables are particularly useful for processes with sparse address spaces. | show 🗑
|
||||
The mapping of a logical address to a physical address is done in hardware by the ________. | show 🗑
|
||||
Suppose a program is operating with execution-time binding and the physical address generated is 300. The relocation register is set to 100. What is the corresponding logical address? | show 🗑
|
||||
_____ is the method of binding instructions and data to memory performed by most general-purpose operating systems. | show 🗑
|
||||
show | True
🗑
|
||||
show | execution time
🗑
|
||||
A relocation register is used to check for invalid memory addresses generated by a CPU. | show 🗑
|
||||
show | False
🗑
|
||||
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? | show 🗑
|
||||
show | 0xAE
🗑
|
||||
show | 0xF9
🗑
|
||||
Consider a logical address with 18 bits used to represent an entry in a conventional page table. How many entries are in the conventional page table? | show 🗑
|
||||
show | It is possible only if relocation is dynamic and done at execution time.
🗑
|
||||
show | Best fit
🗑
|
||||
show | True
🗑
|
||||
The roll out, roll in variant of swapping is used ____. | show 🗑
|
||||
show | inverted
🗑
|
||||
show | a stub is included in the image for each library-routine reference
🗑
|
||||
show | 1200
🗑
|
||||
show | 9
🗑
|
||||
show | logical address
🗑
|
||||
show | TLB reach
🗑
|
||||
show | False
🗑
|
||||
show | LRU
🗑
|
||||
show | 64KB
🗑
|
||||
show | for some page replacement algorithms, the page-fault rate may increase as the number of allocated frames increases
🗑
|
||||
show | False
🗑
|
||||
show | True
🗑
|
||||
show | False
🗑
|
||||
show | False
🗑
|
||||
Which of the following statements is false with regard to allocating kernel memory? | show 🗑
|
||||
show | proportional
🗑
|
||||
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 | show 🗑
|
||||
______ allows a portion of a virtual address space to be logically associated with a file. | show 🗑
|
||||
________ allows the parent and child processes to initially share the same pages, but when either process modifies a page, a copy of the shared page is created. | show 🗑
|
||||
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 number of page faults for the given reference string, using the LRU page-replacement algorithm? | show 🗑
|
||||
Optimal page replacement ____. | show 🗑
|
||||
show | True
🗑
|
||||
show | True
🗑
|
||||
show | True
🗑
|
||||
show | Thrashing
🗑
|
||||
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? | show 🗑
|
||||
show | physical memory is separated from logical memory.
🗑
|
||||
The _____ is an approximation of a program's locality. | show 🗑
|
||||
The vfork() system call in UNIX ____. | show 🗑
|
||||
show | False
🗑
|
||||
show | All of the above
🗑
|
||||
show | 0,0
🗑
|
||||
show | The speed at which pages are examined (the scanrate) is constant.
🗑
|
||||
show | False
🗑
|
||||
Solaris, Windows XP, and Linux assign higher-priority threads/tasks longer time quantums and lower-priority tasks shorter time quantums. | show 🗑
|
||||
In preemptive scheduling, the sections of code affected by interrupts must be guarded from simultaneous use. | show 🗑
|
||||
Load balancing is typically only necessary on systems with a common run queue. | show 🗑
|
||||
A Solaris interactive thread with a time quantum of 80 has a higher priority than an interactive thread with a time quantum of 120. | show 🗑
|
||||
show | average waiting time in the queue
🗑
|
||||
In Little's formula n = λ x W, what does λ represent ? | show 🗑
|
||||
In Little's formula n = λ x W, what does n represent ? | show 🗑
|
||||
show | throughput
🗑
|
||||
In Solaris, if an interactive thread with priority 25 is waiting for I/O, what is its priority recalculated to when it is eligible to run again? | show 🗑
|
||||
show | 5
🗑
|
||||
show | nice
🗑
|
||||
show | RR
🗑
|
||||
With _______ a thread executes on a processor until a long-latency event (i.e. a memory stall) occurs. | show 🗑
|
||||
The most complex scheduling algorithm is the multilevel feedback-queue algorithm. | show 🗑
|
||||
A Solaris interactive thread with priority 15 has a higher relative priority than an interactive thread with priority 20 | show 🗑
|
||||
____ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts. | show 🗑
|
||||
______ allows a thread to run on only one processor. | show 🗑
|
||||
Round-robin (RR) scheduling degenerates to first-come-first-served (FCFS) scheduling if the time quantum is too long. | show 🗑
|
||||
Systems using a one-to-one model (such as Windows XP, Solaris 9, and Linux) schedule threads using process-contention scope (PCS). | show 🗑
|
||||
A significant problem with priority scheduling algorithms is _____. | show 🗑
|
||||
show | FCFS
🗑
|
||||
The ______ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU. | show 🗑
|
||||
show | A process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state.
🗑
|
||||
Load balancing algorithms have no impact on the benefits of processor affinity. | show 🗑
|
||||
show | System-contention scope
🗑
|
||||
Virtualization does not allow a single-CPU system to appear as a multiprocessor system. | show 🗑
|
||||
show | 14
🗑
|
||||
What is the numeric priority of a Windows XP thread in the NORMAL_PRIORITY_CLASS with HIGHEST relative priority? | show 🗑
|
||||
show | 6
🗑
|
||||
show | Each queue has its own scheduling algorithm.
🗑
|
||||
show | False
🗑
|
||||
SMP systems that use multicore processors typically run faster than SMP systems that place each processor on separate cores. | show 🗑
|
||||
show | 80
🗑
|
||||
show | time sharing
🗑
|
||||
Which of the following data structures in the banker's algorithm is a vector of length m, where m is the number of resource types? | show 🗑
|
||||
____________ occurs when a higher-priority process needs to access a data structure that is currently being accessed by a lower-priority process. | show 🗑
|
||||
show | Operations on atomic integers do not require locking.
🗑
|
||||
show | memory transaction
🗑
|
||||
The OpenMP #pragma omp critical directive ___________. | show 🗑
|
||||
show | indefinite blocking
🗑
|
||||
show | A process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state.
🗑
|
||||
Which of the following statements are false with regards to the Linux CFS scheduler? | show 🗑
|
||||
show | targeted latency
🗑
|
||||
show | 1/p
🗑
|
||||
Which of the following is true of the rate-monotonic scheduling algorithm? | show 🗑
|
||||
show | When a process becomes runnable, it must announce its deadline requirements to the system.
🗑
|
||||
show | push migration, pull migration
🗑
|
||||
show | All of the above
🗑
|
||||
show | when a process exceeds its working set maximum
🗑
|
||||
Systems in which memory access times vary significantly are known as __________. | show 🗑
|
||||
show | no memory fragmentation
🗑
|
Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Created by:
bcannoles
Popular Computers sets