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

  Question 1a what is the main advantage of multiprogrammingb

question 1a what is the main advantage of multiprogramming?b how does the distinction between the monitor mode and user

  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.

  Find journals in the field of project management after you

find journals in the field of project management after you have found them examine them to determine1. what type of

  Performance of a computer

Set-up a paper describing with some detail the following topics of computer processing: Each of the twenty items listed should be adequately addressed.

  Threads

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

  Question 1a give three technical merits of unixb

question 1a give three technical merits of unix.b differentiate between clustered systems and real-time systems.c

  Creating program with a gui in vb.net

Create a program with a Graphical User Interface in VB.Net. Create it so that the user can input the amount and term of the mortgage as well as the interest rate.

  Management has asked you to create a report

Management has asked you to create a report that details how the windows 7 operating system works. describe the fundamental and generic components of the OS. discuss how the os would handel the following, process and threads, memory management, pr..

  Understanding networking concepts

Determine some of the issues facing AT&T as they try to integrate multiple services to deliver to the consumer? What impact does competition play?

  Categorize the efficiency in terms

Consider the followimg nested loop contruct. Categorize the efficiency in terms of the variable n using "big-O" notation. Suppose the statements represented by the elipsis

  Operating system interfaces questions

Select one of the programs that comes with Vista in which you think your classmates would be interested. Determine what does the program do?

  Effectiveness of online security

Six months ago a toy corporation started to sell their items on the internet. Over this time period traffic to the website has raised substantially but few consumers have made online purchases.

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