Display pid of manager process

Assignment Help Operating System
Reference no: EM131100304

Project

Objectives:

1. Become familiar with Programming Assignment

2. Work with multiple processes

3. Gain experience with process communication

These will be individual projects. The main purpose of this programming assignment, i.e. Project 1, is to become familiar with the programming of creating processes using system call (library) and inter-process communication.

For Project 1, you may choose any programming language, such as .NET, Visual C++, C, etc. as long as the programming language provides library or function to create a process such as fork() and exec() in C (C++). Because of this reason, Java is not allowed. Also, other OS, such as Unix or Linux, are possible. In any case, your final program should be compiled and running on GA's computer. To do that, you need to provide all materials as well as source code, such as run time module, integrated development environment (Visual Studio, .NET or C#), and any other program to run your program.

You are to implement a simple Question and Answer system for a teacher and students like online chatting. This program does not require GUI, nor user interactions. Your program should consist of at least four processes as seen in the Figure 1. The main process is the ‘Manager (i.e., teacher)'. It should create three other processes (children processes as students) and manage the discussion.

489_Figure.jpg


The desired output sequence is as follows:

1. Start your program (Manager process for a teacher)

2. Display PID of Manager process

3. Input the number of students (i.e., how many child processes). It should be equal or greater than 3.

4. Create children processes as students.

5. Display PIDs of children processes: for example
# 1st student's PID is 123
# 2nd student's PID is 234
# 3rd student's PID is 345
. . .
6. Manager sends message "Start Q and A" to each student (i.e., each child process)

7. Each child process (student) send their PID as student ID to a manager process.

8. Manager process display each student ID.

9. Each child process (student) sends a question to manager process (This should be standard input using keyboard typing)

10. Manager process display each question: for example
# 1st student asks "What is 1 + 1?"
# 2nd student asks "What is CS?"
# 3rd student asks "What year is this?"

11. Any child process can answer for the question.

12. Manager process judges if the answer is correct or wrong: for example

# 1st student answer is correct (go to Step 13) Or # answer is wrong (go to Step 10)

13. If all students' questions are answered correctly, manager process sends kill signal to all children processes.

14. Finally, exit manger process.

The procedure mentioned above is just simple one. You can add or modify the procedure as long as your program does not disobey the main requirements.

Two important things that should be decided before you code:

- Which language I use.
- Which communication method I use.

Write-up

You should submit a write-up as well as your program. Your write-up should include any known bugs, limitations, and assumptions in your program. This write-up should be in text-format and titled as ‘README'. It should be submitted along with your code. GA will use the ‘README' file to compile (or install) and run your program. If the GA has trouble with your program then he will contact you to makeup it.

It uses unix commands such as forks and pipe. I need solution to this project

Reference no: EM131100304

Questions Cloud

What advantages might cold case investigators have : It is often said that, if a homicide is not solved within the first 48 hours, the chance of solving the crime drops dramatically. That is true. However, what advantages might cold case investigators have over the initial or original investigators?..
Why the central limit theorem does not apply here : Give a qualitative explanation of what the limiting distribution of G00 looks like. If this sort of thing amuses you, it is not hard to find the exact distribution.
How the united states went to war against the confederacy : Write a paper that will discuss how the United States went to war against the Confederacy in 1861. Every time you use material from another source it must be cited.
Trends of data warehousing and data mining : 1. Provide an executive overview that addresses the following: a. Explain the benefits and current trends of data warehousing and data mining. b. Provide two (2) examples of quality companies successfully using a data warehouse to support your answer..
Display pid of manager process : Display PID of Manager process - Create children processes as students and you can add or modify the procedure as long as your program does not disobey the main requirements.
What is required to rule a death as a suicide : What is required to rule a death as a suicide? How can the requirements be met? Please explain or justify your responses.
Explain influence of gestalt psychology on modern psychology : Examine the Influences of Gestalt Psychology on Modern Cognitive Psychology. Neuropsychology is a very vibrant field today. For this task, you will trace the history and influences of Gestalt on the major areas of cognitive psychology today.
Formulate an ip model for this problem : Northeastern Airlines is considering the purchase of new long-, medium-, and short-range jet passenger airplanes. The purchase price would be $67 million for each long-range plane, $50 million for each medium-range plane, and $35 million for each ..
Find the expected transmitted energy per binary digit : That is, the transmitter sends a/gm/ instead of a. Find the expected transmitted energy per binary digit.

Reviews

Write a Review

Operating System Questions & Answers

  Briefly compare and contrast windows and ubuntu linux

Explain how to select the operating system you want to boot in terms and steps a novice computer user can follow (use screen captures as necessary).

  Creating pseudocode

Create pseudocode for the Citron Car rental policy, Standard transmission is available only for A, B, and C. Automatic transmission is available for all cars.

  describe how you would do so with a positive feedback loop.

Describe how you would use a negative feedback loop to manage your bank balance.Describe how you would do so with a positive feedback loop. Explain which you would prefer and why?

  Determine largest value for which system is schedulable

Assume that four events need 35,20,10, and x me=sec of CPU time, respectively. Determine the largest value of x for which system is schedulable?

  Design several security awareness posters

With the help of graphics program, design many security awareness posters on the following themes, updating antivirus signatures, watching out for e-mail viruses.

  Multiplexor and demultiplexor?

statistical time division multiplexing with 24 stations inputting data at 9600 bps, and assuming that only 60 percent of those stations transmit at one time, what is the minimal speed necessary for the high speed link connecting multiplexor and demul..

  Describe two possible record formats

Describe two possible record formats. What are the trade-offs between them? The consecutive slots organization is mostly used for fixed length record formats.

  Significant performance increases can be obtained in an os

Significant performance increases can be obtained in an OS by overlapping I/O operations into file buffers, with CPU activity and microsoft Windows XP is a multi-threaded, preemptive kernel

  What is the maximum size of the logical address

What is the page size in this system -  what is the maximum number of pages that can exist for a process and what is the maximum size of the logical address?

  Define the term context switch

Define the term context switch. Explain how context switching takes place. (use a diagram, with two processes)

  Analyze video game-type interfaces and discuss three 3

describe the three 3 principles of direct manipulation and give examples as to how they are used in video game

  What is file system reliability

What is file system reliability and explain the roles of error handling, back up, and file checker methods in supporting the file system reliability?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd