JP3980729B2 - Storage area management system and medium storing storage area management program - Google Patents

Storage area management system and medium storing storage area management program Download PDF

Info

Publication number
JP3980729B2
JP3980729B2 JP33548997A JP33548997A JP3980729B2 JP 3980729 B2 JP3980729 B2 JP 3980729B2 JP 33548997 A JP33548997 A JP 33548997A JP 33548997 A JP33548997 A JP 33548997A JP 3980729 B2 JP3980729 B2 JP 3980729B2
Authority
JP
Japan
Prior art keywords
attribute
program
storage area
size
address
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
JP33548997A
Other languages
Japanese (ja)
Other versions
JPH10307750A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP33548997A priority Critical patent/JP3980729B2/en
Publication of JPH10307750A publication Critical patent/JPH10307750A/en
Application granted granted Critical
Publication of JP3980729B2 publication Critical patent/JP3980729B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、複数のプログラムからの獲得要求に対して必要に応じて記憶領域の空いている一部を割り当てる記憶領域管理システムおよび記憶領域管理プログラムを記録した媒体に関する。
記憶領域管理システムにおいては、複数のプログラムによって共用され、複数の区画に分割されている記憶領域の一部を複数のプログラムからの獲得要求に対して必要に応じて割り当てている。
【0002】
記憶領域の分割されている1区画においては、ある1属性に対する要求しか受けつけないようになっており、属性の異なる記憶領域の要求に対しては、異なる区画に対して獲得要求を行わなければならなかった。
処理用途が多様化する現在の計算機システムにおいて、システム毎に要求される属性の処理が変化し、要求される属性も増加する。このような要求属性の多様化に対応することができる記憶領域管理システムの開発が要望されている。
【0003】
【従来の技術】
従来の記憶領域管理システムの記憶領域としては、例えば図8(A)に示すようなものがある。
図8(A)において、記憶領域101は複数の区画102により構成されている。すなわち、記憶領域101は、属性の違いにより複数の区画102に分割されている。属性はアドレスによって属性1〜属性nのように決定される。
【0004】
区画102は、それぞれ属性を有し、ある1つの区画102に対しては、複数のプログラムからの同じ属性のみの区画102が獲得できる。すなわち、記憶領域101の分割された各区画102においては、ある属性に対する要求しか受け付けることができなかった。属性の異なる記憶領域101の獲得要求に対しては異なった区画102に対して獲得要求を行わねばならなかった。
【0005】
図9に従来の空きブロックの割り当て処理を説明するフローチャートを示す。図9において、ステップS101では記憶領域101のある1区画102における空きブロックのキューを検索する。
すなわち、従来においては、複数のプログラムによって共用されるある1区画102の記憶領域101に対して、プログラムから記憶領域101の獲得要求が出ると、ある決まった1つの属性のみの獲得要求のみを認め、その属性の要求に対して、空きブロックのキューを検索する。
【0006】
次に、ステップS102で1区画102における最後の空きブロックの割り当て処理が終了したか否かを判別し、処理が終了したときは、ステップS105に進み、処理が終了していないときは、ステップS103に進む。
ステップS103ではプログラムが要求する空きブロックの要求サイズを満足する空きブロックサイズが存在するか否かを判別する。要求サイズを満足する空きブロックが存在しないときは、ステップS101に戻って、次の空きブロックを検索し、要求サイズを満足する空きブロックサイズが存在するときは、ステップS104に進む。ステップS104では、要求サイズを満足する当該空きブロックを割り当ての対象として、ステップS101に戻る。
【0007】
ステップS101で空きブロックのキューを検索し、ステップS102で最後の空きブロックの処理が終了したときは、ステップS105に進み、ステップS105で割り当ての対象となった空きブロックのうち、最もサイズの小さい空きブロックを割り当てる。
【0008】
【発明が解決しようとする課題】
しかしながら、従来の記憶領域管理システムにあっては、記憶領域の分割された1区画においては、ある1属性に対する要求しか受け付けることができなかった。すなわち、属性の異なる記憶領域獲得要求に対しては、異なった区画に対して獲得要求を行わなければならない。したがって、新たな属性を追加しようとする際には、その度毎に必要に応じて区画を上記のように現状以上に細分化することによる区画サイズの決定を検討しなければならない。
【0009】
すなわち、図8(B)に示すように、新たな属性を追加しようとすると、例えば、一つの区画102を2つに分割して、区画102aはある属性を有し、区画102bは追加した新たな属性を有する記憶領域101とする。この場合には区画102を2分割したことによる区画102aのサイズと区画102bのサイズを決定しなければならない。
【0010】
しかしながら、処理用途が多様化する現在の計算機システムにおいては、システム毎に要求属性の種類も変化するであろうし、区画サイズの見積りの仕方によっては、ある区画に対して領域不足が集中する可能性もあるため、必要以上に区画を細分化することは記憶領域の管理の円滑化が困難となり、有効な記憶領域管理が行われないという問題が生じる。
【0011】
本発明では、上記したような従来の問題点を解決するためになされたものであって、現状の記憶領域の区画数は維持させた状態で、記憶領域の1区画において、複数の属性の要求に対応することを可能とする記憶領域管理システムおよび記憶領域管理プログラムを記録した媒体を提供することを目的とする。
【0012】
【課題を解決するための手段】
この目的を達成するために、本発明は、図1のように構成する。請求項1の発明は、複数のプログラムによって共有され、複数の区画に分割されている記憶領域を有し、前記プログラムの獲得要求に対して前記記憶領域の一部を割り当てる記憶領域管理システムにおいて、ある1区画の記憶領域に対して前記プログラムより獲得要求が出されたとき、空きブロックのキューを検索する検索手段10Aと、前記検索手段で検索された空きブロックに前記プログラムが要求したサイズを満足する空きブロックサイズが存在するか判定する空ブロックサイズ判定手段10Bと、前記プログラムにより属性の指定がなされているときは前記空きブロックサイズ判定手段により要求サイズを満足すると判定された空きブロックの領域属性と要求された属性との一致判定を行う属性判定処理手段10Cと、前記空きブロックサイズ判定手段により要求サイズを満足すると判定されるとともに前記空きブロックの領域属性が前記プログラムにより指定がなされている属性と一致していると前記属性判定処理手段で判断されたとき当該空きブロックを割り当て対象として割り当てを行う割り当て手段10Dと、を備える。
【0013】
請求項2の発明は、前記プログラムの要求サイズを満足する空きブロックサイズであるときに、属性の指定がなされていないときは、その空きブロックの領域属性がいかなる属性であっても当該空きブロックを割り当ての対象として割り当てるこ。請求項3の発明は、前記区画の各々が定まったサイズを有する頁を複数含んで構成され、少なくとも一つの頁は全体について使用中のブロックがない無属性であり、前記属性判定処理手段10Cは、前記空きブロックサイズ判定手段により要求サイズを満足すると判定された空きブロックの最高アドレスを設定するアドレス設定手段10Eと、前記最高アドレスで設定された当該ページの領域属性が前記プログラムにより指定がなされている属性と一致するか判定する第1の属性判定手段10Fと、前記第1の属性判定手段で当該頁が前記プログラムにより指定がなされている属性と一致していると判断された場合に、判定対象アドレスを前記最高アドレスからプログラムにより要求されたサイズ分だけ減算する減算手段と、前記属性判定手段で属性が一致しないと判定したきは前記最高アドレスを前記プログラムが要求する要求サイズ分だけ切り下げる判定対象アドレス変更手段10Gとから構成され前記割当て手段は、
前記減算手段により減算された判定アドレス部分が前記プログラムにより指定がなされている属性と一致することが第2の属性判定手段で判定された場合または、前記アドレス変更手段によって前記プログラムが要求する要求サイズ分だけ切り下げた時に当該空きブロックを割当ての対象とすることを特徴とする記憶領域管理システム。
【0014】
請求項4の発明は、複数のプログラムによって共有され、複数の区画に分割されている記憶領域を有し、前記プログラムの獲得要求に対して前記記憶領域の一部を割り当てるプログラムを記憶したコンピュータ読み取り可能な記憶媒体において、
コンピュータに、
ある1区画の記憶領域に対して前記プログラムより獲得要求が出されたとき、空きブロックのキューを検索する検索ステップと、前記検索ステップで検索された空きブロックに前記プログラムが要求したサイズを満足する空きブロックサイズが存在するか判定する空ブロックサイズ判定ステップと、前記プログラムにより属性の指定がなされているときは前記空きブロックサイズ判定ステップにより要求サイズを満足すると判定された空きブロックの領域属性と要求された属性との一致判定を行う属性判定処理ステップと、前記空きブロックサイズ判定手段により要求サイズを満足すると判定されるとともに前記空きブロックの領域属性が前記プログラムにより指定がなされている属性と一致していると前記属性判定処理ステップで判断されたとき当該空きブロックを割り当て対象として割り当てを行う割り当てステップと、を実行させるためのプログラムを備える。
【0015】
請求項5の発明は、前記プログラムの要求サイズを満足する空きブロックサイズであるときに、属性の指定がなされていないときは、その空きブロックの領域属性がいかなる属性であっても当該空きブロックを割り当ての対象として割り当てる。請求項6の発明は、前記区画の各々は定まったサイズを持つ複数の頁を含んで構成され、少なくとも一つの頁は全体について使用中のブロックがない無属性であり、前記属性判定処理ステップは、空きブロックサイズ判定ステップにより要求サイズを満足すると判定された空きブロックの最高アドレスを設定するアドレス設定ステップと、前記最高アドレスで設定された当該ページの領域属性が前記プログラムにより指定がなされている属性と一致するか判定する第1の属性判定ステップと、前記第1の属性判定手段で当該頁が前記プログラムにより指定がなされている属性と一致していると判断された場合に判定対象アドレスを前記最高アドレスからプログラムにより要求されたサイズ分だけ減算する減算ステップと、前記属性判定ステップで双方の属性が一致しないと判定したきは前記最高アドレスを前記プログラムが要求する要求サイズ分切り下げる判定対象アドレス変更ステップとから構成され、
前記割当てステップは、
前記減算ステップにより減算された判定アドレス部分が前記プログラムにより指定がなされている属性と一致することが第2の属性判定手段で判定された場合または、前記アドレス変更ステップによって前記プログラムが要求する要求サイズ分だけ切り下げた時に対象としている空きブロックを割当てる
【0016】
このような構成を備えた本発明によれば、記憶領域の区画を更に細分化することなく、1つの区画において異なる複数属性の記憶領域の獲得要求を混在して受け付けることが可能となるので、区画が細分化した時と比較して、異なった様々な属性の要求に対しても柔軟な記憶領域管理を実現することができ、記憶領域を有効に使用することができる。
【0017】
また、属性を意識しないプログラムに対しては、要求サイズを満足する空きブロックに対しては無条件に当該空きブロックを割り当て候補の対象としているので、無属性の空きブロックを選択して割り当てる時に比べ、フラグメンテーションを極力抑止しようとする効果があり、記憶領域の不足による領域の獲得失敗を減少することができる。
【0018】
【発明の実施の形態】
図2は本発明の一実施形態を示すブロック図である。
図2において、1はCPUであり、CPU1には端末2、ディスク装置3および主記憶装置4が接続されている。ディスク装置3には、端末2から入力するデータが格納される。ディスク装置3内に格納されたデータは、主記憶装置4内の仮想記憶装置5に展開される。仮想記憶装置5内に展開されたデータは、仮想記憶装置5のアドレスを参照することで、端末2に表示される。
【0019】
仮想記憶装置5は、例えばシステムプログラム格納領域6、利用者プログラム格納領域7、記憶領域管理プログラム格納領域8、記憶領域9などにより構成される。システムプログラム格納領域6にはシステムプログラムが格納される。システムプログラムは記憶領域9の1区画に対して領域獲得の要求を行う。このプログラムからの獲得要求に対して必要に応じて記憶領域9の一部が割り当てられる。
【0020】
利用者プログラム格納領域8には複数のプログラムが格納され、このプログラムは記憶領域9の1区画に対して領域獲得の要求を行う。このプログラムからの獲得要求に対して必要に応じて記憶領域9の一部が割り当てられる。記憶領域管理プログラム格納領域8には記憶領域管理プログラム10が格納されている。
記憶領域管理プログラム10は、記憶領域9を必要とするプログラムが要求する複数の属性に応じて空きブロックを割り当てる処理を行う。このため、記憶領域管理プログラム10は、検索手段としての検索部10A、空きブロックサイズ判定手段としての空きブロック測定部10B、属性判定処理手段としての属性判定処理部10Cおよび割り当て手段としての割り当て部10Dを有する。
【0021】
検索部10Aは、ある1区画の記憶領域に対して利用したプログラム格納領域7に格納されたプログラムやシステムプログラム格納領域6に格納されたプログラムより獲得要求が出されたとき、空きブロックのキューを検索する。
空きブロックサイズ判定部10Bは、プログラムが要求したサイズを満足する空きブロックサイズが存在するか判定する。
【0022】
属性判定処理部10Cは、プログラムにより属性の指定がなされているときは空きブロックの領域属性が要求された属性に一致しているか判定処理する。
割り当て部10Dは、空きブロックの領域属性がプログラムで要求されている属性と一致しているとき当該空きブロックを割り当て対象として割り当てる。
また、属性判定処理部10Cは、アドレス設定手段としてのアドレス設定部10E、第1の属性判定手段としての第1の属性判定部10F、判定対象アドレス変更手段としての判定対象アドレス変更部10G、減算手段としての減算部10H、第2の属性判手段としての第2の属性判定手段としての第2の属性判定部10Iを有する。
【0023】
アドレス設定部10Eは、プログラムが要求する空きブロックの最高アドレスを設定する。
第1の属性判定部10Fは、最高アドレスで設定された当該ページの領域属性が要求された属性と一致するか判定する。
判定対象アドレス変更部10Gは、一致しないときは判定対象アドレスをページ単位で切り下げる。
【0024】
減算部10Hは、判定対象アドレスを要求サイズ分だけ減算する。
第2の属性判定処理部10Iは、減算されたアドレスが属するページの属性を要求された属性が一致するか判定する。
記憶領域9は、複数のプログラムによって共用される複数の区画に分割されている。
【0025】
図3は記憶領域9の構成例を示した図である。
図3において、記憶領域9は、複数の区画11によって構成され、各区画11は、複数のページ12により構成されている。すなわち、記憶領域9にはページ12というある定まったサイズを持つ単位が設けられており、属性は記憶領域9に対してプログラムより獲得要求が出たとき、このページ単位で決定される。
【0026】
従来においては、記憶領域の分割された1区画は、ある1属性に対する要求は受け付けることができなかったが、本実施形態の記憶領域9のページ12を利用することによって複数の属性の要求に対応することができるようにしている。
図4は記憶領域9の一区画11の管理を示す図である。
記憶領域9の一区画11は、最初は1つの空きブロックによって管理されている。あるプログラムから記憶領域9の一区画11に対して領域獲得の要求が出されたとき、要求サイズに応じて使用中ブロックが初めて構成される。記憶領域9の獲得および解消を繰り返すことにより、図4に示すような空きブロックと使用中ブロックとが混在するようになる。
【0027】
この区画11は、ページ1、ページ2、ページ3、ページ4、ページ5、ページ6により構成され、第1の使用中ブロック13によって占められるページ1、ページ2は属性1に、第2の使用中ブロック14によって占められているページ3は属性2に、第3の使用中ブロック15によって占められているページ5、ページ6は属性3にそれぞれすでに属性が与えられている。この属性1〜3は、例えば記憶領域9のアドレスによって決められる。
【0028】
ページ4の場合、1ページ全部に関し使用中ブロックが全くない場合には、そのページ4に対する属性は与えられておらず、無属性であり、どのような属性の要求に対しても割り当てることが可能である。第1の空きブロック16は、属性1のページ2および属性2のページ3に存在する。第2の空きブロック17は、属性2のページ3、無属性のページ4、属性3のページ5に存在している。第3の空きブロック18は属性3のページ6に存在している。
【0029】
図4に示すような記憶領域9の状態においてある区画11の記憶領域9に対する獲得要求があった場合には、空きブロックのキューを検索して要求サイズを満足するブロックを見つけ出す。要求サイズを満足する空きブロックが見つかったら、その空きブロックが属する属性に関する判定を行う。
図5は属性の判定方法を説明する説明図である。
【0030】
空きブロックに対する属性の判定は、第1段階として高アドレス側、第2段階として低アドレス側に対して行う。
図5(A)〜(D)において、19はプログラムが要求する領域の要求サイズを示す。20は空きブロックを示し、この空きブロック20は、例えば、ページ21の一部、ページ22の1ページ、およびページ23の一部よりなる。24,25はページ境界を示す。空きブロック20のサイズは、要求サイズ19を満足している。第1段階では属性の判定は、空きブロック20の高アドレス側から行い、図5(A)に示すように、空きブロック20の最高アドレス26の属するページ21の属性の判定を行う。プログラムが要求する属性と、当ページ21の領域属性が一致するときは、第2段階として図5(B)に示すように、最高アドレス26から要求サイズ19分下げたところのアドレス27が属するページ22について属性の判定を行う。
【0031】
ページ22の領域属性がプログラムの要求する属性と一致したときは、この空きブロック20を割り当ての対象とする。ページ22の属性と要求属性が一致しないときは、空きブロック20を割り当ての対象外として、他の空きブロックを検索する。
図5(A)に示すように、ページ21の領域属性を判定して、ページ21の属性とプログラムの要求する属性が一致しないときは、図5(C)に示すように、対象とするアドレスを1ページ分下げたところのページ境界24を最高アドレス26とみなす。この最高アドレス26の属するページは1ページであり、無属性であるから、属性を判定しない。
【0032】
次に、第2段階として、図5(D)に示すように、最高アドレス26から要求サイズ19分下げたところのアドレス27が属するページ23の属性を判定する。
このページ23の領域属性と要求属性が一致するときは、この空きブロック20を割り当ての対象とする。ページ23の領域属性と要求属性が一致しないときは、この空きブロック20は割り当ての対象外として他の空きブロックを検索する。
【0033】
次に、動作を説明する。
図6は空きブロックの割り当ての動作を説明するフローチャートである。
図6において、まず、ステップS11でプログラムから新たな空きブロックの獲得要求が出された場合、まず、空きブロックのキューを検索する。
次に、ステップS12で最後の空きブロックの処理が終了したか否かを判別し、処理を終了したときは、ステップS16に進み、処理を終了していないときは、ステップS13に進む。空きブロックを全て検索していない場合には、空きブロックのサイズの比較を行う。すなわち、ステップS13でプログラムが要求する要求サイズを満足する空きブロックが存在するか否かを判別する。
【0034】
要求サイズを満足する空きブロックがないときは、ステップS11に戻って次の空きブロックを検索し、要求サイズを満足するサイズの空きブロックがあるときは、ステップS14でプログラムによる属性の指定がなされているか否かを判別する。属性の指定がなされているときは、図7に示す属性の判定処理に進み、属性の指定がなされていないときはステップS15に進む。
【0035】
すなわち、属性の指定が行われている場合には、属性の判定処理を行い適切な属性を持つ空きブロックの割り当て判断処理を図7に示すように行った上で、空きブロックの割り当て対象になるか否かの判定を行うが、属性を意識しないプログラムに対しては、ステップS15でこの時点で無条件に当該空きブロックを割り当て候補の対象とし、次の空きブロックの検索処理に戻る(S11に戻る)。属性を意識しないプログラムに対して無条件に当該空きブロックを割り当て候補の対象とするのは、フラグメンテーションの発生をできる限り抑止しようとするものである。
【0036】
ステップS12で上記操作を最後の空きブロックまで行い、ステップS16で割り当て候補の対象となった空きブロックの中で、最も小さな空きブロックを選び出し、この選び出された空きブロックを、要求したプログラムに対して割り当てる。
図7は属性の判定処理を説明するフローチャートである。
【0037】
図6のステップS14で属性の指定がなされている場合、図7に示す属性の判定処理を行い、当該空きブロックが割り当ての対象になるかを決定する。
属性の判定処理においては、まず、ステップS21で空きブロックの最高アドレスを求める。例えば、図5(A)に示すように、空きブロック20の最高アドレス26を求める。
【0038】
次に、ステップS22で当該ページの属性は要求された属性と一致するか判別する。
図5(A)に示すように最高アドレス26の属するページ21の属性がプログラムの要求する属性と一致するか判定する。属性が一致した場合には、ステップS24に進み、属性が一致しない場合にはステップS23に進む。
【0039】
ステップS23では判定対象アドレスをページ単位に切り下げる。例えば、図5(C)に示すように、ページ21とページ22のページ境界24を空きブロック20の最高アドレス26とみなす。最高アドレス26が属するページ22は1ページであり、無属性であるから、属性の判定をしない。
ステップS24では判定対象アドレスを要求サイズ分だけ減算する。例えば、図5(B)に示すように、空きブロック20の最高アドレス26から要求サイズ19を減算し、アドレス27を求める。また、図5(D)に示すように、空きブロック20の最高アドレスとみなしたアドレス26から要求サイズ19分だけ減算し、アドレス27を求める。
【0040】
ステップS25では低アドレス側の属性の判定を行う。すなわち、当該ページの属性は要求された属性と一致するか判定する。例えば、図5(B)に示すように、要求サイズ19分を減算したアドレス27が属するページ22の領域属性と要求された属性が一致するか判別する。また、図5(D)に示すように、要求サイズ19分だけ減算したアドレス27が有するページ23の属性と要求された属性が一致するか判別する。
【0041】
低アドレスが属するページの属性が要求されている属性と一致していたら、ステップS26で当該空きブロックを割り当て候補の対象と認識し、図6に示すステップS11に戻り次の空きブロックの検索を行う。要求されている属性と一致していない場合には、当該空きブロックは割り当て候補の対象外となり、図6に示すステップS11に戻り次の空きブロックの検索を続ける。
【0042】
本実施形態においては、現在の記憶領域9の区画数を維持した状態で記憶領域9の一つの区画11において、複数の属性の要求に対応することができ、記憶領域9を有効に使用することができる。
また、属性が指定されないときは、無条件に当該空きブロックを割り当て対象とするため、無属性の空きブロックを選択して割り当てる場合に比べ、フラグメンテーションを抑止することができる。
【0043】
【発明の効果】
以上説明してきたように、本発明によれば、記憶領域の区画を更に細分化することなく、1つの区画において異なる複数属性の記憶領域の獲得要求を混在して受け付けることができるため、区画が細分化した時と比較して、異なった様々な属性の要求に対しても柔軟な記憶領域管理を実現することができ、記憶領域を有効に使用することができる。
【0044】
また、属性を意識しないプログラムに対しては、要求サイズを満足する空きブロックに対しては無条件に当該空きブロックを割り当て候補の対象としているので、無属性の空きブロックを選択して割り当てる時に比べ、フラグメンテーションを極力抑止しようとする効果があり、記憶領域の不足による領域の獲得失敗を減少することができる。
【図面の簡単な説明】
【図1】本発明の原理説明図
【図2】本発明の一実施形態を示すブロック図
【図3】記憶領域の構成例を示す図
【図4】1つの区画に対する管理を説明する説明図
【図5】属性の判定方法の説明図
【図6】空きブロックの割り当てを説明するフローチャート
【図7】属性の判定処理を説明するフローチャート
【図8】従来の記憶領域の構成図
【図9】従来の動作を説明するフローチャート
【符号の説明】
1:CPU
2:端末
3:ディスク装置
4:主記憶装置
5:仮想記憶装置
6:システムプログラム格納領域
7:利用者プログラム格納領域
8:記憶領域管理プログラム格納領域
9:記憶領域
10:記憶領域管理プログラム
10A:検索部(検索手段)
10B:空きブロックサイズ判定部(空きブロックサイズ判定手段)
10C:属性判定処理部(属性判定処理手段)
10D:割り当て部(割り当て手段)
10E:アドレス設定部(アドレス設定手段)
10F:第1の属性判定部(第1の属性判定手段)
10G:判定対象アドレス変更部(判定対象アドレス変更手段)
10H:減算部(減算手段)
10I:第2の属性判定部(愛2の属性判定手段)
11:区画
12,21〜23:ページ
13〜15:第1〜第3の使用中ブロック
16〜18:第1〜第3の空きブロック
19:要求サイズ
20:空きブロック
24,25:ページ境界
26:最高アドレス
27:アドレス
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a storage area management system that allocates a part of an empty storage area as necessary in response to acquisition requests from a plurality of programs, and a medium on which a storage area management program is recorded.
In the storage area management system, a part of a storage area that is shared by a plurality of programs and divided into a plurality of partitions is allocated as necessary to acquisition requests from the plurality of programs.
[0002]
In one partition where the storage area is divided, only a request for one attribute is accepted, and for a request for a storage area with a different attribute, an acquisition request must be made for a different partition. There wasn't.
In current computer systems where processing applications are diversified, the processing of attributes required for each system changes, and the required attributes increase. Development of a storage area management system that can cope with such diversification of required attributes is desired.
[0003]
[Prior art]
As a storage area of the conventional storage area management system, for example, there is a storage area as shown in FIG.
In FIG. 8A, the storage area 101 is composed of a plurality of partitions 102. That is, the storage area 101 is divided into a plurality of sections 102 due to differences in attributes. Attributes are determined as attribute 1 to attribute n by the address.
[0004]
Each partition 102 has an attribute, and a partition 102 having only the same attribute from a plurality of programs can be obtained for a certain partition 102. In other words, each divided partition 102 of the storage area 101 can only accept a request for a certain attribute. In response to an acquisition request for a storage area 101 having different attributes, an acquisition request must be made for a different partition 102.
[0005]
FIG. 9 is a flowchart for explaining a conventional free block allocation process. In FIG. 9, in step S101, an empty block queue in one partition 102 having the storage area 101 is searched.
In other words, conventionally, when a storage area 101 acquisition request is issued from a program to a storage area 101 of a partition 102 shared by a plurality of programs, only an acquisition request for only one predetermined attribute is permitted. In response to a request for that attribute, the queue of free blocks is searched.
[0006]
Next, in step S102, it is determined whether or not the process of allocating the last free block in one partition 102 is completed. When the process is completed, the process proceeds to step S105, and when the process is not completed, the process proceeds to step S103. Proceed to
In step S103, it is determined whether there is an empty block size that satisfies the required size of the empty block requested by the program. If there is no empty block satisfying the requested size, the process returns to step S101 to search for the next empty block. If there is an empty block size satisfying the requested size, the process proceeds to step S104. In step S104, the process returns to step S101 with the empty block satisfying the requested size as an allocation target.
[0007]
In step S101, the empty block queue is searched, and when the processing of the last empty block is completed in step S102, the process proceeds to step S105, and the empty block with the smallest size among the empty blocks to be allocated in step S105. Allocate a block.
[0008]
[Problems to be solved by the invention]
However, in the conventional storage area management system, only one request for one attribute can be accepted in one section of the storage area divided. In other words, for storage area acquisition requests with different attributes, acquisition requests must be made for different partitions. Therefore, when a new attribute is to be added, it is necessary to consider the determination of the partition size by subdividing the partition more than the current state as described above as necessary.
[0009]
That is, as shown in FIG. 8B, when a new attribute is added, for example, one partition 102 is divided into two, the partition 102a has a certain attribute, and the partition 102b The storage area 101 has various attributes. In this case, the size of the partition 102a and the size of the partition 102b obtained by dividing the partition 102 into two must be determined.
[0010]
However, in today's computer systems with diversified processing applications, the types of required attributes will change from system to system, and depending on how the partition size is estimated, there is a possibility that area shortages will concentrate on a certain partition. For this reason, if the partitions are subdivided more than necessary, it becomes difficult to facilitate management of the storage area, and there arises a problem that effective storage area management is not performed.
[0011]
The present invention has been made to solve the above-described conventional problems, and requests for a plurality of attributes in one partition of a storage area while maintaining the current number of storage areas. It is an object of the present invention to provide a storage area management system and a medium on which a storage area management program is recorded.
[0012]
[Means for Solving the Problems]
  In order to achieve this object, the present invention is configured as shown in FIG. The invention of claim 1 is a storage area management system having a storage area shared by a plurality of programs and divided into a plurality of partitions, and allocating a part of the storage area in response to the acquisition request for the program. When an acquisition request is issued from the program for a storage area of a certain partition, search means 10A for searching a queue of free blocks;Free blocks searched by the search meansWhen an empty block size determination unit 10B that determines whether there is an empty block size that satisfies the size requested by the program and an attribute is specified by the programAn area attribute of an empty block determined to satisfy the requested size by the empty block size determining meansRequested attributesMatch withAttribute determination processing means 10C;The free block size determination means determines that the required size is satisfied andThe free block area attribute isDesignated by the programMatches the attributeThe attribute determination processing means determines thatAnd allocating means 10D for allocating the empty block as an allocation target.
[0013]
    According to the second aspect of the present invention, when the free block size satisfies the required size of the program and no attribute is specified, the free block is stored regardless of the attribute of the free block area attribute. Assign as an assignment target. The invention of claim 3Each of the sections is configured to include a plurality of pages having a fixed size, and at least one page is attributeless with no blocks in use as a whole,SaidattributeThe determination processing means 10CIt was determined by the free block size determination means that the required size is satisfied.Address setting means 10E for setting the highest address of the empty block, and the area attribute of the page set by the highest addressDesignated by the programFirst attribute determination means 10F for determining whether the attribute matches,When the first attribute determination means determines that the page matches the attribute specified by the program, the determination target address is subtracted from the highest address by the size requested by the program. When it is determined that the attribute does not match between the subtracting means and the attribute determining means, the highest address is as much as the requested size requested by the program.Decision target address changing means 10GConsists of,The assigning means includes
  The requested size requested by the program by the address changing unit when the second attribute determining unit determines that the determination address portion subtracted by the subtracting unit matches the attribute specified by the program When the value is rounded down, the free block is assignedA storage area management system.
[0014]
  The invention of claim 4 has a storage area shared by a plurality of programs and divided into a plurality of partitions, and a part of the storage area is allocated to the acquisition request of the programComputer-readable memory that stores the programIn the medium,
  On the computer,
  Search that searches the queue of free blocks when an acquisition request is issued by the program to a storage area of a certain partitionStepWhen,In the free block searched in the search stepEmpty block size determination for determining whether there is an empty block size that satisfies the size requested by the programStepWhen the attribute is specified by the programDetermining whether the free block area attribute determined to satisfy the requested size in the free block size determining step matches the requested attributeAttribute determination processAnd determining that the required size is satisfied by the free block size determining meansThe area attribute of the free block isWhen the attribute determination processing step determines that the attribute matches the attribute specified by the programAllocation that allocates the free block as an allocation targetAnd a program for executing the steps.
[0015]
  According to the invention of claim 5, when the free block size satisfies the required size of the program and no attribute is specified, the free block is stored regardless of the attribute of the free block area attribute. Assign as an assignment target. The invention of claim 6Each of the sections is configured to include a plurality of pages having a predetermined size, and at least one page is attributeless with no blocks in use for the whole,SaidattributeDetermination processStepIsIt was determined that the requested size was satisfied by the free block size determination step.Address setting to set the highest address of empty blocksStepAnd the area attribute of the page set with the highest address isDesignated by the programFirst attribute determination that determines whether the attribute matchesStepWhen,Subtraction for subtracting the determination target address from the highest address by the size requested by the program when the first attribute determination means determines that the page matches the attribute specified by the program Step and the attribute determination step, when it is determined that the attributes do not match, the highest address is requested by the size requested by the program.It consists of a judgment target address change step to be rounded down,
  The assigning step includes
  When the second attribute determining means determines that the determination address portion subtracted in the subtracting step matches the attribute specified by the program, or the requested size requested by the program in the address changing step Allocate target free block when rounded down by.
[0016]
According to the present invention having such a configuration, it becomes possible to receive a mixture of acquisition requests for storage areas having different attributes in one partition without further subdividing the storage area partition. Compared to when the partition is subdivided, flexible storage area management can be realized even for various different attribute requirements, and the storage area can be used effectively.
[0017]
For programs that are not aware of attributes, the free blocks that satisfy the required size are unconditionally targeted for allocation, so compared with the case of selecting and assigning free blocks with no attributes. There is an effect of suppressing fragmentation as much as possible, and it is possible to reduce an area acquisition failure due to a lack of a storage area.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 2 is a block diagram showing an embodiment of the present invention.
In FIG. 2, 1 is a CPU, and a terminal 2, a disk device 3, and a main storage device 4 are connected to the CPU 1. The disk device 3 stores data input from the terminal 2. The data stored in the disk device 3 is expanded in the virtual storage device 5 in the main storage device 4. The data expanded in the virtual storage device 5 is displayed on the terminal 2 by referring to the address of the virtual storage device 5.
[0019]
The virtual storage device 5 includes, for example, a system program storage area 6, a user program storage area 7, a storage area management program storage area 8, a storage area 9, and the like. The system program storage area 6 stores system programs. The system program requests area acquisition for one partition of the storage area 9. A part of the storage area 9 is allocated to the acquisition request from this program as necessary.
[0020]
A plurality of programs are stored in the user program storage area 8, and this program requests area acquisition to one partition of the storage area 9. A part of the storage area 9 is allocated to the acquisition request from this program as necessary. A storage area management program 10 is stored in the storage area management program storage area 8.
The storage area management program 10 performs processing for allocating free blocks according to a plurality of attributes requested by a program that requires the storage area 9. Therefore, the storage area management program 10 includes a search unit 10A as a search unit, a free block measurement unit 10B as a free block size determination unit, an attribute determination processing unit 10C as an attribute determination processing unit, and an allocation unit 10D as an allocation unit. Have
[0021]
When an acquisition request is issued from a program stored in the program storage area 7 used for a storage area of one partition or a program stored in the system program storage area 6, the retrieval unit 10A sets a queue of empty blocks. Search for.
The free block size determination unit 10B determines whether there is a free block size that satisfies the size requested by the program.
[0022]
The attribute determination processing unit 10C determines whether the area attribute of the free block matches the requested attribute when the attribute is specified by the program.
The allocation unit 10D allocates the empty block as an allocation target when the area attribute of the empty block matches the attribute requested by the program.
The attribute determination processing unit 10C includes an address setting unit 10E as an address setting unit, a first attribute determination unit 10F as a first attribute determination unit, a determination target address change unit 10G as a determination target address change unit, and a subtraction. A subtracting unit 10H serving as a means, and a second attribute determining unit 10I serving as a second attribute determining unit serving as a second attribute determining unit.
[0023]
The address setting unit 10E sets the highest address of the empty block requested by the program.
The first attribute determination unit 10F determines whether the area attribute of the page set with the highest address matches the requested attribute.
The determination target address changing unit 10G rounds down the determination target address in units of pages when they do not match.
[0024]
The subtraction unit 10H subtracts the determination target address by the required size.
The second attribute determination processing unit 10I determines whether the requested attribute matches the attribute of the page to which the subtracted address belongs.
The storage area 9 is divided into a plurality of partitions shared by a plurality of programs.
[0025]
FIG. 3 is a diagram showing a configuration example of the storage area 9.
In FIG. 3, the storage area 9 is composed of a plurality of partitions 11, and each partition 11 is composed of a plurality of pages 12. In other words, the storage area 9 is provided with a unit having a certain size of page 12, and the attribute is determined for each page when an acquisition request is issued from the program to the storage area 9.
[0026]
Conventionally, one partition of the storage area could not accept a request for a certain attribute, but it can respond to requests for multiple attributes by using the page 12 of the storage area 9 of this embodiment. To be able to.
FIG. 4 is a diagram showing management of a section 11 of the storage area 9.
A section 11 of the storage area 9 is initially managed by one free block. When an area acquisition request is issued from a certain program to one partition 11 of the storage area 9, a used block is configured for the first time according to the requested size. By repeating acquisition and cancellation of the storage area 9, empty blocks and in-use blocks as shown in FIG. 4 are mixed.
[0027]
This partition 11 is composed of page 1, page 2, page 3, page 4, page 5, page 6, and page 1 and page 2 occupied by the first in-use block 13 are attribute 1 and second usage. The page 3 occupied by the middle block 14 is already given the attribute 2, and the pages 5 and 6 occupied by the third busy block 15 are already given the attribute. These attributes 1 to 3 are determined by the address of the storage area 9, for example.
[0028]
In the case of page 4, if there is no block in use for all of one page, the attribute for page 4 is not given, it is attributeless, and it can be assigned to any attribute request It is. The first empty block 16 exists on page 2 with attribute 1 and page 3 with attribute 2. The second empty block 17 exists on page 3 with attribute 2, page 4 with no attribute, and page 5 with attribute 3. The third empty block 18 exists on the page 6 with the attribute 3.
[0029]
When there is an acquisition request for the storage area 9 of a partition 11 in the state of the storage area 9 as shown in FIG. 4, the empty block queue is searched to find a block that satisfies the requested size. When a free block satisfying the requested size is found, a determination is made regarding the attribute to which the free block belongs.
FIG. 5 is an explanatory diagram for explaining an attribute determination method.
[0030]
The attribute determination for the empty block is performed on the high address side as the first stage and on the low address side as the second stage.
In FIGS. 5A to 5D, 19 indicates the required size of the area requested by the program. Reference numeral 20 denotes an empty block. The empty block 20 includes, for example, a part of the page 21, one page of the page 22, and a part of the page 23. Reference numerals 24 and 25 denote page boundaries. The size of the empty block 20 satisfies the required size 19. In the first stage, the attribute is determined from the higher address side of the empty block 20, and the attribute of the page 21 to which the highest address 26 of the empty block 20 belongs is determined as shown in FIG. When the attribute requested by the program and the area attribute of the page 21 match, as shown in FIG. 5B, the page to which the address 27 to which the request size 19 is lowered from the maximum address 26 is assigned as the second stage. The attribute is determined for 22.
[0031]
When the area attribute of the page 22 matches the attribute requested by the program, the free block 20 is assigned. When the attribute of the page 22 and the request attribute do not match, the empty block 20 is excluded from allocation and another empty block is searched.
As shown in FIG. 5A, when the area attribute of the page 21 is determined and the attribute of the page 21 does not match the attribute requested by the program, the target address is shown in FIG. Is regarded as the highest address 26. Since the page to which the highest address 26 belongs is one page and has no attribute, no attribute is determined.
[0032]
Next, as a second stage, as shown in FIG. 5D, the attribute of the page 23 to which the address 27 to which the requested size 19 is lowered from the highest address 26 is determined.
When the area attribute of this page 23 matches the request attribute, this free block 20 is set as an allocation target. When the area attribute of the page 23 and the request attribute do not match, the empty block 20 is searched for other empty blocks as out of allocation targets.
[0033]
Next, the operation will be described.
FIG. 6 is a flowchart for explaining the operation of allocating free blocks.
In FIG. 6, when a new free block acquisition request is issued from the program in step S11, first, a free block queue is searched.
Next, in step S12, it is determined whether or not the last empty block has been processed. When the process is ended, the process proceeds to step S16. When the process is not ended, the process proceeds to step S13. When all the empty blocks are not searched, the sizes of the empty blocks are compared. That is, in step S13, it is determined whether there is an empty block that satisfies the requested size requested by the program.
[0034]
If there is no free block satisfying the required size, the process returns to step S11 to search for the next free block. If there is a free block having a size satisfying the required size, the attribute is specified by the program in step S14. It is determined whether or not. When the attribute is specified, the process proceeds to the attribute determination process shown in FIG. 7, and when the attribute is not specified, the process proceeds to step S15.
[0035]
That is, when an attribute is specified, an attribute determination process is performed, and an allocation determination process for an empty block having an appropriate attribute is performed as shown in FIG. For a program that is not aware of the attribute, at step S15, the empty block is unconditionally selected as an allocation candidate at this point, and the process returns to the search process for the next empty block (S11). Return). The purpose of unconditionally making a free block an allocation candidate for a program that is not aware of attributes is to suppress the occurrence of fragmentation as much as possible.
[0036]
In step S12, the above operation is performed up to the last empty block, and in step S16, the smallest empty block is selected from among the empty blocks that are candidates for allocation, and the selected empty block is selected for the requested program. Assign.
FIG. 7 is a flowchart for explaining attribute determination processing.
[0037]
If the attribute is specified in step S14 of FIG. 6, the attribute determination process shown in FIG. 7 is performed to determine whether the empty block is to be assigned.
In the attribute determination process, first, in step S21, the highest address of an empty block is obtained. For example, as shown in FIG. 5A, the highest address 26 of the empty block 20 is obtained.
[0038]
In step S22, it is determined whether the attribute of the page matches the requested attribute.
As shown in FIG. 5A, it is determined whether the attribute of the page 21 to which the highest address 26 belongs matches the attribute requested by the program. If the attributes match, the process proceeds to step S24, and if the attributes do not match, the process proceeds to step S23.
[0039]
In step S23, the determination target address is rounded down in units of pages. For example, as shown in FIG. 5C, the page boundary 24 between the page 21 and the page 22 is regarded as the highest address 26 of the empty block 20. Since the page 22 to which the highest address 26 belongs is one page and has no attribute, the attribute is not determined.
In step S24, the determination target address is subtracted by the required size. For example, as shown in FIG. 5B, the request size 19 is subtracted from the highest address 26 of the empty block 20 to obtain the address 27. Further, as shown in FIG. 5D, the address 27 is obtained by subtracting the requested size 19 from the address 26 regarded as the highest address of the empty block 20.
[0040]
In step S25, the attribute on the low address side is determined. That is, it is determined whether the attribute of the page matches the requested attribute. For example, as shown in FIG. 5B, it is determined whether or not the area attribute of the page 22 to which the address 27 to which the requested size of 19 minutes is subtracted matches the requested attribute. Further, as shown in FIG. 5D, it is determined whether or not the attribute of the page 23 included in the address 27 obtained by subtracting the requested size by 19 matches the requested attribute.
[0041]
If the attribute of the page to which the low address belongs matches the requested attribute, the empty block is recognized as a candidate for allocation in step S26, and the process returns to step S11 shown in FIG. 6 to search for the next empty block. . If it does not match the requested attribute, the empty block is not a candidate for allocation, and the process returns to step S11 shown in FIG. 6 to continue searching for the next empty block.
[0042]
In the present embodiment, it is possible to respond to requests for a plurality of attributes in one partition 11 of the storage area 9 while maintaining the current number of partitions in the storage area 9, and to effectively use the storage area 9. Can do.
Further, when no attribute is specified, since the empty block is unconditionally assigned, fragmentation can be suppressed as compared with the case of selecting and assigning an empty block having no attribute.
[0043]
【The invention's effect】
As described above, according to the present invention, since it is possible to accept a plurality of storage area acquisition requests having different attributes in one partition without further subdividing the storage area partition, Compared to the subdivision, it is possible to realize flexible storage area management even for various different attribute requests, and the storage area can be used effectively.
[0044]
For programs that are not aware of attributes, the free blocks that satisfy the required size are unconditionally targeted for allocation, so compared with the case of selecting and assigning free blocks with no attributes. There is an effect of suppressing fragmentation as much as possible, and it is possible to reduce an area acquisition failure due to a lack of a storage area.
[Brief description of the drawings]
FIG. 1 illustrates the principle of the present invention
FIG. 2 is a block diagram showing an embodiment of the present invention.
FIG. 3 is a diagram showing a configuration example of a storage area
FIG. 4 is an explanatory diagram illustrating management for one partition
FIG. 5 is an explanatory diagram of an attribute determination method
FIG. 6 is a flowchart for explaining free block allocation;
FIG. 7 is a flowchart for explaining attribute determination processing;
FIG. 8 is a configuration diagram of a conventional storage area.
FIG. 9 is a flowchart for explaining a conventional operation.
[Explanation of symbols]
1: CPU
2: Terminal
3: Disk unit
4: Main memory
5: Virtual storage device
6: System program storage area
7: User program storage area
8: Storage area management program storage area
9: Storage area
10: Storage area management program
10A: Search unit (search means)
10B: free block size determination unit (free block size determination means)
10C: attribute determination processing unit (attribute determination processing means)
10D: Allocation unit (allocation means)
10E: Address setting unit (address setting means)
10F: 1st attribute determination part (1st attribute determination means)
10G: Determination target address changing unit (determination target address changing means)
10H: Subtraction unit (subtraction means)
10I: second attribute determination unit (love 2 attribute determination means)
11: Section
12, 21-23: Page
13 to 15: first to third in-use blocks
16-18: First to third empty blocks
19: Requested size
20: Empty block
24, 25: Page boundary
26: Highest address
27: Address

Claims (6)

複数のプログラムによって共有され、複数の区画に分割されている記憶領域を有し、前記プログラムの獲得要求に対して前記記憶領域の一部を割り当てる記憶領域管理システムにおいて、
ある1区画の記憶領域に対して前記プログラムより獲得要求が出されたとき、空きブロックのキューを検索する検索手段と、
前記検索手段で検索された空きブロックに前記プログラムが要求したサイズを満足する空きブロックサイズが存在するか判定する空ブロックサイズ判定手段と、
前記プログラムにより属性の指定がなされているときは前記空きブロックサイズ判定手段により要求サイズを満足すると判定された空きブロックの領域属性と要求された属性との一致判定を行う属性判定処理手段と、
前記空きブロックサイズ判定手段により要求サイズを満足すると判定されるとともに前記空きブロックの領域属性が前記プログラムにより指定がなされている属性と一致していると前記属性判定処理手段で判断されたとき当該空きブロックを割り当て対象として割り当てを行う割り当て手段と、
を備えたことを特徴とする記憶領域管理システム。
In a storage area management system having a storage area shared by a plurality of programs and divided into a plurality of partitions, and assigning a part of the storage area to the acquisition request for the program,
Search means for searching a queue of free blocks when an acquisition request is issued from the program to a storage area of a certain partition;
Empty block size determination means for determining whether there is an empty block size that satisfies the size requested by the program in the empty blocks searched by the search means ;
When the attribute is specified by the program, attribute determination processing means for performing a match determination between the area attribute of the empty block determined to satisfy the requested size by the empty block size determining means and the requested attribute ;
The free come to have been determined by said attribute determining processing means area attribute of the free blocks together is determined to satisfy the requested size matches the attribute specification is made by the program by the free block size determining means An allocation means for allocating blocks as allocation targets;
A storage area management system comprising:
請求項1記載の記憶領域管理システムにおいて、
前記プログラムの要求サイズを満足する空きブロックサイズであるときに、属性の指定がなされていないときは、その空きブロックの領域属性がいかなる属性であっても当該空きブロックを割り当ての対象として割り当てることを特徴とする記憶領域管理システム。
The storage area management system according to claim 1,
If the attribute is not specified when the free block size satisfies the required size of the program, the free block is allocated as an allocation target regardless of the attribute of the free block area attribute. A storage area management system.
請求項1記載の記憶領域管理システムにおいて、
前記区画の各々はある定まったサイズを有する頁を複数含んで構成され、少なくとも中間の頁は全体について使用中のブロックがない無属性であり、
前記属性判定処理手段は、
前記空きブロックサイズ判定手段により要求サイズを満足すると判定された空きブロックの最高アドレスを設定するアドレス設定手段と、
前記最高アドレスで設定された当該頁の領域属性が前記プログラムにより指定がなされている属性と一致するか判定する第1の属性判定手段と、
前記第1の属性判定手段で当該頁が前記プログラムにより指定がなされている属性と一致していると判断された場合に、前記最高アドレスからプログラムにより要求されたサイズ分だけ減算して判定対象最小アドレスを求める減算手段と、
前記第1の属性判定手段で属性が一致しないと判定したきは前記空きブロックの最高アドレスを次頁の最高アドレスに切り下げる判定対象最高アドレス変更手段とから構成され、
前記割り当て手段は、
前記減算手段により減算された判定対象最小アドレス部分が前記プログラムにより指定がなされている属性と一致することが第2の属性判定手段で判定された場合または、前記最高アドレスを前記判定対象最高アドレス変更手段によって次頁の最高アドレスに切り下げた時に当該アドレス部分が前記第1の属性判定手段でプログラムにより指定されている属性と一致し、前記減算手段で求められた判定対象最小アドレス部分がプログラムにより指定されている属性と一致していると前記第2の属性判定手段で判定されたとき該空きブロックを割り当ての対象とすることを特徴とする記憶領域管理システム。
The storage area management system according to claim 1,
Each of the sections is configured to include a plurality of pages having a certain size, and at least intermediate pages are attributeless with no blocks in use as a whole.
The attribute determination processing means includes
Address setting means for setting the highest address of the empty block determined to satisfy the required size by the empty block size determining means;
First attribute determination means for determining whether the region attribute of the page set at the highest address matches the attribute specified by the program;
When the first attribute determining means determines that the page matches the attribute specified by the program, the determination target is minimum by subtracting the size requested by the program from the highest address. Subtraction means for obtaining an address ;
Said can and determines that the attribute does not match with the first attribute determining means is composed of a determination target maximum address changing means devalue the highest address of the empty block to the highest address of the next page,
The assigning means includes
When the second attribute determining unit determines that the determination target minimum address portion subtracted by the subtracting unit matches the attribute specified by the program, or the highest address is changed to the determination target highest address When the means is rounded down to the highest address of the next page, the address portion matches the attribute specified by the program in the first attribute determination means, and the determination target minimum address portion obtained by the subtraction means is specified by the program. A storage area management system characterized in that, when the second attribute determination means determines that the attribute matches the attribute being assigned, the free block is targeted for allocation .
複数のプログラムによって共有、複数の区画に分割されている記憶領域を有し、前記プログラムの獲得要求に対して前記記憶領域の一部を割り当てるプログラムを記憶したコンピュータ読み取り可能な記憶媒体において、
コンピュータに、
ある1区画の記憶領域に対して前記プログラムより獲得要求が出されたとき、空きブロックのキューを検索する検索ステップと、
前記検索ステップで検索された空きブロックに前記プログラムが要求したサイズを満足する空きブロックサイズが存在するか判定する空ブロックサイズ判定ステップと、
前記プログラムにより属性の指定がなされているときは前記空きブロックサイズ判定ステップにより要求サイズを満足すると判定された空きブロックの領域属性と要求された属性との一致判定を行う属性判定処理ステップと、
前記空きブロックサイズ判定ステップにより要求サイズを満足すると判定されるとともに前記空きブロックの領域属性が前記プログラムにより指定がなされている属性と一致していると前記属性判定処理ステップで判断されたとき当該空きブロックを割り当て対象として割り当てを行う割り当てステップと、
を実行させるためのプログラムを備えたコンピュータ読み取り可能な記録媒体。
A computer-readable storage medium having a storage area shared by a plurality of programs and divided into a plurality of partitions, and storing a program for allocating a part of the storage area in response to the acquisition request for the program,
On the computer,
A retrieval step of retrieving a queue of free blocks when an acquisition request is issued from the program to a storage area of a certain partition;
An empty block size determination step for determining whether an empty block size satisfying the size requested by the program exists in the empty block searched in the search step;
When an attribute is specified by the program, an attribute determination processing step of performing a match determination between an area attribute of a free block determined to satisfy a requested size by the free block size determination step and a requested attribute;
When the free block size determining step determines that the requested size is satisfied and the free block size region attribute matches the attribute specified by the program, the free space size is determined. An allocation step for allocating blocks as allocation targets;
The computer-readable recording medium provided with the program for performing this.
請求項4記載の記録媒体において、
前記プログラムの要求サイズを満足する空きブロックサイズであるときに、属性の指定がなされていないときは、その空きブロックの領域属性がいかなる属性であっても当該空きブロックを割り当ての対象として割り当てることを特徴とする記録媒体。
The recording medium of claim 4, wherein,
If the attribute is not specified when the free block size satisfies the required size of the program, the free block is allocated as an allocation target regardless of the attribute of the free block area attribute. recording medium body, characterized.
請求項4記載の記録媒体において、
前記区画の各々はある定まったサイズを有する頁を複数含んで構成され、少なくとも中間の頁は全体について使用中のブロックがない無属性であり、
前記属性判定処理ステップは、
前記空きブロックサイズ判定ステップにより要求サイズを満足すると判定された空きブロックの最高アドレスを設定するアドレス設定ステップと、
前記最高アドレスで設定された当該の領域属性が前記プログラムにより指定がなされている属性と一致するか判定する第1の属性判定ステップと、
前記第1の属性判定ステップで当該頁が前記プログラムにより指定がなされている属性と一致していると判断された場合に、前記最高アドレスからプログラムにより要求されたサイズ分だけ減算して判定対象最小アドレスを求める減算ステップと、
前記第1の属性判定ステップで属性が一致しないと判定したきは前記空きブロックの最高アドレスを次頁の最高アドレスに切り下げる判定対象最高アドレス変更ステップとから構成され、
前記割り当てステップは、
前記減算ステップにより減算された判定対象最小アドレス部分が前記プログラムにより指定がなされている属性と一致することが第2の属性判定ステップで判定された場合または、前記最高アドレスを前記判定対象最高アドレス変更ステップによって次頁の最高アドレスに切り下げた時に当該アドレス部分が前記第1の属性判定ステップでプログラムにより指定されている属性と一致し、前記減算ステップで求められた判定対象最小アドレス部分がプログラムにより指定されている属性と一致していると前記第2の属性判定ステップで判定されたとき該空きブロックを割り当ての対象とすることを特徴とする記録媒体。
The recording medium according to claim 4, wherein
Each of the sections is configured to include a plurality of pages having a certain size, and at least intermediate pages are attributeless with no blocks in use as a whole.
The attribute determination processing step includes:
An address setting step of setting the maximum address of a free block is determined to satisfy the required size by the free block size determining step,
A first attribute determination step for determining whether or not the region attribute of the page set at the highest address matches the attribute specified by the program;
If the is the page in the first attribute determination step it is determined that they match with the attribute specification is made by the program, by subtracting previous SL size of requested by the program from the highest address judgment target A subtraction step to obtain a minimum address ;
The can and attributes in a first attribute determination step determines that no match is composed of the determination target maximum address changing step devalue the highest address of the empty block to the highest address of the next page,
The assigning step includes
When it is determined in the second attribute determination step that the determination target minimum address portion subtracted in the subtraction step matches the attribute specified by the program, or the highest address is changed to the determination target highest address When the step is rounded down to the highest address of the next page, the address portion matches the attribute specified by the program in the first attribute determination step, and the determination target minimum address portion obtained in the subtraction step is specified by the program. A recording medium characterized in that, when it is determined in the second attribute determination step that the attribute matches the attribute being assigned, the empty block is targeted for allocation .
JP33548997A 1997-03-06 1997-12-05 Storage area management system and medium storing storage area management program Expired - Fee Related JP3980729B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33548997A JP3980729B2 (en) 1997-03-06 1997-12-05 Storage area management system and medium storing storage area management program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP5136697 1997-03-06
JP9-51366 1997-03-06
JP33548997A JP3980729B2 (en) 1997-03-06 1997-12-05 Storage area management system and medium storing storage area management program

Publications (2)

Publication Number Publication Date
JPH10307750A JPH10307750A (en) 1998-11-17
JP3980729B2 true JP3980729B2 (en) 2007-09-26

Family

ID=26391907

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33548997A Expired - Fee Related JP3980729B2 (en) 1997-03-06 1997-12-05 Storage area management system and medium storing storage area management program

Country Status (1)

Country Link
JP (1) JP3980729B2 (en)

Also Published As

Publication number Publication date
JPH10307750A (en) 1998-11-17

Similar Documents

Publication Publication Date Title
JP4139675B2 (en) Virtual volume storage area allocation method, apparatus and program thereof
US7107323B2 (en) System and method of file distribution for a computer system in which partial files are arranged according to various allocation rules
JP4323637B2 (en) Memory allocation method, memory allocation device, and storage medium
JP2858795B2 (en) Real memory allocation method
JPH02300949A (en) Memory control
JPS59180645A (en) Allotment of data set
JP6885193B2 (en) Parallel processing device, job management method, and job management program
CN112241320A (en) Resource allocation method, storage device and storage system
CN101645837A (en) Method and device for realizing load balancing
CN110727517A (en) Memory allocation method and device based on partition design
CN107870922B (en) Method, equipment and system for data deduplication
US20180292988A1 (en) System and method for data access in a multicore processing system to reduce accesses to external memory
US11093291B2 (en) Resource assignment using CDA protocol in distributed processing environment based on task bid and resource cost
US7509461B1 (en) Method and apparatus for intelligent buffer cache pre-emption
CN106294189B (en) Memory defragmentation method and device
JP5730446B1 (en) Hierarchical storage system with trial area, storage controller and program
JP3980729B2 (en) Storage area management system and medium storing storage area management program
CN108804571B (en) Data storage method, device and equipment
JP6194875B2 (en) Cache device, cache system, cache method, and cache program
US6766336B2 (en) Garbage collection apparatus and a garbage collection method
KR20170000109A (en) Method and apparatus for memory allocation and memory free in the memory pool including memory block list arranged in parallel
CN116204309A (en) Memory exchange method, memory exchange device, computer equipment and storage medium
KR20180035023A (en) Storage Orchestration Learning Optimization Target Volume Selection Method
CN117435352B (en) Lightweight memory optimal allocation method for mixed management of fixed-length and variable-length data
CN116301670B (en) Data partitioning method and data processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060207

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060221

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060414

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070220

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070413

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070605

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070628

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20100706

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100706

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110706

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110706

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120706

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120706

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130706

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees