In: Computer Science
Answer;
1) Write a program that launches 1,000 threads. Each thread adds 1 to a variable sum that initially is 0. Define a variable to hold sum.
Run the program without synchronization.
Code;

Output;

Run the program with synchronization in three different techniques
Code;

Output;

2) Write a program to compute a factorial of a given number in parallel
Code;

Output;
