JPS63172346A - Stack allocating method - Google Patents

Stack allocating method

Info

Publication number
JPS63172346A
JPS63172346A JP322487A JP322487A JPS63172346A JP S63172346 A JPS63172346 A JP S63172346A JP 322487 A JP322487 A JP 322487A JP 322487 A JP322487 A JP 322487A JP S63172346 A JPS63172346 A JP S63172346A
Authority
JP
Japan
Prior art keywords
task
stack
size
memory
started
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP322487A
Other languages
Japanese (ja)
Inventor
Tomoaki Nakamura
智明 中村
Shigenori Kaneko
茂則 金子
Setsuo Kawakami
節雄 河上
Shuji Nishiyama
修治 西山
Toshiaki Akita
秋田 敏明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP322487A priority Critical patent/JPS63172346A/en
Publication of JPS63172346A publication Critical patent/JPS63172346A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Abstract

PURPOSE:To effectively utilize a memory by setting previously the initial value of a proper stack size at a table updating the initial value with the value added with the stack extension value when a stack extension request is produced and at the same time allocating the stacks by the number equal to the size stored in a corresponding table when a task is started. CONSTITUTION:An operating system OS searches a task execution waiting list to decide a desired task and starts this task. In this case, a physical memory is secured for the stack allocation size l stored in a control table TCB and a mapping task is carried out to a logic space. If the stacks run short in an execution mode, the OS secures a physical memory to the short staks and has a mapping task to a logical space. Then the extended size (m) is added to the size l in the TCB. When a task is through and set under an execution enable state, the task is registered again into the task execution waiting list. Then a stack physical memory having a size (l-m) changed when the task is started in the preceding time is secured when a task is started by the OS.

Description

【発明の詳細な説明】 (産業上の利用分野〕 本発明は、仮想記憶方式の計算機システムにおいて、作
業用のスタックエリアを各タスクへ割り当てるためのス
タック割当方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a stack allocation method for allocating a working stack area to each task in a virtual memory computer system.

(従来の技術〕 仮想記憶方式の計算機システムでタスクを実行する場合
には、まずそのタス・りの起動時にO8(オペレーティ
ングシステム)によってテキストやデータが磁気ディス
ク装置から主メモリにロードされ更にワークエリアとし
てのスタックエリアも主メモリ上に割当られる。このス
タックエリアの割当方法としては、例えば特開昭60−
27963に開示されているように、タスク実行中の必
要な時にスタックエリアの拡張を要求する方法と、タス
ク起動時に必要なスタックエリアをあらかじめ確保して
おく方法とがあった。
(Prior art) When a task is executed in a virtual memory computer system, text and data are first loaded from the magnetic disk device into the main memory by the O8 (operating system) when the task is started, and then loaded into the work area. A stack area is also allocated on the main memory.As a method of allocating this stack area, for example,
As disclosed in No. 27963, there is a method of requesting expansion of the stack area when necessary during task execution, and a method of securing the necessary stack area in advance when starting a task.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記の従来技術は、システムのオーバーヘッドとメモリ
の効率的利用について問題があった0例えば前者の、タ
スク実行中にダイナミックにスタックを拡張する方法で
は、スタック拡張のたびにO8処理が介在することにな
るため、オーバーヘッドの増加はさけられない、また後
者の、タスク起動時に必要サイズ分のスタックを割当て
る方法の場合には、実行時にスタック領域が欠乏するこ
とを防ぐため、必要以上にスタックを割当てることにな
り、メモリの利用効率が低下する0手計算やシュミレー
ション等により最適スタックサイズを割り出すこともで
きるが、それには大きな手間がかかる。
The above conventional techniques had problems with system overhead and efficient use of memory. For example, in the former method of dynamically expanding the stack during task execution, O8 processing intervenes every time the stack is expanded. Therefore, an increase in overhead cannot be avoided.In addition, in the case of the latter method of allocating a stack of the required size when starting a task, in order to prevent the stack area from running out during execution, it is necessary to allocate more stacks than necessary. Although it is possible to determine the optimal stack size by manual calculation or simulation, which reduces memory usage efficiency, it takes a lot of effort.

本発明の目的は、オーバーヘッドの増大がなくかつ、メ
モリの効率的利用を実現できるスタック割当方法を提供
するにある。
An object of the present invention is to provide a stack allocation method that does not increase overhead and can realize efficient memory usage.

〔問題点を解決するための手段〕[Means for solving problems]

上記の目的は、スタックサイズを記憶するためのテーブ
ルを各タスクに対して設け、このテーブルにはメモリの
無駄とならない程度の適当なスタックサイズの初期値を
セットしておき、タスク実行時にスタック拡張要求が発
生したときにはその時拡張した分をこのテーブルに格納
されていたサイズに加えた値へとテーブル内容を更新す
るとともに、タスク起動時には、起動されるタスク対応
のテーブルに格納されているサイズ分だけスタックを割
当てることにより達成される。
The purpose of the above is to create a table for each task to store the stack size, set an appropriate initial value for the stack size in this table so as not to waste memory, and then expand the stack when the task is executed. When a request occurs, the table contents are updated to a value that adds the amount expanded at that time to the size stored in this table, and when a task is started, only the size stored in the table corresponding to the task being started is updated. This is accomplished by allocating a stack.

〔作用〕[Effect]

タスク起動時に割当てられるスタックサイズは、前回ま
でのタスク動作時に必要としたスタックの最大サイズと
なっているため、タスク動作中にスタック拡張要求が発
生する確率は、当然小さくなり、スタック拡張に伴うオ
ーバヘッドの増大がさけられる。また、タスク起動時に
割当てられるスタックサイズは、前回までのタスク動作
時に実際に必要とした大きさであるから不必要に大きな
サイズのスタックを割当てることがなく、メモリの効率
的利用が保証される。
The stack size allocated at task startup is the maximum stack size required during the previous task operation, so the probability that a stack expansion request will occur during task operation is naturally small, and the overhead associated with stack expansion is reduced. This will prevent an increase in Furthermore, since the stack size allocated at the time of starting a task is the size actually required during the previous task operation, an unnecessarily large stack size is not allocated, and efficient use of memory is guaranteed.

〔実施例〕〔Example〕

以下に本発明の一実施例を説明する。第4図は、本発明
の方法が適用される計算機システム1の例を示すもので
ある。中央処理族[4はメモリ管理袋!!5.メモリバ
ス3を通して主メモリ6と接続され、またシステムバス
2を通してI10管理装W17に接続されている。O8
及び各タスクは、工10管理装置7に接続された1図示
しないディスク等の2次記憶装置に格納され、立ち上げ
時、あるいは必要に応じて主メモリ6上にロードされる
An embodiment of the present invention will be described below. FIG. 4 shows an example of a computer system 1 to which the method of the present invention is applied. Central processing group [4 is the memory management bag! ! 5. It is connected to the main memory 6 through the memory bus 3, and to the I10 management unit W17 through the system bus 2. O8
and each task are stored in a secondary storage device such as a disk (not shown) connected to the management device 7 of the system 10, and loaded onto the main memory 6 at startup or as needed.

O8及びタスクは中央処理装置4で実行されるが、主メ
モリ6へのアクセスは、すべてメモリ管理装置2!5を
通じて、論理空間で行なわれる。
O8 and tasks are executed by the central processing unit 4, but all accesses to the main memory 6 are performed in logical space through the memory management units 2!5.

第5図は、メモリ管理装置5により管理される論理空間
と物理メモリの関係を示した図である。
FIG. 5 is a diagram showing the relationship between the logical space managed by the memory management device 5 and physical memory.

論理空間には、その時実行中のタスク(図ではタスク1
)及びO8のエリアが物理メモリとマツピングされる。
In the logical space, the task currently being executed (task 1 in the figure) is displayed.
) and O8 areas are mapped to physical memory.

タスクはユーザ領域としてテキストエリアTI、データ
エリアD1.スタックエリアS1の3つのエリアに分割
される。タスク1が終了してタスク2が待機中となり、
次いでO8によりタスク2が起動され実行中となると、
タスク2のテキスト、データ、スタックエリアが論理空
間とマツピングされる。ただしスタックエリアのマツピ
ングは、物理メモリへのスタックエリアの割り当てであ
って、これは後に詳しくのべる。また論理空間のユーザ
領域は、タスクのスイッチングのたびに別々の物理メモ
リのエリアにマツピングされるが、O8領域だけは常に
物理メモリの固定エリア(OSエリア)にマツピングさ
れる。これは論理空間や物理メモリ、全タスクの制御を
O8が行なう上で、必要である。
The task has text area TI, data area D1 . The stack area S1 is divided into three areas. Task 1 has finished and task 2 is waiting.
Next, when task 2 is activated by O8 and is running,
The text, data, and stack area of Task 2 are mapped to the logical space. However, stack area mapping is the allocation of the stack area to physical memory, which will be discussed in detail later. Furthermore, the user area of the logical space is mapped to a separate area of the physical memory each time a task is switched, but the O8 area is always mapped to a fixed area (OS area) of the physical memory. This is necessary for O8 to control logical space, physical memory, and all tasks.

第6図は、メモリ管理装置5による論理アドレスから物
理アドレスへのアドレス変換方法を示す図である。これ
は仮想記憶方式におけるメモリアクセスのごく普通の方
法であって、命令のアドレス部はすべて論理アドレスで
かかれている。この論理アドレスの空間は通常4Mバイ
トのセグメントに分割され、更に各セグメントは4にバ
イトのページに分割されている。主メモリ上にはセグメ
ントテーブル及びページテーブルが置かれ、これらのテ
ーブルは、論理アドレスと主メモリ上の物理アドレスと
の対応を示しており、メモリ管理装置5はこれらのテー
ブルを参照して論理アドレスを物理アドレスに変換して
主メモリへのアドレスを実行する。
FIG. 6 is a diagram showing a method of converting an address from a logical address to a physical address by the memory management device 5. This is a very common method of memory access in virtual memory systems, and the address part of an instruction is all written as a logical address. This logical address space is typically divided into 4 Mbyte segments, and each segment is further divided into 4 byte pages. A segment table and a page table are placed on the main memory, and these tables show the correspondence between logical addresses and physical addresses on the main memory, and the memory management device 5 refers to these tables to determine the logical address. Converts to a physical address and executes the address to main memory.

第7図は、タスクの状態遷移を示した図である。FIG. 7 is a diagram showing the state transition of tasks.

新しいタスクまたは未登録状態のタスクはタスク生成マ
クロにより生成され休止中となる。この状態では、第2
図に示すタスク管理テーブル(TCB )が確保され、
タスク生成マクロで指定したタスク番号が設定され、タ
スク状態は休止中となり、スタック割当サイズは、後述
の初期割当サイズ(例えば2ページ)が設定される。
A new task or an unregistered task is generated by a task generation macro and becomes dormant. In this state, the second
The task management table (TCB) shown in the figure is secured,
The task number specified by the task generation macro is set, the task status becomes inactive, and the stack allocation size is set to the initial allocation size (for example, 2 pages), which will be described later.

タスク休止状態のタスクはTCBが生成されただけで、
未だ物理メモリ上にテキストエリアやデータエリアがロ
ーディングされていない、タスク休止解除マクロにより
タスクが実行可能状態となると、第5図で説明したよう
に物理メモリ上にエリアが確保され、補助記憶装置より
テキスト、データがローディングされる。
A task in a dormant state only has a TCB generated,
When a task becomes executable by the task suspend release macro and the text area or data area has not yet been loaded on the physical memory, an area is secured on the physical memory as explained in Figure 5, and the area is read from the auxiliary storage device. Text and data are loaded.

実行可能状態のタスクはテキストエリア、データエリア
が主メモリ上にローディングされているので、いつでも
動作可能の状態にあるが、O8のスケジューリング対象
外なので、このままでは起動がかかることはない。タス
クを実行させるには、第8図に示したタスク実行待ちリ
スト(後述)にTCB′&登録させる必要がある。ここ
でタスクははじめてoSのスケジューリングの対象とな
り。
A task in an executable state has a text area and a data area loaded into the main memory, so it is ready to operate at any time, but since it is not subject to O8 scheduling, it will not be started as it is. In order to execute a task, it is necessary to register the TCB'& in the task execution waiting list (described later) shown in FIG. Here, the task becomes the target of OS scheduling for the first time.

実行中あるいは待機中の状態となる。実行中とは中央処
理袋fit (CPU)の時間が割り当てられ。
It is in the running or waiting state. During execution, the central processing unit (CPU) time is allocated.

実際に命令の実行を行なっている状態であり、待機中と
は、CPU時間の占有が一定時間以上となり、他のタス
クにCPUがあけわたされた時などの、スケジューリン
グ待ちとなっている状態を示す。
This is the state in which instructions are actually being executed. Waiting refers to the state in which the CPU is waiting for scheduling, such as when the CPU time has been occupied for more than a certain period of time and the CPU has been given over to another task. show.

なお、タスクにスタック用物理メモリが割りつけられる
のは、タスクに最初に起動がかかった時であり、その後
タスクが終了あるいは強制終了し実行可能あるいは休止
中の状態になるまで、解放されない、またタスクが終了
あるいは強制終了すれば、実行待ちリストからTCBが
はずされる。
Note that stack physical memory is allocated to a task when the task is first started, and is not released until the task is terminated or forcibly terminated and becomes executable or dormant. When the task is completed or forcibly terminated, the TCB is removed from the waiting list.

ただしこの場合でもタスク削除されない限りTCBその
ものは消滅しない。
However, even in this case, the TCB itself does not disappear unless the task is deleted.

第2図及び第8図にTCB及びタスク実行待ちリストの
構成を示す、TCBはタスクが生成され。
FIG. 2 and FIG. 8 show the configuration of the TCB and the task execution waiting list.

休止中になる時に作成され、以降タスクが削除されるま
で保存される。TCB内のタスク実行待ちポインタはタ
スク実行待ちリストに登録する際に使用され、タスク状
態フラグは第7図で示したタスク状態を記憶するために
使用される。スタック割当サイズは1本特許の中心とな
るものであり、タスク起動の際に確保するスタック用物
理メモリの容量を憶えておくためのものである。
It is created when the task goes dormant and is saved until the task is deleted. The task execution waiting pointer in the TCB is used when registering a task to the execution waiting list, and the task status flag is used to store the task status shown in FIG. The stack allocation size is the central feature of this patent, and is used to remember the capacity of physical stack memory to be secured when starting a task.

タスク実行待ちリストは、O8により起動すべきタスク
を取り出すために使用される。なおタスク実行待ちポイ
ンタは優先レベルの数だけ存在し。
The task execution waiting list is used by the O8 to retrieve tasks to be activated. Note that there are as many task execution wait pointers as there are priority levels.

それぞれの優先レベルごとに各TCBをつなげている。Each TCB is connected for each priority level.

以上の説明をもとに本発明のスタック割当て方法の概略
動作を第3図により説明する。O8はタスク実行待ちリ
ストをサーチし、起動すべきタスクを決定し、タスク起
動を行なうが、゛同図(1)のように、その際TCB内
に格納されているスタック割当サイズlの物理メモリを
確保し、論理空間とのマツピングを行なう、ここでタス
ク生成後、最初のタスク起動の場合であれば、TCB内
のスタック割当サイズは、初期割当サイズとなっており
、既に一度以上実行されていれば、前回までに使用した
最大スタックサイズとなっている。
Based on the above explanation, the general operation of the stack allocation method of the present invention will be explained with reference to FIG. The O8 searches the task execution waiting list, determines the task to be started, and starts the task. At that time, as shown in (1) in the same figure, the physical memory of the stack allocation size l stored in the TCB is If this is the first time the task is activated after task generation, the stack allocation size in the TCB is the initial allocation size, and if the task has already been executed at least once, If so, it is the maximum stack size used up to the previous time.

さて、このタスクが起動され、実行中にスタックが不足
した場合には、第3図(2)のように、O8は不足した
分のスタックに対亥る物理メモリを確保し、論理空間と
マツピングする。そしてTCB内のスタック割当てサイ
ズlに、拡張したサイズmを加える。その結果、第3図
(3)のようなスタック割当てサイズはl+mとなる。
Now, when this task is started and there is a shortage of stacks during execution, as shown in Figure 3 (2), O8 secures physical memory for the missing stack and performs logical space and mapping. do. Then, the expanded size m is added to the stack allocation size l in the TCB. As a result, the stack allocation size as shown in FIG. 3(3) becomes l+m.

タスクが終了し、実行可能状態となってから。After the task has finished and is ready to run.

再びタスク実行待ちリストに登録され、O8によりタス
クが起動される場合は、前回タスク動作時に変更された
値1+mサイズのスタック用物理メモリが確保される。
When the task is registered in the task execution waiting list again and the task is activated by O8, a physical memory for the stack of the value 1+m size that was changed during the previous task operation is secured.

なお、実際にはタスクが暴走するなどして、スタックを
無限に拡張する場合もありうるが、その場合は異常と見
なし、タスクを強制終了させるとともに、TCB内のス
タック割当サイズを初期割当サイズに戻す操作を行なっ
てスタック割当サイズが不当に増えないようにしている
In reality, there may be cases where a task goes out of control and expands the stack infinitely, but in that case, it is considered an abnormality, the task is forcibly terminated, and the stack allocation size in the TCB is set to the initial allocation size. This operation is performed to prevent the stack allocation size from increasing unreasonably.

第1A図〜第1D図は1本発明の方法を実現するための
O8処理の一実施例を示すフローチャートである。まず
第1A図はタスク起動時におけるO8の処理内容であっ
て、ステップ101では第8図に示したタスク実行待ち
リストより優先レベルが最高のタスクを取り出す6次の
ステップ102では、取り出したタスクのテキスト部及
びデータ部の論理空間を、第5図で示したように物理空
間にマツピングする0次にステップ103では、TCB
内のスタック割当てサイズlの分だけスタック用物理メ
モリを確保し、論理空間とマツピングする。ここで1の
値は前述のように、タスクの初期始動時、または何らか
の異常発生でリセットされたときは、その初期値にセッ
トされておりタスクが正常に使用されて拡張されたとき
は、後述のようにその拡張分も含めたサイズになってい
る。
FIGS. 1A to 1D are flowcharts showing one embodiment of the O8 process for implementing the method of the present invention. First, FIG. 1A shows the processing content of O8 at the time of task activation. In step 101, the task with the highest priority level is extracted from the task execution waiting list shown in FIG. 8. In the next step 102, the extracted task is In step 103, the logical space of the text part and the data part is mapped to the physical space as shown in FIG.
The physical memory for the stack is secured for the stack allocation size l in the stack allocation size l, and is mapped with the logical space. As mentioned above, the value of 1 is set to the initial value when the task is initially started or when it is reset due to some abnormal occurrence, and when the task is normally used and expanded, it is set to the initial value as described later. The size includes the expansion, as shown in the figure.

こうしてスタックが確保されると、ステップ104でタ
スクが起動される。
Once the stack is secured in this way, a task is activated in step 104.

第1B図はスタック拡張要求発生時のO8処理内容であ
って、ステップ111では拡張するサイズmだけスタッ
ク用物理メモリを新たに確保し、これの論理空間とのマ
ツピングを行う、ステップ112では今増やした分mだ
け、TCB内のスタック割当てサイズを増やし、l+m
とする。こうしてステップ113でタスクを再開する。
Figure 1B shows the content of O8 processing when a stack expansion request occurs. In step 111, a new physical memory for the stack is secured by the size m to be expanded, and this is mapped with the logical space. In step 112, the memory for the stack is Increase the stack allocation size in the TCB by m, and l+m
shall be. The task is thus restarted in step 113.

次に第1C図はタスク強制終了時のO8の処理内容であ
って、タスク7の強制終了が行われるときには、何らか
の異常でタスクが暴走しており、スタックエリアが大幅
にかつ不必要に拡大されてしまっている可能性があるか
ら、このときはまずステップ121でTCB内のスタッ
ク割当てサイズを初期値へ戻しておく、そしてステップ
122でTCB内のタスク状態を休止中として、ステッ
プ123でタスクを終了させる。
Next, FIG. 1C shows the processing content of O8 when a task is forcibly terminated. When task 7 is forcibly terminated, the task has runaway due to some abnormality, and the stack area has been expanded significantly and unnecessarily. In this case, first return the stack allocation size in the TCB to its initial value in step 121, set the task status in the TCB to dormant in step 122, and then set the task in step 123 to the initial value. Terminate it.

第1D図はタスク正常終了時のO8の処理内容であって
、このときはステップ131でTCBのタスク状態を実
行可能とし、ステップ132でタスクを終了させる。
FIG. 1D shows the processing contents of O8 when the task is normally completed. In this case, the task state of the TCB is made executable in step 131, and the task is ended in step 132.

第9図は、同一タスクで本方法によるスタック割当の場
合と、実行時にダイナミックにスタックを拡張する場合
に関して、タスク起動ごとのスタック拡張要求発生回数
の平均をグラフ化したものである。なお、スタック拡張
要求発生回数は、動的スタック割当の場合を1.0 と
して正規化している。この図より、本方式ではタスクの
初期起動からある程度時間が経過するとほとんどスタッ
ク拡張要求が発生せず、ダイナミックにスタックを拡張
する場合に比べ、スタック拡張のオーバヘッドの大巾削
減が計れることを示している。
FIG. 9 is a graph of the average number of times stack expansion requests are generated for each task activation in the case of stack allocation using this method for the same task and in the case of dynamically expanding the stack during execution. Note that the number of stack expansion requests generated is normalized to 1.0 in the case of dynamic stack allocation. This figure shows that in this method, stack expansion requests are hardly generated after a certain amount of time has passed after the initial startup of a task, and the overhead of stack expansion can be significantly reduced compared to the case where the stack is expanded dynamically. There is.

以上のように、タスク実行時に必要としたスタックサイ
ズをTCB内のスタック割当サイズにフィードバックす
ることにより、タスク起動時の最適なスタック割当てを
実現できる。
As described above, by feeding back the stack size required at the time of task execution to the stack allocation size in the TCB, it is possible to realize optimal stack allocation at the time of task activation.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、タスクの実行に必要最低限のスタック
をタスク起動時に割り当てることができるので、スタッ
ク拡張時に発生するオーバヘッドの削減及びメモリの効
率的利用を実現できるという効果がある。
According to the present invention, since the minimum stack required for executing a task can be allocated at the time of task activation, it is possible to reduce the overhead that occurs when expanding the stack and to make efficient use of memory.

【図面の簡単な説明】[Brief explanation of the drawing]

第1A図〜第1D図は本発明の方法を実現するO8処理
の一実施例を示すフローチャート、第2図はタスク管理
テーブルの構成を示す図、第3図は本発明の方法の概略
動作を示す図、第4図は本発明を適用するシステムの構
成例を示す図、第5図は論理空間と物理メモリの関係を
示す図、第6図は論理アドレスから物理アドレスへのア
ドレス変換方法の説明図、第7図はタスクの状態遷移図
。 第8図はタスク実行待ちリストを示す図、第9′図は本
発明の方法と従来のダイナミック割当て、の場合の動作
比較図である。 4・・・中央処理装置、5・・・メモリ管理装置、6・
・・主メモリ、7・・・I10管理装置。
Figures 1A to 1D are flowcharts showing an example of O8 processing that implements the method of the present invention, Figure 2 is a diagram showing the structure of a task management table, and Figure 3 is a schematic diagram of the operation of the method of the present invention. 4 is a diagram showing a configuration example of a system to which the present invention is applied, FIG. 5 is a diagram showing the relationship between logical space and physical memory, and FIG. 6 is a diagram showing an address conversion method from a logical address to a physical address. The explanatory diagram, FIG. 7, is a state transition diagram of a task. FIG. 8 is a diagram showing a task execution waiting list, and FIG. 9' is a diagram comparing operations between the method of the present invention and conventional dynamic allocation. 4...Central processing unit, 5...Memory management device, 6.
...Main memory, 7...I10 management device.

Claims (1)

【特許請求の範囲】[Claims] 1、仮装記憶方式を用いた計算機システムで実行される
各タスクを管理するための各タスク対応のタスク管理テ
ーブルに、当該タスクで使用するスタックのサイズを表
わす欄としてのスタック割当サイズを設けるとともに、
タスクの生成時またはタスク強制終了時には対応する上
記スタック割当サイズに予め定めた初期値をセットし、
スタック拡張要求が発生した時には対応する上記スタッ
ク割当サイズに拡張した後のスタックサイズをセットし
、タスク起動時には当該タスクに対応する上記スタック
割当サイズ分のスタックエリアを物理空間上に確保しこ
れを論理空間とマッピングしたのち当該タスクを起動す
るようにしたことを特徴とするスタック割当方法。
1. In a task management table corresponding to each task for managing each task executed in a computer system using a virtual storage method, a stack allocation size is provided as a column representing the size of the stack used in the task, and
When creating a task or forcibly terminating a task, set a predetermined initial value to the corresponding stack allocation size,
When a stack expansion request occurs, the stack size after expanding to the corresponding stack allocation size is set, and when a task is started, a stack area corresponding to the above stack allocation size corresponding to the task is secured in physical space and this is logically A stack allocation method characterized in that the task is started after being mapped to a space.
JP322487A 1987-01-12 1987-01-12 Stack allocating method Pending JPS63172346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP322487A JPS63172346A (en) 1987-01-12 1987-01-12 Stack allocating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP322487A JPS63172346A (en) 1987-01-12 1987-01-12 Stack allocating method

Publications (1)

Publication Number Publication Date
JPS63172346A true JPS63172346A (en) 1988-07-16

Family

ID=11551475

Family Applications (1)

Application Number Title Priority Date Filing Date
JP322487A Pending JPS63172346A (en) 1987-01-12 1987-01-12 Stack allocating method

Country Status (1)

Country Link
JP (1) JPS63172346A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134748A (en) * 2008-12-05 2010-06-17 Fuji Xerox Co Ltd Image processing apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010134748A (en) * 2008-12-05 2010-06-17 Fuji Xerox Co Ltd Image processing apparatus

Similar Documents

Publication Publication Date Title
JP2003167737A (en) Stack use method
JPH08129457A (en) Method and apparatus for expansion,reduction and redistribution of external storage structure
JP3226525B2 (en) Main memory management method
JPS63172346A (en) Stack allocating method
EP0223463A2 (en) Multiprocessor data processing system
JP3163196B2 (en) Instruction interruption information storage control method in virtual storage control
JPH03141442A (en) Task control system
JP2001229053A (en) Computer with dump acquiring mechanism
JP3013742B2 (en) Cache memory management method
JP2003248620A (en) Dynamic memory managing method and dynamic memory management information processing device
JPS583177A (en) Data processing system
JP2002259201A (en) Method for starting computer system
JP2000347939A (en) System and method for managing memory
JP3022829B2 (en) Automatic storage device allocation device
JPH076045A (en) Memory managing method of multi-processing system
JPH10507548A (en) Data processing systems and methods and communication systems with such systems
JPH0521256B2 (en)
JP3542894B2 (en) File system
JPH07182298A (en) Method and device for processing information
JPS63109555A (en) Dynamic conversion system for virtual storage space size
JPS63113739A (en) Overlay system for os
JPH02178747A (en) Memory control system for virtual storage computer system
JPH01297740A (en) File recall system
JPH02129724A (en) Program executing system
JPS61150051A (en) Page assignment control system