JP3438056B2 - Shared memory management method - Google Patents

Shared memory management method

Info

Publication number
JP3438056B2
JP3438056B2 JP16012192A JP16012192A JP3438056B2 JP 3438056 B2 JP3438056 B2 JP 3438056B2 JP 16012192 A JP16012192 A JP 16012192A JP 16012192 A JP16012192 A JP 16012192A JP 3438056 B2 JP3438056 B2 JP 3438056B2
Authority
JP
Japan
Prior art keywords
job
task
memory
memory area
processing
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.)
Expired - Fee Related
Application number
JP16012192A
Other languages
Japanese (ja)
Other versions
JPH05334174A (en
Inventor
康英 佐藤
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.)
Kyocera Corp
Original Assignee
Kyocera Corp
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 Kyocera Corp filed Critical Kyocera Corp
Priority to JP16012192A priority Critical patent/JP3438056B2/en
Publication of JPH05334174A publication Critical patent/JPH05334174A/en
Application granted granted Critical
Publication of JP3438056B2 publication Critical patent/JP3438056B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】本発明は、複数のタスクでジョブ
を順次処理していくパイプライン方式を使用するマルチ
タスクシステムで、複数のタスク間で共用して使用され
る共用メモリ管理方式に関するものである。 【0002】 【従来技術】従来のメモリ管理方式はジョブを意識して
いないためメモリ領域解放要求があると、即座にメモリ
領域を解放していた為、タスクレベルでの後段タスクの
監視を行う必要がある。図3に従来の共用メモリ管理方
式の例1のブロック図を示す。複数のタスク1、タスク
2、ジョブ待ち行列3、ジョブ管理部4、メモリ管理部
5、メモリ領域6で構成される。 【0003】図3に示すシステムの状態は、タスク1で
ジョブ4を処理中、タスク2ではジョブ1を処理してい
る、ジョブ2、3はジョブ待ち行列3の中でタスク2の
処理を行うために待機中である。メモリ領域6のメモリ
ブロックAはタスク1でジョブ1の段階で確保された共
用メモリで、タスク2でジョブ1、ジョブ2、ジョブ3
を処理する場合に必要となる。 【0004】図3に示す従来の共用メモリ管理方式の例
1の方式は、タスク1がジョブ管理部4を通して後段タ
スク2のジョブ終了状態を監視することによってメモリ
領域解放要求を出す方法である。この場合タスク1はメ
モリ管理部5にメモリ領域解放要求を発行する前にジョ
ブ管理部4に対してタスク2での処理が何処まで終了し
たか問い合わせを行う。図3の状態の場合、タスク2は
現在ジョブ1を処理中であることが分かるためメモリ領
域解放を見合わせなければならない。このような監視を
ジョブ3が終了するまで行い、ジョブ3が終了したこと
を確認したあとで初めてメモリブロックAの解放要求を
メモリ管理部5に発行する。これを受けたメモリ管理部
5はメモリブロックAの解放を行う。 【0005】図4に従来の共用メモリ管理方式の例2の
ブロック図を示す。後段タスク2の為に共用するメモリ
領域を複写し、複写された領域は後段タスク2がジョブ
終了時点で解放し、メモリブロックAは不必要になった
段階でタスク1によって解放する方法である。タスク1
はジョブ1、ジョブ2、ジョブ3の処理中に各ジョブの
為にメモリブロックAをコピ−してメモリブロック
1、メモリブロックA2、メモリブロックA3を用意す
る。従ってタスク1はジョブ4の時点でメモリブロック
Aをすぐに解放しても構わない。メモリブロックA1
メモリブロックA2、メモリブロックA3はタスク2によ
って各ジョブが終了した段階で解放される。 【0006】 【発明が解決しようとする課題】しかしながら、図3に
示す従来の管理方式の例1の方式をとる場合、タスク1
の処理部A、処理部B、処理部Cでメモリ領域6の確保
と解放要求があるため各処理ごとにジョブ管理部4を介
してジョブの監視処理を入れておくことが必要になる。
タスク1内にメモリ領域解放要求を出す箇所は複数存在
するためこのような監視処理をタスク1内の複数箇所に
入れる必要がある。そのためシステム構成が複雑にな
り、後段タスク2のジョブの実行状態を監視するためタ
スク1の独立性が失われてしまう。又、後段タスクのジ
ョブ終了まで待つ必要があるためシステムの処理パ−フ
ォ−マンスを落してしまうと云う問題があった。 【0007】図4に示す従来の管理方式の例2の方式を
とる場合、前記方法のような問題は発生しないが必要な
メモリブロックを複写するため、メモリの使用効率を下
げてしまう。また、各タスクでもメモリ領域解放要求を
出すため、システム全体の処理効率を落してしまう。複
写をするためメモリの使用効率の低下や時間的な無駄が
生じると云う問題があった。 【0008】本発明は上述の点に鑑みてなされたもの
で、上記問題点を除去し、複数タスク間で共用されるメ
モリ領域を効率良く管理する共用メモリ管理方式を提供
することを目的とする。 【0009】 【課題を解決するための手段】上記課題を解決するため
本発明は、図1に示すように或るタスク1が実行される
際、タスク1から後で実行される後段タスク2と共用し
て使用するメモリ領域を解放する要求が出されるとメモ
リ管理部5は、そのメモリブロックAのアドレス(また
は識別子)と、そのメモリブロックAを使用する最終ジ
ョブを識別するジョブIDを受付テ−ブル51に記録し
受付ける手段を設けた。 【0010】 【作用】本発明では、上記ジョブIDを設けたことでジ
ョブ管理部4で各タスクが処理するジョブを監視し、各
ジョブ終了時点でジョブIDをメモリ管理部5へ渡し、
メモリ管理部5はそのジョブIDと受付テ−ブル51に
記録されているジョブIDと照合し、一致する事を確認
することにより今まで確保していたメモリブロックAを
解放する事が出来る。 【0011】 【実施例】以下、本発明の一実施例を図面に基づいて詳
細に説明する。図1に本発明の共用メモリ管理方式のブ
ロック図を示す。複数のタスク1、タスク2、ジョブ待
ち行列3、ジョブ管理部4、メモリ管理部5、受付テ−
ブル51、メモリ領域6で構成される。 【0012】限りあるメモリ資源を管理して複数の処理
系間で調整をとるためのメモリ管理方式で、メモリ管理
部5で各タスクからのメモリ解放要求をジョブIDで管
理する機能を持たせることにより、最終ジョブの終了を
検出し確保されていたメモリ領域の解放をするメモリ管
理機構である。 【0013】タスク1の処理部Aがメモリ領域に処理結
果を格納して他のタスク2の処理部Bがそれを必要にな
る場合、タスク1は処理部Aが不必要になった段階でジ
ョブIDを付加してメモリ領域解放要求をメモリ管理部
5に発行する。ジョブ管理部4からのジョブ終了通知に
よりそのジョブIDを持ったジョブが終了したことを確
認した段階でメモリ管理部5は実際のメモリ領域解放を
行う。処理部Aから見た場合ID付きで解放した段階で
メモリ領域6は解放された状態として処理の継続をして
も問題はない。つまり、タスク1はシングルタスクと同
様な処理で考えられる。又、特殊なジョブIDに対して
は即時解放も行うため、処理系で局所的に使用されるメ
モリ領域6の解放にも対応できる。 【0014】図1に示すように処理部A、B、Cを持つ
ようなタスク1とタスク1が処理したデ−タを利用して
処理を行うタスク2が存在し、これらの間にはジョブ待
ち行列3が存在するような例で処理概要を説明する。図
1のシステムの状態は、タスク1ではジョブ4を処理
中、タスク2ではジョブ1を処理している、ジョブ2、
3はジョブ待ち行列の中でタスク2の処理を行うために
待機中である。メモリブロックAはタスク1でジョブ1
の段階で確保されたもので、タスク2でジョブ1、ジョ
ブ2、ジョブ3を処理する場合に必要となる。 【0015】タスク1はメモリブロックAが不要になっ
た時点でジョブID=3でメモリブロックAの解放要求
を発行して次の処理へ移行すればよい。ID付きのメモ
リ領域解放要求を受けたメモリ管理部5は解放要求であ
るジョブID=3とメモリブロックAのアドレス(又は
識別子)を受付テ−ブル51に受付け、タスク1に対し
て正常終了したように戻る。図2にジョブIDと解放す
るメモリブロックの受付テ−ブル51の例を示す。 【0016】その後ジョブ管理部4からのジョブ終了通
知によりメモリ管理部5はタスク2でジョブ3が終了し
たことを確認し、はじめてメモリブロックAを解放す
る。このようにジョブIDを付加することによりタスク
1内の各処理部でタスク2の処理状態を意識する必要は
なく、メモリブロックAの複写も必要なくシングルタス
クと同様の考えでマルチタスクでのメモリ管理を行う事
が可能となる。 【0017】 【発明の効果】以上、詳細に説明したように本発明によ
れば、下記のような優れた効果が期待できる。 (1)メモリ領域解放の際、前段タスクの各処理部で後
段タスクのジョブ終了を監視する必要や後段タスク状態
を意識する必要がないためタスク間の独立性が保てる
とになり、システム構築が単純化される。 (2)各処理部が後段タスクの処理終了を待たずに次の
処理へ移行できるためシステム効率が上がる。 (3)後段タスクへデータを複写する必要ない為、メ
モリ使用効率も良くなる。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multi-task system using a pipeline system in which jobs are sequentially processed by a plurality of tasks. The present invention relates to a shared memory management method used by the user. 2. Description of the Related Art In a conventional memory management system, when a memory area release request is issued because a job is not aware of a job, the memory area is immediately released, so that it is necessary to monitor a subsequent task at a task level. There is. FIG. 3 shows a block diagram of a first example of the conventional shared memory management method. It is composed of a plurality of tasks 1, tasks 2, a job queue 3, a job management unit 4, a memory management unit 5, and a memory area 6. The state of the system shown in FIG. 3 is that the job 1 is being processed by the task 1, the job 1 is being processed by the task 2, and the jobs 2 and 3 perform the processing of the task 2 in the job queue 3. Waiting for you. The memory block A of the memory area 6 is a shared memory secured at the stage of the job 1 in the task 1, and the job 1, the job 2, and the job 3 in the task 2.
It is required when processing. [0004] In the system of Example 1 of the conventional shared memory management system shown in FIG. 3, a task 1 issues a memory area release request by monitoring the job end status of a subsequent task 2 through a job management unit 4. In this case, before issuing the memory area release request to the memory management unit 5, the task 1 inquires the job management unit 4 how far the processing in the task 2 has been completed. In the case of the state shown in FIG. 3, since it is known that the task 2 is currently processing the job 1, the task 2 has to cancel the memory area release. Such monitoring is performed until the job 3 ends, and a release request for the memory block A is issued to the memory management unit 5 only after confirming that the job 3 has ended. Upon receiving this, the memory management unit 5 releases the memory block A. FIG. 4 is a block diagram showing a second example of the conventional shared memory management system. In this method, the memory area shared for the subsequent task 2 is copied, and the copied area is released at the end of the job by the subsequent task 2, and the memory block A is released by the task 1 when it becomes unnecessary. Task 1
Jobs 1, job 2, copy of memory block A for each job during processing of job 3 - to the memory block A 1, the memory block A 2, providing a memory block A 3. Therefore, the task 1 may release the memory block A immediately at the time of the job 4. Memory block A 1 ,
The memory block A 2 and the memory block A 3 are released when each job is completed by the task 2. [0006] However, when the system of the first example of the conventional management system shown in FIG.
Since there is a request for securing and releasing the memory area 6 in the processing units A, B, and C, it is necessary to perform a job monitoring process via the job management unit 4 for each process.
Since there are a plurality of places for issuing a memory area release request in the task 1, it is necessary to put such monitoring processing in a plurality of places in the task 1. For this reason, the system configuration becomes complicated, and the independence of the task 1 is lost because the execution state of the job of the subsequent task 2 is monitored. In addition, there is a problem in that the processing performance of the system is degraded because it is necessary to wait until the end of the job of the subsequent task. In the case of the second example of the conventional management method shown in FIG. 4, the problem as in the above method does not occur, but necessary memory blocks are copied, so that the use efficiency of the memory is reduced. In addition, since each task issues a memory area release request, the processing efficiency of the entire system is reduced. There is a problem in that the use efficiency of the memory is reduced and time is wasted for copying. SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to provide a shared memory management method which eliminates the above problems and efficiently manages a memory area shared by a plurality of tasks. . According to the present invention, when a certain task 1 is executed as shown in FIG. 1, the present invention includes a post-task 2 which is executed later from the task 1. When a request to release the shared memory area is issued, the memory management unit 5 accepts the address (or identifier) of the memory block A and the job ID for identifying the final job using the memory block A. Means for recording and receiving data on the cable 51; According to the present invention, by providing the job ID, the job management unit 4 monitors jobs processed by each task, and transfers the job ID to the memory management unit 5 at the end of each job.
The memory management unit 5 compares the job ID with the job ID recorded in the reception table 51, and can release the memory block A secured up to now by confirming that they match. An embodiment of the present invention will be described below in detail with reference to the drawings. FIG. 1 shows a block diagram of the shared memory management system of the present invention. A plurality of tasks 1, a task 2, a job queue 3, a job management unit 4, a memory management unit 5, a reception table
And a memory area 6. A memory management system for managing limited memory resources and making adjustments among a plurality of processing systems. The memory management unit 5 has a function of managing a memory release request from each task by a job ID. Is a memory management mechanism that detects the end of the last job and releases the secured memory area. When the processing unit A of the task 1 stores the processing result in the memory area and the processing unit B of the other task 2 needs it, the task 1 executes the job processing at the stage when the processing unit A becomes unnecessary. A memory area release request is issued to the memory management unit 5 with the ID added. When the job management unit 4 confirms that the job having the job ID has been completed based on the job completion notification from the job management unit 4, the memory management unit 5 releases the actual memory area. From the viewpoint of the processing unit A, there is no problem if the processing is continued with the memory area 6 being released when the memory area 6 is released with the ID. That is, task 1 can be considered as a process similar to the single task. In addition, since the special job ID is immediately released, the memory area 6 used locally in the processing system can be released. As shown in FIG. 1, there are a task 1 having processing units A, B, and C, and a task 2 for performing processing using data processed by the task 1. An outline of the process will be described using an example in which the queue 3 exists. The state of the system in FIG. 1 is as follows: job 1 is processing job 4; task 2 is processing job 1;
Reference numeral 3 denotes a standby state for performing the processing of the task 2 in the job queue. Memory block A is task 1 and job 1
And is required when processing job 1, job 2, and job 3 in task 2. The task 1 may issue a request to release the memory block A with the job ID = 3 when the memory block A becomes unnecessary, and may proceed to the next processing. Upon receiving the memory area release request with ID, the memory management unit 5 receives the job ID = 3 and the address (or identifier) of the memory block A, which are the release request, in the reception table 51 and completes the task 1 normally. Back. FIG. 2 shows an example of a job ID and a reception table 51 of a memory block to be released. Thereafter, the memory management unit 5 confirms that the job 3 has been completed by the task 2 based on the job completion notification from the job management unit 4, and releases the memory block A for the first time. By adding the job ID in this way, it is not necessary for each processing unit in the task 1 to be aware of the processing state of the task 2, and there is no need to copy the memory block A. It is possible to perform management. As described above, according to the present invention, the following excellent effects can be expected . (1) when a memory area release, maintain independence between tasks because there is no need to be aware of the need or subsequent task status to monitor the job end of the subsequent task in each processing unit of the preceding stage task this
And the system construction is simplified. (2) Since each processing unit can shift to the next processing without waiting for the end of the processing of the subsequent task, system efficiency is improved. (3) Since there is no need to copy data to the subsequent task, the memory use efficiency is improved.

【図面の簡単な説明】 【図1】本発明の共用メモリ管理方式の構成を示すブロ
ック図である。 【図2】ジョブIDと解放するメモリブロックの受付テ
−ブル例を示す図である。 【図3】従来方式の共用メモリ管理方式の構成例1を示
すブロック図である。 【図4】従来方式の共用メモリ管理方式の構成例2を示
すブロック図である。 【符号の説明】 1 タスク 2 タスク 3 ジョブ待ち行列 4 ジョブ管理部 5 メモリ管理部 51 受付テ−ブル 6 メモリ領域
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a configuration of a shared memory management system according to the present invention. FIG. 2 is a diagram showing an example of a reception table of a job ID and a memory block to be released. FIG. 3 is a block diagram showing a configuration example 1 of a conventional shared memory management system. FIG. 4 is a block diagram showing a configuration example 2 of a conventional shared memory management system. [Description of Signs] 1 Task 2 Task 3 Job queue 4 Job management unit 5 Memory management unit 51 Reception table 6 Memory area

Claims (1)

(57)【特許請求の範囲】 【請求項1】 複数のタスクでジョブを順次処理してい
くパイプライン方式を使用するマルチタスクシステム
で、複数のタスク間で共用して使用される共用メモリ管
理方式において、 前記マルチタスクシステムでタスクが実行される際、前
記タスクから後段タスクと共用して使用する共用メモリ
領域の確保要求が出された時、その要求されたメモリ領
域を確保すると共に、 前記メモリ領域を使用する最終ジョブを識別するジョブ
IDと前記確保されたメモリ領域の番地又は識別子を受
する受付手段を設け、 該当するタスクが実行される際、前記ジョブIDとメモ
リ領域の番地又は識別子を前記受付手段に受付け、前記
ジョブIDを持つジョブが終了したことを検知して前記
受付されたメモリ領域を解放する手段を設けたことを
特徴とする共通メモリの管理方式。
(57) [Claim 1] Shared memory management used in a shared manner between a plurality of tasks in a multitask system using a pipeline system in which jobs are sequentially processed by a plurality of tasks In the method, when a task is executed in the multi-task system, when a request for securing a shared memory area to be used in common with a subsequent task is issued from the task, the requested memory area is secured, when the reception means for Installing receive <br/> a job ID for identifying the last job an address or identifier of the reserved memory area to be used a memory area is provided, the corresponding task is performed, and the job ID accepting an address or identifier of the memory area to the receiving unit, to release the <br/> accepted only memory domain detects that the job with the job ID has been completed Means for managing a common memory.
JP16012192A 1992-05-27 1992-05-27 Shared memory management method Expired - Fee Related JP3438056B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16012192A JP3438056B2 (en) 1992-05-27 1992-05-27 Shared memory management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16012192A JP3438056B2 (en) 1992-05-27 1992-05-27 Shared memory management method

Publications (2)

Publication Number Publication Date
JPH05334174A JPH05334174A (en) 1993-12-17
JP3438056B2 true JP3438056B2 (en) 2003-08-18

Family

ID=15708324

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16012192A Expired - Fee Related JP3438056B2 (en) 1992-05-27 1992-05-27 Shared memory management method

Country Status (1)

Country Link
JP (1) JP3438056B2 (en)

Also Published As

Publication number Publication date
JPH05334174A (en) 1993-12-17

Similar Documents

Publication Publication Date Title
US7516176B2 (en) Distributed request and response queues for service processor
JP5018133B2 (en) Job management apparatus, cluster system, and job management program
JP3689425B2 (en) System and method for object-oriented message filtering
RU2192039C2 (en) Executive regeneration routine for backup copying support program
JPH10124470A (en) Mechanism for calling processing of multiplexed message with small overhead of low context switching
JPH04271453A (en) Composite electronic computer
JP2005182491A (en) Communication apparatus management program
JPH11265301A (en) Client/server system, client computer and recording medium
JP3438056B2 (en) Shared memory management method
JP2003271349A (en) System and method for managing and processing print job using print job ticket
JP2003167746A (en) Software distribution method, execution system for the same and processing program for the same
JP3675292B2 (en) CORBA single restart method for embedded devices
JP3082830B2 (en) Software introduction method in distributed system
JP3423477B2 (en) Printing method and system
JP2669363B2 (en) Process switching control method and system for system call in cluster-coupled multiprocessor system
JP2752922B2 (en) Transfer path payout control method for file transfer
KR100332050B1 (en) Real Time Processing Apparatus And Method Of A System Command In Application Program
JPH11175292A (en) Print system, data processing method therefor and storage medium storage computer readable program
JPH0895839A (en) Data backup method
JP2002099510A (en) Plural transactions processing system
JPH10171663A (en) Release and build-in management system for many terminal equipments
JPH08272729A (en) Parallel computer system
JPH0877084A (en) Image recording system
JPH10269156A (en) System for file output in long message transmission
JP2004341575A (en) Multiple access control system and control method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090613

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090613

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100613

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees