Solved

Simulation of an airport using Queues (C language)

Posted on 2008-10-19
4
3,437 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

738 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