Assignment 3 MergeSort - PowerPoint PPT Presentation

1 / 3
About This Presentation
Title:

Assignment 3 MergeSort

Description:

Create a set of threads. Begin the distribution of data to a 'first' thread ... dataset, that will make the general estimate of performance a predictor of the ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 4
Provided by: csiS7
Category:

less

Transcript and Presenter's Notes

Title: Assignment 3 MergeSort


1
Assignment 3 - MergeSort
  • The object of this assignment is to
  • Write a Java program that utilizes a parallel
    mergesort using threads
  • Examine the performance of the program over a
    range of workload sizes (number of items to be
    sorted)
  • Duplicate random numbers will be allowed in the
    dataset.
  • The range of random numbers should be related to
    the size of the dataset (dataset of size 16
    random numbers between 1 and 16)
  • The number of parallel threads will be half the
    size of the dataset.

2
  • The main program generates a random dataset of
    fixed size
  • (a timer starts)
  • Create a set of threads
  • Begin the distribution of data to a first
    thread
  • Threads distribute data to other threads (as per
    the algorithm in the text with corrections
    discussed in class)
  • When a thread has but two items in the dataset,
    it sorts those items
  • Threads pass sorted subsets for mergesorting
  • The sorted dataset is passed to the main program
  • (the timer stops) number of items and time to
    sort are printed

3
  • Run a variety of datasets (powers of two),
    recording the time to completion for each.
  • Evaluate your numbers against the Big O
    estimate of algorithm performance
  • Extra Credit try to determine constants of
    proportionality from your experimental runs of
    varying size dataset, that will make the general
    estimate of performance a predictor of the
    performance you actually observed.
Write a Comment
User Comments (0)
About PowerShow.com