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

  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