Solved

Simulation of an airport using Queues (C language)

Posted on 2008-10-19
4
3,344 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I recover data from my iphone 3g 4 54
Using unmanaged DLL from managed application 14 290
Handling string inputs in C/Linux 23 179
Passing a array as parameter - C 2 84
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
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…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

912 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now