Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-28-2007, 05:01 AM   #1
LQ Newbie
Registered: Dec 2006
Posts: 29

Rep: Reputation: 15
giving separate stack space for each task

How to give separate stack space for each task while developing own OS.....
Old 03-01-2007, 04:48 PM   #2
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905Reputation: 905
I'm no OS designer, but I have done a fair amount of assembler programming on x86 architecture. The stack is just wherever the stack pointer points, so when you make a context switch, simply save the value of the stack pointer, and load the stack pointer with a saved value from the new context. Create new stack space for each process at the time the process is created. If you are doing the whole thing in a high level language, then I'm at a loss.

--- rod.
Old 03-01-2007, 05:34 PM   #3
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,547

Rep: Reputation: 160Reputation: 160
I agree with theNbomr. I will also add that the things you need to do depend on the processor. Stack pointer (if exists) is places in different places, is changed in a different ways and so on.

In general, you may see stack as an area of memory allocated when the task is created with an address written in such a place that push/pop-like operations work.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Live CD not giving itself much disk space veeruk101 Linux - Newbie 1 01-31-2007 10:22 AM
nfs mounted partition giving error "no space left" niranjan_mr Linux - Software 4 01-03-2007 06:01 AM
Looking for a tool to auto crop and separate images in to separate files.. mlsfit Linux - Software 2 08-06-2006 04:13 PM
while installation of linux its giving error like media failure/lack of disk space nagesh555 Linux - Hardware 1 02-12-2006 03:49 AM
Separate Partitions for Separate User groups volvic Slackware - Installation 2 09-16-2004 03:42 AM

All times are GMT -5. The time now is 10:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration