project2 - CSE 410 Summer 2008 PROJECT ASSIGNMENT #2 60...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 410 Summer 2008 PROJECT ASSIGNMENT #2 60 POINTS Your source files must be dated on or before midnight, Monday, 23 June 2008 . OVERALL OBJECTIVE You are to write a C or C++ concurrent Shearsort program using POSIX PTHREAD library and semaphore operations. You are NOT to use fork() calls, pipes, or message queues in this exercise. The Shearsort is a simple mesh-sorting algorithm that consists of nothing more than alternately sorting rows and columns of the mesh. In particular, it sorts all the rows in Phases 1, 3, . . . , log 2 N + 1, and all the columns in Phases 2, 4, . . . , log 2 N , where N is the total number of elements. The columns are sorted so that smaller numbers move upward. The odd rows (1, 3, . . . , N- 1) are sorted so that smaller numbers move leftward, and the even rows (2, 4, . . . , N ) are sorted in reverse order ( i.e. , so that smaller numbers move rightward). The numbers will appear in a snakelike order after 2 log 2 N + 1 = log 2 N + 1 phases. An example is given in Figure+ 1 phases....
View Full Document

This note was uploaded on 07/25/2008 for the course CSE 410 taught by Professor Bonakdarpour during the Summer '08 term at Michigan State University.

Page1 / 2

project2 - CSE 410 Summer 2008 PROJECT ASSIGNMENT #2 60...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online