[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

  1. What is a process? What kind of information does an operating system need to maintain about a process?

  2. Draw a diagram for process scheduling. What is happening at each of the transitions?

  3. What is a thread? How are threads related to processes?

  4. What is the difference between user-level and kernel-level threads? What impact does this difference have on the execution of a multithreaded program?

  5. What is a scheduler? What do the different types of scheduler do?

  6. What is a dispatcher? What is the difference between the function of a dispatcher and the function of a scheduler?

  7. What is the difference between non-preemptive and preemptive scheduling?

  8. What is a critical section? What kind of problem do critical sections create?

  9. Briefly describe how processes are created in UNIX. How is executable code loaded into memory for a new process?

  10. In UNIX, how does a parent process know the identity of its child processes? Why is this important?

  11. What is the difference between direct and indirect interprocess communication?

  12. How does message passing serve as a sychronization mechanism?

  13. What do the terms synchronous and asynchronous mean with regard to interprocess communication? What are the most commonly used options for sends and receives?

  14. Describe how UNIX pipes work. What role does buffering play here?

  15. What options does an operating system have with regard to the relationship between user-level threads and kernel-level threads?

  16. How does the semantics of process creation and loading change on a system that supports multithreaded processes?

  17. How does the semantics of signal handling change on a system that supports multithreaded processes?

  18. What is the purpose of thread pools?

  19. Briefly describe the following criteria of scheduling performance. Which are useful as criteria for selecting a scheduling algorithm for batch processing? For interactive processing?

    1. CPU utilization (efficiency)
    2. Thoughput
    3. Turnaround time
    4. Waiting time
    5. Response time

  20. 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

    1. Show the Gantt chart for the system using the first-come-first-serve scheduling algorithm. Also, compute the total turnaround and waiting times.
    2. Show the Gantt chart for the system using the shortest-job-first scheduling algorithm. Also, compute the total turnaround and waiting times.
    3. Show the Gantt chart for the system using the priority scheduling algorithm (low number = high priority). Also, compute the total turnaround and waiting times.
    4. 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.

  21. How can hardware simplify synchronization between processes?

  22. What is busy-waiting? What is the alternative? Discuss the usefulness of busy-waiting in single processor and mulyiple processor synchronization.

  23. What is a deadlock?

  24. Describe a solution to the producers and consumers problem using semaphores.

  25. Describe a solution to the producers and consumers problem using monitors and condition variables.

  26. What are the differences between mutual exclusion semaphores, counting semaphores, and binary semaphores?

  27. Describe the synchronization mechanism provided by the Java programming language.

[an error occurred while processing this directive]