JPS6226553A - Program constituting method - Google Patents

Program constituting method

Info

Publication number
JPS6226553A
JPS6226553A JP60165319A JP16531985A JPS6226553A JP S6226553 A JPS6226553 A JP S6226553A JP 60165319 A JP60165319 A JP 60165319A JP 16531985 A JP16531985 A JP 16531985A JP S6226553 A JPS6226553 A JP S6226553A
Authority
JP
Japan
Prior art keywords
program
space
logical
operating system
memory
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
JP60165319A
Other languages
Japanese (ja)
Inventor
Akio Matsubara
章雄 松原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP60165319A priority Critical patent/JPS6226553A/en
Publication of JPS6226553A publication Critical patent/JPS6226553A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the execution speed of a program by making the whole operating system area resident substantially in a physical memory space. CONSTITUTION:A physical memory capacity being larger than a size of the whole operating system area 1 is provided, physical space can be assigned to plural spaces by a memory managing mechanism 3, and the whole operating system area 1 can be constituted by splitting it into several logical spaces. In each logical space, one main routine is always provided, respectively, and each object program is suppressed to a size which can be contained in one logical space. Also, a mechanism for executing inter-process communication is added to each logical space. In this way, a memory state 2 which has been constituted by splitting the whole operating system 1 can be made a program image 4 on a main storage.

Description

【発明の詳細な説明】 援1九」 本発明はコンピュータプログラム(システムプログラム
、ユーザプログラム]に係り、特にメモリ空間にプログ
ラムを実装させるプログラム構成方法に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a computer program (system program, user program), and particularly to a program configuration method for implementing a program in a memory space.

従来致来 従来、コンピュータシステムにおけるソフトウェアは、
物理メモリエリアを適切に区分し、各々の区分間および
オペレーティングシステム等の常駐領域となる共有区分
域において論理的に1つのプログラムを構成するように
しているが、大規模プログラムの場合にはアドレス空間
の制限によって実質上動かせないものになっている。
Traditionally, software in computer systems has been
The physical memory area is divided appropriately, and a single program is logically constructed between each division and a shared area that serves as a resident area for the operating system, etc., but in the case of large programs, the address space Its limitations make it virtually immovable.

l許 本発明は以上の点を考慮してなされたもので。permission The present invention has been made in consideration of the above points.

論理アドレス空間が狭いコンピュータシステムにおいて
、1つの論理アドレス空間内に収容しきれない大規模プ
ログラムを実装させることができるようにしたプログラ
ム構成方法を提供するものである。
The present invention provides a program configuration method that makes it possible to implement a large-scale program that cannot be accommodated in one logical address space in a computer system with a narrow logical address space.

皇處 本発明はその目的達成のため、複数の論理アドレス空間
を物理アドレス空間にマツピングするメモリ管理機能と
、異なる論理アドレス空間に状態遷移させる機能とをも
ったコンピュータシステムにあって、それぞれメインル
ーチンを有し、かつ実行形式のプログラムサイズが1つ
の論理アドレス空間に収容できる大きさをもって1つの
プログラムを複数に分離して構成するとともに、相互に
プロセス間通信を行なわせる手段を設け、論理的に一つ
のプログラムを実装するのに充分な物理メモリ容量をも
ちながら論理アドレス空間として不充分なプログラムを
常駐させることができるようにするものである。
In order to achieve the object, the present invention provides a computer system having a memory management function for mapping a plurality of logical address spaces to a physical address space, and a function for making state transitions to different logical address spaces, each of which has a main routine. , and the program size in the executable format is large enough to be accommodated in one logical address space.A single program is divided into multiple parts, and a means for mutual inter-process communication is provided. This allows programs that have sufficient physical memory capacity to implement one program but have insufficient logical address space to reside.

以下、添付図面を参照して本発明の一実施例について詳
述する。
Hereinafter, one embodiment of the present invention will be described in detail with reference to the accompanying drawings.

いま、ハードウェア要件としてCPU、メモリ。Currently, the hardware requirements are CPU and memory.

メモリ管理ユニットをそなえ、ソフトウェア要件として
ユーザプログラムエリアとシステムプログラムエリアと
の2つを遷移できるトラップ命令をそなえているコンピ
ュータシステムにおいてソフトウェアを構築する場合に
ついて考えてみる。
Consider the case where software is constructed in a computer system that is equipped with a memory management unit and has a trap instruction that can transition between a user program area and a system program area as a software requirement.

第3図は、こうしたマルチプログラム環境における論理
空間の対応例を示している。
FIG. 3 shows an example of logical space correspondence in such a multi-program environment.

このような各論理空間LO〜Lnの対応例において、普
通、論理空間LOをオペレーティングシステム等のシス
テムプログラム常駐領域とし、その他の論理空間L1〜
Lnをユーザプログラム領域に設定するようにしている
。コンピュータシステムを使用するユーザには論理空間
L1〜Lnのうちの適当な1つが割り当てられ、そこで
プロセスの実行が行なわれる。特に最小のマイクロコン
ビ五−タ応用システムにあっては、こうしたことが一般
的になっている・。
In such a correspondence example of each logical space LO to Ln, normally the logical space LO is a resident area for a system program such as an operating system, and the other logical spaces L1 to
Ln is set in the user program area. A user using a computer system is assigned an appropriate one of the logical spaces L1-Ln, and processes are executed there. This is becoming common, especially in the smallest microcombinant application systems.

一方、プログラムを大規模にする場合があり。On the other hand, you may want to make your program large-scale.

1つの論理空間内に収容しきれなくなることがある。It may become impossible to accommodate all the data in one logical space.

いまオペレーティングシステムが大規模化して論理空間
LO内に収容しきれなくなった場合を想定してみる。
Let us now assume a case where the operating system has grown so large that it cannot be accommodated in the logical space LO.

その場合、従来では第4図に示すように、論理システム
空間LSAに比べてオペレーティングシステムエリアO
8A全体がかなり大きい場合、同じ論理システム空間L
SAにオペレーティングシステムの一部を適当にオーバ
マツピングする方法によって、全体を重畳させて実装さ
せるようにしている。
In that case, conventionally, as shown in FIG. 4, the operating system area O is smaller than the logical system space LSA.
If the entire 8A is quite large, the same logical system space L
By appropriately overmapping a part of the operating system into SA, the entire operating system is overlaid and implemented.

この場合は、オペレーティングシステム全体のうち、論
理システム空間LSAに割り当てられおらずに二次記憶
装置内に退避されている部分がアクセスされると、セグ
メンテーションフォールトが発生し、対応する空間にマ
ツピングしなおされてから対応する部分がアクセスされ
てプログラムの実行が続行される。しかして、オペレー
ティングシステムエリア○SA全体があたかもメモリエ
リアに存在するかのようにふるまわせることができる。
In this case, if a portion of the entire operating system that is not allocated to the logical system space LSA and is saved in the secondary storage device is accessed, a segmentation fault will occur and the portion will be remapped to the corresponding space. The corresponding part is then accessed and program execution continues. Thus, the entire operating system area SA can be made to behave as if it existed in the memory area.

しかしこのような従来・方式では、前述のようにセグメ
ンテーションフォールトが発生したときに対応する空間
にマツピングしなおす必要があるが、そのとき新たにア
ラセスされるべき部分は二次記憶装置上に退避されてい
るため、メモリにロードさせることが必要になる。した
がって、二次記憶装置へのアクセスに時間がかかるもの
となっている。
However, in such conventional methods, when a segmentation fault occurs as described above, it is necessary to remap to the corresponding space, but at that time, the part that should be newly allocated is saved on the secondary storage device. Therefore, it is necessary to load it into memory. Therefore, it takes time to access the secondary storage device.

これに対して本発明では、第2図に示すように、オペレ
ーティングシステムエリアO5A全体が実質的に物理メ
モリ空間PMAに常駐できるようにすることにより、プ
ログラムの実行速度を向上させることができるようにし
ている。
In contrast, in the present invention, as shown in FIG. 2, the entire operating system area O5A can be made to reside substantially in the physical memory space PMA, thereby making it possible to improve the program execution speed. ing.

すなわち、オペレーティングシステムエリア○SA全体
の大きさよりも大きな物理メモリ容量をそなえ、メモリ
管理機構により物理空間を論理空間にもたせることが可
能であれば、オペレーティングシステムエリアO3A全
体をいくつかの部分に分解して構成する。ここでは、論
理ユーザ空間AI、論理システム空間A2.論理ユーザ
空間A3に分解した場合を示している。
In other words, if it is possible to provide a physical memory capacity larger than the entire size of the operating system area ○SA and make the physical space into a logical space using a memory management mechanism, the entire operating system area O3A can be divided into several parts. Configure. Here, logical user space AI, logical system space A2. This shows the case where it is decomposed into a logical user space A3.

各部分A1〜A3には必ず1つのメインルーチンをそれ
ぞれもたせ、各オブジェクトプログラムは1つの論理空
間内(例えば64KB)に収容できる大きさにおさえる
。また各部分A1〜A3の相互にプロセス間通信を行な
わせる機構を付加させておく。
Each of the parts A1 to A3 must have one main routine, and each object program is kept to a size that can be accommodated in one logical space (for example, 64 KB). Further, a mechanism is added to allow inter-process communication between the parts A1 to A3.

しかしてこのようなプログラム構成を行なわせることに
より、各々のオブジェクトプログラムの主記憶上でのイ
メージを第1図に示すようにすることができる。すなわ
ち、図中部分1はオペレーティングシステムエリア全体
のイメージを示し、部分2はオペレーティングシステム
エリア全体を複数に分解して構成したメモリ状態を示し
、その複数に分解されたメモリ状態をメモリ管理機構3
を介して部分斗に示すような主記憶上での実行形式によ
るプログラムイメージとすることができる。
However, by configuring the program in this way, the image of each object program on the main memory can be made as shown in FIG. That is, part 1 in the figure shows an image of the entire operating system area, part 2 shows a memory state configured by decomposing the entire operating system area into multiple parts, and the memory state divided into multiple parts is divided into multiple parts by the memory management mechanism 3.
It is possible to create a program image in an executable format on the main memory as shown in the figure below.

ここで各プログラムの割当方法としては、一般的なプロ
グラム管理ユニットにおける機能をそのまま利用すれば
よい。
Here, as a method for allocating each program, the functions of a general program management unit may be used as is.

プログラム管理機能は、CPUの制御レジスタを参照す
ることにより、そのとき走行しているプロセスの空間と
その前に走行しているプロセスの空間とを指定すること
ができるようになっている。
The program management function is capable of specifying the space of the currently running process and the space of the process running before it by referring to the control register of the CPU.

そこで、オペレーティングシステムエリア全体のうち、 1、システムモードでなければ実行できない命令(CP
Uのプライオリティの変更命令、CPUの停止命令など
)を含む部分 2、複数のプロセス間でのメツセージ通信(パラメータ
の引渡し)を行なう部分 を1つにまとめ、さらにメモリ管理機構を用いて複数の
プロセスを切り換える機構を追加し、それを論理システ
ム空間に割り当てる。そして、それ以外の部分を適宜分
解されてユーザ空間に割り当てる。ただし、これはユー
ザプログラムではなく、システムプログラムをユーザモ
ードで動かしていることになる。
Therefore, among the entire operating system area, 1. Instructions that can only be executed in system mode (CP
Part 2, which includes commands to change the U priority, commands to stop the CPU, etc., and a part that performs message communication (parameter passing) between multiple processes, are combined into one, and the memory management mechanism is used to handle multiple processes. Add a mechanism to switch between the two and assign it to the logical system space. Then, the remaining parts are appropriately decomposed and allocated to the user space. However, this means that you are running a system program in user mode, not a user program.

各プロセスの発生するプロセス間通信の発生要求は一度
論理システム空間を介することにより相手方のプロセス
で受理され、各空間の切換えはこれを行なうトラップ命
令により実行することができる。
A request for inter-process communication generated by each process is accepted by the other process once via the logical system space, and each space can be switched by a trap instruction that performs this.

このように本発明によるプログラム構成方法にによれば
、1゛つの論理空間内に収容しきれない程度の大きなプ
ログラムが主記憶されることにより、大規模プログラム
の実行が可能になるとともに、プログラムの実行を迅速
に行なわせることができるようになる。
As described above, according to the program configuration method of the present invention, a large program that cannot be accommodated in one logical space is stored in the main memory, making it possible to execute a large-scale program and This allows for faster execution.

なお、以上はオペレーティングシステムを実装する場合
について説明したが、一般のユーザプログラムを構成す
る場合にあっても同様に実施できることはいうまでもな
い。
Note that although the above description has been made regarding the case where an operating system is implemented, it goes without saying that the same implementation is possible when configuring a general user program.

羞困 以上、本発明によるプログラム構成方法にあっては、論
理アドレス空間が狭いコンピュータシステムにあって、
1つの論理アドレス空間内に収容しきれない大規模プロ
グラムを実行可能なように、かつその実行を迅速に行な
わせることができるように実装させることができるとい
う優れた利点を有している。
Unfortunately, in the program configuration method according to the present invention, in a computer system with a narrow logical address space,
It has the excellent advantage of being able to implement a large-scale program that cannot be accommodated in one logical address space in a manner that allows it to be executed and to execute the program quickly.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明によるプログラム構成方法を図式的に示
す図、第2図は本発明によるオペレーティングシステム
の実装状態を示す図、第3図はマ、ルチプログラム環境
における論理空間の対応関係を示す図、第4図は従来の
オペレーティングシステムの実装状態を示す図である。 LSA・・・論理システム空間 O3A・・・オペレー
ティングシステムエリア AI、A3・・・論理ユーザ
空間 A2・・・論理システム空間 LO〜Ln°゛°
論理空間
FIG. 1 is a diagram schematically showing a program configuration method according to the present invention, FIG. 2 is a diagram showing an implementation state of an operating system according to the present invention, and FIG. 3 is a diagram showing the correspondence between logical spaces in a multi-program environment. 4 are diagrams showing the implementation state of a conventional operating system. LSA...Logical system space O3A...Operating system area AI, A3...Logical user space A2...Logical system space LO~Ln°゛°
logical space

Claims (1)

【特許請求の範囲】[Claims] 複数の論理アドレス空間を物理アドレス空間にマッピン
グするメモリ管理機能と、異なる論理アドレス空間に状
態遷移させる機能とをもったコンピュータシステムにあ
って、それぞれメインルーチンを有し、かつ実行形式の
プログラムサイズが1つの論理アドレス空間に収容でき
る大きさをもって1つのプログラムを複数に分離して構
成するとともに、相互にプロセス間通信を行なわせる手
段を設け、論理的に一つのプログラムを実装するのに充
分な物理メモリ容量をもちながら論理アドレス空間とし
て不充分なプログラムを常駐させるようにしたプログラ
ム構成方法。
A computer system has a memory management function that maps multiple logical address spaces to a physical address space, and a function that transitions states to different logical address spaces. A single program is divided into multiple parts each having a size that can be accommodated in one logical address space, and a means for inter-process communication is provided, with sufficient physical space to logically implement one program. A program configuration method that allows a program that has memory capacity but has insufficient logical address space to reside permanently.
JP60165319A 1985-07-26 1985-07-26 Program constituting method Pending JPS6226553A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60165319A JPS6226553A (en) 1985-07-26 1985-07-26 Program constituting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60165319A JPS6226553A (en) 1985-07-26 1985-07-26 Program constituting method

Publications (1)

Publication Number Publication Date
JPS6226553A true JPS6226553A (en) 1987-02-04

Family

ID=15810066

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60165319A Pending JPS6226553A (en) 1985-07-26 1985-07-26 Program constituting method

Country Status (1)

Country Link
JP (1) JPS6226553A (en)

Similar Documents

Publication Publication Date Title
KR100733852B1 (en) Computer system
EP3217285B1 (en) Transmitting data
JP4072271B2 (en) A computer running multiple operating systems
US6996828B1 (en) Multi-OS configuration method
JP2743608B2 (en) Shared register control method
GB2293675A (en) Process allocation in a data processing system
US20030105927A1 (en) Method for use of stack
US8533740B2 (en) Data processing system with intercepting instructions
CN112306669A (en) Task processing method and device based on multi-core system
US20030009601A1 (en) Program execution method in an environment of a plurality of computers
JPH06243112A (en) Multiprocessor device
JP2001290665A (en) Processor system
JPS6226553A (en) Program constituting method
JPH01195562A (en) Control system for allocation of input/output device
JPS6327936A (en) File management method
JPH0378843A (en) Program control system using extension memory
JP2001014177A (en) Method for processing asynchronous data input and output and program recording medium
JPS62286155A (en) Multi cpu control system
JPH06259265A (en) User defining state transition system for cpu
JPS63197239A (en) Saving/storing system for control information of virtual processor
JPH113231A (en) Software processing method
JPH09134309A (en) Information processing system and method for controlling access state of shared memory
JPS61248152A (en) Procedure change controlling system
JPH07319717A (en) Program switching method for information processor
JPH02257232A (en) Interruption processing program managing method