KEMBAR78
Operating Systems/Interprocess Communication Mini Project | PDF
0% found this document useful (0 votes)
265 views1 page

Operating Systems/Interprocess Communication Mini Project

This document outlines three mini projects involving interprocess communication: 1. Two processes communicate via shared memory to periodically retrieve and format a list of all running processes on the system. 2. The same server process updates a shared memory list of running processes every 5 minutes, and the client counts how many times each process was running to identify continuously running processes. 3. A supervisor process divides a prime number calculation range among slave processes on different hosts, using sockets to communicate the ranges. Pipes and FIFOs simulate this locally.

Uploaded by

Avinash Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
265 views1 page

Operating Systems/Interprocess Communication Mini Project

This document outlines three mini projects involving interprocess communication: 1. Two processes communicate via shared memory to periodically retrieve and format a list of all running processes on the system. 2. The same server process updates a shared memory list of running processes every 5 minutes, and the client counts how many times each process was running to identify continuously running processes. 3. A supervisor process divides a prime number calculation range among slave processes on different hosts, using sockets to communicate the ranges. Pipes and FIFOs simulate this locally.

Uploaded by

Avinash Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Operating Systems/Interprocess Communication

Mini Project

Mini Project
1. Create two processes which communicate using a shared memory segment. The first process finds out the list of all processes running on the system with their name, process id, number of files opened and total time running and creates a linked list containing this data about every process running in the shared memory. The second process reads this linked list and formats it in HTML and saves it in a file. This is done by the processes every half an hour. (Hint: Use jproc filesystem on Linux to find out process information.) 2. Take the same server which was developed in (1) and change the client as described. The goal of the client this time is to find out the processes which are executing continuously in the running state over a period of 5 minutes. For this the server also sends the state of the running processes at the time the snapshot was taken. The server takes the snapshot repeatedly over 5 minutes and writes the linked list in the shared memory as soon as the client is done with the previous linked list. The client keeps a count for each process of the -number of times the process was in the running state. At the end of 5 minutes the client prints out the list of processes running in descending order of the counts recorded by the client. Describe the changes that are required to synchronize the two processes. 3. Create a process which creates a list of prime numbers in a given range of numbers. The process has the ability to run in two modes - supervisor mode and slave mode. In the supervisor mode the process takes a range of numbers from the user between which prime numbers have to be calculated. It also takes a list of tuples containing the hostname and port numbers. Each of this host runs another similar process in slave mode. The supervisor divides the range into equal parts and sends each range to different slave processes. The supervisor and the slave then calculate the prime numbers in their respective ranges. The slaves return back the prime numbers found to the supervisor. When all slaves have communicated back the prime numbers, the supervisor prints the list in ascending order. Use sockets to communicate between the processes running on different hosts. Simulate the same system using pipes and FIFOs on the local system.

P.C.P.Bhat/IISc Bangalore

M7/V1/June 04/1

You might also like