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

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  Develop a user mode command interpreter

Develop a user mode command interpreter which support list-short.

  Memory allocation in operating system

Analysis and implementation of algorithms for memory allocation in operating system, Explain First- t and best- t methods are used in memory allocation in operating systems.

  Stand alone child process

Forking the child process

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Simulating operating systems scheduling

Simulate the long-term scheduler, the short-term scheduler and the I/O scheduler of the computer using the First-Come-First-Serve algorithm.

  Issues with trusted platform module

Research paper discussing the issues with Trusted Platform Module (TPM)

  Threads

Explain a complication that concurrent processing adds to an operating system.

  Design and programming

Use the semaphore methods to control the concurrency of the solution

  Virtual machines

Virtual machines supported by a host operating system

  Discuss an application that benefits barrier synchronization

Discuss an application that would benefit from the use of barrier synchronization

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