How to program a queue

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pepito

How to program a queue

Post by pepito »

I begin the programming of the "I/O System" and I need to program a 'queue' for each I/O device. How could I to program such queues?

Thank you,

pepito
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

RE:How to program a queue

Post by df »

ask yourself this,

what is the difference between a queue, a stack and a linked list?

what is FIFO and what is LIFO?

if you have got to the point of doing an IO sub system, surley you can handle a queue....
-- Stu --
VoidLogic

RE:How to program a queue

Post by VoidLogic »

Maybe you should take Computer Programming 1 or read somthing like it before begining this. Go to the AP test web site and look at APvector.h/cpp, APqueue.h/cpp etc. Also, a linked list is simply using pointers to so that you can have dynamic arrays, you want to be using an upper level lang to do these things. You can always write it, compile, convert to ASM, then hand optimize, then recompile, if you are concerned about speed.
Post Reply