Essay 2: Processes and Threads

Processes and threads represent two different approaches to virtualizing the CPU and providing concurrent execution. Drawing upon our reading assignments, your experiences implementing the Unix shell project and the web server project, and concepts discussed in lecture, write an essay discussing the following:

  1. What are the similarities and differences between how processes and threads virtualize the CPU and provide concurrency? Use specific examples from your implementations of the shell and the web server in support of your answer.
  2. Describe two situations beyond those covered in our projects in which one would need concurrency. In one situation, argue as to why processes are preferable to threads as a concurrency mechanism. In the other situation, argue as to why threads are preferable to processes as a concurrency mechanism. Again, use specific examples from your implementations of the shell and the web server to support your answer.
  3. Write a concluding paragraph in which you summarize what you have learned about concurrency by this point in the course.