Gain e-perience with process communication

Assignment Help Operating System
Reference no: EM13672674

Objectives:

1. Become familiar with Programming Assignment

2. Work with multiple processes

3. Gain e-perience with process communication

These will be individual projects. The main purpose of this Lab assignment, i.e. LAB0, is to become familiar with the programming assignment and prepare the first lab that will be announced at the ne-t week.

For LAB0, you may choose any programming language, such as .NET, Visual C++, Java, C, etc. However, keep in mind that the first lab assignment (LAB1) will be based on this assignment and include Graphical User Interface. Therefore, the students are encouraged to choose the programming language that supports GUI, and runs on Windows. Also, the other OS that support GUI desktop, e.g. Gnome and KDE for Linu-, are possible. Finally, your final program should be compiled and run on TA'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 game of ‘Scissors, Rock, and Paper'. This program does not require GUI, nor user interactions. Your program should consist of three processes as seen in the Figure 1. The main process is the ‘Manager'. It should create two other processes (children processes) and manage the game. It is responsible to judge the results from children's processes, i.e. winner or tie.

758_Game of Scissors-Rock and Paper.png

The desired output sequence is as follows:

1. Start your program (Manager process)

2. Display PID of Manager process 3. Create two children process

4. Display PIDs of children processes: for e-ample

# Child1's PID is 123
# Child2's PID is 234

5. Manager sends message "Start Game" to children processes

6. Each child process randomly generates number 0, 1, or 2 (0:Scissors, 1:Rock, and 2:Paper)

7. Each child process sends the number to manager process

8. Manager process display each child's choice: for e-ample
# Child1 is ‘Scissors' and Child2 is ‘Rock'

9. Manager process declare a winner or tie: for e-ample
# Child1 is a winner (go to Step 11)
Or # This game is tie (go to Step 10)

10. If the game is tie, go to Step 6 with a message "Restart Game"

11. Manager process first sends kill signal to the loser.

12. Then, manager process sends kill signal to the winner.

13. Finally, e-it 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: EM13672674

Questions Cloud

What a non-truncated scatterplot means : Explain in words what a non-truncated scatterplot means and identify how likely it is that a causal relationship has been indicated.
Determine the composition of the vapor : Determine the composition of the vapor at boiling point and determine the Dew point of the mixture - determine the composition of streams leaving the first FV unit.
Will either of their grievances be heard in court : Sydney, on the other hand, submitted his case to an arbitrator. Will either of their grievances be heard in court? Why? What will the results of each be?
Illustrate four ways in which government intervene in market : Explain and illustrate four ways in which government intervene in markets
Gain e-perience with process communication : 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'.
Calculate the ultimate bearing capacity : Meyerh of method to calculate the ultimate bearing capacity Use the Meyerhof method to calculate the ultimate bearing capacity of the raft foundation and the allowable bearing capacity (FS=3).
What is its impact speed with the ground : A ball is thrown up with an initial speed of 32m/s from a height of 84m. How long is the ball in the air? What is its impact speed with the ground? At what time wills the object be halfway between the starting point and the ground,
Motorcycle rider moving with an initial velocity : A motorcycle rider moving with an initial velocity of 6.8 m/s uniformly accelerates to a speed of 19.4 m/s in a distance of 30.0m. What is the acceleration?  How long does it take?
Discover the maximum kinetic energy of the cart : A 0.44 kg air cart is attached to a spring and allowed to oscillate. You are given the displacement of the air cart from equilibrium to be x = (23.1 cm) cos [(1.04s-1)t + π]. Discover the maximum kinetic energy of the cart. Discover the maximum force..

Reviews

Write a Review

Operating System Questions & Answers

  In working out your responses to the discussion question

in working out your responses to the discussion question you should choose examples from your own experience or find

  Draw curves for throughput-delay and power

Assume two hosts A and B are connected via router R. A-R link has infinite bandwidth; A-R link has infinite bandwidth; draw curves for throughput, delay, and power, each as function of load.

  Determine the average seek time of traversed disk

Traversed Disk receives request to access random sector on random track. Suppose head starts at track 0. Determine the average seek time?

  1 given the following code and the assembler equivalent to

1. given the following code and the assembler equivalent to the rightfor i999 igt0 i-- xixiyiloopnbspnbsp

  Determine the various aspects of operating system

Determine the various aspects in which we can view an operating system in terms of the services provided also discuss the differences between the various types of the operating systems and what are the advantages and limitations of each type

  Discuss five computer forensics tools

Use Library and internet resources to analyze five computer forensics tools. For each tool, list the vendor and its functions.

  Comparison of 3 mobile operating systems in user interface

comparison of three mobile operating systems in terms of user interface, functionality, application support and platform presence.

  Discussion on internet phone and pbx

An interesting emerging market is using Internet phone and a corporation's high speed LAN to replace same corporation's PBX. Create a page report on the issue.

  What characteristics do mainframe operating systems have

What are the fundamental differences between Windows®, Mac OS®, UNIX, and Linux operating systems for personal computers? What unique characteristics do mainframe operating systems have?

  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..

  Human centered and user centered approaches

Discuss the differences between the human centered and user centered approaches? Do you consider that human centered approach is more effective?

  How many processes a computer can effectively support

Discuss the factors that you think would limit how many processes a computer can effectively support.

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