Solved

Simulation of an airport using Queues (C language)

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them 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.

758 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

17 Experts available now in Live!

Get 1:1 Help Now