English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 30 January 2019, 10:06   #1
alpine9000
Registered User

 
Join Date: Mar 2016
Location: Australia
Posts: 643
Supervisor stack size?

So if I understand correctly, when you have an interrupt server it will be run in supervisor mode using the supervisor stack.

How big is the supervisor stack ? Is this documented anywhere ?
alpine9000 is offline  
Old 30 January 2019, 10:21   #2
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,377
You will find this info in SysStkUpper/SysStkLower fields in ExecBase.
meynaf is offline  
Old 30 January 2019, 10:49   #3
alpine9000
Registered User

 
Join Date: Mar 2016
Location: Australia
Posts: 643
Quote:
Originally Posted by meynaf View Post
You will find this info in SysStkUpper/SysStkLower fields in ExecBase.
Great thanks, is this configurable in a system friendly way?

Or would use switch to your own stack if you needed a bigger stack in a server?
alpine9000 is offline  
Old 30 January 2019, 11:39   #4
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,377
Quote:
Originally Posted by alpine9000 View Post
Great thanks, is this configurable in a system friendly way?
Moving the supervisor stack is possible, i even have code for doing it, but i wouldn't recommend doing that all the time...


Quote:
Originally Posted by alpine9000 View Post
Or would use switch to your own stack if you needed a bigger stack in a server?
Never did this, but it's in theory possible to use your own allocated stack.

However, normally the supervisor stack should be big enough. If you're doing heavy duty work it might be better to create a new task and send it some signal from the interrupt server.
meynaf is offline  
Old 30 January 2019, 15:00   #5
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 55
Quote:
Originally Posted by alpine9000 View Post
Great thanks, is this configurable in a system friendly way?
You can allocate a new supervisor stack - all provided you insert this information into execbase as otherwise graphics below v45 gets a hickup. However - what for? The supervisor stack is only needed for interrupt processing, and its default size of 6K is really large enough.
Quote:
Originally Posted by alpine9000 View Post
Or would use switch to your own stack if you needed a bigger stack in a server?
There is no "own supervisor stack", there is only "one supervisor stack". So I wonder - why do you think that the default size is not large enough? Note well, the supervisor stack is completely separate from the user stack which is separate for each task, and which has a size that is task-dependent and configurable individually, for example with the magic $STACK: cookie in the code hunk.
Thomas Richter is offline  
Old 30 January 2019, 15:33   #6
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,231
Quote:
Originally Posted by Thomas Richter View Post
... for example with the magic $STACK: cookie in the code hunk.
What's the exact format, and what versions of Kickstart support this?

I always felt that the managing the stack via the c:stack command and the program icon was a terrible solution.
Leffmann is offline  
Old 30 January 2019, 17:13   #7
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 842
Quote:
Originally Posted by Leffmann View Post
What's the exact format, and what versions of Kickstart support this?

I'd like to know, too.. Sounds interesting, don't think I ever heard that mentioned before..
hooverphonique is offline  
Old 30 January 2019, 18:05   #8
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,377
From what i know setting stack size this way requires at least kick 3.1.
I prefer using a pair of StackSwap() calls.
meynaf is offline  
Old 31 January 2019, 00:18   #9
alpine9000
Registered User

 
Join Date: Mar 2016
Location: Australia
Posts: 643
Quote:
Originally Posted by Thomas Richter View Post
You can allocate a new supervisor stack - all provided you insert this information into execbase as otherwise graphics below v45 gets a hickup. However - what for? The supervisor stack is only needed for interrupt processing, and its default size of 6K is really large enough.

There is no "own supervisor stack", there is only "one supervisor stack". So I wonder - why do you think that the default size is not large enough? Note well, the supervisor stack is completely separate from the user stack which is separate for each task, and which has a size that is task-dependent and configurable individually, for example with the magic $STACK: cookie in the code hunk.
Well I don't have an immediate specific need for something > 6k in mind, but games programmers are always pushing the boundaries of everything, so it's nice to know where the boundary is. As for "6K is really large enough", sounds a bit like another famous quote about ram size that also started with a 6 and ended with a K

I could imagine for example if you wanted to do a quick and dirty conversion of a non system friendly game, to make it system friendly that had it's main loop running out of the VBL and it used a lot of stack. Obviously there are other ways around it, but the OS provides a way of adding these interrupt servers, yet there are (unwritten?) rules about what you can do in them.

Last edited by alpine9000; 31 January 2019 at 07:10.
alpine9000 is offline  
Old 13 February 2019, 08:41   #10
Bruce Abbott
Registered User

Bruce Abbott's Avatar
 
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 133
Quote:
Originally Posted by Thomas Richter View Post
the user stack which is separate for each task, and which has a size that is task-dependent and configurable individually, for example with the magic $STACK: cookie in the code hunk.
I have not found this cookie in any executable. Is it an OS4 feature?
Bruce Abbott is offline  
Old 19 February 2019, 18:42   #11
Wepl
Moderator
Wepl's Avatar
 
Join Date: Nov 2001
Location: Germany
Posts: 684
AFAIK this is OS4 only.
Wepl is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving supervisor stack roondar Coders. Asm / Hardware 6 18 July 2017 18:13
Stack available mritter0 Coders. General 4 03 August 2014 19:31
TCP/IP Stack redneon Amiga scene 18 24 July 2005 17:01
Stack Up Galaxy request.Old Rare Games 5 08 September 2004 04:06
Who wants a stack of originals? FromWithin Games images which need to be WHDified 41 31 July 2003 10:31

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 On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:23.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07644 seconds with 15 queries