Experience with process communication

Assignment Help Operating System
Reference no: EM131105837

Project 1 - Online Q and A system

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.

2177_Figure.jpg

Figure 1 Hierarchy of Processes

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.

Reference no: EM131105837

Questions Cloud

Describe a famous attack that leveraged it : For this conference, explain what a specific vulnerability is, describe a famous attack that leveraged it (For example, the Morris worm leveraged the buffer overflow vulnerability), and how it can be prevented/minimized.
Prices at the pump : Gasoline "prices at the pump" go up and down and Oil "costs per barrel" go up or down, but they do so at different rates and even in opposite directions sometimes.
Opportunity cost of an action : Recount and incident in your past which in retrospect required that you consider the opportunity cost of an action taken. State the circumstances the decision made and whether the outcome met with your satisfaction.
Maximize total consumer and producer surplus : Competitive markets are said to be efficient because they maximize total consumer and producer surplus. Explain how monopoly markets differ in this regard.
Experience with process communication : 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 -
Find the power necessary just at the end of the acceleration : find the power necessary just at the end of the acceleration.
What is the charge on the first sphere : What is the charge on the first sphere?
Compute the total costs incurred in january for materials : BBAC501 Assignment. Compute the total costs incurred in January for (a) materials and (b) conversion.  Compute (a) the cost of WIP Inventory as of 31 January 2016 and (b) the cost of units completed and transferred out during the month
A horizontal straight section of pipe : A horizontal straight section of pipe is supported at its center by a vertical wire as shown in Fig. 26.80. Find the formula for the moment of inertia of the pipe with respect to an axis along the wire if the pipe is of length L and mass m.

Reviews

Write a Review

Operating System Questions & Answers

  Describe how implementation of a raid level 2 system

Describe how implementation of a RAID Level 2 system would be beneficial to a university payroll system. In your own words, describe the disadvantages of such a system, if any, in that environment, and if appropriate, suggest an alternative RAID s..

  Write a script for user maintenance

You now need to write a script for user maintenance. Write a script that will perform the following tasks: Prompt the system administrator for all valid input parameters

  Are all the properties the same for different controls

How are Integer and String data types used in an application?

  Show the output of the screen when the program executes

Show the output of the screen when the program executes with a value of 200.

  How many page faults would occur under pure demand paging

How many page faults would occur under pure demand paging (all frames are initially empty), assuming four frames are available, under FIFO, LRU.

  Pros and cons of using embedded uid and pw

Think about an embedded user id and password which provides me access to a client/server environment. Discuss the pros and cons of using an embedded uid and pw?

  A- please answeronly two ofnbsp the following questions

a- please answeronly two ofnbsp the following questions that are related to the file

  Calculate waiting and average waiting time

A program that can do cpu scheduling algorithm priority using javascript or php to display gaant chart and calculate waiting and average waiting time

  What are some metrics that can be used during the sdlc

What are some of the methodologies commonly used for requirements elicitation?

  Explain the client-server architecture

What are the three different categories of command, support your answer by giving three examples. Give three good reasons, with valid explanation, to justify why partitioning hard disk provides a variety of advantages. Explain the client/server..

  Question about spreadsheet applications

As a result of your work on high school reunion assignment, you decide to learn more about MS. Excel and the several uses of spreadsheet applications.

  Determine the rang of usable ip addresses

Determine the rang of usable IP addresses for the following IP subnet also determine the bradcast address for the subnet?

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