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

  Describe benefits of providing synchronization tool

Slim reader-writer locks favor neither readers nor writers, nor are waiting threads ordered in FIFO queue. Describe benefits of providing such a synchronization tool.

  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?

  Why thread belonging to same process affected by page fault

Other user user threads belonging to the same process also be affected by the page fault (i.e., would they also have to wait for the faulting page to be brought into memory?) Explain.

  The master distribution center in bend

The master distribution center in Bend, Oregon, has 42 people, including nine Windows 2000 users, 22 people using Windows XP Professional, and 11 people using Windows Vista Business Edition.

  Using international project management as a topic1 use

using international project management as a topic1. use three different search engines to obtain information.2. how do

  How many processes a computer can effectively support

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

  Consider a scheduling scenario

Consider a scheduling scenario in which a job of size (processing time) 50ms arrives every 60 ms, and 10 jobs of processing time 1ms arrive every 6 ms. Which algorithm: First Come First Serve, or Shortest Remaining Processing Time, would provide b..

  Dedicated microprocessor for inputting multiple 8-bit unsign

Design a dedicated microprocessor for inputting multiple 8-bit unsigned numbers until a zero is entered. Then output the number of numbers entered. First design the datapath and write the control words for it. Clearly label all control signals. Th..

  The state of the waiting thread to blocked

Which IPC mechanism does not change the state of the waiting thread to blocked?

  Question about software and staff training

As was stated before, the corporation X is going to expand its data system. To do this, it is going to choose and buy new hardware and software and retrain workers.

  Question 1a explain two reasons driving the creation of

question 1a explain two reasons driving the creation of processes.b suppose we want a system to have two ready states

  Deadlock prevention.

Describe what changes could be made to an operating to break the conditions of non-preemption and hold and wait for deadlock prevention. What are the drawbacks of your changes?

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