JP2002328811A - Virtual storage method - Google Patents
Virtual storage methodInfo
- Publication number
- JP2002328811A JP2002328811A JP2001130734A JP2001130734A JP2002328811A JP 2002328811 A JP2002328811 A JP 2002328811A JP 2001130734 A JP2001130734 A JP 2001130734A JP 2001130734 A JP2001130734 A JP 2001130734A JP 2002328811 A JP2002328811 A JP 2002328811A
- Authority
- JP
- Japan
- Prior art keywords
- memory
- task
- block
- secondary storage
- switching
- 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
- 238000000034 method Methods 0.000 title claims description 57
- 230000015654 memory Effects 0.000 claims abstract description 240
- 238000013507 mapping Methods 0.000 claims description 91
- 230000010365 information processing Effects 0.000 claims description 10
- 238000011084 recovery Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 7
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 1
- 210000004940 nucleus Anatomy 0.000 description 1
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、仮想記憶方法に関
し、特に、ダイレクトモードで動作する(仮想記憶を持
たない)オペレーティングシステムに部分的な仮想記憶
を提供する仮想記憶方法に関する。The present invention relates to a virtual storage method, and more particularly, to a virtual storage method for providing a partial virtual storage to an operating system (having no virtual storage) operating in a direct mode.
【0002】[0002]
【従来の技術】従来より、組み込み機器は、機器の大き
さやコストの制約から、実装メモリ容量の制限が厳し
い。また、通常、組み込み用のリアルタイム・オペレー
ティングシステムは、性能を重視し、仮想記憶を持たず
にダイレクトモードで動作するようになっている。2. Description of the Related Art Conventionally, in embedded devices, the mounting memory capacity is severely limited due to restrictions on the size and cost of the device. Usually, an embedded real-time operating system emphasizes performance and operates in a direct mode without a virtual memory.
【0003】[0003]
【発明が解決しようとする課題】しかしながら、近年、
組み込み機器は、性能が重視される一方で、携帯端末に
代表されるように、プログラムのダウンロードなどが可
能となり、大容量のデータ処理を行うアプリケーション
プログラムの実行環境も共存させる必要性が生じてき
た。ところが、従来の場合、組み込み機器用のリアルタ
イム・オペレーティングシステムは、仮想記憶を持たず
にダイレクトモードで動作するため、実装メモリ容量以
上のメモリをアプリケーションプログラムが利用するこ
とは不可能であり、大容量のデータ処理を行うアプリケ
ーションプログラムを実行させることができないという
課題があった。However, in recent years,
While embedding devices place emphasis on performance, programs such as mobile terminals can download programs, and the need to coexist with the execution environment of application programs that perform large-capacity data processing has arisen. . However, in the conventional case, since the real-time operating system for embedded devices operates in the direct mode without virtual memory, it is impossible for an application program to use a memory larger than the mounted memory capacity. However, there is a problem that it is not possible to execute an application program for performing the above data processing.
【0004】本発明はこのような状況に鑑みてなされた
ものであり、ダイレクトモードで動作するオペレーティ
ングシステム上で、実装メモリ容量以上のメモリをアプ
リケーションプログラムが利用することができるように
し、大容量のデータ処理を行うアプリケーションプログ
ラムの実行を可能とするものである。[0004] The present invention has been made in view of such a situation, and enables an application program to use a memory larger than a mounted memory capacity on an operating system operating in a direct mode, thereby providing a large-capacity memory. An application program for performing data processing can be executed.
【0005】[0005]
【課題を解決するための手段】請求項1に記載の仮想記
憶方法は、メモリと二次記憶とを備え、ダイレクトモー
ドで動作するオペレーティングシステムによって複数の
タスクの実行が制御される情報処理装置における仮想記
憶方法であって、メモリの少なくとも一部分を、各タス
ク毎に二次記憶にマッピングするマッピングステップ
と、タスクの切り替え時に、切り替え前のタスクが使用
していたメモリの内容を、メモリに対応する二次記憶の
マッピング先に退避する退避ステップと、切り替え後の
タスクが使用するメモリの内容を、メモリに対応する二
次記憶のマッピング先から回復する回復ステップとを備
えることを特徴とする。また、メモリの一部分と二次記
憶は、それぞれ所定の大きさのブロックに分割され、各
ブロックに振られたブロック番号で管理されるようにす
ることができる。また、メモリの一部分の各ブロック
と、各ブロックがマッピングされた二次記憶のブロック
との対応関係を示すメモリマッピングテーブルに基づい
て、タスク切り替え時のメモリの退避及び回復がブロッ
ク単位で行われるようにすることができる。また、各タ
スク毎に仮想的に設けられたタスクメモリは、所定の大
きさのブロックに分割され、各ブロックに振られたブロ
ック番号で管理され、タスクメモリの各ブロックと、各
ブロックがタスク毎にマッピングされた二次記憶のブロ
ックとの対応関係を示すタスクメモリマッピングテーブ
ルに基づいて、タスク切り替え時に、メモリマッピング
テーブルの内容が、切り替え後のタスクのタスクマッピ
ングテーブルの内容で書き換えられるようにすることが
できる。また、二次記憶の各ブロックの使用状況を示す
使用状況テーブルに基づいて、二次記憶に空きがあると
き、タスクメモリが二次記憶にマッピングされるように
することができる。請求項6に記載の情報処理装置は、
メモリと二次記憶とを備え、ダイレクトモードで動作す
るオペレーティングシステムによって複数のタスクの実
行が制御される情報処理装置であって、メモリの少なく
とも一部分を、各タスク毎に二次記憶にマッピングする
マッピング手段と、タスクの切り替え時に、切り替え前
のタスクが使用していたメモリの内容を、メモリに対応
する二次記憶のマッピング先に退避する退避手段と、切
り替え後のタスクが使用するメモリの内容を、メモリに
対応する二次記憶のマッピング先から回復する回復手段
とを備えることを特徴とする。請求項7に記載の仮想記
憶制御プログラムは、メモリと二次記憶とを備え、ダイ
レクトモードで動作するオペレーティングシステムによ
って複数のタスクの実行が制御される情報処理装置を制
御する仮想記憶制御プログラムであって、メモリの少な
くとも一部分を、各タスク毎に二次記憶にマッピングす
るステップと、タスクの切り替え時に、切り替え前のタ
スクが使用していたメモリの内容を、メモリに対応する
二次記憶のマッピング先に退避するステップと、切り替
え後のタスクが使用するメモリの内容を、メモリに対応
する二次記憶のマッピング先から回復するステップとを
情報処理装置に実行させることを特徴とする。本発明に
係る仮想記憶方法においては、メモリの少なくとも一部
分を、各タスク毎に二次記憶にマッピングし、タスクの
切り替え時に、切り替え前のタスクが使用していたメモ
リの内容を、メモリに対応する二次記憶のマッピング先
に退避し、切り替え後のタスクが使用するメモリの内容
を、メモリに対応する二次記憶のマッピング先から回復
する。According to a first aspect of the present invention, there is provided an information processing apparatus comprising a memory and a secondary storage, wherein execution of a plurality of tasks is controlled by an operating system operating in a direct mode. A virtual storage method, comprising: a mapping step of mapping at least a part of a memory to a secondary storage for each task; and, when switching a task, the contents of the memory used by the task before the switching correspond to the memory. It is characterized by comprising a saving step of saving to the mapping destination of the secondary storage and a recovery step of restoring the contents of the memory used by the task after switching from the mapping destination of the secondary storage corresponding to the memory. Further, a part of the memory and the secondary storage can be respectively divided into blocks of a predetermined size, and managed by the block numbers assigned to the respective blocks. Further, based on a memory mapping table indicating a correspondence relationship between each block of a part of the memory and the block of the secondary storage to which each block is mapped, saving and restoring of the memory at the time of task switching are performed in block units. Can be In addition, the task memory virtually provided for each task is divided into blocks of a predetermined size, managed by block numbers assigned to each block, and each block of the task memory and each block are assigned to each task. Based on the task memory mapping table indicating the correspondence relationship with the blocks of the secondary storage mapped to the memory, the contents of the memory mapping table are rewritten with the contents of the task mapping table of the switched task at the time of task switching. be able to. In addition, based on a use status table indicating the use status of each block of the secondary storage, when there is free space in the secondary storage, the task memory can be mapped to the secondary storage. The information processing device according to claim 6,
An information processing apparatus comprising a memory and a secondary storage, wherein execution of a plurality of tasks is controlled by an operating system operating in a direct mode, wherein at least a part of the memory is mapped to a secondary storage for each task. Means for saving the contents of the memory used by the task before switching to the secondary storage mapping destination corresponding to the memory at the time of the task switching; and storing the contents of the memory used by the task after the switching. Recovery means for recovering from the secondary storage mapping destination corresponding to the memory. A virtual storage control program according to claim 7, wherein the virtual storage control program includes a memory and a secondary storage, and controls an information processing apparatus in which execution of a plurality of tasks is controlled by an operating system operating in a direct mode. Mapping at least a portion of the memory to the secondary storage for each task; and when switching the tasks, the contents of the memory used by the task before the switching are mapped to the secondary storage corresponding to the memory. And causing the information processing apparatus to execute a step of saving the contents of the memory used by the task after the switching from a mapping destination of the secondary storage corresponding to the memory. In the virtual storage method according to the present invention, at least a part of the memory is mapped to the secondary storage for each task, and at the time of task switching, the contents of the memory used by the task before switching correspond to the memory. The contents are saved to the secondary storage mapping destination, and the contents of the memory used by the task after switching are restored from the secondary storage mapping destination corresponding to the memory.
【0006】[0006]
【発明の実施の形態】図1は、本発明を応用した組み込
み機器のオペレーティングシステムの一実施の形態の構
成例を示すブロック図である。同図に示すように、本実
施の形態は、タスク切り替えを行うタスクディスパッチ
ャ101と、メモリプール管理を行うメモリプール管理
102と、二次記憶ブロック使用状況管理を行う二次記
憶ブロック使用状況管理103とから構成されている。
ここで、メモリプールは実メモリであり、後述するタス
クメモリ(仮想的なメモリ)に割り当てられる。FIG. 1 is a block diagram showing a configuration example of an embodiment of an operating system of an embedded device to which the present invention is applied. As shown in the figure, in the present embodiment, a task dispatcher 101 that performs task switching, a memory pool management 102 that performs memory pool management, and a secondary storage block usage management 103 that performs secondary storage block usage management It is composed of
Here, the memory pool is a real memory, and is allocated to a task memory (virtual memory) described later.
【0007】タスクディスパッチャ101は、タスクデ
ィスパッチャ101によるタスク切り替え時に、タスク
メモリ(予めアドレスを定めた仮想記憶として利用する
メモリ上の領域)を、次にディスパッチするタスクのも
のに切り替えるタスクメモリ切替手段111と、タスク
の終了時にそのタスクの保有するタスクメモリに使用し
ていた二次記憶のブロックを解放するタスクメモリ終了
手段112とにより構成されている。[0007] When the task dispatcher 101 switches tasks, the task dispatcher 101 switches a task memory (an area on a memory used as a virtual memory whose address is determined in advance) to a task memory switching unit 111 for switching the task to be dispatched next. And a task memory ending means 112 for releasing a block of the secondary storage used for the task memory held by the task when the task ends.
【0008】メモリプール管理102は、タスクメモリ
に該当するメモリプールからメモリを確保する場合に、
タスクメモリに二次記憶のブロックを割り当てるタスク
メモリ確保手段113と、タスクメモリに該当するメモ
リプールにメモリを解放する場合に、タスクメモリに割
り当てられていた二次記憶のブロックを解放するタスク
メモリ解放手段114とから構成されている。[0008] The memory pool management 102, when reserving memory from the memory pool corresponding to the task memory,
A task memory securing unit 113 for allocating a secondary storage block to the task memory; and a task memory release for releasing the secondary storage block allocated to the task memory when releasing the memory to the memory pool corresponding to the task memory. And means 114.
【0009】二次記憶ブロック使用状況管理103は、
二次記憶のブロックの使用状況を管理するための二次記
憶ブロック確保手段115と、二次記憶ブロック解放手
段116とから構成されている。[0009] The secondary storage block usage status management 103 includes:
It comprises a secondary storage block securing means 115 for managing the use status of the blocks of the secondary storage, and a secondary storage block releasing means 116.
【0010】本実施の形態の各部を制御するオペレーテ
ィングシステムは、ダイレクトモードで動作し、そのメ
モリ管理は、組み込み用のものに多く見られるメモリプ
ール方式によるものであるとする(例えば、μITRO
N(IndustrialTRON(The Real
time Operating system Nuc
leus))等)。つまり、メモリ(RAM(rand
om accessmemory))は、いくつかのメ
モリプールと呼ばれるアドレスの連続した領域に分割し
て管理され、ユーザ(アプリケーションプログラム(以
下では、適宜、アプリケーションと記載する))は、ど
の領域からメモリを確保するかをメモリプールのIDに
て指定する。本実施の形態では、メモリの予め定めた所
定のアドレスの領域を各タスクに固有のメモリプールと
し、この領域をタスクスイッチ時に、二次記憶(例え
ば、フラッシュメモリ)に退避・回復することで、実装
メモリ容量以上のメモリをアプリケーションが利用する
ことができるようにするものである。このアプリケーシ
ョンは、複数のタスクによって構成される場合がある。It is assumed that the operating system that controls each section of the present embodiment operates in the direct mode, and that its memory management is based on the memory pool method often found in embedded systems (for example, μITRO).
N (Industrial TRON (The Real
time Operating system Nuc
leus)) etc.). That is, the memory (RAM (land)
om access memory)) is managed by being divided into several continuous areas of addresses called memory pools, and a user (an application program (hereinafter, appropriately referred to as an application)) secures a memory from which area. Is specified by the ID of the memory pool. In the present embodiment, an area at a predetermined address in a memory is set as a memory pool unique to each task, and this area is saved and restored in a secondary storage (for example, a flash memory) at the time of a task switch. This allows an application to use a memory larger than the mounted memory capacity. This application may be composed of multiple tasks.
【0011】図2に示すように、二次記憶の記憶領域
は、二次記憶の入出力単位である所定の入出力サイズ
(1度の入出力で読み書きできるサイズ)のブロックに
分割され、各ブロックは、各ブロックを一意に示すブロ
ックIDで管理されている。二次記憶への入出力は、こ
のブロックIDを指定してダイレクトに行うことができ
るものとする。以下では、各ブロックの大きさをブロッ
クサイズと記載する。As shown in FIG. 2, the storage area of the secondary storage is divided into blocks of a predetermined input / output size (a size that can be read / written by one input / output), which is an input / output unit of the secondary storage. The blocks are managed by a block ID that uniquely indicates each block. It is assumed that input and output to and from the secondary storage can be performed directly by designating the block ID. Hereinafter, the size of each block is referred to as a block size.
【0012】そして、この二次記憶の各ブロックの使用
状況(「使用中」又は「空き」)を管理するために、図
3に示すような二次記憶使用状況テーブル(二次記憶の
各ブロックの使用状況を表すテーブル)を用いる。図3
は、二次記憶使用状況テーブルの例を示している。図3
に示した例の場合、例えば、ブロック番号#1は「使用
中」であり、ブロック番号#3は「空き」であることが
示されている。In order to manage the use status ("in use" or "free") of each block of the secondary storage, a secondary storage use status table (each block of the secondary storage) as shown in FIG. Table showing the usage status of). FIG.
Shows an example of a secondary storage usage table. FIG.
In the example shown in FIG. 7, for example, it is indicated that the block number # 1 is “in use” and the block number # 3 is “empty”.
【0013】予めアドレスを定めたタスクメモリ(仮想
記憶)として利用される実メモリは、図4に示すよう
に、退避・回復する二次記憶のブロックに対応させるた
め、二次記憶のブロックサイズと同一のサイズで分割さ
れ、各ブロックにブロック番号が付与され、ブロック番
号によって管理される。As shown in FIG. 4, a real memory used as a task memory (virtual storage) whose address is determined in advance has a secondary storage block size corresponding to a secondary storage block to be saved and restored. The blocks are divided into the same size, each block is assigned a block number, and managed by the block number.
【0014】図5は、この実メモリの各ブロックが、二
次記憶のどのブロックに退避されているのかを示すブロ
ックマッピングテーブルの例を示している。この例の場
合、実メモリのブロック番号#1のブロックは、二次記
憶のブロック番号#12のブロックに対応し、実メモリ
のブロック番号#2のブロックは、二次記憶のブロック
番号#39のブロックに対応し、実メモリのブロック番
号#3のブロックは、二次記憶のブロック番号#22の
ブロックに対応し、実メモリのブロック番号#4のブロ
ックは、二次記憶のブロック番号#8のブロックに対応
し、実メモリのブロック番号Nのブロックは、二次記憶
のブロック番号Xのブロックに対応している。FIG. 5 shows an example of a block mapping table which indicates in which block of the secondary memory each block of the real memory is saved. In this example, the block with the block number # 1 in the real memory corresponds to the block with the block number # 12 in the secondary memory, and the block with the block number # 2 in the real memory has the block number # 39 in the secondary storage. The block having the block number # 3 in the real memory corresponds to the block having the block number # 22 in the secondary memory, and the block having the block number # 4 in the real memory corresponds to the block having the block number # 8 in the secondary memory. The block with the block number N in the real memory corresponds to the block with the block number X in the secondary memory.
【0015】システム全体では、図6に示すように、二
次記憶の使用状態を管理するための1つの二次記憶使用
状況テーブル605と、タスクメモリ域の実メモリの各
ブロックに二次記憶のどのブロックの情報が載っている
かを示す実メモリ状態を管理するための1つのブロック
マッピングテーブル601と、各タスクにおけるタスク
メモリの各ブロックが二次記憶のどのブロックに退避さ
れているかを管理するための各タスク毎に設けられたブ
ロックマッピングテーブル602乃至604が用いられ
る。In the entire system, as shown in FIG. 6, one secondary storage use state table 605 for managing the use state of the secondary storage, and each block of the real memory in the task memory area, One block mapping table 601 for managing the real memory state indicating which block information is stored, and for managing which block of the secondary memory each block of the task memory in each task is saved to The block mapping tables 602 to 604 provided for each task are used.
【0016】二次記憶使用状況テーブル605は、オペ
レーティングシステム起動時に、全ブロックが「空き」
として初期化される。また、実メモリのブロックマッピ
ングテーブル601は、オペレーティングシステム起動
時に、全ブロックが「0」として初期化される。また、
タスク毎のブロックマッピングテーブル602乃至60
4は、各タスクの生成時に作成され、全ブロックが
「0」として初期化される。The secondary storage usage table 605 indicates that all blocks are “empty” when the operating system is started.
Initialized as In the block mapping table 601 of the real memory, all blocks are initialized to “0” when the operating system is started. Also,
Block mapping tables 602 to 60 for each task
4 is created when each task is generated, and all blocks are initialized as “0”.
【0017】次に、図7乃至図12のフローチャートを
参照して、本実施の形態の全体の動作について詳細に説
明する。Next, the overall operation of the present embodiment will be described in detail with reference to the flowcharts of FIGS.
【0018】まず、図7のフローチャートを参照して、
タスクメモリ切り替え処理について説明する。オペレー
ティングシステムのタスクの切り替え時、図1のタスク
ディスパッチャ101においては、タスクメモリ切替手
段111が、タスクメモリを、次にディスパッチするタ
スクのものに切り替える。以下では、図6に示すよう
に、カレントタスクが「タスク1」であった状態から、
カレントタスクが「タスク2」である状態に切り替える
場合のタスクメモリ切替手段111の動作について、図
7のフローチャートを参照して説明する。First, referring to the flowchart of FIG.
The task memory switching process will be described. When the task of the operating system is switched, in the task dispatcher 101 of FIG. 1, the task memory switching unit 111 switches the task memory to that of the task to be dispatched next. In the following, as shown in FIG. 6, from the state where the current task is “task 1”,
The operation of the task memory switching unit 111 when switching to the state where the current task is “task 2” will be described with reference to the flowchart in FIG.
【0019】まず最初に、タスク1のブロックマッピン
グテーブル602を得る(ステップ701)。次に、ブ
ロックマッピングテーブル602に登録されているブロ
ックを、次の手順で二次記憶に退避する。まず、ステッ
プ702において、タスク1のブロックマッピングテー
ブル602の全エントリについて、ステップ703,7
04の処理が繰り返し実行されるように制御される。即
ち、タスク1のブロックマッピングテーブル602の全
エントリについて、ステップ703,704の処理が実
行されたか否かが判定される。その結果、タスク1のブ
ロックマッピングテーブル602の全エントリについ
て、ステップ703,704の処理が実行されていない
と判定された場合、ステップ703に進む。First, a block mapping table 602 for task 1 is obtained (step 701). Next, the blocks registered in the block mapping table 602 are saved in the secondary storage in the following procedure. First, in step 702, steps 703 and 7 are executed for all entries of the block mapping table 602 of task 1.
Control is performed such that the process of step 04 is repeatedly executed. That is, it is determined whether or not the processing of steps 703 and 704 has been executed for all entries of the block mapping table 602 of task 1. As a result, if it is determined that the processing of steps 703 and 704 has not been executed for all entries of the block mapping table 602 of task 1, the process proceeds to step 703.
【0020】ステップ703においては、タスク1のブ
ロックマッピングテーブル602の各エントリ(タスク
1のタスクメモリ域の実メモリの各ブロック)について
順番に、対応する二次記憶のブロックのブロック番号が
0でないか否かが判定される。その結果、対応する二次
記憶のブロックのブロック番号が0であると判定された
場合、ステップ702に戻り、ステップ702以降の処
理が繰り返し実行される。一方、対応する二次記憶のブ
ロックのブロック番号が0ではないと判定された場合、
そのタスクメモリ域の実メモリの上記ブロックのデータ
を、対応する二次記憶のブロック番号のブロックにWR
ITEする(ステップ704)。In step 703, for each entry of the block mapping table 602 for task 1 (each block of the real memory in the task memory area of task 1), the block number of the corresponding secondary storage block is not 0 in order. It is determined whether or not. As a result, when it is determined that the block number of the corresponding block of the secondary storage is 0, the process returns to step 702, and the processes after step 702 are repeatedly executed. On the other hand, when it is determined that the block number of the corresponding block of the secondary storage is not 0,
The data of the above block of the real memory in the task memory area is written into the block of the corresponding secondary storage block number by WR.
ITE is performed (step 704).
【0021】図6のブロックマッピングテーブル602
の例では、実メモリのブロック1乃至3に対応する二次
記憶のブロック番号が0ではないので、実メモリのブロ
ック1乃至3のメモリ内容を、それぞれ二次記憶のブロ
ック番号#3、#5、#8のブロックにWRITEす
る。即ち、実メモリのブロック1のメモリ内容を二次記
憶のブロック番号#3のブロックにWRITEし、実メ
モリのブロック2のメモリ内容を二次記憶のブロック番
号#5のブロックにWRITEし、実メモリのブロック
3のメモリ内容を二次記憶のブロック番号#8のブロッ
クにWRITEする。The block mapping table 602 shown in FIG.
In the example, the block numbers of the secondary storage corresponding to the blocks 1 to 3 of the real memory are not 0, so that the memory contents of the blocks 1 to 3 of the real memory are respectively stored in the block numbers # 3 and # 5 of the secondary storage. , # 8. That is, the memory contents of the block 1 of the real memory are WRITE to the block of the block number # 3 of the secondary memory, and the memory contents of the block 2 of the real memory are WRITE to the block of the block number # 5 of the secondary memory. Is written to the block of block number # 8 in the secondary storage.
【0022】また、ステップ702において、タスク1
のブロックマッピングテーブル602の全エントリにつ
いて、ステップ703,704の処理が実行されたと判
定された場合、ステップ705に進む。In step 702, task 1
If it is determined that the processing of steps 703 and 704 has been performed for all entries of the block mapping table 602, the processing proceeds to step 705.
【0023】次に、タスク1の次にディスパッチするタ
スク2のメモリ内容を回復する。まず、タスク2のブロ
ックマッピングテーブル603を得る(ステップ70
5)。次に、ブロックマッピングテーブル603に登録
されているブロックを、次の手順で二次記憶から回復す
る。まず、ステップ706において、タスク2のブロッ
クマッピングテーブルの全エントリについて、ステップ
707以降の処理が繰り返し実行されるように制御され
る。即ち、タスク2のブロックマッピングテーブルの全
エントリについて、ステップ707以降の処理が実行さ
れたか否かが判定される。その結果、タスク1のブロッ
クマッピングテーブルの全エントリについて、ステップ
707以降の処理が実行されていないと判定された場
合、ステップ707に進む。Next, the memory contents of task 2 to be dispatched after task 1 are recovered. First, a block mapping table 603 for task 2 is obtained (step 70).
5). Next, the blocks registered in the block mapping table 603 are recovered from the secondary storage in the following procedure. First, in step 706, control is performed so that the processing in step 707 and subsequent steps is repeatedly executed for all entries of the block mapping table of task 2. That is, it is determined whether or not the processing after step 707 has been executed for all entries of the block mapping table of task 2. As a result, if it is determined that the processing after step 707 has not been executed for all entries of the block mapping table of task 1, the process proceeds to step 707.
【0024】ステップ707においては、タスク1のブ
ロックマッピングテーブルの各エントリ(タスク2のタ
スクメモリ域の実メモリの各ブロック)について順番
に、対応する二次記憶のブロックのブロック番号が0で
ないか否かが判定される。その結果、対応する二次記憶
のブロックのブロック番号が0であると判定された場
合、ステップ706に戻り、ステップ706以降の処理
が繰り返し実行される。一方、対応する二次記憶のブロ
ックのブロック番号が0ではないと判定された場合、ス
テップ708に進む。In step 707, for each entry of the block mapping table of task 1 (each block of the real memory in the task memory area of task 2), it is determined whether the block number of the corresponding secondary storage block is not 0. Is determined. As a result, when it is determined that the block number of the corresponding block of the secondary storage is 0, the process returns to step 706, and the processes after step 706 are repeatedly executed. On the other hand, when it is determined that the block number of the corresponding block of the secondary storage is not 0, the process proceeds to step 708.
【0025】ステップ708においては、タスク2のブ
ロックマッピングテーブル603の各ブロックに対応す
る二次記憶のブロックのブロック番号と、実メモリのブ
ロックマッピングテーブル601の各ブロックに対応す
る二次記憶のブロックのブロック番号とが等しいか否か
が、タスク2のブロックマッピングテーブル603の各
ブロックについて順番に判定される。その結果、タスク
2のブロックマッピングテーブル603の各ブロックに
対応する二次記憶のブロックのブロック番号と、実メモ
リのブロックマッピングテーブル601の各ブロックに
対応する二次記憶のブロックのブロック番号とが等しい
と判定された場合、ステップ706に戻り、ステップ7
06以降の処理が繰り返し実行される。In step 708, the block number of the secondary storage block corresponding to each block of the block mapping table 603 of task 2 and the block number of the secondary storage block corresponding to each block of the real memory block mapping table 601 are set. Whether or not the block numbers are equal is determined for each block in the block mapping table 603 of task 2 in order. As a result, the block number of the secondary storage block corresponding to each block of the block mapping table 603 of task 2 is equal to the block number of the secondary storage block corresponding to each block of the block mapping table 601 of the real memory. If it is determined that there is no
The processes after 06 are repeatedly executed.
【0026】一方、タスク2のブロックマッピングテー
ブル603の各ブロックに対応する二次記憶のブロック
のブロック番号と、実メモリのブロックマッピングテー
ブル601の各ブロックに対応する二次記憶のブロック
のブロック番号とが等しくない(異なる)と判定された
場合、タスク2のブロックマッピングテーブル603の
対応する二次記憶のブロック番号のブロックのデータを
READし、実メモリの対応するブロックに書き込む
(ステップ709)。このとき、実メモリのブロックマ
ッピングテーブル601の対応する二次記憶のブロック
番号をREADしたブロックのブロック番号に更新する
(ステップ710)。その後、ステップ706に戻り、
ステップ706以降の処理が繰り返し実行される。ま
た、ステップ706において、タスク2のブロックマッ
ピングテーブル603の全エントリについてステップ7
07乃至710の処理が実行されたと判定された場合、
本処理を終了する。On the other hand, the block number of the secondary storage block corresponding to each block of the block mapping table 603 of the task 2, the block number of the secondary storage block corresponding to each block of the block mapping table 601 of the real memory, and the like. Is determined to be not equal (different), the data of the block of the block number of the corresponding secondary storage in the block mapping table 603 of task 2 is read and written to the corresponding block of the real memory (step 709). At this time, the block number of the corresponding secondary storage in the block mapping table 601 of the real memory is updated to the block number of the read block (step 710). Then, returning to step 706,
The processing after step 706 is repeatedly executed. In step 706, step 7 is executed for all entries of the block mapping table 603 of task 2.
When it is determined that the processes of 07 to 710 have been executed,
This processing ends.
【0027】図6に示したブロックマッピングテーブル
603の例では、タスク2のタスクメモリのブロック1
乃至3に対応する二次記憶のブロック番号が0でなく、
かつ、タスク2のブロック1乃至3に対応する二次記憶
のブロック番号と、実メモリのブロックマッピングテー
ブル601のブロック1乃至3に対応する二次記憶のブ
ロック番号とがそれぞれ異なっている(タスク2のタス
クメモリのブロック1に対応する二次記憶のブロック番
号は#1、実メモリのブロック1に対応する二次記憶の
ブロック番号は#3で異なる。また、タスク2のタスク
メモリのブロック2に対応する二次記憶のブロック番号
は#2、実メモリのブロック2に対応する二次記憶のブ
ロック番号は#5で異なる。また、タスク2のタスクメ
モリのブロック3に対応する二次記憶のブロック番号は
#6、実メモリのブロック3に対応する二次記憶のブロ
ック番号は#8で異なる)ので、これらのブロックのメ
モリ内容を、それぞれ二次記憶のブロック番号#1、#
2、#6のブロックからREADし、実メモリのブロッ
クマッピングテーブル601のブロック1乃至3を、い
まREADしたブロック番号#1、#2、#6の対応す
るブロックの内容に書き換える。また、タスク2のタス
クメモリのブロック4に対応する二次記憶のブロック番
号と、実メモリのブロック4に対応する二次記憶のブロ
ック番号は共に#9で等しいので、ブロック4について
はそのままとする。In the example of the block mapping table 603 shown in FIG.
The block number of the secondary storage corresponding to the items 3 to 3 is not 0,
The block numbers of the secondary storage corresponding to the blocks 1 to 3 of the task 2 and the block numbers of the secondary storage corresponding to the blocks 1 to 3 of the block mapping table 601 of the real memory are different from each other (task 2). The block number of the secondary storage corresponding to the block 1 of the task memory is # 1, and the block number of the secondary storage corresponding to the block 1 of the real memory is # 3. The corresponding secondary storage block number is # 2, and the secondary storage block number corresponding to the real memory block 2 is # 5, and the secondary storage block corresponding to the task memory block 3 of task 2. The number is # 6, and the block number of the secondary storage corresponding to the block 3 of the real memory is different at # 8). It is the block number # 1 of the secondary storage, #
READ from the blocks # 2 and # 6, and rewrite the blocks 1 to 3 of the block mapping table 601 of the real memory to the contents of the blocks corresponding to the currently read block numbers # 1, # 2 and # 6. Since the block number of the secondary storage corresponding to the block 4 of the task memory of the task 2 and the block number of the secondary storage corresponding to the block 4 of the real memory are both equal to # 9, the block 4 is left as it is. .
【0028】次に、タスク終了時の処理手順について説
明する。タスクの終了時には、オペレーティングシステ
ムのタスクのターミネータは、タスクメモリ終了手段1
12(図1)を用いて、当該タスクのタスクメモリを解
放する。以下、図8のフローチャートを参照して、タス
クメモリ終了手段112の動作について、「タスク1」
を終了させる場合を例に説明する。Next, the processing procedure at the end of a task will be described. At the end of the task, the terminator of the task of the operating system is the task memory ending means 1
12 (FIG. 1), the task memory of the task is released. Hereinafter, with reference to the flowchart of FIG.
Will be described as an example.
【0029】まず最初に、タスク1のブロックマッピン
グテーブル602を得る(ステップ801)。次に、ブ
ロックマッピングテーブル602に登録されているブロ
ックを次の手順で解放する。まず、ステップ802にお
いて、タスク1のブロックマッピングテーブル602の
全エントリについて、ステップ803,804の処理が
繰り返し実行されるように制御される。即ち、タスク1
のブロックマッピングテーブル602の全エントリにつ
いて、ステップ803,804の処理が実行されたか否
かが判定される。その結果、タスク1のブロックマッピ
ングテーブル601の全エントリについて、ステップ8
03,804の処理が実行されていないと判定された場
合、ステップ803に進む。First, a block mapping table 602 for task 1 is obtained (step 801). Next, the blocks registered in the block mapping table 602 are released in the following procedure. First, in step 802, control is performed such that the processing of steps 803 and 804 is repeatedly executed for all entries of the block mapping table 602 of task 1. That is, task 1
It is determined whether or not the processing of steps 803 and 804 has been executed for all the entries of the block mapping table 602 of FIG. As a result, for all entries of the block mapping table 601 of task 1, step 8
If it is determined that the processing of 03,804 has not been executed, the process proceeds to step 803.
【0030】ステップ803においては、タスク1のブ
ロックマッピングテーブル601の各エントリ(タスク
1のタスクメモリ域の実メモリの各ブロック)について
順番に、対応する二次記憶のブロックのブロック番号が
0でないか否かが判定される。その結果、対応する二次
記憶のブロックのブロック番号が0であると判定された
場合、ステップ802に戻り、ステップ802以降の処
理が繰り返し実行される。一方、対応する二次記憶のブ
ロックのブロック番号が0ではないと判定された場合、
二次記憶ブロック解放手段116(図1)は、その二次
記憶のブロック番号のブロックを解放する(ステップ8
04)。In step 803, for each entry of the block mapping table 601 of task 1 (each block of the real memory in the task memory area of task 1), whether the block number of the corresponding secondary storage block is not 0 is determined. It is determined whether or not. As a result, when it is determined that the block number of the corresponding block of the secondary storage is 0, the process returns to step 802, and the processes after step 802 are repeatedly executed. On the other hand, when it is determined that the block number of the corresponding block of the secondary storage is not 0,
The secondary storage block releasing means 116 (FIG. 1) releases the block of the secondary storage block number (step 8).
04).
【0031】また、ステップ802において、タスク1
のブロックマッピングテーブル601の全エントリにつ
いて、ステップ803,804の処理が実行されたと判
定された場合、本処理を終了する。In step 802, task 1
If it is determined that the processing of steps 803 and 804 has been executed for all the entries of the block mapping table 601 of FIG.
【0032】図6に示したブロックマッピングテーブル
602の例では、ブロック1乃至3に対応する二次記憶
のブロック番号が0でないので、これらのブロックに対
応するブロック番号#3、#5、#8の二次記憶のブロ
ックを解放する。In the example of the block mapping table 602 shown in FIG. 6, since the block numbers of the secondary storage corresponding to the blocks 1 to 3 are not 0, the block numbers # 3, # 5, # 8 corresponding to these blocks are used. Free the block of secondary storage of.
【0033】次に、メモリ確保時の処理手順について説
明する。タスクがメモリプールよりメモリを確保すると
き、オペレーティングシステムのメモリプール管理10
2(図1)は、指定メモリプールがタスクメモリの場
合、即ち、指定メモリプールが、複数のタスクのタスク
メモリに従って二次記憶がマッピングされるメモリプー
ルの一部である場合、確保したメモリの含まれるブロッ
クをタスクメモリ確保手段113(図1)を用いて確保
する。以下、図9のフローチャートを参照して、タスク
メモリ確保手段113の動作について、「タスク1」が
メモリを確保する場合を例に説明する。Next, a processing procedure for securing a memory will be described. When a task secures memory from the memory pool, the operating system memory pool management 10
2 (FIG. 1) indicates that when the specified memory pool is a task memory, that is, when the specified memory pool is a part of a memory pool to which secondary storage is mapped according to the task memories of a plurality of tasks, The included block is secured by using the task memory securing means 113 (FIG. 1). Hereinafter, the operation of the task memory securing unit 113 will be described with reference to the flowchart of FIG. 9 by taking as an example the case where “task 1” secures the memory.
【0034】まず、確保するメモリのアドレスとサイズ
から、対応するメモリのブロック番号を得る(オペレー
ティングシステムのメモリプールの空き管理の方法によ
っては、空きメモリ上に空きエリアを管理するためのポ
インタを格納するものがあり、この場合には、このポイ
ンタを格納するためのエリアも含めて、使用するメモリ
すべてを「確保対象」とする必要がある。しかし、本実
施の形態におけるオペレーティングシステムは、このよ
うな管理は行っておらず、純粋に確保メモリのみに注目
すればよいオペレーティングシステムであるとする)。
その確保位置や大きさによって、複数ブロックにまたが
ることもあり、この場合は、複数のブロック番号を得る
(ステップ901)。First, the block number of the corresponding memory is obtained from the address and size of the memory to be secured (depending on the method of managing the free space in the memory pool of the operating system, a pointer for managing the free area is stored in the free memory. In this case, all the memories to be used, including the area for storing the pointer, need to be “secured.” However, the operating system according to the present embodiment has It is assumed that the operating system does not perform any management, and only needs to pay attention to the reserved memory.)
Depending on the position and size of the block, the block may span a plurality of blocks. In this case, a plurality of block numbers are obtained (step 901).
【0035】次に、タスク1のブロックマッピングテー
ブル602を得る(ステップ902)。次に、ステップ
901で得た各ブロック番号について、ステップ904
乃至906の処理が実行されるように制御される(ステ
ップ903)。即ち、ステップ901において得られた
全ブロック番号について、ステップ904乃至906の
処理が実行されたか否かが判定される。その結果、全ブ
ロック番号について、ステップ904乃至906の処理
が実行されていないと判定された場合、ステップ904
に進む。Next, a block mapping table 602 for task 1 is obtained (step 902). Next, for each block number obtained in step 901, step 904
906 are controlled so as to be executed (step 903). That is, it is determined whether or not the processing of steps 904 to 906 has been performed for all the block numbers obtained in step 901. As a result, if it is determined that the processing of steps 904 to 906 has not been executed for all block numbers, step 904
Proceed to.
【0036】ステップ904においては、タスク1のブ
ロックマッピングテーブル602において二次記憶のブ
ロック番号が0であるか否かが判定される。その結果、
タスク1のブロックマッピングテーブル602に対応す
る二次記憶のブロック番号が0ではないと判定された場
合、ステップ903に戻り、ステップ903以降の処理
が繰り返し実行される。一方、タスク1のブロックマッ
ピングテーブル602に対応する二次記憶のブロック番
号が0であると判定された場合、ステップ905に進
む。In step 904, it is determined whether the block number of the secondary storage is 0 in the block mapping table 602 of the task 1. as a result,
When it is determined that the block number of the secondary storage corresponding to the block mapping table 602 of the task 1 is not 0, the process returns to the step 903, and the processes after the step 903 are repeatedly executed. On the other hand, when it is determined that the block number of the secondary storage corresponding to the block mapping table 602 of the task 1 is 0, the process proceeds to step 905.
【0037】ステップ905においては、二次記憶ブロ
ック確保手段115(図1)は、二次記憶の所定のブロ
ック番号のブロックを確保して、タスク1のブロックマ
ッピングテーブル602に当該ブロック番号を、対応す
る二次記憶ブロック番号として格納する(ブロックマッ
ピングテーブル602のエントリに記入する)。また、
実メモリのブロックマッピングテーブル601にも、当
該ブロック番号を対応する二次記憶ブロック番号として
格納する(ブロックマッピングテーブル601のエント
リにも記入する)(ステップ906)。その後、ステッ
プ903に戻り、ステップ903以降の処理が繰り返し
実行される。In step 905, the secondary storage block securing means 115 (FIG. 1) secures a block of a predetermined block number in the secondary storage, and assigns the block number to the block mapping table 602 of the task 1. (To be entered in the entry of the block mapping table 602). Also,
The block number is also stored as the corresponding secondary storage block number in the block mapping table 601 of the real memory (entry is also entered in the entry of the block mapping table 601) (step 906). Thereafter, the process returns to step 903, and the processing after step 903 is repeatedly executed.
【0038】また、ステップ903において、実メモリ
の全ブロック番号について、ステップ904乃至906
の処理が実行されたと判定された場合、本処理を終了す
る。Further, in step 903, steps 904 to 906 are performed for all block numbers of the real memory.
If it is determined that the process has been executed, the present process is terminated.
【0039】次に、メモリを解放するときの処理手順に
ついて説明する。タスクがメモリプールにメモリを解放
するとき、オペレーティングシステムのメモリプール管
理102(図1)は、指定メモリプールがタスクメモリ
の場合、解放したメモリの含まれるブロックをタスクメ
モリ解放手段114(図1)を用いて解放する。以下、
図10のフローチャートを参照して、タスクメモリ解放
手段114の動作について、「タスク1」がメモリを解
放する場合を例に説明する。Next, a processing procedure for releasing the memory will be described. When the task releases the memory to the memory pool, the memory pool management 102 of the operating system (FIG. 1) allocates the block containing the released memory to the task memory releasing unit 114 (FIG. 1) when the designated memory pool is the task memory. Release with. Less than,
With reference to the flowchart of FIG. 10, the operation of the task memory release unit 114 will be described by taking as an example the case where “task 1” releases the memory.
【0040】まず、メモリを解放した結果、未使用とな
るメモリのブロック番号を得る。その解放位置や大きさ
によって、複数ブロックが未使用となることもあり、こ
の場合は、複数のブロック番号を得る(ステップ100
1)。次に、タスク1のブロックマッピングテーブル6
02を得る(ステップ1002)。次に、ステップ10
01において得られた全ブロック番号について、ステッ
プ1004及びステップ1005の処理が実行されるよ
うに制御される(ステップ1003)。First, as a result of releasing the memory, the block number of the unused memory is obtained. Depending on the release position and size, a plurality of blocks may be unused. In this case, a plurality of block numbers are obtained (step 100).
1). Next, block mapping table 6 of task 1
02 (step 1002). Next, step 10
Control is performed so that the processing of steps 1004 and 1005 is executed for all the block numbers obtained in 01 (step 1003).
【0041】次に、ステップ1004において、ブロッ
クマッピングテーブル602において対応する二次記憶
のブロック番号が0でないか否かが判定される。その結
果、ブロックマッピングテーブル602において対応す
る二次記憶のブロック番号が0であると判定された場
合、ステップ1003に戻り、ステップ1003以降の
処理が繰り返し実行される。一方、ブロックマッピング
テーブル602において対応する二次記憶のブロック番
号が0でないと判定された場合、ステップ1005に進
む。Next, in step 1004, it is determined whether or not the block number of the corresponding secondary storage in the block mapping table 602 is not 0. As a result, when it is determined in the block mapping table 602 that the block number of the corresponding secondary storage is 0, the process returns to step 1003, and the processes after step 1003 are repeatedly executed. On the other hand, if it is determined in the block mapping table 602 that the block number of the corresponding secondary storage is not 0, the process proceeds to step 1005.
【0042】ステップ1005においては、二次記憶ブ
ロック解放手段116(図1)は、ブロックマッピング
テーブル602において対応する二次記憶のブロック番
号のブロックを解放して、タスク1のブロックマッピン
グテーブル602の当該ブロックの二次記憶のブロック
番号を0とする。In step 1005, the secondary storage block release means 116 (FIG. 1) releases the block of the corresponding secondary storage block number in the block mapping table 602, and The block number of the secondary storage of the block is set to 0.
【0043】次に、二次記憶ブロック確保手段115
(図1)の動作手順について、図11のフローチャート
を参照して説明する。まず、二次記憶使用状況テーブル
605を得る(ステップ1101)。次に、二次記憶使
用状況テーブル605の使用状況が「空き」のものを検
索する(ステップ1102)。Next, the secondary storage block securing means 115
The operation procedure of FIG. 1 will be described with reference to the flowchart of FIG. First, a secondary storage use status table 605 is obtained (step 1101). Next, a search is made for a secondary storage usage status table 605 whose usage status is “empty” (step 1102).
【0044】次に、ステップ1103において、二次記
憶使用状況テーブル605の使用状況が「空き」のブロ
ックが見つかったか否かが判定される。その結果、「空
き」が見つからなかった場合、メモリ空間不足のエラー
とする(ステップ1105)。一方、「空き」が見つか
った場合、二次記憶使用状況テーブル605の「空き」
のブロックを「使用中」に変更し、当該ブロック番号を
タスクメモリ確保手段113に返す(ステップ110
4)。ステップ1104又はステップ1105の処理が
終了すると、本処理を終了する。Next, in step 1103, it is determined whether or not a block whose usage status in the secondary storage usage status table 605 is "empty" is found. As a result, if "empty" is not found, it is determined that the memory space is insufficient (step 1105). On the other hand, if “empty” is found, “empty” in the secondary storage usage table 605
Is changed to “in use”, and the block number is returned to the task memory securing unit 113 (step 110).
4). When the processing of step 1104 or step 1105 ends, the present processing ends.
【0045】次に、二次記憶ブロック解放手段116
(図1)の動作手順について、図12のフローチャート
を参照して説明する。まず、二次記憶使用状況テーブル
605を得る(ステップ1201)、次に、タスクメモ
リ解放手段114によって解放指定されたブロックに対
応するエントリの使用状況を「空き」に変更する(ステ
ップ1202)。その後、本処理を終了する。Next, secondary storage block releasing means 116
The operation procedure of FIG. 1 will be described with reference to the flowchart of FIG. First, the secondary storage use status table 605 is obtained (step 1201). Next, the use status of the entry corresponding to the block specified to be released by the task memory release means 114 is changed to "free" (step 1202). After that, the process ends.
【0046】以上説明したように、本実施の形態によ
り、次にような効果を得ることができる。即ち、組み込
みソフトウェアの性能を維持したまま、大容量のメモリ
を必要とするアプリケーションの実行環境も共存させる
ことができることである。その理由は、ダイレクトモー
ドで動作するオペレーティングシステム上で、必要なタ
スクには部分的に仮想記憶に近い機能を提供することが
でき、この部分はタスク毎に多重に情報を保持すること
ができるためである。即ち、複数のタスクが実メモリの
所定のメモリ空間を共有することができる。これによ
り、ダイレクトモードで動作しながら、部分的にメモリ
を多重に持つことができる。As described above, according to the present embodiment, the following effects can be obtained. That is, it is possible to coexist an execution environment of an application requiring a large capacity memory while maintaining the performance of the embedded software. The reason is that, on an operating system operating in the direct mode, a function close to virtual memory can be partially provided for a necessary task, and this part can hold information multiplexed for each task. It is. That is, a plurality of tasks can share a predetermined memory space of the real memory. As a result, the memory can be partially multiplexed while operating in the direct mode.
【0047】次に、本発明を応用した他の実施の形態に
ついて説明する。本実施の形態は、先に挙げた実施の形
態における、実メモリ状態を表すブロックマッピングテ
ーブル601を持たないものである。先に挙げた実施の
形態では、この実メモリ状態を表すブロックマッピング
テーブル601にて実際のメモリ上の内容を管理し、タ
スク切り替え時に、切り替えた後のタスクが使用するデ
ータと同一のデータが実メモリに残っている場合には、
再度、二次記憶より回復することを防いでいる。本実施
の形態では、この処理を省略し、実装を簡略化したもの
である。Next, another embodiment to which the present invention is applied will be described. This embodiment does not have the block mapping table 601 indicating the real memory state in the embodiment described above. In the above-described embodiment, the contents in the actual memory are managed by the block mapping table 601 representing the actual memory state, and when the task is switched, the same data as the data used by the task after the switch is actually stored. If it remains in memory,
Again, it prevents recovery from secondary memory. In the present embodiment, this processing is omitted, and the implementation is simplified.
【0048】本実施の形態は、先に示した実施の形態に
おける以下の処理、即ち、図7のフローチャートに示し
たタスクメモリ切替手段111の動作において、実メモ
リに、いま回復しようとするブロックのデータが残って
いるか否かを検査する処理(ステップ708)と、回復
したブロックのブロック番号を実メモリのブロックマッ
ピングテーブル601に格納する処理(ステップ71
0)と、図9のフローチャートに示したタスクメモリ確
保手段113の動作において、確保したブロックのブロ
ック番号を実メモリのブロックマッピングテーブル60
1に格納する処理(ステップ906)とを省略したもの
である。本実施の形態においても、先の実施の形態の場
合と同様の効果を奏する。In this embodiment, in the following processing in the above-described embodiment, that is, in the operation of the task memory switching means 111 shown in the flowchart of FIG. A process of checking whether or not data remains (step 708) and a process of storing the block number of the recovered block in the block mapping table 601 of the real memory (step 71)
0) and the operation of the task memory allocating means 113 shown in the flowchart of FIG.
1 (step 906). In this embodiment, the same effects as in the previous embodiment can be obtained.
【0049】また、上述したような処理を実行するプロ
グラムは、CD−ROM(compact disc
read only memory)、DVD(dig
ital versatile disc)、フロッピ
ー(登録商標)ディスク、メモリカード等の様々な記録
媒体に記録して提供することができる。そして、そのプ
ログラムは、コンピュータの動作を制御し、プログラム
制御されたそのコンピュータが上記プログラムにより指
令される所定の処理を実行する。A program for executing the above-described processing is a CD-ROM (compact disc).
read only memory), DVD (dig)
It can be provided by being recorded on various recording media such as an italative disc, a floppy (registered trademark) disk, and a memory card. The program controls the operation of the computer, and the computer controlled by the program executes a predetermined process instructed by the program.
【0050】なお、上記実施の形態の構成及び動作は例
であって、本発明の趣旨を逸脱しない範囲で適宜変更す
ることができることは言うまでもない。It should be noted that the configuration and operation of the above embodiment are examples, and it is needless to say that the configuration and operation can be appropriately changed without departing from the spirit of the present invention.
【0051】[0051]
【発明の効果】以上の如く、本発明に係る仮想記憶方法
によれば、メモリの少なくとも一部分を、各タスク毎に
二次記憶にマッピングし、タスクの切り替え時に、切り
替え前のタスクが使用していたメモリの内容を、メモリ
に対応する二次記憶のマッピング先に退避し、切り替え
後のタスクが使用するメモリの内容を、メモリに対応す
る二次記憶のマッピング先から回復するようにしたの
で、ダイレクトモードで動作するオペレーティングシス
テム上で、実装メモリ容量以上のメモリをアプリケーシ
ョンが利用することができ、大容量のデータ処理を行う
アプリケーションの実行が可能となる。As described above, according to the virtual storage method of the present invention, at least a part of the memory is mapped to the secondary storage for each task, and the task before switching is used when switching tasks. The contents of the memory that was saved are saved to the secondary storage mapping destination corresponding to the memory, and the contents of the memory used by the task after switching are restored from the secondary storage mapping destination corresponding to the memory. On an operating system that operates in the direct mode, an application can use a memory larger than the installed memory capacity, and an application that performs large-capacity data processing can be executed.
【図1】本発明が適用される組み込み機器のオペレーテ
ィングシステムの一実施の形態の構成例を示すブロック
図である。FIG. 1 is a block diagram illustrating a configuration example of an embodiment of an operating system of an embedded device to which the present invention is applied.
【図2】二次記憶の記憶領域の例を示す図である。FIG. 2 is a diagram illustrating an example of a storage area of a secondary storage.
【図3】二次記憶使用状況テーブルの例を示す図であ
る。FIG. 3 is a diagram illustrating an example of a secondary storage use status table.
【図4】実メモリの例を示す図である。FIG. 4 is a diagram illustrating an example of a real memory;
【図5】ブロックマッピングテーブルの例を示す図であ
る。FIG. 5 is a diagram illustrating an example of a block mapping table.
【図6】実メモリのブロックマッピングテーブルと、各
タスクのブロックマッピングテーブルと、二次記憶使用
状況テーブルの対応関係を示す図である。FIG. 6 is a diagram showing a correspondence relationship among a block mapping table of a real memory, a block mapping table of each task, and a secondary storage use status table.
【図7】タスクメモリ切り替え処理手順を説明するため
のフローチャートである。FIG. 7 is a flowchart illustrating a task memory switching processing procedure.
【図8】タスクメモリ終了時の処理手順を説明するため
のフローチャートである。FIG. 8 is a flowchart illustrating a processing procedure at the time of ending the task memory.
【図9】タスクメモリ確保時の処理手順を説明するため
のフローチャートである。FIG. 9 is a flowchart for explaining a processing procedure when securing a task memory;
【図10】タスクメモリ解放時の処理手順を説明するた
めのフローチャートである。FIG. 10 is a flowchart illustrating a processing procedure when releasing a task memory.
【図11】二次記憶ブロック確保時の処理手順を説明す
るためのフローチャートである。FIG. 11 is a flowchart illustrating a processing procedure when a secondary storage block is secured.
【図12】二次記憶ブロック解放時の処理手順を説明す
るためのフローチャートである。FIG. 12 is a flowchart illustrating a processing procedure when a secondary storage block is released.
101 タスクディスパッチャ 102 メモリプール管理 103 二次記憶ブロック使用状況管理 111 タスクメモリ切替手段 112 タスクメモリ終了手段 113 タスクメモリ確保手段 114 タスクメモリ解放手段 115 二次記憶ブロック確保手段 116 二次記憶ブロック解放手段 601〜604 ブロックマッピングテーブル 605 二次記憶使用状況テーブル DESCRIPTION OF SYMBOLS 101 Task dispatcher 102 Memory pool management 103 Secondary storage block use status management 111 Task memory switching means 112 Task memory ending means 113 Task memory securing means 114 Task memory releasing means 115 Secondary storage block securing means 116 Secondary storage block releasing means 601 604 Block mapping table 605 Secondary storage usage table
Claims (7)
モードで動作するオペレーティングシステムによって複
数のタスクの実行が制御される情報処理装置における仮
想記憶方法であって、 前記メモリの少なくとも一部分を、各タスク毎に前記二
次記憶にマッピングするマッピングステップと、 前記タスクの切り替え時に、切り替え前の前記タスクが
使用していた前記メモリの内容を、前記メモリに対応す
る前記二次記憶のマッピング先に退避する退避ステップ
と、 切り替え後の前記タスクが使用する前記メモリの内容
を、前記メモリに対応する前記二次記憶のマッピング先
から回復する回復ステップとを備えることを特徴とする
仮想記憶方法。1. A virtual storage method in an information processing apparatus comprising a memory and a secondary storage, wherein execution of a plurality of tasks is controlled by an operating system operating in a direct mode, wherein at least a part of the memory is A mapping step of mapping to the secondary storage for each task; and when switching the task, saving the contents of the memory used by the task before switching to a mapping destination of the secondary storage corresponding to the memory. A virtual storage method, comprising: a save step of saving the contents of the memory used by the task after switching from a mapping destination of the secondary storage corresponding to the memory.
それぞれ所定の大きさのブロックに分割され、各ブロッ
クに振られたブロック番号で管理されることを特徴とす
る請求項1に記載の仮想記憶方法。2. A part of said memory and said secondary storage,
2. The virtual storage method according to claim 1, wherein the virtual storage method is divided into blocks each having a predetermined size and managed by block numbers assigned to the respective blocks.
ブロックがマッピングされた前記二次記憶のブロックと
の対応関係を示すメモリマッピングテーブルに基づい
て、前記タスク切り替え時の前記メモリの退避及び回復
がブロック単位で行われることを特徴とする請求項2に
記載の仮想記憶方法。3. Saving and restoring the memory at the time of the task switching based on a memory mapping table indicating a correspondence between each block of a part of the memory and a block of the secondary storage to which each block is mapped. 3. The virtual storage method according to claim 2, wherein is performed for each block.
メモリは、所定の大きさの前記ブロックに分割され、各
ブロックに振られたブロック番号で管理され、前記タス
クメモリの各ブロックと、各ブロックがタスク毎にマッ
ピングされた前記二次記憶のブロックとの対応関係を示
すタスクメモリマッピングテーブルに基づいて、タスク
切り替え時に、前記メモリマッピングテーブルの内容
が、切り替え後の前記タスクのタスクマッピングテーブ
ルの内容で書き換えられることを特徴とする請求項3に
記載の仮想記憶方法。4. A task memory virtually provided for each task is divided into blocks of a predetermined size, managed by block numbers assigned to each block, and each block of the task memory is Based on a task memory mapping table indicating the correspondence between the blocks and the blocks of the secondary storage mapped for each task, at the time of task switching, the content of the memory mapping table is changed to the task mapping table of the task after switching. 4. The virtual storage method according to claim 3, wherein the virtual storage method is rewritten with the following contents.
示す使用状況テーブルに基づいて、前記二次記憶に空き
があるとき、前記タスクメモリが前記二次記憶にマッピ
ングされることを特徴とする請求項4に記載の仮想記憶
方法。5. The task memory is mapped to the secondary storage when there is free space in the secondary storage, based on a usage status table indicating the usage status of each block of the secondary storage. The virtual storage method according to claim 4, wherein
モードで動作するオペレーティングシステムによって複
数のタスクの実行が制御される情報処理装置であって、 前記メモリの少なくとも一部分を、各タスク毎に前記二
次記憶にマッピングするマッピング手段と、 前記タスクの切り替え時に、切り替え前の前記タスクが
使用していた前記メモリの内容を、前記メモリに対応す
る前記二次記憶のマッピング先に退避する退避手段と、 切り替え後の前記タスクが使用する前記メモリの内容
を、前記メモリに対応する前記二次記憶のマッピング先
から回復する回復手段とを備えることを特徴とする情報
処理装置。6. An information processing apparatus comprising a memory and a secondary storage, wherein execution of a plurality of tasks is controlled by an operating system operating in a direct mode, wherein at least a part of the memory is provided for each task. Mapping means for mapping to secondary storage; and evacuation means for, when switching the task, saving the contents of the memory used by the task before switching to a mapping destination of the secondary storage corresponding to the memory. An information processing apparatus, comprising: recovery means for recovering the contents of the memory used by the task after switching from the mapping destination of the secondary storage corresponding to the memory.
モードで動作するオペレーティングシステムによって複
数のタスクの実行が制御される情報処理装置における仮
想記憶制御プログラムであって、 前記メモリの少なくとも一部分を、各タスク毎に前記二
次記憶にマッピングするステップと、 前記タスクの切り替え時に、切り替え前の前記タスクが
使用していた前記メモリの内容を、前記メモリに対応す
る前記二次記憶のマッピング先に退避するステップと、 切り替え後の前記タスクが使用する前記メモリの内容
を、前記メモリに対応する前記二次記憶のマッピング先
から回復するステップとを前記情報処理装置に実行させ
る仮想記憶制御プログラム。7. A virtual storage control program in an information processing apparatus comprising a memory and a secondary storage, wherein execution of a plurality of tasks is controlled by an operating system operating in a direct mode, wherein at least a part of the memory is Mapping to the secondary storage for each task; and when switching the task, saving the contents of the memory used by the task before switching to a mapping destination of the secondary storage corresponding to the memory A virtual storage control program that causes the information processing apparatus to execute the following steps: and a step of restoring the contents of the memory used by the task after switching from the mapping destination of the secondary storage corresponding to the memory.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001130734A JP2002328811A (en) | 2001-04-27 | 2001-04-27 | Virtual storage method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001130734A JP2002328811A (en) | 2001-04-27 | 2001-04-27 | Virtual storage method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2002328811A true JP2002328811A (en) | 2002-11-15 |
Family
ID=18979046
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001130734A Pending JP2002328811A (en) | 2001-04-27 | 2001-04-27 | Virtual storage method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2002328811A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008077255A (en) * | 2006-09-20 | 2008-04-03 | Nec Corp | Mobile terminal device, memory management method used therefor and program therefor |
| CN118573674A (en) * | 2024-08-01 | 2024-08-30 | 恒生电子股份有限公司 | Data access processing method, device, equipment, storage medium and program product |
-
2001
- 2001-04-27 JP JP2001130734A patent/JP2002328811A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008077255A (en) * | 2006-09-20 | 2008-04-03 | Nec Corp | Mobile terminal device, memory management method used therefor and program therefor |
| CN118573674A (en) * | 2024-08-01 | 2024-08-30 | 恒生电子股份有限公司 | Data access processing method, device, equipment, storage medium and program product |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100289628B1 (en) | Resource management method and apparatus for information processing system of multitasking facility | |
| US5978815A (en) | File system primitive providing native file system support for remote storage | |
| US5931935A (en) | File system primitive allowing reprocessing of I/O requests by multiple drivers in a layered driver I/O system | |
| US6088779A (en) | System and method for execution management of computer programs | |
| US9086920B2 (en) | Device for managing data buffers in a memory space divided into a plurality of memory elements | |
| US7707337B2 (en) | Object-based storage device with low process load and control method thereof | |
| JPS6243766A (en) | Control system for state of shared resources | |
| JPH09506988A (en) | A distributed control system for auxiliary storage in a virtual memory of a computer | |
| US7770177B2 (en) | System for memory reclamation based on thread entry and release request times | |
| JP2002328811A (en) | Virtual storage method | |
| JPH06214874A (en) | Memory managing system | |
| JP4354583B2 (en) | Access method and recording medium recording access processing program | |
| JP2005276164A (en) | Information processing apparatus, information processing method, information processing system, and information processing program | |
| JP2006085209A (en) | Computer system deployment method | |
| EP1008045A1 (en) | File system primitive allowing reprocessing of i/o requests by multiple drivers in a layered driver i/o system | |
| JP2994138B2 (en) | Catalog Variable Management Method for Interactive Processing System | |
| JPH0756800A (en) | Memory area dynamic management device | |
| JPH0337748A (en) | External storage accessing system utilizing main storage | |
| US6662214B1 (en) | Class-creation from disk | |
| JPH0237443A (en) | Main storage management system for electronic computer system | |
| JPH0394346A (en) | Method for expanding buffer | |
| JPH04167152A (en) | Idle memory control system | |
| KR20000003162A (en) | Effective operation method of flash memory | |
| CN119292804A (en) | A cross-process data zero-copy method and device | |
| JP3790997B2 (en) | Object management method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061013 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090219 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090303 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090427 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090602 |