Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Pls write C program for this project Project 1 Create two processes which communicate using a shared memory segment. The first process finds out the
Pls write C program for this project
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 c The second process file. This is done by the processes every half an hour. (Hint: Use jproc filesystem on Linux to find out process information.) 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 thoe linked list in the shared 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. Create a process which creates a list of prime numbers in a given range of num- bers. 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 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 same system using pipes and FIFOs on the local system every process running in the shared memory reads this linked list and formats it in HTML and saves it ina 2. memory as soon as the client is done with the previous 3. each range to different slave processes. The supervisor and the slave then processes running on different hosts. Simulate the 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 c The second process file. This is done by the processes every half an hour. (Hint: Use jproc filesystem on Linux to find out process information.) 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 thoe linked list in the shared 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. Create a process which creates a list of prime numbers in a given range of num- bers. 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 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 same system using pipes and FIFOs on the local system every process running in the shared memory reads this linked list and formats it in HTML and saves it ina 2. memory as soon as the client is done with the previous 3. each range to different slave processes. The supervisor and the slave then processes running on different hosts. Simulate the Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started