Engineering
Write a C program called threadcircuit to run on ocelot which will provide a multithreaded solution to the circuit-satisfiability problem which will compute for what combinations of input values will the circuit output the value 1. This is the sequential solution, which is also attached. You should create 6 threads and divide the 65,536 test cases among them. For example, if p=6, each thread would be responsible for roughly 65,536/6 number of iterations (if it's not divisible, some threads can end up with one more iteration than the others). The test cases must be allocated in a cyclic fashion one by one.If a thread finds a combination that satisfies the circuit, it should print out the combination (like in the given sequential version), along with the thread id (a number between 0 and 5 (p-1)). In the end, the main thread should print out the total number of combinations that satisfy this circuit (like in the given sequential program). Mutex should be used to update the total by each thread. An example output of the program is shown below:OUTPUT EXAMPLE:% threadcircuit0) 01101111100110010) 11101111110110012) 10101111100110011) 11101111100110011) 10101111110110011) 01101111101110010) 10101111101110012) 01101111110110012) 1110111110111001There are 9 solutionsCODE TO USE:#include #include /* Return 1 if 'i'th bit of 'n' is 1; 0 otherwise */#define EXTRACT_BIT(n,i) ((n&(1
4. Installation Troubleshooting at North Jetty ManufacturingNorth Jetty Manufacturing makes windows and doors for local building contractors. Several of North Jettys workers have received new PCs in recent weeks, and they need your advice about how to deal with the problems described below:1. Jose Fonseca, production schedulerThe desk space for Joes workstation is very limited.2. Ralph Emerson, accounting specialistBecause of carpeting, static electricity is a problem in the office area where Ralphs PC was installed.3. Anna Liu, marketing database coordinatorAnna has experienced problems with eyestrain, headaches, back strain, and sore wrists.4. Alyssa Platt, employee benefits coordinatorAlyssa has to squint at the display screen late in the afternoon because the windows in her office face west and the sun shines in.5. Mary Pat Schaeffer, WebmasterMary Pat would like to minimize the number of power switches required to turn on her PC and peripherals (system unit, display screen, printer, and scanner).6. Lou Campanelli, shipping and receivingLous system is installed in an unusually dusty shop environment.Write a memo to Candace Van Camp, CEO at North Jetty Manufacturing, that recommends how you would deal with each of these specific problem areas.