Write a Win32 console application illustrating the usage of anonymous pipes for data sharing between a parent and child thread of a process. The application should satisfy the following conditions:...


Write a Win32 console application illustrating the usage of anonymous pipes for data sharing between a parent and child thread of a process. The application should satisfy the following conditions: (a) The main thread of the process creates an anonymous pipe with size 512KB and assigns the handle of the pipe to a global handle   (b) The main thread creates an event object “synchronise” with state non-signalled and a child thread with name ‘child_thread’.   (c) The main thread waits for the signalling of the event object “synchronise” and reads data from the anonymous pipe when the event is signalled and prints the data read from the pipe on the console window.   (d) The main thread waits for the execution completion of the child thread and quits when the child thread completes its execution.   (e) The child thread writes the data “Hi from child thread” to the anonymous pipe and sets the event object “synchronise” and sleeps for 500 milliseconds and then quits.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here