subject
Engineering, 28.01.2020 04:31 summer098890

Objective: to understand and experiment with thread creation using pthread library in linux. problem statement: design and implement a sudoku solution validator using pthreads library in linux virtual machine. steps: download the incomplete version of hw2.c from icollege read through programming project 1 of chapter 4 in the textbook. follow the suggestion in the textbook to complete the c program in order to check sudoku puzzle using 11 children threads. in addition, you program should meet the following requirement · . the 9x9 data grid to be tested are stored in two txt files, grid1 and grid2, which can be downloaded from icollege o
#include #include #include #define number_of_threads 11 #define puzzle_size 9 void *column_worker(void *param); /* thread that checks columns */ void *row_worker(void *param); /* thread that checks rows */ void *subfield_worker(void *param); /* thread that checks subfields */ /* example puzzle */ int puzzle[puzzle_size+1][puzzle_size+1 ] = { {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}, {-1,5,3,4,6,7,8,9,1,2}, {-1,6,7,2,1,9,5,3,4,8}, {-1,1,9,8,3,4,2,5,6,7}, {-1,8,5,9,7,6,1,4,2,3}, {-1,4,2,6,8,5,3,7,9,1}, {-1,7,1,3,9,2,4,8,5,6}, {-1,9,6,1,5,3,7,2,8,4}, {-1,2,8,7,4,1,9,6,3,5}, {-1,3,4,5,2,8,6,1,7,9}

ansver
Answers: 1

Another question on Engineering

question
Engineering, 03.07.2019 15:10
Apiston-cylinder with a volume of 0.25 m3 holds 1 kg of air (r 0.287 k/kgk) at a temperature of 100 c. heat transfer to the cylinder causes an isothermal expansion of the piston until the volume triples. how much heat is added to the piston-cylinder?
Answers: 3
question
Engineering, 04.07.2019 18:10
Aloaded platform of total mass 500 kg is supported by a dashpot and by a set of springs of effective stiffness 72 kn/m. it is observed that when the platform is depressed through a distance x = 12.5 cm below its equilibrium position and then released without any initial velocity; it reaches its equilibrium position in the shortest possible time without overshoot. find the position and velocity of the loaded platform 0.10 sec. after its release. if a further load of 400 kg is added to the platform, find, i) the frequency of damped vibrations, and i) the amplitude of vibration after 2 complete oscillations, given that the initial amplitude is 15 cm.
Answers: 1
question
Engineering, 04.07.2019 18:10
Fluids at rest possess no flow energy. a)- true b)- false
Answers: 3
question
Engineering, 04.07.2019 18:10
What are the two (02) benefits, which may result from a successful implementation of preventive maintenance (pm) program in an organization? (clo3)a)- lean manufacturing b)-overlapping responsibilities c)-the planner is not qualified d)-accurate contractor information e)-reduction in equipment redundancies f)-accurate stores information
Answers: 3
You know the right answer?
Objective: to understand and experiment with thread creation using pthread library in linux. proble...
Questions
question
Chemistry, 10.01.2021 14:00
question
Mathematics, 10.01.2021 14:00
question
English, 10.01.2021 14:00
question
Spanish, 10.01.2021 14:00
question
History, 10.01.2021 14:00
question
English, 10.01.2021 14:00
Questions on the website: 13722367