View previous topic :: View next topic |
Author |
Message |
Keruskerfuerst Advocate


Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
Posted: Thu May 08, 2008 5:25 pm Post subject: Stack |
|
|
Is the stack in kernel (stack for buffering commands)
a stack= FILO (First In Last Out)
or a row= FIFO (First In First Out)? |
|
Back to top |
|
 |
Cyker Veteran

Joined: 15 Jun 2006 Posts: 1746
|
Posted: Thu May 08, 2008 8:58 pm Post subject: |
|
|
Well, if it's called a stack and not a queue or a buffer, I'd assume that it's a stack!
Admittedly I'm not sure which command stack/buffer/queue you're referring to... and know very little about kernel internals anyway come to think of it... erm... |
|
Back to top |
|
 |
eccerr0r Watchman

Joined: 01 Jul 2004 Posts: 9932 Location: almost Mile High in the USA
|
Posted: Fri May 09, 2008 12:07 am Post subject: |
|
|
There are lots of queues and stacks in the system, so it would help to tell which one.
There is the "TCP/IP" stack, that really is a stack where data has to go through several "layers" to get to the wire, and data from the wire has to go "up" back to the application program. This one probably can be put on the "ambiguous" list though. Then of course the "Call stack" where it's a true stack, so programs/functions/... that finish can go back to their parent process/procedure/...
There are multiple "queues" like the "run queue" where usually first onto the queue will be first to be executed, minus some priority changes. The CFQ disk queuing system also normally treats disk accesses first in, first served; but allows reordering to maximize the throughput of all processes.
I've usually heard stacks called "LIFO" for Last In, First Out not "FILO"... and FIFO "rows" are normally called "queues"... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
 |
Keruskerfuerst Advocate


Joined: 01 Feb 2006 Posts: 2289 Location: near Augsburg, Germany
|
Posted: Fri May 09, 2008 5:34 am Post subject: |
|
|
I have meant "stack" for buffering program functions.
In my opinion it should be a queue, FIFO (=First In First Out).
FILO and LIFO are equal, if you think a bit. |
|
Back to top |
|
 |
eccerr0r Watchman

Joined: 01 Jul 2004 Posts: 9932 Location: almost Mile High in the USA
|
Posted: Fri May 09, 2008 9:45 pm Post subject: |
|
|
Oh, I just had a technicality point that most people call stacks LIFO versus FILO as it describes what comes out first, similar to of FIFO (and it not being abbreviated LILO, which is yet another confusion point
I'm still not too clear what you mean by "buffering program functions", do you mean function calls as the processor runs through a particular code sequence? Function calls are a true stack so that the last called program can grab its parent data (as it's next to come off the stack.) _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
 |
|