Page 1 of 1

How to program a queue

Posted: Tue Oct 07, 2003 11:00 pm
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

RE:How to program a queue

Posted: Tue Oct 07, 2003 11:00 pm
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....

RE:How to program a queue

Posted: Tue Oct 07, 2003 11:00 pm
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.