LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 02-28-2007, 05:01 AM   #1
manas_sem
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
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
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.
 
  


Reply


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 12:37 PM.

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