Multi-Threaded Image Processing with POSIX and OpenMP, Assignments of Computer Science

A homework assignment for cs 432/632/732 parallel computing course at the university of alabama in fall 2006. Students are required to implement multi-threaded versions of an image processing program using both posix threads and openmp. The assignment includes testing the program with different thread distributions and analyzing the execution time differences. The document also provides guidelines for running the programs on linux workstations and altix.

Typology: Assignments

Pre 2010

Uploaded on 04/12/2010

koofers-user-q1c
koofers-user-q1c 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Fall 2006 CS 432/632/732 Parallel Computing
Homework-1
9/12/2006 1-3
PART-I – Individual Work Only. 200 points. Due September 26, 2006.
Using the POSIX threads library implement a multi-threaded version of the image processing
program implemented in Homework-0.
1. Use one-dimensional data distribution, test the program for different threads shown in table
1, note down the time taken, and complete table below.
Table 1. Time taken (in seconds) with one-dimensional data distribution
Image1 Image2 Image3
No. of
threads Mean Median HP
Filter Mean Median HP
Filter Mean Median HP
Filter
Sequential
1
2
4
6
8
10
12
14
16
2. Use two-dimensional data distribution, test the program for different threads shown in table
2, note down the time taken, and complete table below.
Table 2. Time taken (in seconds) with two-dimensional data distribution
Image1 Image2 Image3
No. of
threads Mean Median HP
Filter Mean Median HP
Filter Mean Median HP
Filter
Sequential
1 X 1
1 X 2
1 X 4
2 X 1
2 X 2
2 X 3
3 X 2
3 X 3
3 X 4
4 X 1
4 X 2
4 X 3
4 X 4
3. Analyze the difference in execution time between one- and two-dimensional data distribution
(if any) and provide possible explanations for the difference in execution time.
pf3

Partial preview of the text

Download Multi-Threaded Image Processing with POSIX and OpenMP and more Assignments Computer Science in PDF only on Docsity!

Homework-

PART-I – Individual Work Only. 200 points. Due September 26, 2006.

Using the POSIX threads library implement a multi-threaded version of the image processing program implemented in Homework-0.

  1. Use one-dimensional data distribution, test the program for different threads shown in table 1, note down the time taken, and complete table below. Table 1. Time taken (in seconds) with one-dimensional data distribution No. of^ Image1^ Image2^ Image threads Mean^ Median^ HP Filter

Mean Median HP Filter

Mean Median HP Filter Sequential 1 2 4 6 8 10 12 14 16

  1. Use two-dimensional data distribution, test the program for different threads shown in table 2, note down the time taken, and complete table below. Table 2. Time taken (in seconds) with two-dimensional data distribution Image1 Image2 Image No. of threads Mean Median HP Filter

Mean Median HP Filter

Mean Median HP Filter Sequential 1 X 1 1 X 2 1 X 4 2 X 1 2 X 2 2 X 3 3 X 2 3 X 3 3 X 4 4 X 1 4 X 2 4 X 3 4 X 4

  1. Analyze the difference in execution time between one- and two-dimensional data distribution (if any) and provide possible explanations for the difference in execution time.

Homework-

PART-II – Individual Work Only. 200 points. Due October 3, 2006.

Using OpenMP implement a multi-threaded version of the image processing program implemented in Homework-0.

  1. Use one-dimensional data distribution, test the program for different threads shown in table 3, note down the time taken, and complete table below. Table 3. Time taken (in seconds) with one-dimensional data distribution No. of^ Image1^ Image2^ Image threads Mean^ Median^ HP Filter

Mean Median HP Filter

Mean Median HP Filter Sequential 1 2 4 6 8 10 12 14 16

  1. Use two-dimensional data distribution, test the program for different threads shown in table 4, note down the time taken, and complete table below. Table 4. Time taken (in seconds) with two-dimensional data distribution Image1 Image2 Image No. of threads Mean Median HP Filter

Mean Median HP Filter

Mean Median HP Filter Sequential 1 X 1 1 X 2 1 X 4 2 X 1 2 X 2 2 X 3 3 X 2 3 X 3 3 X 4 4 X 1 4 X 2 4 X 3 4 X 4

  1. Analyze the difference in execution time between one- and two-dimensional data distribution and provide possible explanations for the difference in execution time (if there is any difference).