[an error occurred while processing this directive]
CS 5631 Study Questions and Homework
Processes (Chapters 4, 5, 6, and 7)
Homework 2
Homework 2 (5 points) due Tuesday, February 17, 2004.
For Homework 2, turn in your answers for the following study questions:
2, 3, 5, 11, 12.
Homework 3
Homework 3 (6 points) due Tuesday, February 24, 2004.
For Homework 3, turn in your answers for the following study questions:
19 (2 points), 20 (2 points), 25 (2 points).
Study questions
-
What is a process?
What kind of information does an operating system need to maintain about a
process?
-
Draw a diagram for process scheduling.
What is happening at each of the transitions?
-
What is a thread?
How are threads related to processes?
-
What is the difference between user-level and kernel-level threads?
What impact does this difference have on the execution of a multithreaded
program?
-
What is a scheduler?
What do the different types of scheduler do?
-
What is a dispatcher?
What is the difference between the function of a dispatcher and the
function of a scheduler?
-
What is the difference between non-preemptive and preemptive scheduling?
-
What is a critical section?
What kind of problem do critical sections create?
-
Briefly describe how processes are created in UNIX.
How is executable code loaded into memory for a new process?
-
In UNIX, how does a parent process know the identity of its child
processes?
Why is this important?
-
What is the difference between direct and indirect interprocess
communication?
-
How does message passing serve as a sychronization mechanism?
-
What do the terms synchronous and asynchronous mean with regard to
interprocess communication?
What are the most commonly used options for sends and receives?
-
Describe how UNIX pipes work.
What role does buffering play here?
-
What options does an operating system have with regard to the relationship
between user-level threads and kernel-level threads?
-
How does the semantics of process creation and loading change on a system
that supports multithreaded processes?
-
How does the semantics of signal handling change on a system that supports
multithreaded processes?
-
What is the purpose of thread pools?
-
Briefly describe the following criteria of scheduling performance.
Which are useful as criteria for selecting a scheduling algorithm for batch
processing?
For interactive processing?
-
CPU utilization (efficiency)
-
Thoughput
-
Turnaround time
-
Waiting time
-
Response time
-
The following processes arrive on a system almost simultaneously, but in
the indicated order.
Process | CPU burst | Priority
|
p_1 | 5 | 4
|
p_2 | 15 | 3
|
p_3 | 8 | 2
|
p_4 | 12 | 1
|
-
Show the Gantt chart for the system using the first-come-first-serve
scheduling algorithm.
Also, compute the total turnaround and waiting times.
-
Show the Gantt chart for the system using the shortest-job-first
scheduling algorithm.
Also, compute the total turnaround and waiting times.
-
Show the Gantt chart for the system using the priority scheduling
algorithm (low number = high priority).
Also, compute the total turnaround and waiting times.
-
Show the Gantt chart for the system using the round-robin
scheduling algorithm with a time quantum of 4.
Also, compute the total turnaround and waiting times.
-
How can hardware simplify synchronization between processes?
-
What is busy-waiting?
What is the alternative?
Discuss the usefulness of busy-waiting in single processor and mulyiple
processor synchronization.
-
What is a deadlock?
-
Describe a solution to the producers and consumers problem using
semaphores.
-
Describe a solution to the producers and consumers problem using monitors
and condition variables.
-
What are the differences between mutual exclusion semaphores, counting
semaphores, and binary semaphores?
-
Describe the synchronization mechanism provided by the Java programming
language.
[an error occurred while processing this directive]