CSCI 315 Exam 1 Review
The questions for exam 1 will be taken from/similar
to/based on the following, and on the homework and lab exercises you've
been assigned. They cover the topics from chapters 1 to 8.
- Identify the following concepts.
- system calls
- dual mode operation
- mode bit
- memory protection
critical region(critical section)
test-and-set (hardware solution)
two ways of inter-process communication (IPC)
- message passing
- shared memory
- resource allocation graph
- deadlock prevention
- deadlock detection
- deadlock recovery
Explain each of the following scheduling algorithms. Which can be
first come, first served
shortest job first
- In lecture we discussed three algorithms for solving the two-process
critical section problem. Explain what each is. For the first two,
specify an execution order that shows they don't work.
- How does multiprogramming improve the performance of an operating system?
- What are the two ways to define Java classes that can execute as
threads? Give the code showing how to declare and start a thread for each of
- What are the three conditions that solutions to the critical
section problem have to meet? You should be able to explain in simple terms
what the detailed definitions are trying to accomplish.
- Give an example (in code or pseudo-code) showing a problem that
can result when two processes share a common memory location.
- What is the main purpose of an operating system?
- What is the difference between user mode and kernel mode? How
does the system keep track of which mode it's operating in?
- What information about processes is needed to allow
multiprogramming? Where is this information stored?
- What are the steps an operating system takes to handle an
interrupt (or exception in general)?
- List the states that a process may be in. Draw a diagram
showing the possible transitions between theses states.
- How does UNIX create a new process?
- How do pipes work in UNIX?
- Define short-term and long-term process scheduling. Are there
differences in the types of algorithms we can use for these? Why?
- What are the various criteria we use to study the performance of
a CPU scheduling algorithm?
- What happens during a context switch? Why can frequent context
switches be a problem?
- Distinguish threads from processes. What benefits does
using threads provide?
- What places can thread scheduling be done? List an advantage
and a disadvantage for managing threads in each of these places.
- How do we estimate the length of next CPU burst?
- What are the three classic process synchronization problems
we discussed in the lectures? Describe briefly the differences among
those three problems.
- What are the four necessary conditions for a deadlock to occur?
- Given a set of processes, resources, and resource requests, draw the
resource allocation graph after each request and state whether or not a
deadlock is possible.
- In general, a cycle in a resource allocation graph indicates only the
possibility of a deadlock. Under what special condition does it
indicate the existence of a deadlock?
- What are the different ways of dealing with deadlock?
- How does the Banker's algorithm work? You should be able to carry out a
hand execution of the algorithm.