JPH0659981A - Information processor - Google Patents

Information processor

Info

Publication number
JPH0659981A
JPH0659981A JP4210016A JP21001692A JPH0659981A JP H0659981 A JPH0659981 A JP H0659981A JP 4210016 A JP4210016 A JP 4210016A JP 21001692 A JP21001692 A JP 21001692A JP H0659981 A JPH0659981 A JP H0659981A
Authority
JP
Japan
Prior art keywords
cpu
swapping
time
page
main 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
JP4210016A
Other languages
Japanese (ja)
Inventor
Eiji Abu
栄二 阿武
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP4210016A priority Critical patent/JPH0659981A/en
Publication of JPH0659981A publication Critical patent/JPH0659981A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To prevent a system from being turned to a hang-up state due to the frequent generation of swapping when tasks more than a fixed number corresponding to the size of a main memory are driven in an information processor adopting a multitask operating system(OS) and virtual storage type memory management. CONSTITUTION:A CPU time monitoring timer 18 is connected to a CPU core 12 by means of a time-out informing signal 19. The timer 18 measures the CPU occupation rate of a swapping module, and when the rate exceeds a fixed value, informs the result to the core 12. If a page fault is generated in the status, the tasks are waited for a fixed time in accordance with task priority, so that the whole system can be prevented from being hung up due to the frequent generation of swapping.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、マルチタスクOS(オ
ペレーティングシステム)と仮想記憶方式のメモリ管理
を採用した情報処理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus which employs a multitasking OS (operating system) and a virtual memory type memory management.

【0002】[0002]

【従来の技術】近年、情報処理装置においては、広大な
メモリ空間を提供する目的で仮想記憶方式のメモリ管理
が必須となってきている。また、複数の業務を同時に処
理するために、マルチタスクOS(オペレーティングシ
ステム)の採用が必須とされている。
2. Description of the Related Art In recent years, in information processing apparatuses, virtual memory type memory management has become essential for the purpose of providing a vast memory space. Further, in order to process a plurality of jobs at the same time, it is essential to adopt a multitasking OS (operating system).

【0003】以下に従来の仮想記憶方式のメモリ管理を
採用した情報処理装置について図を参照しながら説明す
る。
An information processing apparatus adopting a conventional virtual memory type memory management will be described below with reference to the drawings.

【0004】図2は従来の仮想記憶方式のメモリ管理を
採用した情報処理装置を示すものである。図2におい
て、2はCPUコア、3はアドレス変換ユニット、1は
CPUコア2とアドレス変換ユニット3を内蔵したCP
Uユニット、4はページフォルト信号、5はメインメモ
リ、6はハードディスクなどのランダムアクセスが可能
な二次記憶装置、7は二次記憶装置上のスワップ域(ま
たはスワップファイル)、8はシステムバスである。
FIG. 2 shows an information processing apparatus adopting a conventional virtual memory type memory management. In FIG. 2, 2 is a CPU core, 3 is an address translation unit, 1 is a CPU core having a CPU core 2 and an address translation unit 3 built-in.
U unit, 4 is a page fault signal, 5 is main memory, 6 is a randomly accessible secondary storage device such as a hard disk, 7 is a swap area (or swap file) on the secondary storage device, and 8 is a system bus. is there.

【0005】以上のように構成された仮想記憶方式のメ
モリ管理を採用した情報処理装置について、以下その動
作について説明する。メインメモリ5はスワップサイズ
として4Kバイトまたは1Kバイト等のページ単位に分
割して管理する。二次記憶装置6上のスワップ域7も同
じページサイズでメインメモリの退避域として使用す
る。ここでの動作は、まず、CPUコア2から送出され
た論理アドレス(物理アドレスに変換される前の論理的
なアドレス)はアドレス変換ユニット3で物理アドレス
(メインメモリ上の物理的なアドレス)に変換される。
この変換の結果、該当のページがメインメモリ5に存在
する場合はCPUコア2はメインメモリ5の該当の物理
アドレスにアクセスする。また、該当のページがメイン
メモリ5に存在せずにスワップ域7に退避されている場
合はアドレス変換ユニット3はページフォルト信号4を
用いてページ不在をCPUコア2に割り込みとして通知
する。CPUコア2ではスワッピングモジュール(スワ
ッピング処理を行うソフトウェアルーチン)に制御を移
行し、ここでメインメモリ5の空きページを捜すか、ま
たは空きページがない場合は、LRU(Least R
ecently Used)アルゴリズム等によりメイ
ンメモリ5からスワップ域7に退避可能なページを決定
し、該当のページをスワップ域7に退避(スワップアウ
ト)し、代わりにスワップ域7に退避されているアクセ
スしたいページをメインメモリ5の退避したページ域に
復元(スワップイン)し、割り込み発生前の処理を継続
する。ここで、マルチタスクOS下で動作している場
合、上記ページフォルトが発生したタスクはスワッピン
グ処理(スワップアウト及びスワップイン)が完了する
までウェイト状態とし、他のタスクに切り替える(タス
クディスパッチ)する。
The operation of the information processing apparatus employing the virtual memory type memory management configured as described above will be described below. The main memory 5 is managed by dividing it into page units such as 4 Kbytes or 1 Kbyte as a swap size. The swap area 7 on the secondary storage device 6 is also used as the save area of the main memory with the same page size. In the operation here, first, the logical address (logical address before being converted into a physical address) sent from the CPU core 2 is converted into a physical address (physical address in the main memory) by the address conversion unit 3. To be converted.
As a result of this conversion, when the corresponding page exists in the main memory 5, the CPU core 2 accesses the corresponding physical address of the main memory 5. When the corresponding page does not exist in the main memory 5 and is saved in the swap area 7, the address translation unit 3 uses the page fault signal 4 to notify the CPU core 2 of the page absence as an interrupt. The CPU core 2 transfers control to a swapping module (software routine for performing swapping processing), and searches for an empty page in the main memory 5 here, or if there is no empty page, LRU (Least R).
A page that can be saved from the main memory 5 to the swap area 7 is determined by the "Ecently Used" algorithm, etc., the corresponding page is saved to the swap area 7 (swap out), and the page to be saved that is saved to the swap area 7 instead is accessed. Is restored (swapped in) into the saved page area of the main memory 5, and the process before the interrupt is generated is continued. When operating under a multi-task OS, the task in which the page fault has occurred is placed in a wait state until swapping processing (swap-out and swap-in) is completed, and is switched to another task (task dispatch).

【0006】[0006]

【発明が解決しようとする課題】しかしながら上記従来
の構成では、ページフォルトの発生に伴いスワッピング
処理とそれに伴うタスクディスパッチが無条件に行われ
る。そのため、メインメモリの大きさに対して一定以上
のタスクが動作すると、タスクの切り替え毎にスワッピ
ングが発生し、同時にスワッピングの完了待のためにタ
スク切り替えが発生する状態となりスワッピングの多発
によるアプリケーションプログラムの動作時間が著しく
低下し、システム全体がハングアップ状態になるという
問題点を有していた。
However, in the above-mentioned conventional configuration, the swapping process and the task dispatch accompanying it are performed unconditionally when a page fault occurs. Therefore, if more than a certain number of tasks operate in the size of the main memory, swapping occurs at each task switching, and at the same time task switching occurs due to waiting for the completion of swapping. There is a problem that the operating time is significantly reduced and the entire system is hung up.

【0007】本発明は上記従来の問題点を解決するもの
で、ページフォルトによるスワッピング処理とそれに伴
うタスクのディスパッチを制限する機能を備えた情報処
理装置を提供することを目的とする。
The present invention solves the above-mentioned conventional problems, and an object of the present invention is to provide an information processing apparatus having a function of limiting swapping processing due to a page fault and task dispatch accompanying it.

【0008】[0008]

【課題を解決するための手段】この目的を達成するため
に本発明の情報処理装置は、スワッピングモジュールの
実行時間監視タイマとこのタイマからの割り込みによる
タスクのスケジューリングの機能を有した構成を有して
いる。
To achieve this object, the information processing apparatus of the present invention has a configuration having a swapping module execution time monitoring timer and a task scheduling function by an interrupt from this timer. ing.

【0009】[0009]

【作用】この構成によって、スワッピングモジュールの
CPU実行時間に占める比率の測定が可能となり、その
比率が一定以上になった場合(システムがハングアップ
状態となる以前の比率)、タスクの優先度に応じて一定
時間該当タスクをウェイト状態としスワッピング負荷を
軽減することでシステム全体のハングアップを回避する
ことができる。
With this configuration, the ratio of the swapping module to the CPU execution time can be measured, and when the ratio exceeds a certain level (the ratio before the system hangs up), the task priority is changed. By setting the corresponding task in the wait state for a certain period of time and reducing the swapping load, it is possible to avoid hangup of the entire system.

【0010】[0010]

【実施例】以下本発明の一実施例について図面を参照し
ながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0011】図1は本発明の一実施例の情報処理装置を
示すものである。図1において、12はCPUコア、1
3はアドレス変換ユニット、14はページフォルト信
号、11はCPUコア12とアドレス変換ユニット13
を内蔵したCPUユニット、15はメインメモリ、16
は二次記憶装置、17は二次記憶装置上のスワップ域
(またはスワップファイル)、18はスワッピングモジ
ュールのCPU時間監視タイマ、19はCPU時間監視
タイマ18のタイムアウト通知信号、20はシステムバ
スである。
FIG. 1 shows an information processing apparatus according to an embodiment of the present invention. In FIG. 1, 12 is a CPU core, 1
3 is an address translation unit, 14 is a page fault signal, 11 is a CPU core 12 and an address translation unit 13
CPU unit with built-in, 15 is main memory, 16
Is a secondary storage device, 17 is a swap area (or swap file) on the secondary storage device, 18 is a CPU time monitoring timer of the swapping module, 19 is a time-out notification signal of the CPU time monitoring timer 18, and 20 is a system bus. .

【0012】以上のように構成された情報処理装置につ
いて、その動作を説明する。まず、CPU時間監視タイ
マ18はCPUからの命令でカウント動作(減算)の開
始(再開始を含む)と停止を行い、かつ一定時間(1
秒)毎に自動的に初期化を行うタイマであり、初期化の
前に一定の値(0)になるとタイムアウト通知信号19
を用いてCPUコア12にタイムアウトの通知を行うタ
イマである。スワッピングモジュールの入口でCPU時
間監視タイマ18の開始(または再開始)を行い、出口
で停止を行う。ここで、CPU時間監視タイマ18から
の割り込みを受け付けたCPUコア12ではCPU時間
監視タイマからの通知があったことをメインメモリ15
上のOS内部の制御情報域に状態として保持する。
The operation of the information processing apparatus configured as described above will be described. First, the CPU time monitoring timer 18 starts (including restarts) and stops the counting operation (subtraction) in response to an instruction from the CPU, and performs a fixed time (1
It is a timer that automatically initializes every 2 seconds), and if a constant value (0) is reached before initialization, a timeout notification signal 19
Is a timer for notifying the CPU core 12 of the time-out. The CPU time monitoring timer 18 is started (or restarted) at the entrance of the swapping module and stopped at the exit. Here, in the CPU core 12 that has received the interrupt from the CPU time monitoring timer 18, the main memory 15 is notified that the CPU core 12 has received the notification.
It is held as a state in the control information area inside the above OS.

【0013】CPUコア12から送出された論理アドレ
ス(物理アドレスに変換される前の論理的なアドレス)
はアドレス変換ユニット13で物理アドレス(メインメ
モリ上の物理的なアドレス)に変換される。この変換の
結果、該当のページがメインメモリ15に存在する場合
はCPUコア12はメインメモリ15の該当の物理アド
レスにアクセスする。また、該当のページがメインメモ
リ15に存在せずにスワップ域17に退避されている場
合はアドレス変換ユニット13はページフォルト信号1
4を用いてページ不在をCPUコア12に割り込みとし
て通知する。
Logical address sent from the CPU core 12 (logical address before being converted to a physical address)
Is converted into a physical address (physical address on the main memory) by the address conversion unit 13. As a result of this conversion, when the corresponding page exists in the main memory 15, the CPU core 12 accesses the corresponding physical address of the main memory 15. If the corresponding page does not exist in the main memory 15 and is saved in the swap area 17, the address translation unit 13 outputs the page fault signal 1
4 is used to notify the CPU core 12 of the absence of a page as an interrupt.

【0014】この時点でCPU時間監視タイマ18から
タイムアウトの通知がない場合は従来の技術と同様の処
理を行う。すなわち、CPUコア12ではスワッピング
モジュールに制御を移行し、ここでメインメモリ15の
空きページを捜すか、または空きページがない場合は、
LRU(Least Recently Used)ア
ルゴリズム等によりメインメモリ15からスワップ域1
7に退避可能なページを決定し、該当のページをスワッ
プ域17に退避(スワップアウト)し、代わりにスワッ
プ域17に退避されているアクセスしたいページをメイ
ンメモリ15の退避したページ域に復元(スワップイ
ン)し、割り込み発生前の処理を継続する。ここで、マ
ルチタスクOS下で動作している場合、上記ページフォ
ルトが発生したタスクはスワッピング処理(ページの退
避・復元)が完了するまでウェイト状態とし、他のタス
クに切り替える(タスクディスパッチ)。
At this time, if the CPU time monitoring timer 18 does not notify the time-out, the same process as the conventional technique is performed. That is, the CPU core 12 transfers control to the swapping module, and searches for an empty page in the main memory 15 here, or when there is no empty page,
Swap area 1 from main memory 15 by LRU (Least Recently Used) algorithm or the like
7 determines a page that can be saved in the swap area 17, saves the corresponding page in the swap area 17 (swap out), and restores the page to be accessed saved in the swap area 17 to the saved page area in the main memory 15 instead ( Swap in) and continue the process before the interrupt occurred. Here, when operating under a multi-task OS, the task in which the page fault has occurred is placed in a wait state until the swapping processing (page saving / restoring) is completed, and is switched to another task (task dispatch).

【0015】また、ページフォルト発生時、CPU時間
監視タイマ18からタイムアウトの通知がされている場
合は、現在実行中タスクの優先度が相対的に低い場合、
または、システム生成時に指定(ページフォルト)多発
時、ウェイト対象とするかどうかのタスクの優先度)し
た優先度より低い場合、または、タスク起動時の指定
(ページフォルト多発によるウェイト対象かどうか)に
応じて、一定時間、該当のタスクをウェイトとし、スケ
ジューリングの対象から外す。
When a page fault occurs, if the CPU time monitoring timer 18 reports a timeout, if the currently executing task has a relatively low priority,
Or, if it is lower than the priority specified when the system is created (page faults) frequently, the priority of the task as to whether to wait or not, or when the task is started (whether to wait due to frequent page faults) Accordingly, the corresponding task is weighted for a certain period of time and excluded from the scheduling target.

【0016】以上のように本実施例によれば、ページフ
ォルト発生時に無条件にスワッピング処理を行わずに、
スワッピングモジュールのCPU時間監視タイマを設け
ることにより、スワッピングモジュールのCPU実行時
間に占める比率が測定でき、その比率に応じて動作タス
クを制限することで、スワッピングの多発によるシステ
ムのハングアップを回避することができる。
As described above, according to this embodiment, the swapping process is not unconditionally performed when a page fault occurs,
By providing the CPU time monitoring timer of the swapping module, the ratio of the CPU execution time of the swapping module can be measured, and by limiting the operating tasks according to the ratio, it is possible to avoid system hang-up due to frequent swapping. You can

【0017】また、該当のタスクが一定時間、スケジュ
ーリングの対象から外された場合、システムコンソール
とTSS(タイムスライスシステム)のように端末接続
されている場合、各端末にウェイト状態となりスケジュ
ーリング対象外となったことを通知する。
Further, when the corresponding task is excluded from the scheduling target for a certain period of time, and when the system console is connected to a terminal such as TSS (time slice system), each terminal is in the wait state and is not the scheduling target. Notify that it has become.

【0018】なお、上記の実施例においてCPU時間監
視タイマ18はスワッピングモジュール内で起動(再起
動)と停止を行うタイマで、初期化の間隔は1秒、CP
Uへ通知する値を0としたが、スワッピングモジュール
のCPU占有率を計測できる装置であれば起動・停止方
法及びその時間は問わない。また、CPU時間監視タイ
マはシステムバス20上でなく、CPUユニット11に
内蔵される構成でもよい。
In the above embodiment, the CPU time monitoring timer 18 is a timer for starting (restarting) and stopping in the swapping module, and the initialization interval is 1 second, CP
Although the value notified to U is set to 0, the starting / stopping method and its time are not limited as long as the device can measure the CPU occupancy of the swapping module. The CPU time monitoring timer may be built in the CPU unit 11 instead of the system bus 20.

【0019】[0019]

【発明の効果】以上のように本発明は、スワッピングモ
ジュールのCPU占有率を計り、その値が一定以上にな
ると該当のタスクを一定期間停止する機構を設けること
により、スワッピングモジュールの動作時間のCPU占
有時間に占める比率を常にシステムの動作に影響を及ぼ
さない範囲に制限することができる優れた情報処理装置
を実現できるものである。
As described above, according to the present invention, the CPU occupancy rate of the swapping module is measured, and when the value becomes a certain value or more, the task is stopped for a certain period of time. It is possible to realize an excellent information processing apparatus that can limit the ratio of occupied time to a range that does not always affect the operation of the system.

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

【図1】本発明の一実施例における情報処理装置の構成
FIG. 1 is a configuration diagram of an information processing device according to an embodiment of the present invention.

【図2】従来の情報処理装置の構成図FIG. 2 is a block diagram of a conventional information processing apparatus

【符号の説明】[Explanation of symbols]

11 CPUユニット 12 CPUコア 13 アドレス変換ユニット 15 メインメモリ 16 二次記憶装置 17 スワップ域(スワップファイル) 18 CPU時間監視タイマ 11 CPU Unit 12 CPU Core 13 Address Conversion Unit 15 Main Memory 16 Secondary Storage Device 17 Swap Area (Swap File) 18 CPU Time Monitoring Timer

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】CPUと、スワップ領域を有する二次記憶
装置と、スワッピングモジュールのCPU占有率の計測
手段を備え、前記CPUの占有率が一定の割合を超えた
場合、該当のタスクを一定期間停止させることを特徴と
する情報処理装置。
1. A CPU, a secondary storage device having a swap area, and a CPU occupancy ratio measuring unit of a swapping module. When the CPU occupancy ratio exceeds a certain ratio, the corresponding task is executed for a certain period of time. An information processing device characterized by stopping.
【請求項2】CPU占有率の計測手段はスワッピングモ
ジュールのCPU時間監視タイマによって行うことを特
徴とする請求項1記載の情報処理装置。
2. The information processing apparatus according to claim 1, wherein the CPU occupancy rate measuring means is performed by a CPU time monitoring timer of a swapping module.
JP4210016A 1992-08-06 1992-08-06 Information processor Pending JPH0659981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4210016A JPH0659981A (en) 1992-08-06 1992-08-06 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4210016A JPH0659981A (en) 1992-08-06 1992-08-06 Information processor

Publications (1)

Publication Number Publication Date
JPH0659981A true JPH0659981A (en) 1994-03-04

Family

ID=16582433

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4210016A Pending JPH0659981A (en) 1992-08-06 1992-08-06 Information processor

Country Status (1)

Country Link
JP (1) JPH0659981A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100422132B1 (en) * 2001-09-06 2004-03-11 엘지전자 주식회사 cpu task occupation ratio testing equipment of the realtime system
JP2012104140A (en) * 2004-02-04 2012-05-31 Intel Corp Sharing processor execution resources in waiting state

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100422132B1 (en) * 2001-09-06 2004-03-11 엘지전자 주식회사 cpu task occupation ratio testing equipment of the realtime system
JP2012104140A (en) * 2004-02-04 2012-05-31 Intel Corp Sharing processor execution resources in waiting state

Similar Documents

Publication Publication Date Title
US6832311B2 (en) Information processing system and resume processing method used in the system
US7992023B2 (en) Method and system for managing peripheral connection wakeup in a processing system supporting multiple virtual machines
EP0106669B1 (en) Operating system supervisor
EP2495655B1 (en) Method for switching operating system and electronic apparatus using the same
JPH0695769A (en) Method for saving system image of computer system and computer system performing method thereof
WO2006082989A2 (en) System and method of interrupt handling
US7111182B2 (en) Thread scheduling mechanisms for processor resource power management
US6154846A (en) System for controlling a power saving mode in a computer system
JPH07311749A (en) Multiprocessor system and kernel substituting method
US6745296B2 (en) System and method for providing cacheable smram
JPH0659981A (en) Information processor
JP2001117786A (en) Process scheduling device and process scheduling method
JP3961669B2 (en) Computer system and data transfer control method
WO2007094460A1 (en) Parallel processing device and exclusive access control
JP2009258984A (en) Information processor and load control method
JP2585905B2 (en) Multitask execution device
JP2845616B2 (en) Multiprocessor system
WO2024024102A1 (en) Computer system, task scheduler device, pending process awakening method, and program
JPH09293044A (en) Data transfer system
JP2770797B2 (en) Page Descriptor Update Control Method for Multiprocessor System
JP3302158B2 (en) Computer system
JPH10312296A (en) Process switch control system
JP3591883B2 (en) Computer, its system and its control method
JPH03296119A (en) Reducing device for power consumption of personal computer
JP3493122B2 (en) Microprocessor and instruction cache control circuit