Browse Prior Art Database

Stack Management for a Multitasking Operating System Written As a PASCAL Program

IP.com Disclosure Number: IPCOM000060307D
Original Publication Date: 1986-Mar-01
Included in the Prior Art Database: 2005-Mar-08
Document File: 3 page(s) / 38K

Publishing Venue

IBM

Related People

Ebrahimi, M: AUTHOR [+4]

Abstract

Multitasking is managed in an operating system written in PASCAL by taking stacks out of the heap and adjusting the variables used by PASCAL for checking stack overflow. More particularly, a method is described for managing stacks in an environment in which the Disk Operating System (DOS) of the IBM Personal Computer (PC) is augmented to support multitasking. Specifically, consider PASCAL as the implementation language of such an operating system, a general view of which is shown in the figure. In the figure, DOS and the DOS-Extension comprise the operating system which supports multitasking. The DOS-Extension is written in PASCAL, and thus the runtime environment consists of executable code, a heap, a stack, data, and constants. The heap and the stack grow in opposite directions.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 3

Stack Management for a Multitasking Operating System Written As a PASCAL Program

Multitasking is managed in an operating system written in PASCAL by taking stacks out of the heap and adjusting the variables used by PASCAL for checking stack overflow. More particularly, a method is described for managing stacks in an environment in which the Disk Operating System (DOS) of the IBM Personal Computer (PC) is augmented to support multitasking. Specifically, consider PASCAL as the implementation language of such an operating system, a general view of which is shown in the figure. In the figure, DOS and the DOS-Extension comprise the operating system which supports multitasking. The DOS-Extension is written in PASCAL, and thus the runtime environment consists of executable code, a heap, a stack, data, and constants. The heap and the stack grow in opposite directions. A stack overflow condition exists when the stack runs into the heap. All requests for operating system functions go through the process interface module (see the figure). This module has one basic function: making the low-level considerations of such a request transparent to the requesting process. The mechanism for providing such transparency is unimportant here. However, a necessary condition for dealing with such a request is to switch from the process environment to that of the operating system. Switching to the operating system environment means making its code, heap, stack, data, and constants addressable. However, before this can be done, the state of the requesting process has to be saved. Similarly, upon completion of the requested function, the state needs to be restored. Restoring a process state under such circumstances may be viewed as switching back to its environment. A system function is said to run on the thread of a process if it is invoked by that process and using the environment switching protocol as described above. Each system function running on the thread of a process places data on the stack....