Browse Prior Art Database

System Stack for System Code

IP.com Disclosure Number: IPCOM000115880D
Original Publication Date: 1995-Jul-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 2 page(s) / 31K

Publishing Venue

IBM

Related People

Jones, ST: AUTHOR

Abstract

Disclosed is the allocation of a separate System Stack to be used for all System Code. Whenever a transition is made between system code and user code, the stack is similarly switched between the System Stack and the User Stack.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 100% of the total text.

System Stack for System Code

      Disclosed is the allocation of a separate System Stack to be
used for all System Code.  Whenever a transition is made between
system code and user code, the stack is similarly switched between
the System Stack and the User Stack.

      Without this feature, in systems allowing user code and system
code to call each other recursively, problems may arise when user
code assumes that its original stack is available through all
recursions, while system code expects to be able to reallocate the
stack when system requirements increase.  When a single base,
address, or selector is used by user code to reference both stack and
data, data corruption can occur.

      With this feature, the System Stack only needs to be allocated
once for each thread of execution and reused for all code executed by
that thread.  The current top-of-stack pointers for both stacks are
maintained in a reserved region of the System Stack, avoiding
multiple
memory allocations.  Since the User Stack is always used for user
code,
the assumptions of the user stack are always true.  Since the System
Stack is reserved for the use of System code, these assumptions
cannot
be violated.