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, 04.07.2019 18:20
Find the kinematic pressure of 160kpa. for air, r-287 j/ kg k. and hair al viscosity of air at a temperature of 50°c and an absolute (10 points) (b) find the dynamic viscosity of air at 110 °c. sutherland constant for air is 111k
Answers: 3
question
Engineering, 04.07.2019 18:20
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
Answers: 2
question
Engineering, 04.07.2019 18:20
Aheavily insulated piston-cylinder device contains 0.02 m3 of steam at 300 kpa and 200 °c. 1.2 mpa. d this process. team is now compressed in a reversible manner to a pressure of etermine the entropy change and the work done on the steam during this process
Answers: 1
question
Engineering, 04.07.2019 19:10
Asteam is contained in a rigid tank with a volume of 1 m3. initially, the pressure and temperature are 7 bar and 500 oc, respectively. the temperature drops due to cooling process. determine: (1) the temperature at which condensation begins in °c, (2) the fraction of the total mass that has condensed when the pressure decreased to 0.5 bar. (3) the volume in m3 occupied by saturated liquid at the final state?
Answers: 3
You know the right answer?
Objective: to understand and experiment with thread creation using pthread library in linux. proble...
Questions
question
History, 02.07.2019 17:10
Questions on the website: 13722367