Please read the pdf homework description and solve the 4 problems (No Plagiarism)
Question Description
The homework contains 4 problems:
1. CSAPP3 Problem 12.16 (https://www.cs.drexel.edu/~sph77/CS283/H6.html)
2. CSAPP3 Problem 12.17 (https://www.cs.drexel.edu/~sph77/CS283/H6.html)
3. Starting with file hello-hw.txt, write a program that uses threads that print a string,
their own task id and the value of a variable sum. The task id, value of sum and
string address must be passed to the string through pthread_create(). Do not
change the code in hello-hw.txt but only add statements. Some of the places where
new code must be added are shown by /* … */. Compile the program with -lpthread. (Hello-hw.txt is attashed)
Question 4 is not in the H6-CH12.pdf, but it is described below:
4.Starting with file dotpr-hw.txt, write a program that uses threads to calculate the dot
product of two vectors. Do not change the code in dotpr-hw.txt but only add
statements. Some of the places where new code must be added are shown by /*
… */. Compile the program with -lpthread.