Workshop Title: Multithreading and IPC
Venue: MET BKC Instt. of Engg, Nashik
Participants: T. E. Information Tech.
Organized by: Mrs. Ranjana Dahake, Assistant Professor, MET.
1. Deadlock Avoidance Using Semaphores:
Implement the deadlockfree solution to Dining Philosophers problem to illustrate the
problem of deadlock and/or starvation that can occur when many synchronized threads are
competing for limited resources.
2. Inter process communication in Linux using following.
1. Pipes :
Full duplex communication between parent and child processes. Parent process writes a pathname of a file (the contents of the file are desired) on one pipe to be read by child process and child process writes the contents of the file on second pipe to be read by parent process and displays on standard output.
Full duplex communication between two independent processes. First process accepts sentences and writes on one pipe to be read by second process and second process counts number of characters, number of words and number of lines in accepted sentences, writes this output in a text file and writes the contents of the file on second pipe to be read by first process and displays on standard output.
3. Signals :
Detecting the termination of multiple child processes :
Implement the C program to demonstrate the use of SIGCHLD signal. A parent process Creates multiple child process (minimum three child processes). Parent process should be Sleeping until it creates the number of child processes. Child processes send SIGCHLD signal to parent process to interrupt from the sleep and force the parent to call wait for the Collection of status of terminated child processes.