Pthreads

Due: 5:00am, Friday, September 27, 2024

Get the Assignment Code

Login to your university Unix account and copy the assignment code to a location under your home directory:

  cp -r /export/home/public/schwesin/cpsc328/assignments/project2 <LOCATION>

where <LOCATION> is a directory of your choosing.

Description

The starter code contains an implementation of quicksort. The goal of this assignment is to create a parallel version of quicksort that uses pthreads. Your program will take several command line arguments; one of those is the number of threads to use. During the execution of your quicksort, if there are still threads available when the array is partitioned, then spawn a thread to sort each partition, otherwise call the non-parallel quicksort function on the partition.

Specifications

Turning in the Assignment

To turn in the assignment, execute the submit script by running the command

  make submit

from within the project2 directory.

Grading Criteria