JP2012043089A - Information processor and program - Google Patents
Information processor and program Download PDFInfo
- Publication number
- JP2012043089A JP2012043089A JP2010182218A JP2010182218A JP2012043089A JP 2012043089 A JP2012043089 A JP 2012043089A JP 2010182218 A JP2010182218 A JP 2010182218A JP 2010182218 A JP2010182218 A JP 2010182218A JP 2012043089 A JP2012043089 A JP 2012043089A
- Authority
- JP
- Japan
- Prior art keywords
- shared memory
- capacity
- area
- storage
- allocated
- 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
Links
Images
Abstract
Description
本発明は、情報処理装置及びプログラムに関する。 The present invention relates to an information processing apparatus and a program.
1台のコンピュータ上で複数のOS(Operating System)を並列的に動作させることによって1台のコンピュータを複数のコンピュータとして使用する仮想計算機が知られている。仮想計算機においては、仮想計算機を実現するための基本プログラムであるハイパーバイザを動作させ、ハイパーバイザの制御下で複数のOSを動作させる。
ハイパーバイザの役割の1つが、主記憶装置の記憶領域の管理である。例えば、特許文献1に記載された発明では、まず、第1の記憶領域を第1のOSに割り当て、第2の記憶領域を第2のOSに割り当て、第1の記憶領域の一部分を共有メモリに設定する。第1のOS、第2のOSは、記憶領域の物理アドレスと仮想アドレスとを対応付ける変換テーブルを有し、第2のOSがハイパーバイザに共有メモリの使用を要求すると、ハイパーバイザが、第2のOSの変換テーブルに記憶されている第2の記憶領域の先頭の物理アドレスを共有メモリの先頭の物理アドレスに書き換える。
There is known a virtual machine that uses one computer as a plurality of computers by operating a plurality of OSs (Operating Systems) in parallel on one computer. In the virtual machine, a hypervisor which is a basic program for realizing the virtual machine is operated, and a plurality of OSs are operated under the control of the hypervisor.
One of the roles of the hypervisor is to manage the storage area of the main storage device. For example, in the invention described in Patent Document 1, first, a first storage area is assigned to a first OS, a second storage area is assigned to a second OS, and a part of the first storage area is shared memory. Set to. The first OS and the second OS have a conversion table that associates the physical address and the virtual address of the storage area. When the second OS requests the hypervisor to use the shared memory, the hypervisor The top physical address of the second storage area stored in the OS conversion table is rewritten to the top physical address of the shared memory.
本発明は、仮想計算機の共有メモリの空き領域が断片化した場合であっても、仮想記憶機能を有しないOSに対して共有メモリを割り当てることを目的とする。 An object of the present invention is to allocate a shared memory to an OS that does not have a virtual storage function even when a free area of the shared memory of a virtual machine is fragmented.
請求項1に係る発明は、第1のプロセスから主記憶装置の共有メモリの割り当ての要求を受け付ける受付手段と、前記受付手段によって要求を受け付けた場合に、前記第1のプロセスを制御するOS(Operating System)が仮想記憶機能を有するか否かを判別する判別手段と、前記判別手段によって前記OSが仮想記憶機能を有しないと判別された場合に、前記共有メモリ内でどのプロセスにも割り当てられていない空き領域を特定し、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域を抽出する抽出手段と、前記抽出手段によって前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が抽出されなかった場合に、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が得られるように、前記第1のプロセス以外のプロセスに割り当て済みの記憶領域の記憶内容を共有メモリ内の別の記憶領域に書き込む書込手段と、前記書込手段によって得られた、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域の場所を前記第1のプロセスに通知し、前記書込手段によって書き込まれた記憶内容の記憶場所を当該記憶内容に対応するプロセスに通知する通知手段とを有することを特徴とする情報処理装置を提供する。 The invention according to claim 1 is a receiving unit that receives a request to allocate a shared memory of the main storage device from the first process, and an OS that controls the first process when the request is received by the receiving unit. The operating system is assigned to any process in the shared memory when it is determined by the determining means that the OS does not have a virtual storage function. An unoccupied free area, and extracting means for extracting a continuous free area of physical addresses having a capacity greater than or equal to the requested amount from the first process; and an amount greater than the requested amount from the first process by the extracting means A physical address having a capacity equal to or greater than the requested amount from the first process when a continuous free area of the physical address having a capacity of A writing means for writing storage contents of a storage area allocated to a process other than the first process to another storage area in the shared memory, so that a continuous free area can be obtained. The obtained storage location of the storage content written by the writing means is notified to the first process of the location of the continuous free area of the physical address having a capacity larger than the requested amount from the first process. An information processing apparatus is provided that includes notification means for notifying a process corresponding to the stored content.
請求項2に係る発明は、前記抽出手段は、前記判別手段によって前記OSが仮想記憶機能を有しないと判別された場合に、前記共有メモリ内でどのプロセスにも割り当てられていない空き領域を特定し、特定された空き領域の容量の合計が前記第1のプロセスからの要求量以上である場合に、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域を抽出することを特徴とする請求項1に記載の情報処理装置を提供する。 According to a second aspect of the present invention, the extracting unit specifies a free area that is not allocated to any process in the shared memory when the determining unit determines that the OS does not have a virtual storage function. If the total capacity of the specified free areas is equal to or larger than the requested amount from the first process, continuous free areas of physical addresses having a capacity larger than the requested amount from the first process are extracted. The information processing apparatus according to claim 1 is provided.
請求項3に係る発明は、コンピュータを、第1のプロセスから主記憶装置の共有メモリの割り当ての要求を受け付ける受付手段と、前記受付手段によって要求を受け付けた場合に、前記第1のプロセスを制御するOS(Operating System)が仮想記憶機能を有するか否かを判別する判別手段と、前記判別手段によって前記OSが仮想記憶機能を有しないと判別された場合に、前記共有メモリ内でどのプロセスにも割り当てられていない空き領域を特定し、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域を抽出する抽出手段と、前記抽出手段によって前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が抽出されなかった場合に、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が得られるように、前記第1のプロセス以外のプロセスに割り当て済みの記憶領域の記憶内容を共有メモリ内の別の記憶領域に書き込む書込手段と、前記書込手段によって得られた、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域の場所を前記第1のプロセスに通知し、前記書込手段によって書き込まれた記憶内容の記憶場所を当該記憶内容に対応するプロセスに通知する通知手段として機能させるためのプログラムを提供する。 The invention according to claim 3 controls the first process when the computer accepts a request for allocation of the shared memory of the main storage device from the first process and the request by the accepting unit. A determination unit that determines whether or not an operating system (OS) to operate has a virtual storage function, and which process in the shared memory when the determination unit determines that the OS does not have a virtual storage function An unassigned free area, and extracting means for extracting continuous free areas of physical addresses having a capacity equal to or greater than the requested amount from the first process; and from the first process by the extracting means When a continuous free area of a physical address having a capacity larger than the requested amount is not extracted, the capacity larger than the requested amount from the first process Writing means for writing the storage contents of a storage area allocated to a process other than the first process to another storage area in a shared memory, so that a continuous free area of physical addresses having The storage contents obtained by the writing means are notified to the first process of the location of the continuous free area of the physical address having a capacity equal to or larger than the requested amount from the first process. A program for causing the storage location to function as notification means for notifying the process corresponding to the storage content is provided.
請求項1、3に係る発明によれば、仮想計算機の共有メモリの空き領域が断片化した場合であっても、仮想記憶機能を有しないOSに対して共有メモリを割り当てることができる。
請求項2に係る発明によれば、無駄な処理を省くことができる。
According to the first and third aspects of the invention, even when the free area of the shared memory of the virtual machine is fragmented, the shared memory can be allocated to an OS that does not have a virtual storage function.
According to the second aspect of the invention, useless processing can be omitted.
これより、実施形態について説明する。
(1)構成
図1は、本実施形態の情報処理装置1の構成を概念的に表す図である。情報処理装置1は、例えば画像形成装置を制御する制御装置として画像形成装置に組み込まれる。
図2は、ハードウェア100の構成を表す図である。ハードウェア100は、CPU(Central Processing Unit)101、ROM(Read Only Memory)102、RAM(Random Access Memory)103、記憶部104、操作部105、表示部106を備えている。
The embodiment will now be described.
(1) Configuration FIG. 1 is a diagram conceptually showing the configuration of the information processing apparatus 1 of the present embodiment. The information processing apparatus 1 is incorporated in an image forming apparatus as a control device that controls the image forming apparatus, for example.
FIG. 2 is a diagram illustrating the configuration of the
RAM103は、主記憶装置であり、CPU101が各種プログラムを実行する際にプログラム本体や処理の対象となるデータを書き出すためのワークエリアとして使用される。
記憶部104は、ハードディスク記憶装置等の補助記憶装置であり、ハイパーバイザ200、第1のOS(Operating System)300、第2のOS400、アプリケーションプログラム等が記憶されている。ROM102には、ハイパーバイザ200及びOSの読み出しと実行の手順を表すプログラムが記憶されている。
操作部105は、キーボード及びマウスである。表示部106は、例えば液晶表示装置である。
The
The
The
ハイパーバイザ200は、ハードウェア100上で複数のOSを並列的に動作させるための制御を行うプログラムである。第1のOS300、第2のOS400は、ハイパーバイザの制御下で並列的に動作し、第1のプロセス310、第2のプロセス410は、それぞれ第1のOS300、第2のOS400の制御下で動作する。
ハイパーバイザ200は、RAM103が有する記憶領域の一部を、複数のプロセスからアクセス可能な共有メモリに設定し、共有メモリの各プロセスへの割り当てを行う。ハイパーバイザ200は、図3に示す共有メモリ管理テーブル201を有し、共有メモリにおいて各プロセスに割り当てられている領域の先頭アドレス及び容量を、プロセスの識別子と対応付けて共有メモリ管理テーブル201に記憶する。
The
The
なお、ここでは、2つのOSを並列的に動作させる例を示すが、並列的に動作させるOSの数はいくつでもよい。また、各OSの制御下で動作するプロセスの数はいくつでもよい。また、各プロセスは、各OSが実行する処理の単位としてのプロセスでもよいし、各OSの制御下で動作するアプリケーションプログラムが実行する処理の単位としてのプロセスでもよい。また、第1のOS300、第2のOS400とは別のOSをハードウェア100上で動作させ、このOSの制御下でハイパーバイザ200を動作させるようにしてもよい。
Although an example in which two OSs are operated in parallel is shown here, any number of OSs may be operated in parallel. Further, the number of processes operating under the control of each OS is not limited. Each process may be a process as a unit of processing executed by each OS, or may be a process as a unit of processing executed by an application program operating under the control of each OS. Further, an OS other than the first OS 300 and the second OS 400 may be operated on the
第1のOS300は、仮想記憶機能を有しないOSであり、例えば、リアルタイムOSや、OSに組み込まれたデバイスドライバである。仮想計算機においては、複数のOSのうちの或るOSに割り当てられた記憶領域が開放されたために空き領域が断片化する場合がある。この場合、空き領域の物理アドレスは、不連続となる。従って、第1のOS300が、断片化した各空き領域よりも大きな容量の記憶領域の割り当てを要求した場合、第1のOS300に断片化した空き領域を割り当てたとしても、第1のOS300は空き領域に正しくアクセスすることができない。 The first OS 300 is an OS that does not have a virtual storage function, and is, for example, a real-time OS or a device driver incorporated in the OS. In a virtual machine, a free area may become fragmented because a storage area allocated to a certain OS among a plurality of OSs is released. In this case, the physical address of the free area is discontinuous. Accordingly, when the first OS 300 requests allocation of a storage area having a capacity larger than each fragmented free area, the first OS 300 is free even if the fragmented free area is allocated to the first OS 300. The area cannot be accessed correctly.
一方、第2のOS400は、仮想記憶機能を有するOSである。第2のOS400は、RAM103上の物理アドレスと仮想アドレスとを対応付けて記憶するアドレス変換テーブル401を有する。仮想アドレス空間では、先頭アドレスから末尾アドレスまでが連続している。第2のOS400の制御下で動作する第2のプロセス410を起動する場合、ハイパーバイザ200は、RAM103上の空き領域を第2のプロセス410に割り当てるが、この際、空き領域の物理アドレスと仮想アドレスとを低位アドレス側から順に1対1に対応付けてアドレス変換テーブル401に書き込む。RAM103にアクセスする場合、第2のプロセス410は、アドレス変換テーブル401に基づいて、仮想アドレスを物理アドレスに変換し、当該物理アドレスに対応する記憶領域にアクセスする。
On the other hand, the second OS 400 is an OS having a virtual storage function. The
(2)動作
図4は、ハイパーバイザ200がプロセスに記憶領域を割り当てる処理の手順を表す図である。ここで、CPU101は、ハイパーバイザ200、第1のOS300及び第2のOS400を実行中である。いずれかのOSの制御下で新規にプロセスが起動され、当該プロセスが或る容量の共有メモリの割り当てをCPU101に要求した場合に、CPU101が、以下に示す処理を実行する。つまり、以下に示す処理は、CPU101がハイパーバイザ200を実行することによって実現される処理であって、動作の物理的な主体はCPU101であるが、便宜上、ハイパーバイザ200を動作の主体として説明する。
(2) Operation FIG. 4 is a diagram illustrating a procedure of processing in which the
ステップA01では、ハイパーバイザ200が、共有メモリの割り当てを要求したプロセスを制御するOSが仮想記憶機能を有するか否かを当該プロセス又は当該OSに問い合わせる。当該OSが仮想記憶機能を有する場合(ステップA01:YES)には、ステップA08に進み、仮想記憶機能を有しない場合(ステップA01:NO)には、ステップA02に進む。
要するに、CPU101は、第1のプロセスから主記憶装置の共有メモリの割り当ての要求を受け付ける受付手段と、前記受付手段によって要求を受け付けた場合に、前記第1のプロセスを制御するOS(Operating System)が仮想記憶機能を有するか否かを判別する判別手段の一例である。
In step A01, the
In short, the
ステップA02では、ハイパーバイザ200は、共有メモリ管理テーブル201を参照し、どのプロセスにも割り当てられていない領域(空き領域)の先頭アドレスと容量を特定する。空き領域が断片化している場合、先頭アドレスと容量の組が複数特定される。そして、空き領域の容量を合計し、空き容量の合計がプロセスからの要求量以上であるか否かを判断する。空き容量の合計が要求量以上である場合(ステップA02:YES)には、ステップA03に進み、要求量以上でない場合(ステップA02:NO)には、共有メモリの割り当てが不可能である旨を当該プロセスに通知し、処理を終了する。
In step A02, the
ステップA03では、ハイパーバイザ200は、ステップA02で特定された容量に基づいて、要求量以上の容量を有する物理アドレスの連続した空き領域を抽出する。要求量以上の容量を有する物理アドレスの連続した空き領域が抽出された場合(ステップA03:YES)には、ステップA04に進み、このような空き領域が抽出されなかった場合(ステップA03:NO)には、ステップA05に進む。
要するに、CPU101は、前記判別手段によって前記OSが仮想記憶機能を有しないと判別された場合に、前記共有メモリ内でどのプロセスにも割り当てられていない空き領域を特定し、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域を抽出する抽出手段の一例である。
In step A03, the
In short, when the
ステップA04では、ハイパーバイザ200は、要求量以上の容量を有する物理アドレスの連続した空き領域のうち、先頭アドレスが最も低位である空き領域を当該プロセスに割り当てる。具体的には、ハイパーバイザ200は、当該空き領域の先頭アドレスと容量を当該プロセスの識別子と対応付けて、共有メモリ管理テーブル201に書き込み、当該先頭アドレスを当該プロセスに通知する。
In step A04, the
一方、ステップA05では、ハイパーバイザ200は、アドレスの低位側から、空き領域の容量を、その和が要求量以上になるまで加算する。具体的には、先頭アドレスが最も低位である空き領域と先頭アドレスが2番目に低位である空き領域の容量の和を求める。求められた和が要求量以上でない場合は、先頭アドレスが3番目に低位である空き領域の容量を和に加算し、容量の和が要求量以上となるまでこの手順を繰り返す。そして、既にプロセスに割り当てられている領域のうち、最後に容量を加算した空き領域よりも先頭アドレスが低位である領域を抽出する。抽出された領域を要移動領域と呼ぶ。そして、要移動領域を割り当てられているプロセスを共有メモリ管理テーブル201から特定し、特定されたプロセスに対して、要移動領域の記憶内容の移動を通知する。
On the other hand, in step A05, the
ステップA06では、ハイパーバイザ200が、記憶内容の移動を通知されたプロセスから承諾の通知を受けるまで待機し、通知を受けたならば(ステップA06:YES)、ステップA07に進む。記憶内容の移動を通知されたプロセスは、記憶内容の移動が可能になり次第、移動の承諾をCPU101に通知する。
In step A06, the
ステップA07では、ハイパーバイザ200が、要移動領域の記憶内容の複製を共有メモリの先頭アドレスから連続させて書き込み、書き込みが完了したならば、書き込んだ領域の末尾の次のアドレスからステップA05で最後に容量を加算した空き領域の末尾のアドレスまでの記憶内容を消去し、記憶内容を消去した領域の先頭アドレスと容量を、共有メモリの割り当てを要求したプロセスの識別子と対応付けて、共有メモリ管理テーブル201に書き込み、当該プロセスに対して、当該先頭アドレスを通知する。さらに、記憶内容の移動の対象となったプロセスに対して、移動先の領域の先頭アドレスを通知し、処理を終了する。
要するに、CPU101は、前記抽出手段によって前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が抽出されなかった場合に、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が得られるように、前記第1のプロセス以外のプロセスに割り当て済みの記憶領域の記憶内容を共有メモリ内の別の記憶領域に書き込む書込手段と、前記書込手段によって得られた、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域の場所を前記第1のプロセスに通知し、前記書込手段によって書き込まれた記憶内容の記憶場所を当該記憶内容に対応するプロセスに通知する通知手段の一例である。
In step A07, the
In short, the
ステップA08では、ハイパーバイザ200が、共有メモリ管理テーブル201を参照し、空き領域の先頭アドレスと容量を特定し、アドレスの低位側から空き領域をプロセスに割り当てる。具体的には、空き領域の先頭アドレスと容量をプロセスの識別子と対応付けて共有メモリ管理テーブル201に書き込み、当該先頭アドレスをプロセスに通知する。空き領域が断片化している場合、先頭アドレスが最も低位の空き領域だけでは要求量を満たさないことがあり得るが、この場合には、断片化した複数の空き領域をアドレスの低位側から要求量を満たすまで順に割り当てる。割り当てが完了したならば、処理を終了する。
以上が、ハイパーバイザ200がプロセスに記憶領域を割り当てる処理の手順である。
In step A08, the
The above is the procedure of the process in which the
次に、上記の手順に従って行われる割り当ての具体例について説明する。
図5は、共有メモリ103Aの割り当ての様子を表す図である。この例では、ハイパーバイザ200は、共有メモリ103Aの記憶領域を4kB(kilobyte)を1ブロックとして管理し、共有メモリ103Aとして使用可能な容量は、最大で2MB(megabyte)すなわち512ブロックである。同図は、第1のプロセス310に対して先頭から256ブロックが割り当てられた状態を表す。なお、RAM103上では、共有メモリ103Aとは別の記憶領域が、各OS、各プロセスに専用の記憶領域として割り当てられるが、ここでは、共有メモリ103Aに設定された記憶領域のみ図示している。
Next, a specific example of assignment performed according to the above procedure will be described.
FIG. 5 is a diagram illustrating how the shared
次に、第2のプロセス410が、16ブロックの割り当てをハイパーバイザ200に要求したとする。すると、図6に示すように、既に第1のプロセス310に割り当てられているブロックの末尾の次のブロックを先頭として、16ブロックが割り当てられる。
次に、第1のプロセス310が、割り当てられたブロックの解放をハイパーバイザ200に通知したとする。すると、図7に示すように、先頭から256ブロックが解放されるが、空き領域は、第2のプロセス410に割り当てられたブロックにより、先頭から256ブロックの部分と末尾から240ブロックの部分に断片化されてしまう。
Next, it is assumed that the second process 410 requests the
Next, it is assumed that the
次に、第1のプロセス310が、384ブロックの割り当てをハイパーバイザ200に要求したとする。この場合、第1のプロセス310を制御する第1のOSは仮想記憶機能を有しないから、図7のように断片化した2つの空き領域を割り当てられると、2つの空き領域の物理アドレスが連続していないため、第1のプロセス310は共有メモリ103Aに正しくアクセスすることができない。そこで、ハイパーバイザ200は、図8に示すように、第2のプロセス410に割り当てられた16ブロックの記憶内容を共有メモリ103Aの先頭の16ブロックに移動させ、その結果、物理アドレスが連続した496ブロックの空き領域を得る。そして、この空き領域の先頭から384ブロックを第1のプロセス310に割り当てる。割り当てられた領域は、物理アドレスが連続している。
Next, it is assumed that the
(3)変形例
以下に示す変形例は互いに組み合わせてもよい。
(3.1)変形例1
実施形態では、第2のOS400が仮想記憶機能を有するものとしたが、ハイパーバイザ200の制御下で動作させるすべてのOSが仮想記憶機能を有しない構成でもよい。
(3.2)変形例2
実施形態では、プロセスからの要求量を確保するのに必要なだけ記憶内容を移動させるようにしたが、既に他のプロセスに割り当てられている領域の記憶内容をすべて移動させるようにしてもよい。また、実施形態では、要移動量域の記憶内容を物理アドレスの低位側に移動させるようにしたが、高位側に移動させるようにしてもよい。要するに、プロセスからの要求量以上の容量を有する物理アドレスの連続した記憶領域が得られるように、既に他のプロセスに割り当てられている領域の記憶内容を移動させる構成であればよい。
(3) Modifications Modifications shown below may be combined with each other.
(3.1) Modification 1
In the embodiment, the
(3.2) Modification 2
In the embodiment, the stored contents are moved as much as necessary to secure the requested amount from the process. However, all the stored contents in the areas already allocated to other processes may be moved. In the embodiment, the storage content of the required movement amount area is moved to the lower side of the physical address, but may be moved to the higher side. In short, the storage contents of an area already allocated to another process may be moved so that a continuous storage area of physical addresses having a capacity larger than the amount required by the process can be obtained.
(3.3)変形例3
実施形態では、プロセスに割り当てる領域の先頭アドレスと容量とを共有メモリ管理テーブル201に記憶させるようにしたが、先頭アドレスと末尾アドレスを記憶させるようにしてもよい。
(3.4)変形例4
実施形態のステップA02の処理を省略してもよい。
(3.5)変形例5
実施形態では、プロセスを制御するOSが仮想記憶機能を有するか否かをハイパーバイザ200がプロセスに問い合わせるようにしたが、プロセスが共有メモリの割り当てを要求する際に、OSが仮想記憶機能を有するか否かを示す情報を当該要求に含ませるようにしてもよい。
(3.6)変形例6
実施形態では、CPUがプログラムを実行することによって共有メモリの割り当てに関する処理を実行する例を示したが、同様の機能を電子回路に実装するようにしてもよい。
(3.3) Modification 3
In the embodiment, the head address and the capacity of the area allocated to the process are stored in the shared memory management table 201. However, the head address and the tail address may be stored.
(3.4) Modification 4
You may abbreviate | omit the process of step A02 of embodiment.
(3.5) Modification 5
In the embodiment, the
(3.6) Modification 6
In the embodiment, the example in which the CPU executes the process related to the allocation of the shared memory by executing the program has been described. However, the same function may be mounted on the electronic circuit.
1…情報処理装置、100…ハードウェア、101…CPU、102…ROM、103…RAM、103A…共有メモリ、104…記憶部、105…操作部、106…表示部、200…ハイパーバイザ、300…第1のOS、400…第2のOS、310…第1のプロセス、410…第2のプロセス、201…共有メモリ管理テーブル、401…アドレス変換テーブル DESCRIPTION OF SYMBOLS 1 ... Information processing apparatus, 100 ... Hardware, 101 ... CPU, 102 ... ROM, 103 ... RAM, 103A ... Shared memory, 104 ... Memory | storage part, 105 ... Operation part, 106 ... Display part, 200 ... Hypervisor, 300 ... 1st OS, 400 ... 2nd OS, 310 ... 1st process, 410 ... 2nd process, 201 ... Shared memory management table, 401 ... Address conversion table
Claims (3)
前記受付手段によって要求を受け付けた場合に、前記第1のプロセスを制御するOS(Operating System)が仮想記憶機能を有するか否かを判別する判別手段と、
前記判別手段によって前記OSが仮想記憶機能を有しないと判別された場合に、前記共有メモリ内でどのプロセスにも割り当てられていない空き領域を特定し、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域を抽出する抽出手段と、
前記抽出手段によって前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が抽出されなかった場合に、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が得られるように、前記第1のプロセス以外のプロセスに割り当て済みの記憶領域の記憶内容を共有メモリ内の別の記憶領域に書き込む書込手段と、
前記書込手段によって得られた、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域の場所を前記第1のプロセスに通知し、前記書込手段によって書き込まれた記憶内容の記憶場所を当該記憶内容に対応するプロセスに通知する通知手段と
を有することを特徴とする情報処理装置。 Receiving means for receiving a request for allocation of the shared memory of the main storage device from the first process;
A determination unit that determines whether an OS (Operating System) that controls the first process has a virtual storage function when a request is received by the reception unit;
When the determination unit determines that the OS does not have a virtual storage function, it identifies a free area that is not allocated to any process in the shared memory, and exceeds the amount requested from the first process. Extraction means for extracting continuous free space of physical addresses having a capacity;
When a continuous free area of a physical address having a capacity larger than the requested amount from the first process is not extracted by the extracting unit, a physical address having a larger capacity than the requested amount from the first process is extracted. Writing means for writing storage contents of a storage area allocated to a process other than the first process to another storage area in the shared memory so that a continuous free area can be obtained;
Notifying the first process of the location of consecutive free areas of physical addresses having a capacity equal to or greater than the requested amount from the first process, obtained by the writing means, and written by the writing means An information processing apparatus comprising: a notification unit configured to notify a storage location of stored content to a process corresponding to the stored content.
ことを特徴とする請求項1に記載の情報処理装置。 The extraction unit specifies a free area that is not allocated to any process in the shared memory when the determination unit determines that the OS does not have a virtual storage function, and The continuous free area of physical addresses having a capacity equal to or greater than the requested amount from the first process is extracted when the total capacity is equal to or greater than the requested amount from the first process. The information processing apparatus according to 1.
第1のプロセスから主記憶装置の共有メモリの割り当ての要求を受け付ける受付手段と、
前記受付手段によって要求を受け付けた場合に、前記第1のプロセスを制御するOS(Operating System)が仮想記憶機能を有するか否かを判別する判別手段と、
前記判別手段によって前記OSが仮想記憶機能を有しないと判別された場合に、前記共有メモリ内でどのプロセスにも割り当てられていない空き領域を特定し、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域を抽出する抽出手段と、
前記抽出手段によって前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が抽出されなかった場合に、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域が得られるように、前記第1のプロセス以外のプロセスに割り当て済みの記憶領域の記憶内容を共有メモリ内の別の記憶領域に書き込む書込手段と、
前記書込手段によって得られた、前記第1のプロセスからの要求量以上の容量を有する物理アドレスの連続した空き領域の場所を前記第1のプロセスに通知し、前記書込手段によって書き込まれた記憶内容の記憶場所を当該記憶内容に対応するプロセスに通知する通知手段
として機能させるためのプログラム。 Computer
Receiving means for receiving a request for allocation of the shared memory of the main storage device from the first process;
A determination unit that determines whether an OS (Operating System) that controls the first process has a virtual storage function when a request is received by the reception unit;
When the determination unit determines that the OS does not have a virtual storage function, it identifies a free area that is not allocated to any process in the shared memory, and exceeds the amount requested from the first process. Extraction means for extracting continuous free space of physical addresses having a capacity;
When a continuous free area of a physical address having a capacity larger than the requested amount from the first process is not extracted by the extracting unit, a physical address having a larger capacity than the requested amount from the first process is extracted. Writing means for writing storage contents of a storage area allocated to a process other than the first process to another storage area in the shared memory so that a continuous free area can be obtained;
Notifying the first process of the location of consecutive free areas of physical addresses having a capacity equal to or greater than the requested amount from the first process, obtained by the writing means, and written by the writing means A program for functioning as a notification means for notifying a process corresponding to a storage content of the storage content.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010182218A JP2012043089A (en) | 2010-08-17 | 2010-08-17 | Information processor and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010182218A JP2012043089A (en) | 2010-08-17 | 2010-08-17 | Information processor and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2012043089A true JP2012043089A (en) | 2012-03-01 |
Family
ID=45899345
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010182218A Pending JP2012043089A (en) | 2010-08-17 | 2010-08-17 | Information processor and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2012043089A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017111641A (en) * | 2015-12-17 | 2017-06-22 | 株式会社日立産機システム | Programmable controller |
-
2010
- 2010-08-17 JP JP2010182218A patent/JP2012043089A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017111641A (en) * | 2015-12-17 | 2017-06-22 | 株式会社日立産機システム | Programmable controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109542333B (en) | Memory system and control method for controlling nonvolatile memory | |
JP6524039B2 (en) | Memory system and control method | |
US9183157B2 (en) | Method for creating virtual machine, a virtual machine monitor, and a virtual machine system | |
JP6785204B2 (en) | Memory system and control method | |
TW201818249A (en) | Method of operating storage device managing multi-namespace | |
JP2012523623A (en) | Partitioning flash memory data storage devices | |
JP2019079463A (en) | Memory system and control method | |
KR102077149B1 (en) | Method for managing memory and apparatus thereof | |
JP2014206884A (en) | Information processor, information processing method, and program | |
US8499138B2 (en) | Demand-based memory management of non-pagable data storage | |
US20220066928A1 (en) | Pooled memory controller for thin-provisioning disaggregated memory | |
JP6653710B2 (en) | Computer and computer control method | |
US11151064B2 (en) | Information processing apparatus and storage device access control method | |
CN112162818B (en) | Virtual memory allocation method and device, electronic equipment and storage medium | |
CN112214162A (en) | Storage device and control method | |
US20220382672A1 (en) | Paging in thin-provisioned disaggregated memory | |
US20100299672A1 (en) | Memory management device, computer system, and memory management method | |
KR101549569B1 (en) | Method for performing garbage collection and flash memory apparatus using the method | |
JP2012043089A (en) | Information processor and program | |
JP6696052B2 (en) | Storage device and storage area management method | |
US7757053B2 (en) | Apparatus and method for managing stacks for efficient memory usage | |
JP7102482B2 (en) | Memory system and control method | |
US20230168822A1 (en) | Memory management method and semiconductor device adjusting size of contiguous memory allocation area | |
CN112947867A (en) | Full flash memory array high-performance storage system and electronic equipment | |
JP2022179798A (en) | Memory system and control method |