From 63ffd31349758b0c9c61dca791edaa7fa1a35e94 Mon Sep 17 00:00:00 2001 From: Remzi Arpaci-Dusseau Date: Mon, 5 Mar 2018 11:36:28 -0600 Subject: [PATCH] Update to pzip, with background and more spec --- concurrency-pzip/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/concurrency-pzip/README.md b/concurrency-pzip/README.md index 84610cd..098c249 100644 --- a/concurrency-pzip/README.md +++ b/concurrency-pzip/README.md @@ -12,6 +12,21 @@ There are three specific objectives to this assignment: * To learn how to parallelize a program. * To learn how to program for high performance. +## Background + +To understand how to make progress on this project, you should first +understand the basics of thread creation, and perhaps locking and signaling +via mutex locks and condition variables. These are described in the following +book chapters: + +- [Intro to Threads](http://pages.cs.wisc.edu/~remzi/OSTEP/threads-intro.pdf) +- [Threads API](http://pages.cs.wisc.edu/~remzi/OSTEP/threads-api.pdf) +- [Locks](http://pages.cs.wisc.edu/~remzi/OSTEP/threads-locks.pdf) +- [Using Locks](http://pages.cs.wisc.edu/~remzi/OSTEP/threads-locks-usage.pdf) +- [Condition Variables](http://pages.cs.wisc.edu/~remzi/OSTEP/threads-cv.pdf) + +Read these chapters carefully in order to prepare yourself for this project. + ## Overview First, recall how `zip` works by reading the description @@ -40,6 +55,10 @@ least) the following issues: can be done in parallel, and what must be done serially by a single thread, and design your parallel zip as appropriate. + One interesting issue that the "best" implementations will handle is this: + what happens if one thread runs more slowly than another? Does the + compression give more work to faster threads? + - **How to determine how many threads to create.** On Linux, this means using interfaces like `get_nprocs()` and `get_nprocs_conf()`; read the man pages for more details. Then, create threads to match the number of CPU @@ -58,6 +77,7 @@ least) the following issues: into the address space, you can then access bytes of the input file via pointers and do so quite efficiently. + ## Grading Your code will first be measured for correctness, ensuring that it zips input