0% found this document useful (0 votes)
206 views2 pages

Sudoku Problem OS

This document describes a project assignment to implement a Sudoku solution validator using pthreads in C/C++. Students are asked to create 27 threads to separately check each row, column, and 3x3 subgrid of a 9x9 Sudoku grid for validity. The input is a text file containing the grid values, and the output should display the grid and a message indicating if it is a valid solution. Students must write functions to check each type of constraint and share the grid data between threads. The project is worth 40 points and students must submit their source code, makefile, design documentation, and answers to questions about thread manipulation.

Uploaded by

dyahcitta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
206 views2 pages

Sudoku Problem OS

This document describes a project assignment to implement a Sudoku solution validator using pthreads in C/C++. Students are asked to create 27 threads to separately check each row, column, and 3x3 subgrid of a 9x9 Sudoku grid for validity. The input is a text file containing the grid values, and the output should display the grid and a message indicating if it is a valid solution. Students must write functions to check each type of constraint and share the grid data between threads. The project is worth 40 points and students must submit their source code, makefile, design documentation, and answers to questions about thread manipulation.

Uploaded by

dyahcitta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CS470OperatingSystems

Spring2014SudokuSolutionValidatorProject
40points
Out:February14,2014
Due:February28,2014(Friday)
ThepurposeofthisprojectisprovideexperiencewithpthreadsinUNIX.

ProblemStatement
Completethesudokusolutionvalidatorprojectdescribedonpages197199inthetextbookusing
[Link]:

Theinputwillbeafilewhosenameisgivenonthecommandline.Thefilewillcontaindigits0
[Link]
[Link]
/home/hwang/cs470/project3 oncsservernolaterthanFriday,February21.
Createathreadtocheckeachrow,athreadtocheckeachcolumn,andathreadtocheckeach3x3
[Link],andpassin
[Link]
parametersstructaretobeinterpretedbythesefunctions.
Theoutputoftheprogramshouldbedisplayedtothescreenandconsistofthegridfollowedbya
messagestatingwhetherthesolutionisvalidornot.

DesignNotes

NotethatifyouwriteyourprograminC++,thattheparameterstructcanbedefinedwithout
[Link],inC++usenewand
deletefordynamicallocation(ratherthanmallocandfree).
Appropriateerrorcheckingofthecommandlineandthefileopenshouldbecompleted.
Notethatsincethegridistobesharedbetweenthreadsthatitshouldbedeclaredintheglobal
[Link]
betweenthreads.

Assignment
(20points)[Link]
explicitdesignguidelinesforthiscourse,programsshouldexhibitamodularorobjectorienteddesign.
[Link]
languageaslongasthelanguagesupportspthreads,[Link]
instructorwillonlybeabletoprovideassistanceforprojectswritteninC/C++/[Link]
thatwillmakeyourprojectifitneedstobecompiled.
(10points)Provideahighleveldiscussionoftheprogramdescribingthefunctionalityofthemajor
componentsoftheprogramandhowtheyinteractwitheachother,andamoredetaileddiscussionforthe

02/13/2014

Page1of2

[Link]

[Link],
describewhichpartsaremissingandwhatyouthinkshouldbedonetoimplementthem.
(10points)Answerthefollowingquestions:
1.
2.
3.
4.

Whataspectofthreadmanipulationdidyoufindmostdifficulttounderstand?
Whataspectofthreadmanipulationdidyoufindleastdifficulttounderstand?
What,ifanything,wouldyouchangeinyourcurrentdesign?
What,ifanything,didyoufindinterestingorsurprisingaboutthreadmanipulationthatyoudid
notknowbeforedoingthisproject?
5. Discusstheadvantagesanddisadvantagesofusing27threadstosolvethisproblemvs.using3
threads(onetodoalltherows,onetodoallthecolumns,onetodoallthe3x3subgrids)[Link]
1threadtodoallthechecking.
6. Discussthesimilaritiesanddifferencesbetweenthreadsandprocessesthatyouobservedin
completingtheshellprojectandthisproject.

WhattoSubmit

Createatarfileorzipfilecontainingthefollowingitems:
[Link]
C/C++/Java,putinstructionsonhowtoruntheprograminacommentatthebeginningofthe
mainprogramfile.
Amakefiletomakeyourproject,ifneeded
Thediscussionofthefunctionaldesignofyourproject,preferablyinPDFformat.
Theanswerstothequestionsabove,preferablyinPDFformat.

Submityourarchiveusingthesubmissionsystem([Link]
[Link],unlessyouarealsoinCS375,inwhichcase
yourusernamewillhave"cs470"appendedtoit,andyourpasswordisyourstudentIDnumberincluding
theleading0(i.e.7digits).[Link].

02/13/2014

Page2of2

[Link]

You might also like