Update to pzip, with background and more spec
This commit is contained in:
@@ -12,6 +12,21 @@ There are three specific objectives to this assignment:
|
|||||||
* To learn how to parallelize a program.
|
* To learn how to parallelize a program.
|
||||||
* To learn how to program for high performance.
|
* 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
|
## Overview
|
||||||
|
|
||||||
First, recall how `zip` works by reading the description
|
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
|
can be done in parallel, and what must be done serially by a single
|
||||||
thread, and design your parallel zip as appropriate.
|
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
|
- **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
|
interfaces like `get_nprocs()` and `get_nprocs_conf()`; read the man pages
|
||||||
for more details. Then, create threads to match the number of CPU
|
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
|
into the address space, you can then access bytes of the input file via
|
||||||
pointers and do so quite efficiently.
|
pointers and do so quite efficiently.
|
||||||
|
|
||||||
|
|
||||||
## Grading
|
## Grading
|
||||||
|
|
||||||
Your code will first be measured for correctness, ensuring that it zips input
|
Your code will first be measured for correctness, ensuring that it zips input
|
||||||
|
|||||||
Reference in New Issue
Block a user