Miscellaneous Topics
Processes and Threads
Process Synchronization
CPU Scheduling
Deadlocks
100

The CPU can be in any of these two modes.

What are kernel and user modes?

100

It selects among available processes for the next execution on the CPU.

What is the process scheduler?

100

It is not invoked relatively often and selects which processes should be brought into the ready queue.

What is the long-term scheduler?

100

This scheduling algorithm allocates processor time in order of arrival.

What is FCFS?

100

These conditions are necessary for deadlocks to occur.

What are mutual exclusion, no preemption, hold-and-wait, and circular waiting?

200

This is the fastest memory available in a computer.

What are CPU registers?


200

This allows a process to transition from user mode to kernel mode voluntarily.

What is system call?

200

An integer that can be atomically incremented and decremented and is not allowed to have a negative value.

What is a semaphore?

200

This scheduling algorithm runs each process in a small fixed unit of CPU time.

What is Round Robin?

200

A cycle in that graph is a necessary condition of a deadlock.

What is resource allocation graph?

300

In Project 1, you used that technique to draw pixels in a fluid manner.

What is double buffering?

300

This type of process has exit()'ed and its parent has not terminated yet but is not wait()'ing for it.

What is a zombie process?

300

This type of locks is inefficient in single-core systems.

What are spinlocks?

300

The most important parameter to optimize in an operating system for interactive applications.

What is response time?

300

In these approaches, deadlocks never occur.

What are deadlock prevention and deadlock avoidance?

400

Linux is that type of kernel.

What is monolithic kernel?

400

In that type of threading, when a thread performs a blocking I/O system call, all threads in the same process are blocked. 

What is user-level threading?

400

This property is violated when a process can immediately and unconditionally renter a critical section while other processes are waiting to enter the same critical section.

What is bounded waiting?

400

The default scheduling policy in Xv6.

What is Round-Robin?

400

Suppose there are two semaphores, A and B. If process 1 does: down(A); down(B), while process 2 does: down(B); down(A), then we have that type of synchronization bug.

What is deadlock?

500

Because of that overhead, spinlocks are more efficient than sleeplocks in multi-core systems when the critical section is short.

What is context switching overhead?

500

Consider a highly-interactive I/O-bound process that is in the WAITING state. This is the state into which  the process transitions after being unblocked.

What is READY?

500

Suppose there are two semaphores, A and B. If process 1 does: down(A); down(B), while process 2 does: down(A); down(B), then we may have that type of synchronization bug.

What is order violation?

500

Let (x, y, z) mean that process x arrives at time y and needs z time units of processing time: 

(A, 0, 15), (B, 0.1, 3), (C, 2, 2), (D, 5, 1) 

Calculate the average wait time when using Round robin with a quota of 2 units assuming C gets into the ready queue ahead of A at time = 2.

What is 4 + 0.475?

500

Given the following system with four processes 1, .., 4 and four resources A, .., D, for what values of x is the system in a safe state? Hint: Use the Banker’s algorithm. 

                  Allocation       Maximum       Available 

                   A B C D         A B C D          A B C D 

Process 1     3 2 3 5           3 3 x 5          0 1 0 0 

Process 2     1 1 2 2           1 2 4 2 

Process 3     1 0 0 3           2 1 0 3 

Process 4     0 1 0 0           2 2 2 1 

What is 2+1?

M
e
n
u