Question
need help fine tuning my program here is what is should do The following program must be implemented in C programming language and it will
need help fine tuning my program
here is what is should do
The following program must be implemented in C programming language and it will be compiled and tested under Unix for grading. Problem Statement: Write a Pthreads program 'Sudoku-Checker.c' to check the validity of the proposed solution to a typical Sudoku puzzle (Refer to: https://en.wikipedia.org/wiki/Sudoku) (1) This program should be implemented by the following way: (a) The proposed solution to the given sudoku puzzle should be read from an input file. (b) One suggested strategy is to create a total of eleven separate worker threads for validating a Sudoku puzzle by ?One thread: check if each column contains the digits 1 through 9 ?One thread: check if each row contains the digits 1 through 9 ?Nine threads: check if each of the 3 3 subgrids contains the digits 1 through 9 (c) The parent thread creates the worker threads, passing each worker the location that it must check in the Sudoku grid. ?Several parameters including row and column of subgrids are required to be passed to each thread. ?Creating a data structure shown as follows is the easiest approach to implement it. ?The pointer Data will be passed to the pthread_create () function as a parameter for each separate thread to be created. (d) Each worker thread checks the validity of a particular region. Once it is done, the result must be passed back to the parent. ?Creating an array of integer values that is visible to each thread, where the ith index in this array corresponds to the ith worker thread. ?The value of an array entry set by its corresponding worker thread indicates the validity: 1 indicates valid and 0 indicates otherwise. ?When all worker threads completed, the parent thread checks each entry in the result array to determine if the Sudoku puzzle is valid.
here is the code , i can't get it to run
#include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started