1/46
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
In which of the following circumstances can cooperative scheduling take place?
when a process switches from the running state to the waiting state
Which of the following are true about process preemption or process switching (not the same, but related ... so consider and select what may be true for either as well as both).
Please select all that are true.
When pre-empted, processes can be switched from running to ready state
Which of the following are true about process preemption or process switching (not the same, but related ... so consider and select what may be true for either as well as both).
Please select all that are true.
A process running on the CPU may be interrupted by a higher priority process
Which of the following are true about process preemption or process switching (not the same, but related ... so consider and select what may be true for either as well as both).
Please select all that are true.
Answer,
Processes are preempted when their time slice expires
Which of the following is NOT true regarding semaphore implementation?
It suffers from the busy waiting problem
The ready queue can be implemented as a _______________.
All of the answers provided
Which of the following system architectures involves multiprocessor scheduling?
All of the answers provided
Which of the following is NOT true for Peterson’s solution?
Peterson’s solution works for synchronization among more than two processes
Which of the following is not true about compare_and_swap instruction?
Set the new value of passed parameter to “TRUE”
When mutex lock is implemented as a binary semaphore, what should its value be initialized to be?
1
Assume process P0 and P1 are the process before and after a context switch, and PCB0 and PCB1 are respectively their process control block. Which of the following time units are included inside the dispatch latency?
all of the answers provided
In which of the following circumstances can preemptive scheduling take place?
none of the answers provided
Which of the following variables are shared between the processes in Peterson’s solution?
int turn
boolean flag[2]
Which of the following is true for race conditions?
all the answers given except for the one that says "none of the answers given"
Which of the following can be a solution to the problem of indefinite blockage of low-priority processes?
Aging
Which of the following is not true about test_and_set instruction?
Returns the new value of passed parameter
Which of the following items does not belong to the function of a dispatcher?
selecting a process among the available ones in the ready queue
Which of the following is true for the solutions to critical-section problems?
Bounded waiting implies progress, and progress implies no deadlock
In the _________, the process may be changing common variables, updating a table, writing a file, and so on.
(Pick the best choice to fill in the blank)
critical section
In an asymmetric solution for the dining philosophers problem, deadlock is avoided, because
a philosopher will release a chopstick in case she is unable to acquire the other chopstick.
In an asymmetric solution for the dining philosophers problem, deadlock is avoided, because
any neighboring philosophers would have already acquired one of their chopsticks before attempting to acquire the shared chopstick.
One necessary condition for deadlock is ______, which states that a resource can be released only voluntarily by the process holding the resource.
no preemption
One necessary condition for deadlock is ____, which states that at least one resource must be held in a nonsharable mode.
mutual exclusion
Deadlocks can be prevented only if
at least one of the four necessary conditions cannot hold.

The request will not be granted, since the state after granting the request will be unsafe.
Alternate approaches such as transactional memory or OpenMP are useful, because
some race condition problems that cannot be solved using synchronization mechanisms such as mutex locks and semaphores can be solved using these alternate approaches.
In the solution provided for readers-writers problem in Section 7.1.2, if a writer is in the critical section, and multiple readers and writers are waiting,
exactly one of the waiting writers will be allowed to enter the critical section when the writer in the critical section exits.
A system will never enter a deadlocked state if
the system uses the deadlock avoidance technique.
In a resource allocation graph, when a process releases a resource,
an assignment edge is removed.
For a thread using POSIX condition variables, this thread
must lock the associated mutex lock before calling pthread_cond_wait( ) and unlock it after calling pthread_cond_signal( ).
POSIX named semaphores
All of the above.
Deadlock prevention using preempting allocated resources cannot be used for
mutexes.
Emergence of multicore systems has put greater emphasis on developing novel techniques for concurrency problems, because
with increased number of processing cores, there is an increased risk of race conditions and deadlocks.
A frame table stores
All of the answers given.
A translation look-aside buffer is used to
cache page table entries.
Given the logical address 0xAEF9 (in hexadecimal) with a page size of 256 bytes, what is the page number?
0xAE
If the base register is loaded with value 12345 and limit register is loaded with value 1000, which of the following memory address access will not result in a trap to the operating system?
12500
Assume a system uses 2-level paging and 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?
117
If the starting address location changes, in which of the following cases, the program has to be recompiled?
Compile time binding
A page-table base register stores
a pointer to the page table in memory.
A large page size results in
efficient disk I/O
A(n) ______ matches the process with each entry in the TLB.
address-space identifier
_____ is the method of binding instructions and data to memory performed by most general-purpose operating systems.
Execution time binding
Computing systems need cache because
accessing main memory is slow and cache speeds it up.
Which of the following technique is well suited to support very large address space, e.g. 64-bit address space?
Inverted page tables
A page out operation
moves a page from memory to the backing store.
If execution time binding is used,
physical addresses of process may change over time but logical addresses remain the same.