Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Stack
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2289
Location: near Augsburg, Germany

PostPosted: Thu May 08, 2008 5:25 pm    Post subject: Stack Reply with quote

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
View user's profile Send private message
Cyker
Veteran
Veteran


Joined: 15 Jun 2006
Posts: 1746

PostPosted: Thu May 08, 2008 8:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9932
Location: almost Mile High in the USA

PostPosted: Fri May 09, 2008 12:07 am    Post subject: Reply with quote

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
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2289
Location: near Augsburg, Germany

PostPosted: Fri May 09, 2008 5:34 am    Post subject: Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9932
Location: almost Mile High in the USA

PostPosted: Fri May 09, 2008 9:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum