Engineering
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}

answer
Answers: 1

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, niyawilliams23
Asingle-geared blanking press has a stroke of 200 mm and a rated capacity of 320 kn. a cam driven ram is assumed to be capable of delivering the full press load at constant force during the last 15 percent of a constant-velocity stroke. the camshaft has an average speed of 90 rev/min and is geared to the flywheel shaft at a 6: 1 ratio. the total work done is to include an allowance of 16 percent for friction a) estimate the maximum energy fluctuation b) find the rim weight for an effective diameter of 1.2 m and a coefficient of speed fluctuation of 0.10
Answers: 1
image
Engineering, 04.07.2019 18:20, maciemarklin79981
A3-mm-thick panel of aluminum alloy (k 177 w/m-k, c 875 j/kg-k and ? = 2770 kg/m) is finished on both sides with an epoxy coating that must be cured at or above t,-150°c for at least 5 min. the production line for the curing operation involves two steps: (1) heating in a large oven with air at ts,0-175°c and a convection coefficient of h, 40 w/m2. k, and (2) cooling in a large chamber with air at 25°c and a con- vection coefficient of he 10 w/m2.k. the heating portion of the process is conducted over a time interval te which exceeds the ime required to reach 150°c by 5 min (h = r + 300 s). the coating has an emissivity of ? = 0.8, and the temperatures of the oven and chamber walls are 175 and 25°c, respectively. if the panel is placed in the oven at an initial temperature of 25°c and removed from the chamber at a safe-to-touch tempera ture of 37°c, what is the total elapsed time for the two-step curing operation?
Answers: 3
image
Engineering, 04.07.2019 19:10, nbug2121
Arigid tank contains 10 kg of air at 137 kpa (abs) and 21°c. more air is added to the tank until the pressure and temperature rise to 242 kpa (abs) and 32°c, respectively. determine the amount of air added to the tank. [r-0.287 kj/kg k]
Answers: 3
image
Engineering, 06.07.2019 03:10, kturvey225
Consider a 1.2 meter high and 2 meter wide glass window whose thickness is 6 mm and thermal conductivity is 0.78 w/m °c. the room temperature is maintained at 24 °c, while the outdoor temperature is -5 °c. the convective heat transfer coefficients on the inner and outer surfaces of the window are 10 w/m2 °c and 25 w/m2 °c respectively. (a) draw the thermal resistance network, etermine the steady rate of heat transfer t e glass window (c) determine the temperature of the inner surface of the window
Answers: 3
Do you know the correct answer?
Objective: to understand and experiment with thread creation using pthread library in linux. proble...

Questions in other subjects:

Konu
Biology, 09.04.2021 23:20