Question: Question 1 : Implement the following using operating system . a)Write a thread that creates a child thread. The child thread input a number from

Question 1 : Implement the following using operating system . a)Write a thread that creates a child thread. The child thread input a number from user and

determine whether it is even or odd. The parent thread should cancel the child thread if user

enters 5 odd numbers.

b)Write a program that input two numbers and an operation from user. The parent thread create thread to perform the required operation while the main thread should call pthread_join () to wait for the child thread. Main thread displays the result.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!