JPS6330946A - Paging system for multitask - Google Patents
Paging system for multitaskInfo
- Publication number
- JPS6330946A JPS6330946A JP17527286A JP17527286A JPS6330946A JP S6330946 A JPS6330946 A JP S6330946A JP 17527286 A JP17527286 A JP 17527286A JP 17527286 A JP17527286 A JP 17527286A JP S6330946 A JPS6330946 A JP S6330946A
- Authority
- JP
- Japan
- Prior art keywords
- task
- paging
- memory
- register
- application program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 claims description 17
- 238000010586 diagram Methods 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、マルチタスクにおけるページング方式に関し
、特にマイクロプロセッサにおけるマルチタスクモード
時のページング方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a paging method in multitasking, and particularly to a paging method in multitasking mode in a microprocessor.
従来、マイクロコンピュータ(以下、CPUと略記する
)を使用した場合には、CPUからアクセスできるメモ
リ空間の容量が限られていた。例えば、インテル社製の
8086.80186.80286等のCPUのリアル
モードにおいては、アプリケーションプログラムのタス
クがアクセス可能なメモリ空間が最大1Mバイトに制限
されている。Conventionally, when a microcomputer (hereinafter abbreviated as CPU) is used, the capacity of memory space that can be accessed from the CPU is limited. For example, in the real mode of a CPU such as Intel 8086.80186.80286, the memory space that can be accessed by an application program task is limited to a maximum of 1 MB.
しかしながら、最近のアプリケーションプログラムはメ
モリを大量に使用するものが多(なってきており、CP
Uのアクセス可能なメモリ空間の制限がアプリケーショ
ンプログラムを作成する上において大きなネックとなっ
てきている。枠に、マルチタスクで実行されるアプリケ
ーションプログラムでは、複数のアプリケーションプロ
グラムが同時に走行するため、メモリ空間の容量不足が
より顕著となってきている。However, many recent application programs use large amounts of memory (and are becoming more and more
Limitations in the accessible memory space of U have become a major bottleneck in creating application programs. On the other hand, in the case of application programs that are executed in multitasking, the shortage of memory space is becoming more and more obvious because multiple application programs are running at the same time.
このため、アプリケーションプログラム側でメモリを所
定容量のメモリブロックに分割したページを位にハンド
リングして、アプリケーションプログラムからアクセス
可能なメモリ空間の容量を実効的に増加させるようにし
たページング方式が従来から用いられることがあった。For this reason, a paging method has traditionally been used in which the application program divides the memory into memory blocks of a predetermined capacity and handles the pages in blocks, effectively increasing the amount of memory space that can be accessed by the application program. There were times when I was
しかし、上述した従来のページング方式は、アプリケー
ションプログラムがメモリブロックを直接ハンドリング
しなければならないので、トラブルが発生することが多
いという問題点があった。However, the conventional paging method described above has a problem in that troubles often occur because the application program must directly handle memory blocks.
本発明の目的は、上述の点に鑑み、メモリブロックのハ
ンドリングをオペレーティングシステム(以下、oSと
称する)に管理させることにより、アプリケーションプ
ログラム側ではなんら意識することなしに大容量のメモ
リを使用することができるようにしたマルチタスクにお
けるページング方式を提供することにある。In view of the above-mentioned points, an object of the present invention is to allow an operating system (hereinafter referred to as OS) to manage the handling of memory blocks so that a large amount of memory can be used without any awareness on the application program side. The purpose of the present invention is to provide a paging method for multitasking that allows for multitasking.
本発明のマルチタスクにおけるページング方式は、オペ
レーティングシステムのタスクコントロールプロフタに
タスク対応に設けられていてタスクのページングデータ
を格納するコントロールレジスタと、タスクからメモリ
へのアクセスアドレスをタスクに応じてアドレス変換す
るために前記ページングデータを保持するページングレ
ジスタと、タスク切換え時に前記コントロールレジスタ
から前記ページングデータを前記ページングレジスタに
設定するタスクディスパッチャとを有する。The paging method for multitasking of the present invention consists of a control register that is provided for each task in the task control profiler of the operating system and stores the paging data of the task, and an address conversion of the access address from the task to the memory according to the task. The paging register has a paging register that holds the paging data in order to do so, and a task dispatcher that sets the paging data from the control register to the paging register at the time of task switching.
本発明のマルチタスクにおけるページング方式では、コ
ントロールレジスタがオペレーティングシステムのタス
クコントロールブロックにタスク対応に設けられていて
タスクのページングデータを格納しており、ページング
レジスタがタスクからメモリへのアクセスアドレスをタ
スクに応じてアドレス変換するためにページングデータ
を保持し、タスクディスパッチャがタスク切換え時にコ
ントロールレジスタからページングデータをページング
レジスタに設定する。In the multitasking paging method of the present invention, a control register is provided in the task control block of the operating system for each task and stores paging data for the task, and the paging register assigns the memory access address from the task to the task. Paging data is held in order to perform address conversion accordingly, and the task dispatcher sets paging data from the control register to the paging register when switching tasks.
次に、本発明について図面を参照しながら説明する。 Next, the present invention will be explained with reference to the drawings.
第1図は、本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing one embodiment of the present invention.
本実施例のマルチタスクにおけるページング方式は、O
8のタスクコントロールブロックにタスク1a〜1nに
対応して設けられていて各タスク1a〜1nのページン
グデータをそれぞれ格納するコントロールレジスタ2a
〜2nと、タスク1a〜1nからメモリ5へのアクセス
アドレスをタスク1a〜1nに応じてアドレス変換する
ためにページングデータを保持するページングレジスタ
4と、タスクの切換え時にコントロールレジスタ2a〜
2nからページングデータをページングレジスタ4に設
定するタスクディスパッチャ3とから、その主要部が構
成されている。The paging method for multitasking in this embodiment is O
A control register 2a is provided in the No. 8 task control block corresponding to the tasks 1a to 1n and stores paging data of each task 1a to 1n, respectively.
~2n, a paging register 4 that holds paging data for converting the access address from the tasks 1a~1n to the memory 5 according to the tasks 1a~1n, and a control register 2a~2n when switching tasks.
The main part thereof consists of a task dispatcher 3 that sets paging data from 2n to a paging register 4.
第2図を参照すると、タスクディスパッチャ3における
処理手順は、タスク切換えステップ11と、ページング
データ読取りステップ12と、ページングデータ設定ス
テップ13とからなる。Referring to FIG. 2, the processing procedure in the task dispatcher 3 consists of a task switching step 11, a paging data reading step 12, and a paging data setting step 13.
第3図を参照すると、本実施例のマルチタスクにおける
ページング方式が適用されたハードウェア構成では、C
PU6からのアドレスバス7の例えば下位17ビツトが
メモリ5に直接人力され、18ビツト以上の上位ビット
がアドレス変換機構としてのページングレジスタ4でア
ドレス変換された後にメモリ5に入力されている。なお
、符号8はデータバスを示す。Referring to FIG. 3, in the hardware configuration to which the paging method in multitasking of this embodiment is applied, C
For example, the lower 17 bits of the address bus 7 from the PU 6 are input directly to the memory 5, and the upper bits of 18 or more bits are input to the memory 5 after address conversion by the paging register 4 as an address conversion mechanism. Note that numeral 8 indicates a data bus.
第4図を参照すると、メモリ5は、例えば128KBの
メモリブロックに分割されたページ単位に管理されてお
り、CPU6から直接アクセス可能なアドレス空間はI
MBとなっている。また、ページングレジスタ4は、C
PU6からアクセス可能なメモリブロックが8ブロツク
となるので、8つの部分から構成されている。Referring to FIG. 4, the memory 5 is managed in page units divided into memory blocks of, for example, 128 KB, and the address space directly accessible from the CPU 6 is I
It is MB. In addition, the paging register 4 is
Since there are 8 memory blocks that can be accessed from the PU 6, it is composed of 8 parts.
次に、このように構成された本実施例のマルチタスクに
おけるページング方式の動作について説明する。Next, the operation of the paging method in multitasking of this embodiment configured as described above will be explained.
タスクディスパッチャ3がタスクの切換えを行うと(ス
テップ11)、次にタスクのコントロールレジスタから
ページングデータが読み取られて(ステップ12)、こ
のページングデータがページレジスタ4にI10命令に
より書き込まれて設定される。When the task dispatcher 3 switches tasks (step 11), paging data is read from the control register of the task (step 12), and this paging data is written and set in the page register 4 by the I10 instruction. .
例えば、第4図に示すように、ページングレジスタ4の
5番目に値32が格納されていてタスクが80000〜
9FFFF番地にアクセスしたとすると、ページングレ
ジスタ4の5番目が参照される。これにより、8000
0〜9FFFF番地へのアクセスは320000〜33
FFFF番地へのアクセスにアドレス変換され、320
000〜33FFPF番地の内容がアクセスされる。For example, as shown in FIG. 4, the value 32 is stored in the fifth position of paging register 4, and the number of tasks is 80,000 to 80,000.
If address 9FFFF is accessed, the fifth paging register 4 is referenced. As a result, 8000
Access to addresses 0-9FFFF is 320000-33
The address is converted to access to address FFFF, and 320
The contents of addresses 000-33FFPF are accessed.
このように、本実施例のマルチタスクにおけるベージン
グ方式では、128KBのブロック単位でIMBのアド
レス空間を16MBまでのメモリ空間にマフピングする
ことができる。As described above, in the multitasking paging method of this embodiment, the IMB address space can be muffed into a memory space of up to 16 MB in units of 128 KB blocks.
次に、第5図を参照してタスクとアサインされるメモリ
ブロックとの関係をさらに詳しく説明する。Next, the relationship between tasks and assigned memory blocks will be explained in more detail with reference to FIG.
いま、タスクAが実行されているとすると、タスクAが
アクセスするページ0〜4は、対応するタスクコントロ
ールブロックAのコントロールレジスタに格納されたペ
ージングデータ八によりメモリブロック0. 1. 3
. 6および8にそれぞれマフピングされている。タス
クAからタスクBに切り換わると、タスクディスバフチ
ャ3はタスクコントロールブロックBのコントロールレ
ジスタの中からページングデータBを読み出してきて、
ページングレジスタ4にI10命令を使用して書き込む
。この結果、タスクBのアプリケーションプログラムか
ら見たページO〜4は、メモリブロック2,4.5.7
および8にそれぞれマツピングされる。したがって、各
タスクの実行しているプログラムから見ると同一のペー
ジにアクセスしているにもかかわらず、実際にはタスク
毎に異なるメモリブロックにアクセスしていることにな
る。Assuming that task A is currently being executed, pages 0 to 4 accessed by task A are stored in memory blocks 0 to 4 based on paging data 8 stored in the control register of the corresponding task control block A. 1. 3
.. 6 and 8, respectively. When switching from task A to task B, task dispatcher 3 reads paging data B from the control register of task control block B.
Write to paging register 4 using the I10 instruction. As a result, pages O to 4 seen from the application program of task B are memory blocks 2, 4, 5, 7
and 8, respectively. Therefore, even though each task is accessing the same page from the perspective of the program being executed, each task is actually accessing a different memory block.
このように、本実施例のマルチタスクにおけるページン
グ方式を使用することにより、個々のタスク自体がアク
セスできるメモリ容量はCPU6の制限を越えることは
できないが、複数のタスクの総合計では大容量のメモリ
を管理することができる。特に、ページがO8によって
管理されているので、アプリケーションプログラムを変
更することなしに、全体的に見て大容量のメモリを使用
することが可能になる。なお、同一のメモリブロックが
複数のタスクで共用されていてもよ(、例えば第5図で
は、タスクAおよびタスクBによりメモリブロック8が
CRTのビットマツプメモリなどとして共用されている
。As described above, by using the paging method in multitasking of this embodiment, although the memory capacity that each task itself can access cannot exceed the limit of the CPU 6, the total amount of memory that can be accessed by multiple tasks is large. can be managed. In particular, since the pages are managed by O8, it is possible to use a large amount of memory overall without changing the application program. Note that the same memory block may be shared by a plurality of tasks (for example, in FIG. 5, task A and task B share memory block 8 as a CRT bitmap memory, etc.).
以上説明したように、本発明によれば、メモリブロック
がベージ単位にO5によって管理されているので、ユー
ザはアプリケーションプログラムにおいてページを意識
することなしに大きなメモリ空間を使用することができ
る効果がある。As explained above, according to the present invention, since memory blocks are managed by O5 in page units, the user can use a large memory space in an application program without being aware of pages. .
第1図は本発明の一実施例に係るマルチタスクにおける
ベージング方式を示すブロック図、第2図は第1図中に
示したタスクディスパッチャにおける処理手順を示すフ
ローチャート、第3図は本発明の一実施例に係るマルチ
タスクにおけるベージング方式を適用したハードウェア
構成の要部を示すブロック図、
第4図はページングレジスタの値とアクセスされるメモ
リブロックとの関係を示す図、第5図はタスクとアサイ
ンされるメモリブロックとの関係を示す図である。
図において、
13〜In・タスク、
2 a −2n・コントロールレジスタ、3・・・・・
タスクディスパッチャ、
4・・・・・ページングレジスタ、
5・・・・・メモリ、
6・・・・・cpu。
7・・・・・アドレスバス、
8・・・・・データバス、
11・・・・・タスク切換えステップ、12・・・・・
ページングデータ読取りステップ、13・・・・・ペー
ジングレジスタ設定ステップである。
−へ
第3図
第4図FIG. 1 is a block diagram showing a paging method in multitasking according to an embodiment of the present invention, FIG. 2 is a flowchart showing the processing procedure in the task dispatcher shown in FIG. 1, and FIG. A block diagram showing the main parts of the hardware configuration to which the paging method is applied in multitasking according to the embodiment. FIG. 4 is a diagram showing the relationship between the values of the paging register and memory blocks to be accessed. FIG. FIG. 3 is a diagram showing a relationship with assigned memory blocks. In the figure, 13~In・Task, 2a-2n・Control register, 3...
Task dispatcher, 4...Paging register, 5...Memory, 6...CPU. 7...Address bus, 8...Data bus, 11...Task switching step, 12...
Paging data reading step, 13 . . . paging register setting step. - to Figure 3 Figure 4
Claims (1)
クにタスク対応に設けられていてタスクのページングデ
ータを格納するコントロールレジスタと、 タスクからメモリへのアクセスアドレスをタスクに応じ
てアドレス変換するために前記ページングデータを保持
するページングレジスタと、タスク切換え時に前記コン
トロールレジスタから前記ページングデータを前記ペー
ジングレジスタに設定するタスクディスパッチャと、 を有することを特徴とするマルチタスクにおけるページ
ング方式。[Scope of Claims] A control register provided in a task control block of an operating system corresponding to a task and storing task paging data; and a control register for converting an access address from a task to memory according to the task. A paging method for multitasking, comprising: a paging register that holds data; and a task dispatcher that sets the paging data from the control register to the paging register when switching tasks.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP17527286A JPS6330946A (en) | 1986-07-25 | 1986-07-25 | Paging system for multitask |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP17527286A JPS6330946A (en) | 1986-07-25 | 1986-07-25 | Paging system for multitask |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6330946A true JPS6330946A (en) | 1988-02-09 |
Family
ID=15993240
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP17527286A Pending JPS6330946A (en) | 1986-07-25 | 1986-07-25 | Paging system for multitask |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6330946A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008167966A (en) * | 2007-01-12 | 2008-07-24 | Lec Inc | Cleaning tool, tool for mirror, floor, electronic device and window glass |
JP2009223897A (en) * | 1997-03-27 | 2009-10-01 | Atmel Corp | Eight-bit microcontroller having risc architecture |
-
1986
- 1986-07-25 JP JP17527286A patent/JPS6330946A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009223897A (en) * | 1997-03-27 | 2009-10-01 | Atmel Corp | Eight-bit microcontroller having risc architecture |
JP2008167966A (en) * | 2007-01-12 | 2008-07-24 | Lec Inc | Cleaning tool, tool for mirror, floor, electronic device and window glass |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA1266532A (en) | Method to share copy on write segment for mapped files | |
JPS62274444A (en) | Address conversion system | |
JPS6330946A (en) | Paging system for multitask | |
US5511206A (en) | Microprocessor based computer with virtual memory space in overwritable memory | |
US5491826A (en) | Microprocessor having register bank and using a general purpose register as a stack pointer | |
JPH06231072A (en) | Microcomputer | |
KR19990058732A (en) | Hardware real-time multitasking device and method | |
JPH0237443A (en) | Main storage management system for electronic computer system | |
JPH03154130A (en) | Task switching system | |
JPS621048A (en) | Virtual storage system | |
JPH0521256B2 (en) | ||
JPH03113548A (en) | Extension memory controller | |
JP2742245B2 (en) | Parallel computer | |
JPH02230324A (en) | Microprogram controller | |
JPS63118852A (en) | Control system for virtual memory | |
JPH01241642A (en) | Dynamic arranging method for common memory | |
JPS63261446A (en) | Extended virtual memory control system | |
JPH0241772B2 (en) | ||
JPS63155338A (en) | Control system for record of program executing history | |
EP0688449A1 (en) | Method and apparatus for memory management | |
JPS60214040A (en) | Data processor | |
JPH02150923A (en) | Program dividing controller | |
JPS61193244A (en) | Method for data access via window in virtual memory system | |
JPH03206525A (en) | Stack system for single chip microcomputer | |
JPH02257232A (en) | Interruption processing program managing method |