JPH08507630A - Memory management device and memory management method - Google Patents

Memory management device and memory management method

Info

Publication number
JPH08507630A
JPH08507630A JP6520278A JP52027894A JPH08507630A JP H08507630 A JPH08507630 A JP H08507630A JP 6520278 A JP6520278 A JP 6520278A JP 52027894 A JP52027894 A JP 52027894A JP H08507630 A JPH08507630 A JP H08507630A
Authority
JP
Japan
Prior art keywords
memory
application
range
module
temporary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP6520278A
Other languages
Japanese (ja)
Inventor
ジー. エコルス,グラント
Original Assignee
ノベル,インコーポレイテッド
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 ノベル,インコーポレイテッド filed Critical ノベル,インコーポレイテッド
Publication of JPH08507630A publication Critical patent/JPH08507630A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension
    • G06F12/0623Address space extension for memory modules

Abstract

(57)【要約】 本発明は、DOS実行可能なプログラムあるいは「モジュール」のための環境を提供するものてあり、これらのプログラムあるいは「モジュール」は、それらのコードあるいはデータの一部によって使用されるメモリを共有しながら他の同様に構成されたプログラムと協同し得るように構成されている。この環境によって、コンベンショナルメモリ(102)の全般的な要件が削減される。モジュールは、コンベンショナルメモリからスワップアウトされ得る一時的なコードおよびデータ(403)、ならびにスワップ不可能でありコンベンショナルメモリに常駐するグローバルデータおよびコード(402)を有している。本発明は、一時的なコードおよびデータのためのコンベンショナルメモリの1つのブロックを(複数の)モジュールが共有し得るようにすることによって、コンベンショナルメモリの要件を削減する。ディスク記憶装置(204)へあるいはそこからモジュールの一時的なブロックをスワップする代わりに、一時的なブロックはコンベンショナルメモリと拡張メモリあるいはエクスパンディッドメモリとの間でスワップされる。これによって、オーバレイスキムと比較して転送時間が大幅に削減され、性能が向上する。 (57) [Summary] The present invention provides an environment for DOS executable programs or "modules", and these programs or "modules" are used by a part of their code or data. It is configured so that it can cooperate with other similarly configured programs while sharing memory. This environment reduces the overall requirements for conventional memory (102). Modules have temporary code and data (403) that can be swapped out of conventional memory, as well as global data and code (402) that are non-swappable and reside in conventional memory. The present invention reduces the requirements for conventional memory by allowing a block (s) to share one block of conventional memory for temporary code and data. Instead of swapping a temporary block of modules to or from disk storage (204), the temporary block is swapped between conventional memory and expanded or expanded memory. This significantly reduces transfer time and improves performance compared to overlay skim.

Description

【発明の詳細な説明】 メモリ管理装置およびメモリ管理方法 発明の背景 1.発明の分野 本発明は、一般的にコンピュータメモリシステムに関する。本発明は、特に、 コンピュータメモリの使用を制御し最適化するためのメモリ管理システムに関す る。 2.背景となる従来技術 典型的なコンピュータシステムは、多数のモジュールおよび構成要素から構成 される。コンピュータシステムは、典型的にマイクロプロセッサのような中央処 理装置(CPU)を備えている。マイクロプロセッサは、命令を得て、復号化し 、実行するプログラム制御された装置である。コンピュータシステムは、システ ムオペレーティングソフトウエア、アプリケーションプログラム命令およびデー タを格納するための記憶構成要素を備えている。これらの記憶構成要素は、読み 出し専用メモリ(ROM)、ランダムアクセスメモリ(RAM)あるいはディス ク記憶装置あるいはテープ記憶装置などのような大容量記憶装置あるいは他の適 切な記憶手段であり得る。 コンピュータシステムのオペレーションは、「オペレーティングシステム」と して公知である一連の命令によって制御 される。オペレーティングシステムは、入力/出力などのコンピュータシステム の基本的機能を制御するために用いられる。また、オペレーティングシステムは 、典型的にはROMあるいはディスク記憶装置などの永久記憶素子に格納され、 次にRAMへロードされ、そこで実行される。オペレーティングシステムの例と して、MS−DOS又はPC−DOSがある。コンピュータシステムは、アプリ ケーションプログラムを実行するために用いられる。 処理オペレーションの間に、データの格納されている上で命令が実行されると きに一時的にそのデータを格納することをCPUがされるかもしれない。さらに 、処理およびそれに基づきプログラムが実行されているオペレーティングシステ ムを制御するアプリケーションプログラムは、CPUにアクセス可能でなければ ならない。この情報は、「メインメモリ」として知られている資源、RAMにそ の情報を格納することによってCPUに対して利用可能になる。 メインメモリとして公知であるメモリ構成要素は、ユーザ、データ、プログラ ムあるいは処理に動的に割り当てられた不十分な資源である。この十分でない資 源に競合するメモリユーザは、アプリケーションプログラム、TSR(「常駐終 了型」プログラム)および他の処理を有する。アプリケーションプログラムの例 としては、ワードプロセッサ、表計算、作図プログラム、データベースなどを含 む。あるアプリケーションプログラムは、ROMに格納され得る。しかし、一般 的 には、アプリケーションプログラムは、ディスクドライブなどの大容量記憶装置 に格納される。初期設定に際して、CPUによって実行されるアプリケーション プログラムは、大容量記憶装置からRAMに転送される。 TSRは、コンピュータシステムでも用いられる。そのようなプログラムは「 ホットキー」および「ポップアップウインドウ」を提供し、ビデオ表示装置の角 に時計を表示したり、ディスクドライブの活動をモニタするなどの背景タスクを 行うために用いられる。TSRは、多くの他のアプリケーションのために書き込 まれ、ユーザがいくつかのTSRがコンピュータに同時に常駐することを望むこ とがしばしばある。各TSRはそれが位置づけられるメモリ空間を必要とするの で、TSRをシステムに付加すると、メインメモリへのメモリデマンドを増加さ せることになる。 メインメモリは、典型的にRAMなどのシリコンベースのメモリである。ある いは、ダイナミックランダムアクセスメモリ(DRAM)がメインメモリとして 用いられる。メインメモリRAMはコンベンショナルメモリ、拡張メモリ、エク スパンデッドメモリとしてアクセスされ得る。コンベンショナルメモリ コンベンショナルメモリは、CPUによって最も容易にアクセスされるRAM の領域である。CPUが必要とするデータおよび命令をコンベンショナルメモリ に格納することが望 ましい。しかし、コンベンショナルメモリの大きさに制限があり、それによって コンベンショナルメモリに格納され得るデータおよび命令の量が制限される。 初期のマイクロコンピュータは、64Kのアドレス空間を提供する16ビット アドレスバスを有していた。アプリケーションが必要とするメモリの容量が増加 するに従って、マイクロコンピュータは16ビットアドレスバスの制限を克服し なければならなかった。従って、IBMパーソナルコンピュータは、20ビット アドレスバスをサポートしていたセグメント化されたアドレス指定スキムと共に 導入された。20ビットアドレスバスは1024Kすなわち1Mのアドレス空間 を提供し、このアドレス空間は16ビットバスのアドレス空間の16倍である。 オリジナルのIBM PCおよびシステムソフトウエアは、コンベンショナルメ モリを人為的に640Kに制限して設計された。640Kから1Mのアドレス空 間のうちの384Kは、将来使用するため、主としてROMのために確保された 。それに続くコンピュータのモデルは、オリジナルのIBM PCと後方への互 換性があり、同一のPC−DOS MS−DOSオペレーティングシステムを用 いるように設計されているので、640Kに制限されたコンベンショナルメモリ は最新のコンピュータ上のアプリケーションに対して利用可能なメモリの容量を 制限し続けている。拡張メモリ(Extended Memory) 拡張メモリは、十分な数のアドレス線を有するマイクロプロセッサによって直 接アドレス指定され得る1024Kバイトを超えるRAMである。例えば、In tel 80286マイクロプロセッサは24ビットアドレス指定能力を有し、 メモリの最初の1Mの上の拡張メモリ内の15Mをアドレス指定し得る。インテ ル80386および80486マイクロプロセッサは32ビットアドレス指定能 力を有し、メモリの最初の1Mの上の拡張メモリのおよそ4ギガバイトをアドレ ス指定し得る。エクスパンディッドメモリ(Expanded Memory) 「エクスパンディッドメモリ仕様(expanded memory specification)」(E MS)としても公知であるエクスパンディッドメモリはエクスパンディッドメモ リとして用いるために、直接アクセス不可能であるエクスパンディッドメモリの 一部を確保し、それをページに分割する。エクスパンディッドメモリの1ページ をCPUが直接アクセス可能であるアドレス空間に一度で切換えることによって 、EMSは実質的に無制限な容量のメモリにアクセス可能である。しかし、EM Sがページを変えるためには時間がかかる。所望のデータが直接アクセス可能な メモリ内に位置づけられたEMSページフレームになければ、EMSはページフ レームの現在の内容をページアウトし、所望のデータを含むエクスパンディッド メモリからのページでページングしなければならない。そのよう なページ変えには時間が必要となるので、コンピュータの処理速度が遅くなる。 また、EMSは一般的にすべてのアプリケーションソフトウエアに適用可能では ない。アプリケーションソフトウエアは、EMSが利用可能である場合、特にE MSを利用するために書き込まれなければならない。メモリマップ 図1は、典型的なコンピュータ、すなわち、IBMパーソナルコンピュータな どの、8088/8086ファミリーマイクロプロセッサに基づきMS−DOS 環境下で動作するコンピュータ上のメインメモリRAMのメモリマップを示す。 図1のメモリマップは唯一可能なメモリなのではなく、典型的なメモリマップの 一例である。メモリマップは下から上に編成され、最下部はメモリ位置ゼロ(1 01)であり、最上部のメモリ内の最高位置まで続く。メモリマップは、3つの 基本領域を有している。第1の領域は、メモリの最底部の640Kであり、コン ベンショナルメモリ102と称される。コンベンショナルメモリ102はその全 体が読み取りおよび書き込みオペレーションを可能にするRAMによって構成さ れるが、すべてのシステムが640K全体を有するのではなく、メモリ空間の一 部は未使用のままであってもよい。 コンベンショナルメモリ102は、TSRおよびデバイスドライバを含む、シ ステムソフトウエア、アプリケーションソフトウエア、ユーザデータおよびほか のコードおよびデー タを格納するために用いられる。図1に示されるように、MS−DOSはメモリ の最下部を用いて、MS−DOSのコード106および関連づけられたデータ1 07を格納する。その上に、MS−DOSは、まとめてエレメント112として 図示されているアプリケーションソフトウエア、TSRおよびデバイスドライバ を格納する。 コンベンショナルメモリの上には、384Kの予約メモリ103があり、これ はRAMの640Kの上限の上から1024Kまでのメモリアドレス内に位置す る。予約メモリ領域103は、読み出し専用装置であるROMによって主に占め られる。予約メモリ領域において見いだされるROMは、システムROM、ビデ オROM、およびおそらくはハードディスクあるいはネットワークインタフェー スなどのその他の周辺装置のためのROMを含む。ROMに加えて、予約メモリ 領域103は、例えばビデオフレームバッファなどの他の種類の専用メモリも備 えている。 コンピュータの基本オペレーションをサポートするシステムROMは、例えば 、960Kから1024Kまでの予約メモリ領域103の最上部の64Kを占め る。予約メモリ103の残りの空間は未使用であるか、あるいは他の周辺装置あ るいはEMSページフレームをサポートするROMを含む他の目的のために使用 される。 上記のように、拡張メモリ111は1Mの上のすべてのメモリを含む。802 86のような24ビットアドレス指定能 力を有するマイクロプロセッサは、予約メモリ103およびコンベンショナルメ モリ102の1Mに加えて拡張メモリ111の15Mを含む16Mまでのメモリ をアドレス指定し得る。80386および80486のような、32ビットアド レス指定能力を有するマイクロプロセッサは、1Mの予約メモリ103およびコ ンベンショナルメモリ102のうえに4095Mの拡張メモリを含む4Gまでア ドレス指定可能である。1Mの真上に位置する拡張メモリ111内の領域は、高 位メモリ領域113とも称される。 TSRが増殖しアプリケーションプログラムが大きくなるに従って、コンベン ショナルメモリにおける空間に対する競合も大きくなる。TSRを用いる能力を 保持しながらアプリケーションプログラムにより大きなコンベンショナルメモリ を与えることが望ましい。 アプリケーションプログラムに対して利用可能なコンベンショナルメモリ空間 の量は、TSRが使用するメモリの容量を削減すること、TSRの数を減らすこ と、あるいはコンベンショナルメモリ外部のメモリにTSRを配置し直すことに よって増加され得る。 TSRの数を削減すると、機能および性能が低下し得るので望ましくない。各 TSRによって使用されるコンベンショナルメモリの容量を削減することは、各 TSRへの再書き込みが必要となるので実用的ではない。 TSRは、TSRが使用していなけれは他のソフトウエア によって使用され得るコンベンショナルメモリ空間の一部を占めるので、これら のプログラムがコンベンショナルメモリ102外部のメモリに移動し得れば、よ り大きいメモリがアプリケーションソフトウエアに利用可能になるであろう。あ る従来技術の方法では、TSRをコンベンショナルメモリ102から予約メモリ 103に移動させることによってアプリケーションソフトウエアに対して利用可 能なコンベンショナルメモリ102の量を増加させている。 この方法を実施するためには、未使用の予約メモリ103の量がまず決定され なければならない。また、TSRによって占められているコンベンショナルメモ リの容量も決定されなければならない。また、拡張メモリから割り当てを解除さ れたRAMの十分な量を予約されたメモリ領域にマップして、TSRのためのメ モリ空間を提供しなければならない。次に、TSRは、予約メモリ領域103内 の利用可能なメモリに再配置されなければならない。 この従来技術の方法には欠点がある。まず、この方法では割り当てを解除され た予約メモリ空間しか使用できない。この方法では、ROM、ビデオフレームバ ッファあるいは他の用途に割り当てられた予約メモリ空間を使用することはでき ない。また、TSRの再配置は、TSRに対するすべての参照が新しい場所に再 指示されることを保証するために行われなければならない。 コンベンショナルメモリから再配置を行う他の従来技術の 方法は、「オーバレイ」として公知である。オーバレイは、必要であればメモリ にスワップインおよびメモリからスワップアウトされる、プログラムの実行可能 な部分である。オーバレイには、オーバレイ内に位置する機能およびデータへの アクセスを制御するオーバレイマネージャとリンクされたオーバレイを用いるプ ログラムが要求されるという欠点がある。 オーバレイスキムの一例を、図2Aおよび図2Bに示す。まず図2Aを参照す ると、CPUによってアクセス可能なRAMの最初の1024バイトがメモリブ ロック201として示される。メモリブロック201は、コンベンショナルメモ リ102の領域を含む。コンベンショナルメモリ102は、DOSのようなオペ レーティングシステムコードを格納するための下方のアドレスに位置する領域2 02を含む。DOS領域202の上および予約メモリ103の下のコンベンショ ナルメモリ102の残りの領域112は、アプリケーション、TSR,デバイス ドライバなどを格納するために用いられる。 アプリケーションには大きすぎてコンベンショナルメモリ112に全てを格納 できないものもある。そのようなアプリケーションの1例は、ワードプロセッシ ングアプリケーションであるWord Perfectである。従って、一度に はWord Perfectの一部のみがメモリ領域112に格納される。残り の部分は、ディスク記憶装置204などの他のメモリに格納される。アプリケー ションの一部が必要とされると、その部分はディスク記憶装置204からメモリ 領域112に転送される。 図2Aの例においては、ブロックA203によって表されるアプリケーション の部分は、メモリ領域112に格納される。このアプリケーションは、ディスク 記憶装置204に格納される他の2つの部分、ブロックB205およびブロック C206に分割される。ディスク記憶装置204は、バスあるいは他の転送手段 207を介してRAM201と結合する。 ブロックA203に含まれている機能が呼出されるかあるいは使用されると、 ブロックA203はメモリ領域112に常駐し続ける。他の機能が必要になると 、その機能を提供するコードはディスク記憶装置204からメモリ201に転送 されなければならない。今度は図2Bを参照すると、ブロックB205はディス ク記憶装置204からメモリ領域112に転送される。従って、前にメモリ領域 112に常駐していたアプリケーションの部分ブロックA203は、ディスク記 憶装置204に転送される。ブロックB205がメモリ領域112において占め る領域は、ブロックA203が占める領域よりもより大きいように記載されてい る。ブロックは同一の大きさを有する必要はないが、メモリ領域112における 利用可能なアドレス空間と同じぐらいの大きさにならなければならない。 オーバレイの欠点は、オーバレイがディスクファイルにおよびそこからスワッ プされ、それによって実行時間が長くなり性能が低下するということである。あ るプログラムでは、 コードあるいはデータが常にコンベンショナルメモリに常駐することを必要とす る。オーバレイは、コンベンショナルメモリに永続的に常駐するコードあるいは データを特定するいかなる方法も提供しない。ブロックA203およびB205 がスワップされると、それらのブロック全体がスワップされる。ブロックA20 3でメモリ領域112に残っている部分はない。従って、そのようなプログラム はオーバレイスキムを使用できない。TSRには、オーバレイに変換され得ない ものもある。これらのTSRは、内部DOS機能を提供するものも含む。この一 例は、ユタ州、Novell,Inc.of Provo、によって製造されたNetWare Dos Client ソフトウエアである。 従って、従来技術は、性能を低下させずにTSRによって使用されるコンベン ショナルメモリの量を削減するシステムを提供していない。 発明の要旨 本発明は、メモリのコードあるいはデータの一部によって使用されるメモリを 共有しながら他の同様に構成されたプログラムと協同し得るように構成されてい るDOS実行可能なプログラムを提供する。これによって、コンベンショナルメ モリの全般的な要件が削減される。本発明において、これらのプログラムはモジ ュールと称され、アプリケーションプログラム、TSRあるいはこのモジュール フォーマットに変換されるその他の実行可能なファイルであり得る。モジュール は、コンベンショナルメモリからスワップアウトされ得る一時的なコードおよび データ、ならびにスワップ不可能でありコンベンショナルメモリに常駐するグロ ーバルデータおよびコードを有している。 メモリに常駐するグローバルデータを提供することによって、本発明のモジュ ールは、他のモジュールだけではなく、割り込みを扱うものおよび外部からある いは非同期的に利用可能であるその他のコードおよびデータも呼出得る。従って 、本発明はオーバレイよりもプログラミングインタフェースをサポートする。 本発明は、コンベンショナルメモリの1つのブロックを複数のモジュールが共 有し得るようにすることによって、コンベンショナルメモリの要件を削減する。 モジュールの数に無関係に、使用されるために割り付けられたコンベンショナル メモリのブロックの大きさは同じままである。割り付けられたメモリブロックは 、コンベンショナルメモリブロックを共有するモジュールの一時的なコードある いはデータの最も大きいブロックを格納するために十分な大きさを有する。 ディスク記憶装置へあるいはそこからモジュールの一時的なブロックをスワッ プする代わりに、一時的なブロックはコンベンショナルメモリと拡張メモリある いはエクスパンディッドメモリとの間でスワップされる。これによって、オーバ レイスキムと比較して転送時間が大幅に削減され、性能が向上する。 図面の簡単な説明 図1は、典型的なコンピュータシステムのメモリ組織を示すメモリマップであ る。 図2Aおよび図2Bは、従来技術のオーバレイスキムを示す図である。 図3は、本発明のモジュール構造を示す図である。 図4Aから図4Eは、メモリマネージャのオペレーションを示す図である。 図5は、本発明のプレイニット(Pre-init)オペレーションを示すフローチャ ートである。 図6は、本発明の実イニット(real-init)オペレーションを示すフローチャ ートである。 図7は、本発明におけるモジュールの呼出しを示すフローチャートである。 図8は、本発明を実施するためのコンピュータシステムのブロック図である。 図9は、VMCBデータブロックを示す図である。 本発明の詳細な説明 コンピュータシステムにおけるコンベンショナルメモリをより有効に用いる方 法が記載される。以下の記載においては、より綿密に本発明を記載するために、 コンピュータシステムのタイプ、メモリアドレス位置、メモリ容量などの多数の 具 体的な事項が詳細に記載される。しかし、これらの具体的な詳細事項がなくても 本発明が実行され得ることは当業者には明らかである。他の例においては、本発 明を不必要にわかりにくくすることのないように、公知の特徴は詳細には記載さ れない。 本発明は、TSRおよび他のプログラムがコンベンショナルメモリにおける空 間を共有する方法および装置を提供することによって、コンベンショナルメモリ 要件を削減する。TSRおよびプログラムは「モジュール」として構成され、モ ジュールマネージャはコンベンショナルメモリへのモジュールのスワップインお よびそこからのスワップアウトを制御する。本発明の好ましい実施態様において は、ある時点で1つのモジュールしかコンベンショナルメモリに常駐しない。他 のモジュールは、拡張メモリあるいはエクスパンディッドメモリに格納される。 これによって、時間の消費および性能を低下させるディスクスワップが回避され る。 モジュールマネージャのオペレーションを図4Aから図4Eに示す。図4Aは 、コンベンショナルメモリ、予約メモリ、拡張メモリおよびエクスパンディッド メモリのメモリマップを示している。コンベンショナルメモリ102は、下部メ モリ領域においてDOS記憶領域202を有している。コンベンショナルメモリ 102内のDOS領域202のちょうど上には、モジュールマネージャ401の ために保存されている空間がある。モジュールマネージャ401の上には、シス テ ムのために利用可能なモジュールのグローバルコードおよびデータのために予約 されている領域がある。グローバルコードおよびデータ領域402の上に格納さ れているのは、モジュールの一時的なブロックのために予約されている領域であ る。一時的なブロックモジュール403は、システム中のいずれかのモジュール の最も大きい一時的なブロックによって固定および決定される上限404を有し ている。上限404の上でかつ予約メモリ103の下のコンベンショナルメモリ 102内の空間は、他のアプリケーションおよび処理のために利用可能である。 予約メモリ103はROMおよびエクスパンディッドメモリ406のために用 いられる。予約メモリ103の上には、拡張メモリ111(1024Kバイトの 上)がある。拡張メモリ111は、モジュールAと称されるモジュールの一時的 なブロック405を格納する。エクスパンディッドメモリ406は、モジュール BおよびCとそれぞれ称される一時的なブロック407および408を有してい る。 グローバルコードおよびデータがグローバル領域402に格納され、一時的な ブロック403の上限404が限定されると、モジュールマネージャはモジュー ルが呼出されるとモジュールにアクセスする準備ができている。図4Bを参照し ながら、モジュールBが要求される場合を考える。モジュールBは、グローバル 領域402に永続的に常駐するコードを有し得る。モジュールBが呼出されると 、モジュールマネー ジャはモジュールBの一時的なブロック407をエクスパンディッドメモリ40 6からコンベンショナルメモリ102の一時的なブロック403に転送する。こ のとき、他のモジュールのいずれかの一時的なブロックがコンベンショナルメモ リから外にスワップされる。そして、処理呼出しモジュールBは、モジュールB がコンベンショナルメモリに常に常駐するかのように、一時的なブロックにアク セスし得る。図4Bに示されるように、モジュールBの一時的なブロック407 は、一時的なブロック403内の利用可能なアドレス空間のすべてを使用するの ではない。一時的なブロック403の上限404は固定されたままである。 図4Cから図4Eに、モジュールが他のモジュールを呼出すプロセスを示す。 モジュールCの一時的なブロック408は、図4Cに図示されているようにコン ベンショナルメモリ102の一時的なブロック403に常駐している。モジュー ルCは、モジュールマネージャを介してモジュールAを呼出す。モジュールマネ ージャは、呼出しを行っているモジュールおよびディスティネーションモジュー ルとの接触を保っている。モジュールCの一時的なブロック408は、モジュー ルAの一時的なブロック405とスワップされる。図4Dを参照すると、モジュ ールAの一時的なブロック405は一時的なブロック403に格納される。モジ ュールAの一時的なブロック405は一時的なブロック403のすべてのアドレ ス空間を占めることに留意されたい。モジュールAがある機 能のために呼出され、その機能を実行した後、図4Eに示されるように、モジュ ールマネージャはモジュールAの一時的なブロック405をモジュールCの一時 的なブロック408とスワップする。モジュール構造 本発明においては、モジュールのコードおよびデータは、コンベンショナルメ モリにおけるモジュール管理に一般的な解決法が与えられるように、異なるカテ ゴリーに構成される。これらのカテゴリーは、機能タスク指名テーブル(ジャン プテーブル)、一時的なコードおよびデータ、グローバルコードおよびデータな らびにスタートアップコードおよびデータを含む。モジュールのフォーマットは 図3に示される。 モジュール301の構造は、3つの領域302、303および304を有して いる。領域302は、ジャンプテーブル305および一時的なグループ306を 有している。領域303はグローバルコードおよびデータを含み、領域304は スタートアップコードおよびデータを有している。一時的な領域302は、「ス ワップ可能な」コードおよびデータを有している。すなわち、このデータはコン ベンショナルメモリおよび(拡張されたあるいはエクスパンドされた)エンハン ストメモリの間でスワップインあるいはスワップアウトされ得る。ジャンプテーブル ジャンプテーブル306はモジュールによってサポートされる機能を表す。ジ ャンプテーブル(一時的なコードとも称される)は、いつでもスワップアウトさ れ得る。従って、割り込みを扱うもの(あるいは直接アクセス可能であるいずれ かのコードセグメント)は一時的なコードセグメントの中に存在し得ない。ジャ ンプテーブルにおける第1のエントリは、モジュールイニットルーチンへのポイ ンタである。ジャンプテーブル306は、すべてのモジュールに対して共通であ る少なくとも4つの定義済み機能、すなわち、イニット、アンロード、バージョ ンおよび統計へのポインタで構成されている。 イニット:イニットは、モジュールにおける初期設定ルーチンである。この初 期設定ルーチンはモジュールを初期設定するために必要なパラメータを得るため にプレイニットを行い、モジュールを適切なセグメントに実際にロードするため に実イニットを行う。ベクトルがフックされるのはこの実イニット処理において である。 アンロード:アンロード機能によって資源の解放が容易になる。アンロード安 全性(CX=FFFh)についてのチェックが臨界地域状態に戻ると、アンロー ド要求は行われ得ない。モジュールがうまく動作すると、アンロード要求を行わ ない理由はなくなり、アンロード安全性のチェックは0に戻り、実際にアンロー ドを行っても安全であることが示される。そ して、実際にアンロードを行うという要求が行われないことはない。モジュール がアンロードのチェックを行わないと、アンロードのキャンセル(すなわち、C X=FFFEh)と共に、以前にチェックされたモジュールがすべて知らされる 。 バージョン:バージョン機能は、モジュールの主バージョンおよび小バージョ ンを得る。この機能は、モジュールの間に共有性を与える。このバージョン機能 のその他の副機能も、モジュールの間に共有性を設定する。他の副機能(01h −0Bh)によっても、接続設定、切断などに関してインターモジュールコミュ ニケーション(マルチキャスティング)を容易になる。 例えば、最初のタスクの終了時(すなわち、_Notify Handler subfunction 0 1h,PSP Terminate)にマルチキャスト呼出しがある。この副機能は、事前に定義 された一般的な副機能の一部である。 統計:統計機能は、モジュールについての統計を得る。この機能は選択的であ る。この統計は、モジュールデバッギングのために行われる。統計構造は、長さ 優先バッファである。統計構造テーブルの第1番目の単語は、有効な統計情報の バイト数を示す。ほかのすべての統計情報は、スタットサイズフィールドとスタ ットエンドフィールドの間で記憶される必要がある。 他の機能は特にモジュールに与えられ得、これらの事前に定義された機能に従 う。ゼロ終了(DD0)は、共通の機能 およびジャンプテーブルにおけるモジュールによって定義された他の全ての機能 に続いて行われる。これによって、この機能の数を超える要求を拒否し得るよう に、モジュールマネージャはいくつの機能がモジュールによってサポートされて いるかを知り得る。一時的なデータ 一時的なコードのように、一時的なデータも特別な要件を備えている。あるタ イプのデータは、一時的なグループにおいて存在し得ない。これらの制限された タイプは、スタックおよび他のモジュールに渡されるデータを有している。性能 上の理由から、グローバルデータではないすべてのデータは、この一時的なデー タセグメント内になければならない。一時的なデータは、エンハンストメモリと コンベンショナルメモリとの間でスワップされる。グローバルコードおよびデータ グローバル領域303は、コンベンショナルメモリ内に常駐し続けなければな らないコードおよびデータを格納する。例えば、グローバル領域303に格納さ れ得るコードおよびデータは、グローバルコード、モジュールマネージャを介し てアクセスされない遠い呼出を扱うもの、スタックおよびほかのモジュールに渡 されたデータのための割り込み処理ルーチンを有している。グローバル領域にメ モリがなくてもモジ ュールを作ることは可能である。スタートアップ領域 スタートアップ領域は、初期設定コードを有している。そのコードはプレイニ ットおよび実イニットオペレーションを提供する。プレイニットの間には、各モ ジュールはモジュールマネージャにVMCB構造データブロックを与える。モジ ュールはイニットルーチンを使用し、このVMCB構造を介して要求される初期 設定メモリ(グローバルメモリおよび一時的なメモリセグメントを含む)の量を 報告する。具体的には、VMCB_InitImageParaLengthパラメータは、プレロー ドの全体のサイズを定義する。 モジュールマネージャは、VMCB_InitImageParaLengthを用いて、実イニッ トおよび実行時間の間にどれだけのメモリがスワップインおよびスワップアウト されるべきなのかを決定する。モジュールメモリ割り当てを決定するこの方法に よって混乱が避けられ、メモリセグメントを別々に保持する処理が簡略化される 。メモリセグメントを別々に保持することは、グローバルデータセグメントとプ ロテクトモードデータセグメントを同時に実行するときに有効である。モジュー ルがロードされている他のモジュールに依存している場合、モジュールに対する 依存性はプレイニット段階でチェックされる。偽のイニットフラグ(AX=−1 )が途中でこのプロシジャへ渡される。 実イニットの間、モジュールがロードされた位置からグローバルコード/デー タを移動することが必要である。このグループのディスティネーションは、実イ ニットでイニット機能をモジュールマネージャが呼出したときに、BXレジスタ において定義される。この処理の後、モジュールはグローバルグループの移動に よって必要とされるいかなるフィックスアップも実行しなければならない。これ らのフィックスアップは、データはDOSによってロードされたグループではな く新しい位置を参照していることを保証するために行われる。モジュールマネージャ 個々のモジュールおよびマルチプレクサを監督するのがモジュールマネージャ である。アプリケーションは、すべての呼出しをモジュールマネージャに対して 行うが、そのディスティネーションが他のモジュール(子)であろうとマルチプ レクサであろうとその個々のディスティネーションに対して要求を行う。モジュ ールマネージャは、応答が適した呼出すもの(caller)に戻ることを保証する。 すべてのモジュールは、他のモジュールをモジュールマネージャを介して呼出 す。モジュールがその特定のレイヤのマルチプレクサを呼出すときも、そのモジ ュールはモジュールマネージャに呼出しを行ってそのマルチプレクサを呼出す。 同様に、そのモジュールから呼出しが戻るとき、その呼出しはマルチプレクサか らモジュールマネージャを介してそのモ ジュールに向かう。 モジュールマネージャの責務の1つは、他の情報の間のAPI呼出しが正しく ルートされていることを保証することである。従って、モジュールマネージャは 、与えられたユーザアプリケーションが要求するモジュールがロードされている かを知らなければならない。それは他のモジュールを呼出すモジュールを監視す る。モジュールマネージャは、同様に非同期的に呼出されたモジュールおよび機 能を取り扱う。 モジュールマネージャはAPIを与え、ナンバーによって機能およびモジュー ルを呼出す。モジュールマネージャは、呼出すもののモジュールIDを介して、 その機能を呼出しているのが誰であるかを知る。モジュールIDは、事前に割り 当てられている。モジュールマネージャは、ナンバーに基づきすべてのAPIを 取り扱うので、モジュールマネージャはモジュールにおける個々の機能に対する 本質的な依存または結びつきを持たない。従って、要求モデルの一部ではないモ ジュールは、TSRメモリマネージャとしてモジュールを使用し得る。これによ って、様々な異なるTSRをサポートする能力がモジュールマネージャに与えら れる。 モジュールマネージャは、すべてのモジュールが必要とする基本サービス、特 に、すべてのロードされたモジュールの間で呼出しを行い呼出しを容易にする基 本サービスを提供する。従って、モジュールマネージャは、要求モデルのすべて のレイヤを含む。 モジュールマネージャはマルチプレクサを含む各モジュールをロードおよびア ンロードするだけではなく、すべてのモジュールに対するメモリサービス(割り 当ておよび管理)を取り扱う。モジュールマネージャは、そのモジュールに対す るメモリスワッピングを用いる。 モジュールマネージャは、与えられたモジュールがモジュール自体に影響を与 えずにエクスパンディッドメモリ、拡張メモリ、コンベンショナルメモリあるい はサポートされているあらゆるメモリタイプのいずれを使用するかを決定する。 従って、個々の子モジュールは、メモリに関連する処理を行わなくてもよい。 子モジュールは、メモリ使用のある要件を満たしていなければならない。子モ ジュールがその要件が満たせば、子モジュールに対するモジュールマネージャハ ンドルメモリ機構のすべての利点が得られる。 また、モジュールマネージャはロード時間構成APIに対する責務がある。い かなるモジュールも構成可能である。例えば、接続テーブルはある数の接続を必 要とし、またはIPXは多数のECB、もしくはより大きいあるいはより小さい バッファをサポートすることを必要とする。これらの例では、モジュールマネー ジャはモジュールに対する作業を行う。 付加的に、性能を最適化するために、使用されているメモリタイプに関係なく 、ユーザはスワップされていないメモリにモジュールをロードすることを望んで もよい。理想的には、 最適な構成のバリエーションは、モジュールマネージャによって管理される。こ の能力を望み得るモジュールにはAPIが与えられる。 モジュールマネージャは、すべての可能な構成順列を知り得ないので、要求は モジュールの構成オプションを認識するために用いられるトークンを有するAP Iを備えていた。そのAPIは、モジュールがそれらのオプションを特定するも のである。このように、テーブル駆動型APIは、NET.CFGファイルから 構成情報を分析するためにモジュールのスタートアップ時に呼出され得る。 モジュールマネージャがロードすると、モジュールマネージャは、現在のディ レクトリあるいは他の特定されたディレクトリ内でロードすべきモジュールをフ ァイルから読み出す。モジュールマネージャはこれらのモジュールをファイルが 特定された順番でロードする。 モジュールのロードが行われているときに、現在のディレクトリはデフォルト によって使用される。異なるディレクトリからモジュールをロードしたい場合、 コンフィギュレーションファイルにおけるモジュール=コマンドにおいてディレ クトリを指定し得る。 VLM=C:\NWCLIENT\CONN.VLM また、モジュールコマンドライン上のコンギュレーションフ ァイルのためのパスも特定し得る。例えば、以下の通りである。 VLM/C=C:\NWCLIENT\NET.CFG モジュールのデフォルトセットは基本機能のためにモジュールマネージャにハ ードコード化される。しかし、NET.CFGは、デフォルトオプションをオー バーライドするために用いられ得る。モジュールマネージャの呼出し モジュールマネージャの遠い呼出しハンドラーに対するアドレスを見いだすた めには、アプリケーションはAXレジスタおよびBX=0hにおいて7A20h と割り込み2Fhを行う。モジュールマネージャは、遠い呼出しアドレス(モジ ュールマネージャ)へのポインタであるES:BXにおけるアドレスに戻る。モ ジュールマネージャが呼出しを処理したことをアプリケーションに知らせるため に、AXはゼロにされる。コールバイナンバーシステム モジュールマネージャは、システムにおいてモジュールを唯一特定するコール バイナンバーシステムを使用する。機能もナンバーによって呼出される。このプ ロトコルは、アプリ ケーションがCALLER_ID、DEST_IDおよびDEST_FUNCを 含む、モジュールマネージャの3つの不可欠な情報を提供することを要求する。 これらの2つのナンバーは、それぞれWORDの大きさを有している。 CALLER_IDおよびDEST_IDは、個々のモジュールを唯一特定す るナンバーである。モジュールマネージャはこれらのナンバーを用いて、適切な モジュールをスワップインし、呼出しを適切にタスク指名する。 DEST_FUNCは、呼出すものがどの機能を行いたいのかを示す。デステ ィネーション機能は、個々のモジュール内で定義される。これらの機能は、モジ ュールジャンブテーブル領域305によって定義される。 これらの3つの要求される要素は、このシステムによって管理される各機能呼 出しに対して共に作業を行う。アプリケーションがモジュール呼出しを行う場合 、モジュールマネージャのための遠い呼出しアドレスを得なければならない。以 下のコードは、どのようにアプリケーションが遠い呼出しアドレスを検索するの かの一例である。 以下のコードは、遠い呼出しアドレスを用いて_VLMNotifyの要求を 行い、モジュールマネージャモジュールのバージョンを戻させる非モジュールア プリケーションの一例である。 要するに、まず、呼出すものはスタック上の自分のIDをプッシュする(CA LLER_IDはモジュールに対してはゼロではなく、アプリケーションに対し てはゼロである)。そして、呼出すものは、ディスティネーションID、具体的 には呼出したいと思うマルチプレクサモジュールあるいは特定の子モジュールの IDをプッシュする。最後に、呼出すものは、所望の機能ナンバーをプッシュす る。 2つの予約された(あるいはシステム専用)機能がある。すなわち、初期設定 に用いられる機能0およびアンロードに用いられる機能2である。機能1および 機能3も、様々なモジュールを通じて一貫して用いられる。機能1は多数の副機 能を有する包括的通知機能のために、機能3はモジュール統計のために用いられ る。 戻ると、モジュールマネージャはCALLER_ID、DEST_IDおよび DEST_FUNCをスタックからクリアするので、アプリケーションはこの作 業を行ってはならない。これは、一般にパスカル呼出し規定と称されている。 2つのレジスタ、すなわちAXおよびBPがモジュールマネージャによって使 用されている。BPは、モジュールマネージャのみによって内部で使用される。 アプリーケーションは、いかなるパラメータ要求にもBPを使用してはならない 。BPは、3つの要求された値をスタック上でプッシュするためにのみ用いられ 得る。アプリケーションは、リターンコードのためのみにAXを使用すべきであ る。 モジュールマネージャは、非同期的呼出しを取り扱う方法も提供する。呼出し 機能は、ディスティネーションID、ディスティネーション機能、呼出すものI D、および呼出しのためにセットアップされる必要があるあらゆるレジスタを含 むメモリのブロックへのポインタを与える。すると、要求は保持され、後に実行 される。必要とされるコードを実行できないとモジュールマネージャが決定する と、モジュールマネージャはコードの実行を延期し得る。この機能の呼出すもの は、この機能が実際に完了する前にコントロールバックを受け取り得る。モジュールマネージャプレイニット 本発明のプレイニットオペレーションのフローチャートを図5に示す。ステッ プ501に、モジュールマネージャはそれ自体を構成する(NET.CFG、お よびVLM=ファイル)。この構成は、新しいあるいは付加的なモジュールのリ ストを有し得る。次に、モジュールマネージャは、ステップ502で各モジュー ルを現在のリストに一回に1つにロードする。モジュールは、ステップ503で ロードオーバレイAPIを用いてロードされる。初期設定機能は、ステップ50 4で「偽イニット」フラグオン(プレイニットを示している)と共に呼出される 。ロードされている途中のモジュールは、ステップ505でモジュールマネージ ャにVMCBデータブロックを与える。ステップ506では、モジュールのメモ リ 要件、すなわち、初期設定メモリ要件、あらゆるグローバルメモリ要件および一 時的なメモリ要件を読み出す。 ステップ507では、モジュールマネージャはモジュールパラメータテーブル 内のモジュールに対するパラメータを格納する。パラメータは、初期設定メモリ 要件、(もしあれば)グローバルメモリ要件、一時的メモリ要件、およびモジュ ールの機能の数を含む。 モジュールマネージャは決定ブロック508まで進む。決定ブロック508に おいて、「最終モジュールであるか?」というアーギュメントが行われる。アー ギュメントが偽であれば、得られるべきモジュールメモリ情報がまだあり、モジ ュールマネージャはステップ505に戻る。決定ブロック508におけるアーギ ュメントが真であれば、すべてのモジュールのメモリ要件が得られ、モジュール マネージャはステップ509に進む。 ステップ509では、モジュールマネージャはモジュールパラメータテーブル からデータを収集し、グローバルデータに必要なメモリを決定する。そして、モ ジュールマネージャは、グローバルデータを格納するためのコンベンショナルメ モリにおいてアドレス空間の割り付けを行う。 ステップ510では、モジュールマネージャはロードされなければならないモ ジュールの最も大きい一時的なメモリの要件を識別する。モジュールの最も大き い一時的なブロックは、コンベンショナルにおける一時的ブロック403の大き さを決定する。ステップ510では、モジュールマネージャは、ロードされるべ きモジュールの最も大きいブロックと少なくとも同じ大きさの一時的なメモリブ ロックにRAMを割り当てる。 ステップ511では、モジュールマネージャは、各モジュールの一時的なブロ ックを格納するために用いられ得るアドレス空間がどれであるかを決定する。優 先順位は、最初が拡張メモリ、次にエクスパンデッドメモリ、そしてコンベンシ ョナルメモリである。ユーザはモジュールマネージャを構成し、特にある1つの タイプのメモリを使用し得る。モジュールマネージャはステップ512で、その タイプのメモリが使用可能であるかを決定する。そのメモリのタイプが使用不可 能である場合、モジュールマネージャは上記のヒューリスティックを用いてメモ リタイプを選択する。 VMCBデータブロックの一例を図9に示す。モジュールマネージャ実イニット プレイニットルーチン後、モジュールはセットされていない偽イニットフラグ と共に再びロードされ、実イニットルーチンが実行される。実イニットルーチン の一例を図6に示す。ステップ601では、モジュールマネージャは偽イニット フラグをゼロにセットする。ステップ602では、第1のモジユールがロードさ れる。ステップ603では、初期設定ルーチンが呼出される。ステップ604で は、モジュールのため のあらゆる割り込みベクトルがフックされる。ステップ605では、モジュール の他のあらゆる資源が割り当てられる。ステップ606では、グローバルコード およびデータが割り当てられたアドレス空間に移動される。ステップ607では 、モジュールの一時的なブロックが、(拡張メモリ、エクスパンデッドメモリあ るいはコンベンショナルメモリにおいて)そのモジュールの一時的なブロックの ために割り当てられたアドレス空間にコピーされる。決定ブロック608におい て、「最終モジュールであるか?」というアーギュメントが行われる。このアー ギュメントが真であれば、ステップ609で実イニットプロシージャが終わり、 そこでモジュールマネージャが常駐終了する。決定ブロック608におけるアー ギュメントが偽であれば、システムはステップ602に戻る。モジュールローディング モジュールローディングを示すフローチャートを図7に示す。ステップ701 において、モジュールマネージャは、呼出しを受け取り、モジュールにアクセス する。決定ブロック702において、「他の要求がサービス中であるか」という アーギュメントが行われる。アーギュメントが頁であれば、モジュールマネージ ャは、退去(exiting)呼出しが完了すると新しい呼出しが行われ得るように現 在のIDをステップ703で格納する。 決定ブロック702におけるアーギュメントが偽である場 合、システムは決定ブロック704に進み、「DEST IDは有効か?」とい うアーギュメントが行われる。そのアーギュメントが真である場合、モジュール マネージャは決定ブロック705に進む。アーギュメントが偽である場合、モジ ュールマネージャはエラーを戻す。決定ブロック705においては、「機能#は 有効か?」というアーギュメントが行われる。アーギュメントが真である場合、 システムは決定ブロック706に進む。アーギュメントが偽である場合、モジュ ールマネージャはエラーを戻す。 決定ブロック706において、「呼出すものID=0であるか?」というアー ギュメントが行われる。アーギュメントが真である場合、呼出すものIDは現在 のモジュールIDと代えられ、システムはステップ707に進む。アーギュメン トが偽である場合、システムはステップ707に進む。 ステップ707において、現在一時的なブロックにあるあらゆるモジュールが エンハンストメモリ内の割り当てられたアドレス空間にコピーされる。従って、 モジュールのコードおよびデータに行われるいかなる変更も、「ホーム」アドレ ス空間(そのモジュールの割り当てられたアドレス空間)において更新される。 ステップ708において、呼出されたモジュールの一時的なブロックは、エンハ ンストメモリ内の割り当てられたアドレス空間からマップインされる。ステップ 709では、呼出された機能ナンバーが、現在一時的なメモリに格納されている ジャンプテーブルで参照される。ステッ プ710において、機能が呼出される。リターンすると、呼出すものIDがステ ップ711でチェックされる。必要であれば、呼出モジュールは一時的なブロッ クにマップインされる。ステップ712において、コントロールが呼出し機能あ るいは呼出処理に戻される。 上記の実施例は、アプリケーションがモジュール機能を呼出すときに適用され る。また、本発明は、モジュールのグローバルメモリが一時的なメモリ機能を呼 出しているとき、および一時的なメモリ内のモジュールが他のモジュールの一時 的なブロックを呼出すときにも用いられる。グローバルメモリから一時的なメモ リの呼出しにおいては、オペレーションは図7のアプリケーション呼出しのもの と同様である。グローバルリクエスタの呼出すものIDは0である。一時的メモ リから一時的メモリの呼出しに対しては、呼出すものがマップバックインされコ ントロールが戻されたとき、要求している一時的なコードが実際にメモリ内にあ るように、適した呼出すもののIDがプッシュされる。さもなければ、他のいく つかの処理をメモリ内にマップバックすることが可能であるが、これを行うとコ ンピュータシステムにとって不安定な環境になり得る。 本発明は、いかなるコンピュータシステムにも実行され得る。本発明を実行す るための典型的なコンピュータシステムを図8に示す。コンピュータシステムは 、CPU801、RAM(メインメモリ)802、ROM(読み出し専用メモリ ) 803、およびI/O(入力/出力)804を有し、これらすべてがシステムバ ス807に結合されている。I/Oブロック804は、バス805を介した大容 量記憶装置806のような他のシステムにアクセスする。 CPU801は、コンピュータを制御し、命令を実行し、データを処理する。 CPU801は、システムバス807を介して他の構成要素と通信を行う。CP Uは、システムバス807を介してコンピュータの他の構成要素から入力データ を受け取り、システムバスを介してコンピュータの他の構成要素に出力データを 送る。システムバス807は、通常、アドレスバス、データバス、および様々な 他の制御線を備えている。アドレスバスおよびデータバスの幅は、制御線の数お よび種類と同様に、あるコンピュータシステムのものと他のコンピュータシステ ムのものとは異なっている。 RAM802、ROM803およびメモリマップされたI/O804を有する コンピュータシステムの各構成要素は、多数の個別のメモリ位置を有している。 CPU801がこれらの位置にアクセスし得るようにするために、各位置には特 定のアドレスが割り付けられる。各アドレスは、アドレスバスを介して転送され 得る2進数の特定の組み合わせである。大部分のメモリ装置は1つ以上の位置を 有しているので、1つのメモリ装置の全ての位置に対するアドレスは、通常連続 的なブロックとして割り付けられる。しばしばこれらのブロックは、連続的に割 り付けられた(メモリにマップされた) アドレスでもある。しかし、割り付けられていないアドレスあるいは将来使用す るために予約されたアドレスのギャップがあり得る。 図8のコンピュータシステムは、ただ単に一例として示されている。本発明は 、いかなるコンピュータシステムにも実行し得る。 従って、メモリ管理装置およびメモリ管理方法が記載される。Detailed Description of the Invention                 Memory management device and memory management method                           Background of the Invention 1.Field of the invention   The present invention relates generally to computer memory systems. The invention is particularly A memory management system for controlling and optimizing the use of computer memory. It 2.Conventional background technology   A typical computer system consists of numerous modules and components. To be done. Computer systems are typically centralized, such as microprocessors. It has a processing device (CPU). The microprocessor gets the instructions and decodes , Is a program-controlled device that executes. Computer system Operating system software, application program instructions and data A storage component for storing data. These memory components are read Output dedicated memory (ROM), random access memory (RAM) or disk Mass storage such as hard disk storage or tape storage or other suitable It can be a painful storage means.   The operation of a computer system is called the "operating system" Controlled by a series of known commands To be done. Operating system is a computer system such as input / output Used to control the basic functions of the. Also, the operating system is , Typically stored in a permanent storage element such as ROM or disk storage, It is then loaded into RAM and executed there. Operating system example Then, there is MS-DOS or PC-DOS. Computer system app Application program.   During a processing operation, when an instruction is executed on the stored data The CPU may be allowed to temporarily store that data each time. further , The process and the operating system on which the program is running The application program that controls the system must be accessible to the CPU. I won't. This information is stored in RAM, a resource known as "main memory". Storing this information makes it available to the CPU.   The memory components known as main memory are the users, data, and programs. Insufficient resources dynamically allocated to the system or process. This not enough resources Memory users competing for the source can use the application program, TSR (“resident End "program) and other processing. Application program example Includes a word processor, spreadsheet, drawing program, database, etc. Mu. Certain application programs may be stored in ROM. But in general Target The application program is a mass storage device such as a disk drive Stored in. Application executed by CPU at initialization The program is transferred from the mass storage device to the RAM.   TSR is also used in computer systems. Such a program Provides "hotkeys" and "pop-up windows," which allow you to To perform background tasks such as displaying a clock or monitoring disk drive activity. Used to do. TSR is written for many other applications In rare cases, users may want several TSRs to reside on the computer at the same time. And often. Each TSR needs the memory space in which it is located So, adding TSR to the system increases the memory demand for main memory. I will let you.   Main memory is typically silicon-based memory such as RAM. is there Dynamic random access memory (DRAM) is the main memory Used. Main memory RAM is conventional memory, extended memory, memory It can be accessed as spanned memory.Conventional memory   Conventional memory is RAM that is most easily accessed by the CPU. Area. Conventional memory for data and instructions required by CPU Hope to store in Good. However, there is a limit to the size of conventional memory, which The amount of data and instructions that can be stored in conventional memory is limited.   Early microcomputers provided 16 bits that provided 64K of address space. Had an address bus. Increases the amount of memory required by the application The microcomputer overcomes the limitation of 16-bit address bus I had to. Therefore, the IBM personal computer has a 20-bit With a segmented addressing scheme that supported the address bus Was introduced. 20-bit address bus is 1024K or 1M address space This address space is 16 times the address space of a 16-bit bus. The original IBM PC and system software are conventional It was designed by artificially limiting Mori to 640K. Address empty from 640K to 1M 384K of the space was reserved primarily for ROM for future use . Subsequent computer models were backwards compatible with the original IBM PC. Compatible with the same PC-DOS MS-DOS operating system Conventional memory limited to 640K as it is designed to Is the amount of memory available for applications on modern computers. Continue to limit.Extended Memory   Extended memory is directly supported by a microprocessor that has a sufficient number of address lines. More than 1024K bytes of RAM that can be contact addressed. For example, In The tel 80286 microprocessor has 24-bit addressability, 15M in expanded memory above the first 1M of memory may be addressed. INTE The 80386 and 80486 microprocessors have 32-bit addressability Power, addressing approximately 4 gigabytes of extended memory above the first 1M of memory. Can be specified.Expanded Memory   "Expanded memory specification" (E Expanded memory, also known as MS), is an expanded memory. Of expanded memory that is not directly accessible for use as Reserve a portion and split it into pages. One page of expanded memory By switching to an address space that the CPU can access directly , EMS has access to a virtually unlimited amount of memory. But EM It takes time for S to change pages. Direct access to desired data If it is not in the EMS page frame located in memory, the EMS will Expanded page containing the current contents of the rame and containing the desired data You have to page with pages from memory. Like that Since it takes time to change the page, the processing speed of the computer becomes slow. Also, EMS is generally not applicable to all application software. Absent. The application software, especially if EMS is available, Must be written to utilize the MS.Memory map   FIG. 1 illustrates a typical computer, that is, an IBM personal computer. Which, MS-DOS based on 8088/8086 family microprocessor 3 shows a memory map of a main memory RAM on a computer operating under an environment. The memory map in Figure 1 is not the only possible memory, but a typical memory map This is an example. The memory map is organized from bottom to top, with the bottom at memory location zero (1 01) and continues to the highest position in the top memory. There are three memory maps It has a basic area. The first area is the bottom 640K of memory and is It is referred to as a ventional memory 102. Conventional memory 102 is Configured by RAM that allows the body to read and write operations However, not all systems have a full 640K, The parts may remain unused.   The conventional memory 102 includes a system including a TSR and a device driver. System software, application software, user data and others Code and Day Used to store data. As shown in FIG. 1, MS-DOS is a memory. MS-DOS code 106 and associated data 1 using the bottom of 07 is stored. On top of that, MS-DOS is grouped as element 112. The illustrated application software, TSR and device driver To store.   Above the conventional memory, there is a reserved memory 103 of 384K. Is located within the memory address up to 1024K from the upper limit of 640K of RAM It Reserved memory area 103 is mainly occupied by ROM, which is a read-only device. Can be ROMs found in the reserved memory area are system ROMs and video ROM, and possibly a hard disk or network interface Includes ROM for other peripherals, such as memory devices. Reserved memory in addition to ROM Area 103 also includes other types of dedicated memory, such as a video frame buffer. I am.   A system ROM that supports basic computer operations is, for example, , Occupies the top 64K of reserved memory area 103 from 960K to 1024K It The remaining space in the reserved memory 103 is unused, or other peripheral device Or used for other purposes, including ROM that supports EMS page frames To be done.   As mentioned above, expansion memory 111 includes all memory above 1M. 802 24-bit addressability like 86 The powerful microprocessor has a reserved memory 103 and a conventional memory. Memory up to 16M including 15M of expansion memory 111 in addition to 1M of memory 102 Can be addressed. 32-bit add such as 80386 and 80486 The microprocessor having the address specification capability has a 1M reserved memory 103 and Up to 4G including 4095M expansion memory on top of conventional memory 102 You can specify the dress. The area in the expansion memory 111 located directly above 1M is high. The memory area 113 is also called.   As TSRs grow and application programs grow, The competition for space in the optional memory is also large. The ability to use TSR Larger conventional memory for application programs while retaining It is desirable to give.   Conventional memory space available for application programs The amount of memory can be reduced by reducing the amount of memory used by the TSR and reducing the number of TSRs. Or, relocating the TSR to a memory outside the conventional memory Therefore, it can be increased.   Reducing the number of TSRs is not desirable as it can reduce functionality and performance. each Reducing the amount of conventional memory used by the TSR is This is not practical because it requires rewriting to the TSR.   TSR is other software unless TSR is using These take up part of the conventional memory space that can be used by If the program can be moved to a memory outside the conventional memory 102, Larger memory will be available for application software. Ah In the prior art method, the TSR is transferred from the conventional memory 102 to the reserved memory. Available for application software by moving to 103 Capacity of conventional memory 102 is increased.   To implement this method, the amount of unused reserved memory 103 is first determined. There must be. Also, a conventional memo occupied by TSR The capacity of the memory must also be determined. It is also deallocated from extended memory. Map a sufficient amount of reserved RAM into the reserved memory area to We have to provide a space for Mori. Next, the TSR is stored in the reserved memory area 103. Must be relocated to available memory.   This prior art method has drawbacks. First, this method will deallocate Only reserved memory space can be used. This method uses ROM, video frame It is not possible to use the reserved memory space allocated for buffers or other uses. Absent. Also, relocating a TSR relocates all references to the TSR to the new location. It must be done to ensure that it is directed.   Other prior art relocations from conventional memory The method is known as "overlay". Overlay is memory if needed Executable programs that are swapped in and out of memory That is the part. Overlays provide access to features and data located within the overlay. Overlay managers that control access and use overlays linked to It has the drawback of requiring a program.   An example of overlay skim is shown in FIGS. 2A and 2B. First, refer to FIG. 2A. The first 1024 bytes of RAM accessible by the CPU Shown as lock 201. Memory block 201 is a conventional memo The area of the memory 102 is included. The conventional memory 102 is an operating system such as DOS. Area 2 located at the lower address for storing the rating system code Including 02. The convention above the DOS area 202 and below the reserved memory 103 The remaining area 112 of the null memory 102 is an application, TSR, device. Used to store drivers etc.   Stores everything in conventional memory 112 because it is too large for the application Some things cannot be done. One example of such an application is word processing. It is a Word application that is a Word application. Therefore, at once Is stored in the memory area 112 only in part of Word Perfect. remaining Portion is stored in another memory, such as disk storage device 204. Application When a portion of the application is needed, that portion is It is transferred to the area 112.   In the example of FIG. 2A, the application represented by block A203. Is stored in the memory area 112. This application is a disc Two other parts stored in storage device 204, block B 205 and block It is divided into C206. The disk storage device 204 may be a bus or other transfer means. It is connected to the RAM 201 via 207.   When a function contained in block A203 is called or used, Block A203 remains resident in memory area 112. If you need other features , The code that provides the function is transferred from the disk storage device 204 to the memory 201 It must be. Referring now to FIG. 2B, block B205 is From the storage device 204 to the memory area 112. So before the memory area The partial block A203 of the application resident in 112 is recorded on the disk. It is transferred to the storage device 204. Block B205 occupies memory area 112 Area is described as being larger than the area occupied by block A203. It The blocks need not have the same size, but in the memory area 112 It should be as large as the available address space.   The downside of overlays is that they can swap to and from disk files. This results in longer execution times and lower performance. Ah In the program, Require code or data to always reside in conventional memory It Overlays are code that permanently resides in conventional memory or It does not provide any way to identify the data. Blocks A203 and B205 When is swapped, the entire blocks are swapped. Block A20 There is no portion left in the memory area 112 in 3. Therefore, such a program Cannot use overlay skim. TSR cannot be converted to overlay There are also things. These TSRs also include those that provide internal DOS functionality. This one Examples are Novell, Inc., Utah. NetWare Dos Client manufactured by of Provo It is software.   Therefore, the prior art does not use the components used by TSR without degrading performance. It does not provide a system to reduce the amount of optional memory.                             Summary of the invention   The present invention provides memory used by some of the code or data in the memory. It is designed to allow you to share and collaborate with other similarly configured programs. A DOS executable program is provided. This allows the conventional Mori's overall requirements are reduced. In the present invention, these programs are Application module, TSR or this module It can be any other executable file that is converted to a format. module Is temporary code that can be swapped out of conventional memory and Data, and non-swappable global memory resident It has global data and code.   By providing global data that resides in memory, the module of the present invention. Is not only for other modules, but also for interrupt handling and external Alternatively, other code and data that are available asynchronously may be invoked. Therefore The present invention supports programming interfaces rather than overlays.   In the present invention, a single block of conventional memory is shared by a plurality of modules. By having, reduce the requirements for conventional memory. Conventional assigned to be used, regardless of the number of modules The block size of memory remains the same. The allocated memory block is Is the temporary code for a module that shares a conventional memory block Or large enough to store the largest block of data.   Swap temporary blocks of modules to and from disk storage Instead, the temporary blocks have conventional memory and extended memory. Or swapped with expanded memory. This allows you to Transfer time is significantly reduced and performance is improved compared to Rayskim.                         Brief description of the drawings   FIG. 1 is a memory map showing the memory organization of a typical computer system. It   2A and 2B are diagrams illustrating prior art overlay skims.   FIG. 3 is a diagram showing a module structure of the present invention.   4A to 4E are diagrams showing the operation of the memory manager.   FIG. 5 is a flow chart showing the pre-init operation of the present invention. It is   FIG. 6 is a flow chart showing the real-init operation of the present invention. It is   FIG. 7 is a flowchart showing the calling of the module in the present invention.   FIG. 8 is a block diagram of a computer system for implementing the present invention.   FIG. 9 is a diagram showing a VMCB data block.                       Detailed Description of the Invention   Those who use conventional memory more effectively in computer systems The law is described. In the following description, in order to describe the present invention more closely, Many such as computer system type, memory address location, memory capacity, etc. Ingredient Physical matters are described in detail. But without these specific details It will be apparent to those skilled in the art that the present invention can be implemented. In another example, Well-known features are not described in detail to avoid unnecessarily obscuring the light. Not.   The present invention ensures that the TSR and other programs are empty in conventional memory. Conventional memory by providing a method and apparatus for sharing between Reduce requirements. TSRs and programs are organized as "modules" and The module manager swaps modules in and out of conventional memory. And swap out from it. In a preferred embodiment of the invention At any given time only one module resides in conventional memory. other Modules are stored in the expanded memory or expanded memory. This avoids time-consuming and performance-degrading disk swaps. It   The operation of the module manager is shown in FIGS. 4A-4E. Figure 4A , Conventional memory, reserved memory, extended memory and expanded The memory map of memory is shown. The conventional memory 102 has a lower memory. It has a DOS storage area 202 in the memory area. Conventional memory Just above the DOS area 202 in 102, the module manager 401 There is space reserved for it. Above the module manager 401 Te Reserved for global code and data of modules available for There are areas that have been. Stored above global code and data area 402 Reserved area is reserved for temporary blocks of the module. It Temporary block module 403 is any module in the system. Has an upper bound 404 fixed and determined by the largest temporary block of ing. Conventional memory above the upper limit 404 and below the reserved memory 103 The space within 102 is available for other applications and processing.   Reserved memory 103 is used for ROM and expanded memory 406 Can be. On the reserved memory 103, the expansion memory 111 (of 1024 Kbytes) There is). The expansion memory 111 is a temporary storage for a module called module A. The new block 405 is stored. Expanded memory 406 is a module Has temporary blocks 407 and 408, referred to as B and C, respectively It   Global codes and data are stored in the global area 402 and If the upper bound 404 of block 403 is limited, the module manager When the module is called, the module is ready to be accessed. Referring to FIG. 4B However, consider the case where module B is required. Module B is global It may have code that resides permanently in region 402. When module B is called , Module money Ja temporarily stores the temporary block 407 of the module B in the expanded memory 40. 6 to the temporary block 403 of the conventional memory 102. This , The temporary block of one of the other modules is Swapped out from Re. Then, the process call module B is the module B Access temporary blocks as if they always reside in conventional memory. Can be set. As shown in FIG. 4B, module B temporary block 407. Uses all of the available address space in temporary block 403 is not. The upper bound 404 of the temporary block 403 remains fixed.   4C to 4E show a process in which a module calls another module. The temporary block 408 of module C is configured as shown in Figure 4C. It resides in a temporary block 403 of ventional memory 102. Mod C calls module A via the module manager. Module manager Is the module that is calling and the destination module. Maintain contact with Le. The temporary block 408 of module C is the module Swapped with the temporary block 405 of Le A. Referring to FIG. 4D, the module The temporary block 405 of rule A is stored in the temporary block 403. Moji Rule A temporary block 405 contains all addresses of temporary block 403. Note that it takes up space. Machine with module A After being called for a function and performing that function, as shown in Figure 4E, the module The module manager sets the temporary block 405 of module A to the temporary block of module C. Swap with the optional block 408.Modular structure   In the present invention, the module code and data are Different categories are given to give a general solution for module management in memory. Composed by Gory. These categories are functional task nomination tables (Jeans Table), temporary code and data, global code and data. Contains startup code and data. The format of the module is As shown in FIG.   The structure of module 301 has three regions 302, 303 and 304 There is. Area 302 contains a jump table 305 and a temporary group 306. Have. Area 303 contains global code and data, area 304 contains It has startup code and data. The temporary area 302 is It has "wappable" code and data. That is, this data Ventual memory and enhanced (expanded or expanded) It can be swapped in or out of storage.Jump table   Jump table 306 represents the functions supported by the module. The The pump table (also known as temporary code) is always swapped out. Can be Therefore, those that handle interrupts (or whichever is directly accessible) Code segment) cannot exist in the temporary code segment. Ja The first entry in the pump table is the pointer to the module init routine. It is a computer. The jump table 306 is common to all modules. At least four predefined functions: Init, Unload, Version And pointers to statistics.   Init: Init is an initialization routine in the module. This first The setup routine obtains the parameters needed to initialize the module. To pre-knit and actually load the module into the appropriate segment To actually init. The vector is hooked in this actual init processing. Is.   Unload:The unload function facilitates the release of resources. Unloading cheap When the check for integrity (CX = FFFh) returns to the critical area state, the No request can be made. If the module works fine, make an unload request There is no reason not to do so, the unload safety check returns to 0, and the actual unload Is shown to be safe to do. So Then, the request to actually unload is not made. module Does not check for unloading, cancels unloading (ie C With X = FFFEh) all previously checked modules are informed .   version: The version function is the main version and minor version of the module. Get This feature provides sharing between modules. This version features Other sub-functions of also set up sharing between modules. Other sub-functions (01h -0Bh), the inter-module communication regarding connection setting, disconnection, etc. Nation (multicasting) becomes easy.   For example, at the end of the first task (ie, _Notify Handler subfunction 0 1h, PSP Terminate) has a multicast call. This sub-function is predefined Are some of the general sub-features that have been done.   statistics: The statistics function gets statistics about a module. This feature is selective It This statistic is done for module debugging. Statistical structure is length It is a priority buffer. The first word in the statistical structure table is the valid statistical information. Indicates the number of bytes. All other statistics are available in the statsize field and Need to be stored between the end fields.   Other functions may be specifically provided to the module and follow these predefined functions. U Zero end (DD0) is a common function And all other functions defined by the module in the jump table It is performed following. This allows you to reject more than this number of features. In addition, the module manager shows how many features are supported by the module. You can knowTemporary data   Like transient code, transient data also has special requirements. There Ipu's data cannot exist in a temporary group. These restricted Types have data passed to the stack and other modules. Performance For the above reasons, all data that is not global data is Must be within the segment. Temporary data is stored in the enhanced memory Swapped to and from conventional memory.Global code and data   The global area 303 must remain resident in conventional memory. Stores code and data that does not exist. For example, stored in the global area 303 Possible code and data is via global code, module manager Those that handle distant calls that are not accessed through the stack and other modules It has an interrupt handling routine for the processed data. Global area Even without Mori It is possible to make a tool.Startup area   The start-up area has an initialization code. The code is Plani And real init operations. Between play knits, Joule provides the VMCB structure data block to the module manager. Moji Uses the Init routine to request the initials through this VMCB structure. The amount of configuration memory (including global memory and temporary memory segments) To report. Specifically, the VMCB_InitImageParaLength parameter is the preload Defines the overall size of the code.   The module manager uses VMCB_InitImageParaLength to How much memory is swapped in and out during run time and run time Decide what should be done. This way to determine module memory allocation This avoids confusion and simplifies the process of holding memory segments separately. . Keeping memory segments separate means that they are Protect mode This is useful when executing data segments simultaneously. Mod If the module depends on other loaded modules, Dependencies are checked at the playnit stage. False init flag (AX = -1 ) Is passed to this procedure on the way.   During the actual init, from the position where the module is loaded to the global code / data It is necessary to move the data. The destination of this group is When the module manager calls the init function in knit, the BX register Is defined in After this process, the module will move the global group. Therefore any required fixups must be performed. this These fixups show that the data is not in a group loaded by DOS. This is done to ensure that you are referencing a new location.Module manager   Module manager oversees individual modules and multiplexers Is. The application makes all calls to the module manager Yes, even if the destination is another module (child) Make requests for each individual destination, whether it is a lexa. Mod The policy manager ensures that the response returns to the appropriate caller.   All modules call other modules through the module manager You When a module calls the multiplexer for that particular layer, that module The module makes a call to the module manager to call its multiplexer. Similarly, when a call returns from the module, the call is a multiplexer. Module via the module manager Head to Jules.   One of the module manager's responsibilities is that API calls between other information are correct. It is to guarantee that it is rooted. So the module manager , The module required by the given user application is loaded I have to know It monitors modules that call other modules It The module manager is also used to asynchronously call modules and functions. Handle Noh.   The module manager provides APIs and functions and modules by number Call Le. The module manager, via the module ID of the caller, Know who is calling the function. The module ID is assigned in advance. It is applied. The module manager will run all APIs based on number. The module manager handles the individual functions in the module Has no intrinsic dependence or ties. Therefore, it is not part of the requirements model. The module can use the module as a TSR memory manager. This This gives the module manager the ability to support a variety of different TSRs. Be done.   The module manager is a base service that all modules need, To make calls between all loaded modules to facilitate calls. Provide this service. Therefore, the module manager is Including layers.   The module manager loads and assigns each module, including the multiplexer. Memory service (allocation) for all modules Reliance and management). The module manager is responsible for the module Use memory swapping.   The module manager allows a given module to affect the module itself. First of all, expanded memory, expanded memory, conventional memory or Determines which of the supported memory types to use. Therefore, each child module does not have to perform memory-related processing.   The child module must meet certain requirements for memory usage. Child If the module meets the requirements, the module manager module for the child module All the advantages of the idle memory mechanism are obtained.   The module manager is also responsible for the load time configuration API. I Different modules are also configurable. For example, the connection table requires a certain number of connections. Needed, or IPX has multiple ECBs, or larger or smaller Need to support buffers. In these examples, the module money Ja works on the module.   Additionally, to optimize performance, regardless of the memory type used , The user wants to load the module into non-swapped memory Good. Ideally, The optimal configuration variation is managed by the module manager. This APIs are provided for modules that may desire the capabilities of   The module manager does not know all possible configuration permutations, so the request is AP with token used to recognize module configuration options I was equipped with. That API also allows the module to specify those options. Of. As described above, the table driven API uses the NET. From CFG file It may be called at module startup to analyze configuration information.   When the module manager loads, the module manager will Modules that should be loaded in a directory or other specified directory. Read from the file. The module manager will file these modules Load in the specified order.   The current directory is the default when the module is being loaded Used by. If you want to load the module from a different directory, Delay in module = command in configuration file You can specify a folder. VLM = C: \ NWCLIENT \ CONN. VLM   In addition, the configuration command on the module command line The path for the file can also be specified. For example, VLM / C = C: \ NWCLIENT \ NET. CFG   The default set of modules is hidden in the module manager for basic functionality. Coded. However, NET. CFG has default options It can be used for bar riding.Call module manager   Find the address for the module manager's far call handler To do this, the application is 7A20h at AX register and BX = 0h. And interrupt 2Fh. The module manager uses the remote calling address (module Return to the address in ES: BX which is a pointer to the tool manager). Mo To inform the application that the module manager has processed the call Then, AX is set to zero.Call-by-number system   The module manager is a call that uniquely identifies the module in the system. Use a bi-number system. Functions are also called by number. This program Rotocol app Application calls CALLER_ID, DEST_ID and DEST_FUNC Requests that the module manager provide three essential pieces of information, including: Each of these two numbers has the size of WORD.   CALLER_ID and DEST_ID uniquely identify each module. It is a number. The module manager uses these numbers to Swap in the module and assign the call to the task appropriately.   DEST_FUNC indicates what function the caller wants to perform. Deste Destination functions are defined within individual modules. These features are It is defined by the task jamb table area 305.   These three required elements are each functional call managed by this system. We work together for delivery. When the application makes a module call You have to get a distant calling address for the module manager. Since The code below shows how the application looks up a far calling address This is an example.   The following code makes a request for _VLMNotify using a far call address. A non-module app that causes the module manager module version to be returned. It is an example of an application.   In short, the caller first pushes his ID on the stack (CA LLER_ID is non-zero for modules, not for applications Is zero). And, what is called is the destination ID, concrete Of the multiplexer module or specific child module you want to call Push the ID. Finally, the caller pushes the desired feature number. It   There are two reserved (or system specific) functions. That is, the initial setting A function 0 used for unloading and a function 2 used for unloading. Function 1 and Function 3 is also used consistently throughout the various modules. Function 1 has many sub-machines Function 3 is used for module statistics, because of the comprehensive notification function capable. It   Upon return, the module manager will return CALLER_ID, DEST_ID and The application clears DEST_FUNC from the stack, so Do not do business. This is commonly referred to as the Pascal calling convention.   Two registers, AX and BP, are used by the module manager. Have been used. The BP is used internally by the module manager only. Application must not use BP for any parameter request . BP is used only to push the three requested values on the stack obtain. Applications should use AX only for return codes It   The module manager also provides a way to handle asynchronous calls. call Functions include destination ID, destination function, and caller I D, and any registers that need to be set up for the call. Gives a pointer to a block of memory. Then the request will be held and run later To be done. Module manager determines that it cannot execute the required code The module manager can then defer execution of the code. What this function calls May receive a controlback before this function is actually completed.Module manager play unit   A flow chart of the play unit operation of the present invention is shown in FIG. Step In 501, the module manager configures itself (NET.CFG, And VLM = file). This configuration is a new or additional module Can have a strike. The module manager then proceeds to step 502 for each module. Load the current list one at a time. The module is in step 503 It is loaded using the load overlay API. The initial setting function is step 50. Called with "False Init" flag turned on (indicating Playnit) at 4 . Modules that are in the process of being loaded are managed by the module in step 505. The VMCB data block. In step 506, the module memo Re Requirements, ie default memory requirements, any global memory requirements and Read temporal memory requirements.   In step 507, the module manager displays the module parameter table Stores parameters for modules in. Parameters are the default memory Requirements, global memory requirements (if any), temporary memory requirements, and module Including a number of features   The module manager proceeds to decision block 508. At decision block 508 At the end, the argument "is it the final module?" Ah If the argument is false, there is still module memory information that The tool manager returns to step 505. Argi at decision block 508 Document is true, the memory requirements of all modules are The manager proceeds to step 509.   In step 509, the module manager displays the module parameter table. Collect data from and determine the memory required for global data. And mo The module manager is a conventional mechanism for storing global data. Allocation of address space in memory.   At step 510, the module manager must be loaded. Identify Joule's largest temporary memory requirements. The largest of the modules The temporary block is the size of the temporary block 403 in conventional To determine At step 510, the module manager must be loaded. A temporary memory block that is at least as large as the largest block of Allocate RAM for lock.   In step 511, the module manager determines that each module has a temporary block. Determines which address space can be used to store the clock. Yu As for the priority, first the expanded memory, then the expanded memory, and then the It is a local memory. The user configures the module manager, especially one Any type of memory may be used. The module manager, in step 512, Determines if the type of memory is available. The memory type is unavailable Module heuristics, the module manager uses the heuristics above to make notes. Select a retype.   An example of the VMCB data block is shown in FIG.Module manager real init   Fake init flag with no modules set after playnit routine Is loaded again and the actual init routine is executed. Real init routine An example is shown in FIG. In step 601, the module manager is a fake init. Set the flag to zero. At step 602, the first module is loaded. Be done. In step 603, the initialization routine is called. In step 604 For the module Any interrupt vector of is hooked. In step 605, the module All other resources of are allocated. In step 606, the global code And the data is moved to the allocated address space. In step 607 , A temporary block of a module (extended memory, expanded memory (Or in conventional memory) of a temporary block of the module Is copied to the address space allocated for. Smell in decision block 608 Then, the argument "is it the final module?" This arm If the argument is true, the actual init procedure ends in step 609, The module manager then ends resident. Ar at decision block 608 If the argument is false, the system returns to step 602.Module loading   A flow chart showing module loading is shown in FIG. Step 701 At, the module manager receives the call and accesses the module To do. At decision block 702, it says "Is another request in service?" Arguments are made. If the argument is a page, module managed The current caller so that a new call can be made once the exiting call is complete. The existing ID is stored in step 703.   If the argument at decision block 702 is false, If so, the system proceeds to decision block 704 and asks "Is the DEST ID valid?" Argument is performed. Module if that argument is true The manager proceeds to decision block 705. If the argument is false, The tool manager returns an error. At decision block 705, “Function # is Is it valid? ”Is performed. If the argument is true, The system proceeds to decision block 706. If the argument is false, the module The error manager returns an error.   At decision block 706, the question "Is caller ID = 0?" Gument is made. If the argument is true, the caller ID is currently Substituting the module ID of the. Agumen If yes, the system proceeds to step 707.   At step 707, all modules currently in the temporary block are Copied to the allocated address space in enhanced memory. Therefore, Any changes made to the module's code and data will not be made to the “home” address. Space (the module's assigned address space). At step 708, the temporary block of the called module is enhanced. Mapped in from the allocated address space in host memory. Step 709, the called function number is currently stored in temporary memory Referenced in the jump table. Step At 710, the function is invoked. When you return, the caller ID is Checked at 711. If necessary, the calling module should be a temporary block. Mapped into Ku. At step 712, the control calls the calling function. It is returned to the call processing.   The above example applies when an application calls a module function. It The present invention also provides that the module's global memory calls a temporary memory function. When a module is out and the module in temporary memory is It is also used when calling a specific block. Temporary note from global memory In the re-call, the operation is that of the application call in FIG. Is the same as. The caller ID of the global requester is 0. Temporary memo When the temporary memory is called from the memory, the calling one is mapped back in When the control returns, the requesting temporary code is actually in memory. As such, the ID of the appropriate caller is pushed. Otherwise, go the other It is possible to map some operations back into memory, but doing this will It can be an unstable environment for computer systems.   The present invention can be implemented on any computer system. Practicing the invention A typical computer system for doing so is shown in FIG. Computer system , CPU 801, RAM (main memory) 802, ROM (read-only memory) ) 803, and I / O (input / output) 804, all of which are system Is connected to the switch 807. The I / O block 804 has a large capacity via a bus 805. Access other systems, such as mass storage 806.   The CPU 801 controls the computer, executes instructions, and processes data. The CPU 801 communicates with other components via the system bus 807. CP U is input data from other components of the computer via the system bus 807. And output data to other components of the computer via the system bus send. The system bus 807 is typically an address bus, a data bus, and various Equipped with other control lines. The width of the address and data buses depends on the number of control lines. As well as the type and type of computer system. It is different from that of Mu.   Has RAM 802, ROM 803 and memory mapped I / O 804 Each component of the computer system has a number of individual memory locations. Each location has a special feature so that the CPU 801 can access these locations. A fixed address is assigned. Each address is transferred via the address bus It is a specific combination of binary numbers to obtain. Most memory devices have more than one location Addresses for all locations in one memory device are usually contiguous because they have Allocated as a general block. Often these blocks are Attached (mapped to memory) It is also an address. However, unassigned addresses or future use There may be gaps in the address reserved for.   The computer system of FIG. 8 is shown by way of example only. The present invention , Can be run on any computer system.   Therefore, a memory management device and a memory management method are described.

───────────────────────────────────────────────────── フロントページの続き (81)指定国 EP(AT,BE,CH,DE, DK,ES,FR,GB,GR,IE,IT,LU,M C,NL,PT,SE),OA(BF,BJ,CF,CG ,CI,CM,GA,GN,ML,MR,NE,SN, TD,TG),AT,AU,BB,BG,BR,BY, CA,CH,CN,CZ,DE,DK,ES,FI,G B,GE,HU,JP,KG,KP,KR,KZ,LK ,LU,LV,MD,MG,MN,MW,NL,NO, NZ,PL,PT,RO,RU,SD,SE,SI,S K,TJ,UA,UZ,VN 【要約の続き】 れによって、オーバレイスキムと比較して転送時間が大 幅に削減され、性能が向上する。─────────────────────────────────────────────────── ─── Continued front page    (81) Designated countries EP (AT, BE, CH, DE, DK, ES, FR, GB, GR, IE, IT, LU, M C, NL, PT, SE), OA (BF, BJ, CF, CG , CI, CM, GA, GN, ML, MR, NE, SN, TD, TG), AT, AU, BB, BG, BR, BY, CA, CH, CN, CZ, DE, DK, ES, FI, G B, GE, HU, JP, KG, KP, KR, KZ, LK , LU, LV, MD, MG, MN, MW, NL, NO, NZ, PL, PT, RO, RU, SD, SE, SI, S K, TJ, UA, UZ, VN [Continued summary] This results in a longer transfer time compared to overlay skim. The width is reduced and the performance is improved.

Claims (1)

【特許請求の範囲】 1.処理手段を用い、グローバルブロックとしてメモリアドレスの第1の範囲に あることを要求される第1のアプリケーションの第1の部分を特定するステップ と、 該処理手段を用い、該グローバルブロックを格納する該メモリアドレスの該第 1の範囲にアドレス空間を割り付けるステップと、 該処理手段を用い、該第1のアプリケーションの一時的なブロックとして、該 メモリアドレスの該第1の範囲にあることを要求されない該第1のアプリケーシ ョンの第2の部分を特定するステップと、 該処理手段を用い、該一時的なブロックを格納する、該メモリアドレスの該第 1の領域内にはないメモリアドレスの第2の範囲にアドレス空間を割り付けるス テップと、 該処理手段を用い、該一時的なブロックを一時的に格納する該メモリアドレス の該第1の範囲に一時的なアドレス空間を割り付けるステップとを包含する、コ ンピュータシステムにメモリを割り付ける方法。 2.前記処理手段を用い、第2のアプリケーションのグローバルブロックとして 、前記メモリアドレスの前記第1の範囲にあることを要求される該第2のアプリ ケーションの第1の部分を特定するステップと、 該処理手段を用い、該第2のアプリケーションの該グロー バルブロックを格納する該メモリアドレスの該第1の範囲にアドレス空間を割り 付けるステップと、 該処理手段を用い、該第2のアプリケーションの一時的なブロックとして、該 メモリアドレスの該第1の範囲にあることを要求されない該第2のアプリケーシ ョンの第2の部分を特定するステップと、 該処理手段を用い、該第2のアプリケーションの該一時的なブロックを格納す る、該メモリアドレスの該第1の領域内にはないメモリアドレスの該第2の範囲 にアドレス空間を割り付けるステップとをさらに包含する、請求項1に記載の方 法。 3.前記処理手段を用い、前記第1のアプリケーションが実行されるとき、前記 一時的なアドレス空間に該第1のアプリケーションの前記一時的なブロックを一 時的に格納するステップをさらに包含する、請求項2に記載の方法。 4.前記処理手段を用い、前記第2のアプリケーションが実行されるとき、前記 一時的なアドレス空間に該第2のアプリケーションの前記一時的なブロックを一 時的に格納するステップをさらに包含する、請求項2に記載の方法。 5.前記一時的なアドレス空間が、前記第1のアプリケーションの前記一時的な ブロックおよび前記第2のアプリケーシ ョンの前記一時的なブロックのいずれか大きい方を保持するために十分な大きさ を有する、請求項2に記載の方法。 6.前記メモリアドレスの前記第1の範囲がコンベンショナルメモリである、請 求項1に記載の方法。 7.前記メモリアドレスの前記第2の範囲が拡張メモリである、請求項1に記載 の方法。 8.前記メモリアドレスの前記第2の範囲がエクスパンディッドメモリである、 請求項1に記載の方法。 9.前記第1のアプリケーションが常駐終了型アプリケーションである、請求項 1に記載の方法。 10.処理手段を用い、メモリアドレスの第1の範囲にあることを要求される第 1のアプリケーションの第1の部分を格納する該メモリアドレスの該第1の範囲 にアドレス空間を割り付けるステップと、 該処理手段を用い、該メモリアドレスの該第1の範囲にあることを要求される 該第1のアプリケーションの第2の部分のためにメモリアドレスの該第1の範囲 内にはない該メモリアドレスの第2の範囲にアドレス空間を割り付けるステップ と、 該処理手段を用い、該メモリアドレスの該第1の範囲にあることを要求される 第2のアプリケーションの第1の部分を格納する該メモリアドレスの該第1の範 囲にアドレス空間を割り付けるステップと、 該処理手段を用い、該メモリアドレスの該第1の範囲にあることを要求されな い該第2のアプリケーションの第2の部分を格納するために、該メモリアドレス の該第1の範囲内にはない該メモリアドレスの該第2の範囲にアドレス空間を割 り付けるステップと、 該処理手段を用い、該第1のアプリケーションの該第2の部分と該第2のアプ リケーションの該第2の部分のいずれか大きい方を格納するために十分な大きさ を有する該メモリアドレスの該第1の範囲に一時的なアドレス空間を割り付ける ステップとを包含し、該一時的なアドレス空間が該第1のアプリケーションの一 時的なブロックを一時的に格納し、該第2のアプリケーションの一時的なブロッ クを一時的に格納する、コンピュータシステムにメモリを割り付ける方法。 11.前記処理手段を用い、前記第1のアプリケーションが実行されるとき、該 第1のアプリケーションの前記第2の部分を前記一時的なアドレス空間に一時的 に格納するステップをさらに包含する、請求項10に記載の方法。 12.前記処理手段を用い、前記第2のアプリケーションが 実行されるとき、該第2のアプリケーションの前記第2の部分を前記一時的なア ドレス空間に一時的に格納するステップをさらに包含する、請求項10に記載の 方法。 13.前記メモリアドレスの前記第1の範囲がコンベンショナルメモリである、 請求項10に記載の方法。 14.前記メモリアドレスの前記第2の範囲が拡張メモリである、請求項10に 記載の方法。 15.前記メモリアドレスの前記第2の範囲がエクスパンディッドメモリである 、請求項10に記載の方法。 16.前記第1のアプリケーションが常駐終了型アプリケーションである、請求 項10に記載の方法。[Claims] 1. Using the processing means, as a global block, in the first range of memory addresses Identifying the first part of the first application that is required to be When,   Using the processing means, the first address of the memory address for storing the global block. Allocating the address space to the range of 1,   Using the processing means, the temporary block of the first application is The first application not required to be in the first range of memory addresses Identifying the second part of the   The processing means is used to store the temporary block, the memory address of the first block. The address space is allocated to the second range of memory addresses that are not in the area Tep,   The memory address for temporarily storing the temporary block using the processing means Allocating a temporary address space in the first range of How to allocate memory to your computer system. 2. As a global block of the second application using the processing means , The second app required to be in the first range of memory addresses Identifying the first part of the application,   Using the processing means, the glow of the second application Allocates an address space to the first range of the memory address for storing a valve block Step to attach,   As a temporary block of the second application using the processing means, The second application not required to be in the first range of memory addresses Identifying the second part of the   Storing the temporary block of the second application using the processing means The second range of memory addresses that is not within the first region of the memory address The method according to claim 1, further comprising allocating an address space to Law. 3. When the first application is executed using the processing means, Store the temporary block of the first application in a temporary address space. The method of claim 2, further comprising the step of temporally storing. 4. When the second application is executed using the processing means, Store the temporary block of the second application in a temporary address space. The method of claim 2, further comprising the step of temporally storing. 5. The temporary address space is the temporary address space of the first application. Block and said second application Large enough to hold the larger of the temporary blocks The method of claim 2, comprising: 6. The first range of memory addresses is conventional memory; The method according to claim 1. 7. The second range of the memory address is an extended memory. the method of. 8. The second range of memory addresses is expanded memory, The method of claim 1. 9. The first application is a resident termination type application. The method according to 1. 10. Using the processing means, the first range required to be in the first range of memory addresses The first range of the memory address storing a first portion of a one application Assigning an address space to   Required to be in the first range of the memory address using the processing means The first range of memory addresses for a second portion of the first application Allocating an address space for a second range of the memory address not within When,   Required to be in the first range of the memory address using the processing means The first range of the memory address storing the first portion of the second application. To allocate the address space to   Not be required to be in the first range of the memory address using the processing means The memory address for storing a second portion of the second application Allocate an address space to the second range of memory addresses that is not within the first range of Attaching step,   Using the processing means, the second part of the first application and the second application Large enough to store the larger of the second parts of the application Allocate a temporary address space to the first range of memory addresses having And the temporary address space is the one of the first application. Temporary blocks are temporarily stored and temporary blocks of the second application are stored. A method of allocating memory to a computer system that temporarily stores memory. 11. When the first application is executed using the processing means, Temporarily move the second part of the first application into the temporary address space 11. The method of claim 10, further comprising the step of storing at. 12. Using the processing means, the second application When executed, the second part of the second application is loaded into the temporary application. 11. The method of claim 10, further comprising the step of temporarily storing in a dress space. Method. 13. The first range of memory addresses is conventional memory, The method according to claim 10. 14. 11. The method of claim 10, wherein the second range of memory addresses is extended memory. The method described. 15. The second range of memory addresses is expanded memory The method according to claim 10. 16. The first application is a resident termination type application Item 11. The method according to Item 10.
JP6520278A 1993-03-09 1994-03-08 Memory management device and memory management method Pending JPH08507630A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US2831293A 1993-03-09 1993-03-09
US028,312 1993-03-09
PCT/US1994/002523 WO1994020905A1 (en) 1993-03-09 1994-03-08 Method and apparatus for memory management

Publications (1)

Publication Number Publication Date
JPH08507630A true JPH08507630A (en) 1996-08-13

Family

ID=21842743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6520278A Pending JPH08507630A (en) 1993-03-09 1994-03-08 Memory management device and memory management method

Country Status (6)

Country Link
EP (1) EP0688449A4 (en)
JP (1) JPH08507630A (en)
CN (1) CN1090780C (en)
AU (1) AU6253794A (en)
CA (1) CA2157572C (en)
WO (1) WO1994020905A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143263B2 (en) * 2003-10-16 2006-11-28 International Business Machines Corporation System and method of adaptively reconfiguring buffers
US7603392B2 (en) * 2006-06-05 2009-10-13 International Business Machines Corporation System, method and computer program product for storing transient state information

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4943910A (en) * 1987-04-14 1990-07-24 Kabushiki Kaisha Toshiba Memory system compatible with a conventional expanded memory
US4926322A (en) * 1987-08-03 1990-05-15 Compag Computer Corporation Software emulation of bank-switched memory using a virtual DOS monitor and paged memory management
US5280599A (en) * 1989-01-09 1994-01-18 Kabushiki Kaisha Toshiba Computer system with memory expansion function and expansion memory setting method
US5175830A (en) * 1989-06-16 1992-12-29 International Business Machines Corporation Method for executing overlays in an expanded memory data processing system
US5167030A (en) * 1989-08-23 1992-11-24 Helix Software Company, Inc. System for dynamically allocating main memory to facilitate swapping of terminate and stay resident communication program to increase available memory space
US5146580A (en) * 1989-10-25 1992-09-08 Microsoft Corporation Method and system for using expanded memory for operating system buffers and application buffers
US5237669A (en) * 1991-07-15 1993-08-17 Quarterdeck Office Systems, Inc. Memory management method

Also Published As

Publication number Publication date
WO1994020905A1 (en) 1994-09-15
EP0688449A4 (en) 1997-08-27
CN1120867A (en) 1996-04-17
CN1090780C (en) 2002-09-11
CA2157572A1 (en) 1994-09-15
AU6253794A (en) 1994-09-26
EP0688449A1 (en) 1995-12-27
CA2157572C (en) 1998-12-01

Similar Documents

Publication Publication Date Title
CA1266532A (en) Method to share copy on write segment for mapped files
US3858182A (en) Computer program protection means
US5539899A (en) System and method for handling a segmented program in a memory for a multitasking data processing system utilizing paged virtual storage
JP3659062B2 (en) Computer system
US5414848A (en) Method and apparatus for sharing a common routine stored in a single virtual machine with other virtual machines operating in a preemptive muli-tasking computer system
US6711605B2 (en) Multi OS configuration method and computer system
US6732138B1 (en) Method and system for accessing system resources of a data processing system utilizing a kernel-only thread within a user process
US10191759B2 (en) Apparatus and method for scheduling graphics processing unit workloads from virtual machines
CA2275970C (en) Object and method for providing efficient multi-user access to shared operating system kernal code using instancing
US5675793A (en) Dynamic allocation of a common buffer for use by a set of software routines
US5842226A (en) Virtual memory management for a microkernel system with multiple operating systems
US6701421B1 (en) Application-level memory affinity control
US20080162834A1 (en) Task Queue Management of Virtual Devices Using a Plurality of Processors
US7496917B2 (en) Virtual devices using a pluarlity of processors
JPH07121373A (en) Data processing system and its operating method
JP2003531434A (en) Computer method and system for executing a Java computer program
US5893159A (en) Methods and apparatus for managing scratchpad memory in a multiprocessor data processing system
JPH04213129A (en) Memory control system and memory control method
GB2273591A (en) Microcomputer control systems for interprogram communication and scheduling methods
EP0403124A2 (en) Overlay swapping
US20040117568A1 (en) Bridging memory access across pre-boot and runtime phases
US6883171B1 (en) Dynamic address windowing on a PCI bus
EP1031083B1 (en) Apparatus and method of accessing random access memory
WO2001061489A2 (en) Allocating memory based on memory device organization
CN109783145B (en) Method for creating multi-image-based multifunctional embedded system