ECE222(2007Fall)Prog10(BaseToBombardiers)

ECE222(2007Fall)Prog10(BaseToBombardiers) - Fall 2007 ECE...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Fall 2007 ECE 222 System Programming Concepts 1 of 2 Lab 10 – Base to Bombardier In this lab, each student is to write a single program called prog10.c which creates and controls child processes . The program should use system calls such as fork() , wait() , execvp() to manage the processes and signal system calls to communicate between the processes. The parent process is the base and the child processes are bombers . Input The main program (base) accepts the following input: launch – Spawns another process (bomber). Each bomber begins with 10 bombs and 100 gallons of fuel. bomb id – Orders plane id to drop a bomb. refuel id – Refuels plane id fuel tank to 100 gallons. status – List the id ’s of all planes. quit – Exit the program. Invalid commands should produce a suitable error message. Operation All planes should execute the same code. Each plane should execute a simple loop counting fuel downward from 100 at a rate of 5 gallons/second. Every 3 seconds it
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 2

ECE222(2007Fall)Prog10(BaseToBombardiers) - Fall 2007 ECE...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online