Solved

Simulation of an airport using Queues (C language)

Posted on 2008-10-19
4
3,369 Views
Last Modified: 2012-05-05
HI.
I need directions how to develop a code using C language (Queues) which simulate the operation of an airport. I have to create two queues (1 for landing and 1 for taking off), to give the frequency of landing and takeing off....
Anyway...
Do you have any idea how to do it

Thanks
0
Comment
Question by:tsakyr
4 Comments
 
LVL 16

Expert Comment

by:Bryan Butler
ID: 22754815
Sounds like you need to create a FIFO linked list Q.  I guess you are restricted to C and an ansi compiler.  If so you'll have to write the linked list code.  Am I on the right track?
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 22754991
You would have a landing priority queue and a take off priority queue. In addition you would have an n number of runways that can be used for landing and take off.

You would take off one item from either landing or take off queue (depending on priority) and assign a runway to it. You must not have a runway assigned to more than one flight at a time. A single scheduler thread should be able to handle that. When a landing/take off has been completed, scheduler is indicated of the event and it schedules the next flight.

A thread per flight should make a reasonable simulation program.
0
 

Author Comment

by:tsakyr
ID: 22755423
thanks for help
0
 

Expert Comment

by:wolfmen
ID: 34291010
mee too
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
In desperate need of help 8 138
Convert image to byte array 8 203
C++ check and remove last word from a string 5 176
How to install SVN Command Line Client? 5 67
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

823 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question