Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In this project, you are asked to write two independent programs, thr.c and proc

ID: 3886996 • Letter: I

Question

In this project, you are asked to write two independent programs, thr.c and proc.c, which use threads and processes to concurrently compute the sum of squareroot s from 1 to n, where n is a multiple of 3 and is specified in the command line. For the program thr.c, it gets the value n from the command line argument and converts it to an integer Next, it creates two threads using pthread_create(). Then, the main thread computes the sum of squareroot s from 1 to n/3, while the two child threads computes the sum of the squareroot s from n/3+1 to 2n/3 and 2n/3+1 to n, respectively. All three partial sums should be added together to a shared global variable The main thread calls pthread_join() to wait for the termination of the two child threads and then prints the result. Below is an example of running your thread program: spirit > thr 9999 sum of squareroot s: 666616.459197 The program proc.c is similar to thr.c except that you need to use processes instead of threads. That is, your program should set up two pipes and then call the function fork() to create two child processes. Each of the parent and the two child processes computes its own partial sum of the squareroot s. To collect the three partial sums, the first child process should write its result to a pipe. The second process reads the value forwarded by the first child, adds its result, and then forward it to the parent through another pipe The parent gets the value from the second pipe, adds it with its partial sum, and prints the result.

Explanation / Answer

Answer:

What is information security
To guard the privacy, integrity and availability of information assets , whether in storage processing or transmission . it is achieved via the application of policy ,Education, training and wakefulness and technology.
Need of information security
Information is the chief commodity in world of e-commerce . the need to protect information to make sure its privacy , integrity and availability of those whom need if for making critical personal business if we are not using information security , the most damaging aspect is the loss of data and software source of harm such as computer virus, computer tracking and denial of service attack have turn into more common.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote