JP2007172519A - Information processor, link management method for software module, and program - Google Patents

Information processor, link management method for software module, and program Download PDF

Info

Publication number
JP2007172519A
JP2007172519A JP2005372687A JP2005372687A JP2007172519A JP 2007172519 A JP2007172519 A JP 2007172519A JP 2005372687 A JP2005372687 A JP 2005372687A JP 2005372687 A JP2005372687 A JP 2005372687A JP 2007172519 A JP2007172519 A JP 2007172519A
Authority
JP
Japan
Prior art keywords
software module
access frequency
processing apparatus
information processing
software
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.)
Withdrawn
Application number
JP2005372687A
Other languages
Japanese (ja)
Inventor
Manabu Kato
加藤  学
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2005372687A priority Critical patent/JP2007172519A/en
Publication of JP2007172519A publication Critical patent/JP2007172519A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To optimize and speed up a processing speed. <P>SOLUTION: The information processor has: a software module execution means for executing the software module; a main storage means for arranging software modules executed by the execution means; a sub-storage means for storing a plurality of software modules; and a software module management means for calculating the frequency of access to the software modules and managing the software modules on the basis of the calculated frequency of access. The software module management means calculates the frequency of access to the software modules when the execution of software modules arranged by the main storage means from the sub-storage means is completed, and leaves the software modules whose frequency of access is higher than a specified threshold value in the main storage means. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、ソフトウェアモジュールについて、アクセス頻度に応じて動的にリンク管理を行う情報処理装置、ソフトウェアモジュールのリンク管理方法及びプログラムに関する。   The present invention relates to an information processing apparatus, a software module link management method, and a program that dynamically manage link of software modules according to access frequency.

ソフトウェアモジュールの動的なリンク管理は、パソコンなどのOSで広く採用されているが、ソフトウェアモジュール単位で、メインメモリへの常駐に関して自動的に制御する手段や方法はなかった。このため、LRU(Least Recently Used)やLFU(Least Frequently Used)などのページング処理によるメモリ管理が一般的には用いられているが、処理負荷の状況で、メモリの使われ方が大きく変化してしまうため、リアルタイムシステムなどへの適応には向かないなどの問題点があり、また、時間が経過すると不要となるメモリが増えてしまい、システム(装置)が不安定になるなどの問題を抱えていた。   Dynamic link management of software modules has been widely adopted by OSs such as personal computers, but there has been no means or method for automatically controlling the residency in the main memory in units of software modules. For this reason, memory management by paging processing such as LRU (Least Recently Used) and LFU (Least Frequently Used) is generally used. Therefore, there is a problem that it is not suitable for adaptation to a real-time system, etc. Also, there is a problem that the system (device) becomes unstable because unnecessary memory increases as time passes. It was.

また、組み込み系のシステムにおいても、汎用OSを使うシステムが、ディジタル家電やカーナビゲーションなどを中心として増えてきているが、上記のような問題は、よりメモリリソースが制限される組込み系で汎用OSを採用したシステムにて顕著に見られる傾向がある。また、組込みシステムとしては、非力なCPU装置の処理能力をできるだけ引き出したいという要望が根強い。   Also, in the embedded system, the number of systems using a general-purpose OS is increasing mainly in digital home appliances and car navigation systems. However, the above problems are caused by the general-purpose OS in embedded systems where memory resources are more limited. There is a tendency to be prominently seen in the system adopting. In addition, as an embedded system, there is a strong desire to draw out the processing power of a weak CPU device as much as possible.

従来技術例として、スワップされたくないページに対して、参照回数(アクセス頻度)を所定の最大値にセットすることにより、実際の参照回数に関わりなく、最もスワップされにくいページにすることが可能な「仮想記憶システムにおける物理メモリの割り振りをアプリケーションプログラムによって制御するアプリケーション・プログラム・インターフェース」がある(例えば、特許文献1参照)。
特開2004−500605号公報
As an example of the prior art, by setting the reference count (access frequency) to a predetermined maximum value for a page that is not to be swapped, it is possible to make the page that is least likely to be swapped regardless of the actual reference count. There is an “application program interface that controls the allocation of physical memory in a virtual storage system by an application program” (see, for example, Patent Document 1).
JP 2004-500605 A

しかしながら、上記特許文献1記載の発明は、参照回数に閾値を設けて、実際の参照回数が閾値以上であるページをスワップしないように設定することはできない。すなわち、実際のアクセス頻度に基づいて、アクセス頻度の高いソフトウェアモジュールをメインメモリに残すことはできない。   However, in the invention described in Patent Document 1, it is not possible to set a threshold for the number of references so as not to swap pages whose actual number of references is equal to or greater than the threshold. That is, based on the actual access frequency, a software module with a high access frequency cannot be left in the main memory.

本発明は、上記事情に鑑みてなされたものであり、実際のアクセス頻度に基づいて、アクセス頻度の高いソフトウェアモジュールをメインメモリに残すことができる、情報処理装置、ソフトウェアモジュールのリンク管理方法及びプログラムを提供することを目的とする。   The present invention has been made in view of the above circumstances, and an information processing apparatus, a software module link management method, and a program capable of leaving a software module with a high access frequency in a main memory based on an actual access frequency The purpose is to provide.

かかる目的を達成するために、請求項1記載の発明は、ソフトウェアモジュールに設定されたアクセス頻度に基づいて、ソフトモジュールを管理することを特徴とする。   In order to achieve this object, the invention described in claim 1 is characterized in that the software module is managed based on the access frequency set in the software module.

請求項2記載の発明は、請求項1記載の発明において、ソフトウェアモジュールを実行するソフトウェアモジュール実行手段と、実行手段が実行するソフトウェアモジュールが配置される主記憶手段と、複数のソフトウェアモジュールが記憶されている副記憶手段と、ソフトウェアモジュールに対するアクセス頻度を算出し、算出されたアクセス頻度に基づいて、ソフトモジュールを管理するソフトウェアモジュール管理手段と、を有し、ソフトウェアモジュール管理手段は、副記憶手段から主記憶手段に配置されたソフトウェアモジュールの実行終了時に、ソフトウェアモジュールに対するアクセス頻度を算出し、アクセス頻度が所定の閾値より高いソフトウェアモジュールを主記憶手段に残すことを特徴とする。   According to a second aspect of the present invention, in the first aspect of the present invention, a software module executing unit that executes the software module, a main storage unit in which the software module that the executing unit executes is arranged, and a plurality of software modules are stored. Sub-storage means, and software module management means for managing the software module based on the calculated access frequency. The software module management means includes: At the end of execution of the software module arranged in the main storage means, the access frequency for the software module is calculated, and the software module whose access frequency is higher than a predetermined threshold is left in the main storage means.

請求項3記載の発明は、請求項2記載の発明において、ソフトウェアモジュール管理手段は、アクセス頻度が予め設定された閾値より低いソフトウェアモジュールを主記憶手段から削除することを特徴とする。   The invention described in claim 3 is the invention according to claim 2, wherein the software module management means deletes the software module whose access frequency is lower than a preset threshold from the main storage means.

請求項4記載の発明は、請求項2又は3記載の発明において、アクセス頻度の算出に利用するための時間を計測するタイマ手段を有し、ソフトウェアモジュール管理手段は、タイマ手段により計測された所定の時間内の同一ソフトウェアモジュールに対するアクセス回数に基づいて、アクセス頻度を算出することを特徴とする。   According to a fourth aspect of the present invention, in the second or third aspect of the invention, there is provided timer means for measuring a time for use in calculating the access frequency, and the software module management means is a predetermined time measured by the timer means. The access frequency is calculated on the basis of the number of accesses to the same software module within the time.

請求項5記載の発明は、情報処理装置で行われるソフトウェアモジュールのリンク管理方法であって、ソフトウェアモジュールにアクセス頻度を設定し、アクセス頻度に基づいて、ソフトモジュールを管理することを特徴とする。   The invention according to claim 5 is a software module link management method performed by the information processing apparatus, wherein access frequency is set to the software module, and the software module is managed based on the access frequency.

請求項6記載の発明は、請求項5記載の発明において、所定のソフトウェアモジュールの実行終了時に、ソフトウェアモジュールに対するアクセス頻度を算出し、アクセス頻度が所定の閾値より高いソフトウェアモジュールを主記憶手段に残すことを特徴とする。   According to a sixth aspect of the present invention, in the fifth aspect of the present invention, at the end of execution of a predetermined software module, the access frequency for the software module is calculated, and the software module whose access frequency is higher than a predetermined threshold value is left in the main memory means. It is characterized by that.

請求項7記載の発明は、請求項6記載の発明において、所定のソフトウェアモジュールの実行終了時に、ソフトウェアモジュールに対するアクセス頻度を算出し、アクセス頻度が予め設定された閾値より低いソフトウェアモジュールを主記憶手段から削除することを特徴とする。   According to a seventh aspect of the invention, in the sixth aspect of the invention, when the execution of the predetermined software module is finished, the access frequency to the software module is calculated, and the software module whose access frequency is lower than a preset threshold is stored in the main memory means. It is characterized by deleting from.

請求項8記載の発明は、請求項6又は7記載の発明において、アクセス頻度の算出に利用するための時間を計測し、計測された所定の時間内の同一ソフトウェアモジュールに対するアクセス回数に基づいて、アクセス頻度を算出することを特徴とする。   The invention according to claim 8 is the invention according to claim 6 or 7, wherein the time used for calculating the access frequency is measured, and based on the number of accesses to the same software module within the measured predetermined time, The access frequency is calculated.

請求項9記載の発明は、情報処理装置に、ソフトウェアモジュールのリンク管理方法を実行させるプログラムであって、ソフトウェアモジュールにアクセス頻度を設定し、アクセス頻度に基づいて、ソフトモジュールを管理する処理を情報処理装置に実行させることを特徴とする。   The invention according to claim 9 is a program for causing an information processing apparatus to execute a software module link management method, and sets information on an access frequency for the software module and manages software module management based on the access frequency. The processing apparatus is executed.

請求項10記載の発明は、請求項9記載の発明において、所定のソフトウェアモジュールの実行終了時に、ソフトウェアモジュールに対するアクセス頻度を算出し、アクセス頻度が所定の閾値より高いソフトウェアモジュールを主記憶手段に残す処理を情報処理装置に実行させることを特徴とする。   According to a tenth aspect of the present invention, in the ninth aspect of the invention, at the end of execution of a predetermined software module, an access frequency to the software module is calculated, and a software module whose access frequency is higher than a predetermined threshold is left in the main storage means. The information processing apparatus is caused to execute the processing.

請求項11記載の発明は、請求項10記載の発明において、所定のソフトウェアモジュールの実行終了時に、ソフトウェアモジュールに対するアクセス頻度を算出し、アクセス頻度が予め設定された閾値より低いソフトウェアモジュールを主記憶手段から削除する処理を情報処理装置に実行させることを特徴とする。   According to an eleventh aspect of the present invention, in the tenth aspect of the present invention, at the end of execution of a predetermined software module, the access frequency for the software module is calculated, and the software module whose access frequency is lower than a preset threshold is stored in the main memory means. The information processing apparatus is caused to execute processing for deleting from the information processing apparatus.

請求項12記載の発明は、請求項10又は11記載の発明において、アクセス頻度の算出に利用するための時間を計測し、計測された所定の時間内の同一ソフトウェアモジュールに対するアクセス回数に基づいて、アクセス頻度を算出する処理を情報処理装置に実行させることを特徴とする。   The invention according to claim 12 is the invention according to claim 10 or 11, wherein the time used for calculating the access frequency is measured, and based on the number of accesses to the same software module within the measured predetermined time, The information processing apparatus is caused to execute processing for calculating access frequency.

本発明によれば、実際のアクセス頻度に基づいて、アクセス頻度の高いソフトウェアモジュールをメインメモリに残すことができるので、処理速度の最適化・高速化を実現することが可能となる。   According to the present invention, since a software module with a high access frequency can be left in the main memory based on the actual access frequency, the processing speed can be optimized and increased.

以下、本発明を実施するための最良の形態について添付図面を参照して詳細に説明する。   The best mode for carrying out the present invention will be described below in detail with reference to the accompanying drawings.

従来、パーソナルコンピュータなどの通常の情報処理装置では、ダイナミックリンクされるソフトウェアモジュールが二次記憶装置に存在する場合、このソフトウェアモジュールが処理のため主記憶(メインメモリ)に配置されるとき、物理メモリ中のキャッシュメモリに依存した配置がなされるため、容量の大きいソフトウェアモジュールでは、キャッシュメモリに配置される局所的なアドレス空間でのアクセス効率は改善される。しかし、この方式では、ソフトウェアモジュール単位での物理メモリへの動的な配置管理を実施しないため、頻繁にアクセスされるソフトウェアモジュールの場合でも、毎回、二次記憶装置から物理メモリへの読み込みが発生する可能性が高く処理速度が低下する。   Conventionally, in a normal information processing apparatus such as a personal computer, when a software module to be dynamically linked exists in a secondary storage device, when this software module is arranged in a main memory (main memory) for processing, a physical memory Since the arrangement depends on the cache memory, the access efficiency in the local address space arranged in the cache memory is improved in the software module having a large capacity. However, in this method, dynamic allocation management to the physical memory in software module units is not performed, so even in the case of frequently accessed software modules, reading from the secondary storage device to the physical memory occurs every time. The processing speed decreases.

また、従来、メインメモリの効率的活用の手段として、LFUによるページング処理があるが、これは、アクセス頻度の低い部分を単に置き換えてしまうため、アクセス頻度値にかかわらず、相対的にアクセス頻度の低いものからメインメモリより排除される。そのため、状況によっては本来メインメモリにあることが望ましいソフトウェアモジュールを排除してしまい、処理効率を下げる可能性がある。   Conventionally, there is a paging process by LFU as a means of efficiently using the main memory. However, this simply replaces a part having a low access frequency, so that the access frequency is relatively low regardless of the access frequency value. It is excluded from the main memory from the lowest. Therefore, depending on the situation, software modules that are desirably originally in the main memory may be excluded, and processing efficiency may be lowered.

従来のページング手法であるLFUと本発明の相違を述べた動作概念図を図6に示す。
従来のLFUによるソフトウェアモジュール管理は、図6(a)に示すように、例えば、主記憶手段であるメインメモリに、アクセス頻度の高い順にソフトウェアA,B,C,Dが配置されていて、次にソフトウェアG,F,Eが実行される場合、アクセス頻度の低いモジュールから順に置き換えられるため、図6(b)に示すように、メインメモリの制限でソフトウェアC,Dは強制的に置き換えられてしまう。しかし、例えば、このソフトウェアCが、リアルタイム処理が必要で、定期的に呼ばれるモジュールである場合は、ソフトウェアCをメインメモリ上に残しておく必要がある。その理由は、リアルタイム応答性、システム性能が劣化し、最大応答時間を増大させることになるからである。
FIG. 6 shows an operation conceptual diagram describing the difference between the LFU as a conventional paging technique and the present invention.
In the conventional software module management by LFU, as shown in FIG. 6A, for example, software A, B, C, and D are arranged in descending order of access frequency in the main memory as the main storage means. When the software G, F, and E are executed, the modules with the lower access frequency are replaced in order, so that the software C and D are forcibly replaced due to the limitation of the main memory as shown in FIG. End up. However, for example, when this software C is a module that requires real-time processing and is called periodically, it is necessary to leave the software C on the main memory. The reason is that real-time responsiveness and system performance are deteriorated and the maximum response time is increased.

そこで、本発明によるモジュール管理は、図6(c)に示すように、アクセス頻度に閾値を設定し、従来と同じくアクセス頻度の低い順に置き換えられるが、閾値以上のモジュールは入れ替えないようにする。よって、例えば、ソフトウェアCが、リアルタイム処理が必要で、定期的に呼ばれるモジュールである場合でも、ソフトウェアCは閾値を超えているので、図6(d)に示すようにメインメモリ上に残ることとなり、従来のようなシステムの破綻が起こらない。なお、ソフトウェアGは実行待ちとなる。   Therefore, in the module management according to the present invention, as shown in FIG. 6C, a threshold value is set for the access frequency and is replaced in ascending order of the access frequency as in the prior art, but modules that are equal to or higher than the threshold value are not replaced. Thus, for example, even if the software C is a module that requires real-time processing and is called periodically, the software C exceeds the threshold value, and therefore remains on the main memory as shown in FIG. The conventional system failure does not occur. Note that the software G waits for execution.

以上のことから、本発明は、ソフトウェアモジュールの動的リンク管理を行う情報処理装置において、モジュールのアクセス頻度を管理し、アクセス頻度の高いモジュール(アクセス頻度が閾値として設定した値より高いモジュール)を、CPU装置に近いメインメモリに自動的に配置することにより、処理速度の最適化を行うことを特徴とする。   As described above, according to the present invention, in an information processing apparatus that performs dynamic link management of software modules, the module access frequency is managed, and a module with a high access frequency (a module whose access frequency is higher than a value set as a threshold value). The processing speed is optimized by automatically arranging in the main memory close to the CPU device.

具体的には、本発明は、ソフトウェアモジュールにアクセス頻度フラグを設けることにより、アクセス履歴を参照して、二次記憶装置から一旦メインメモリに配置されたソフトウェアモジュールの再利用や廃棄の管理について、アクセス頻度フラグの値をあらかじめ設定した閾値と比較して行うことにより、従来の情報処理装置に比べて処理速度を向上させることが可能となる。   Specifically, the present invention refers to the access history by providing an access frequency flag in the software module, and regarding the management of reuse and disposal of the software module once placed in the main memory from the secondary storage device, By comparing the value of the access frequency flag with a preset threshold value, the processing speed can be improved as compared with the conventional information processing apparatus.

以下に、本発明のソフトウェアモジュールのリンク管理方法を実行する情報処理装置について説明する。図1は、本実施例の情報処理装置の構成を示している。   The information processing apparatus for executing the software module link management method of the present invention will be described below. FIG. 1 shows the configuration of the information processing apparatus of this embodiment.

図1に示すように、本実施例の情報処理装置は、メインメモリ(主記憶手段)7、二次記憶装置(副記憶手段)8、キャッシュメモリ6、CPU装置(ソフトウェアモジュール実行手段)5、メモリ管理ユニット(ソフトウェアモジュール管理手段)10、インターバルタイマ(タイマ手段)14、とを有している。   As shown in FIG. 1, the information processing apparatus of this embodiment includes a main memory (main storage means) 7, a secondary storage device (sub storage means) 8, a cache memory 6, a CPU device (software module execution means) 5, A memory management unit (software module management means) 10 and an interval timer (timer means) 14 are provided.

ソフトウェアモジュールを実行処理するCPU装置5は、実アドレスバス11を介してメモリ管理ユニット10と接続され、また、キャッシュメモリバス13を介してキャッシュメモリ6と接続されている。実アドレスバス11は、CPU装置5が実行すべきソフトウェアモジュールが存在するアドレス情報を出力する。キャッシュメモリバス13は、CPU装置5とキャッシュメモリ6とを高速につなぐデータバスである。   The CPU device 5 that executes the software module is connected to the memory management unit 10 via the real address bus 11 and is connected to the cache memory 6 via the cache memory bus 13. The real address bus 11 outputs address information where a software module to be executed by the CPU device 5 exists. The cache memory bus 13 is a data bus that connects the CPU device 5 and the cache memory 6 at high speed.

キャッシュメモリ6はCPU装置5が実行すべき命令を一時的に記憶し、局所的なループ処理などでの処理効率を高める。このキャッシュメモリ6は、データバス9を介してメインメモリ7と接続されている。   The cache memory 6 temporarily stores instructions to be executed by the CPU device 5 and improves processing efficiency in local loop processing or the like. The cache memory 6 is connected to the main memory 7 via the data bus 9.

メモリ管理ユニット10は、CPU装置5が出力する実アドレスバス11の情報を、メインメモリ7で使用可能な論理アドレスに変換し、その情報を論理アドレスバス12に出力する。このメモリ管理ユニット10は、論理アドレスバス12は、データバス9を介してメインメモリ7と接続されている。   The memory management unit 10 converts the information on the real address bus 11 output by the CPU device 5 into a logical address that can be used in the main memory 7, and outputs the information to the logical address bus 12. In the memory management unit 10, the logical address bus 12 is connected to the main memory 7 via the data bus 9.

メインメモリ7は、CPU装置5が処理を行うために必要となるソフトウェアモジュール1が必要に応じて複数配置される。   In the main memory 7, a plurality of software modules 1 required for the CPU device 5 to perform processing are arranged as necessary.

二次記憶装置8には、プログラムなどのソフトウェアモジュール1が複数記憶されており、CPU装置5が処理に必要となったソフトウェアモジュール1を、データバス9を通じてメインメモリ7に呼び込み、処理の対象とする。   The secondary storage device 8 stores a plurality of software modules 1 such as programs. The software module 1 that is required for processing by the CPU device 5 is called into the main memory 7 through the data bus 9 and processed. To do.

インターバルタイマ14は、ソフトウェアモジュール1のアクセス頻度を算出するための時間計測に用いられる。   The interval timer 14 is used for time measurement for calculating the access frequency of the software module 1.

図2にソフトウェアモジュール1の構成を示す。図2に示すように、ソフトウェアモジュール1は、ソフトウェアモジュール1の再利用または廃棄の管理をするための、アクセス頻度フラグ3と、モジュールID2を含むヘッダ部分と、実行モジュール4と、で構成される。   FIG. 2 shows the configuration of the software module 1. As shown in FIG. 2, the software module 1 includes an access frequency flag 3 for managing reuse or discard of the software module 1, a header portion including a module ID 2, and an execution module 4. .

次に、図1及び図2を参照して本実施例の動作について詳細に説明する。
CPU装置5がプログラムを実行することにより、通常は二次記憶装置8にある任意のソフトウェアモジュール1がデータバス9を通じてメインメモリ7へ配置される。このときソフトウェアモジュール1をメインメモリ7に配置するための論理アドレスバス12の情報は、メモリ管理ユニット10が、CPU装置5から出力される実アドレスバス11の情報に基づいて出力する。
Next, the operation of this embodiment will be described in detail with reference to FIGS.
When the CPU device 5 executes the program, an arbitrary software module 1 that is normally in the secondary storage device 8 is arranged in the main memory 7 through the data bus 9. At this time, the information on the logical address bus 12 for arranging the software module 1 in the main memory 7 is output by the memory management unit 10 based on the information on the real address bus 11 output from the CPU device 5.

CPU装置5は、メインメモリ7に配置された該当ソフトウェアモジュール1の実行モジュール4を、データバス9を通じてキャッシュメモリ6に読み込み、キャッシュメモリバス13を通じて処理を行う。   The CPU device 5 reads the execution module 4 of the corresponding software module 1 arranged in the main memory 7 into the cache memory 6 through the data bus 9 and performs processing through the cache memory bus 13.

該当ソフトウェアモジュール1の実行終了時に、メモリ管理ユニット10はCPU装置5から処理を奪取し、アクセス頻度フラグ3を参照し、アクセス頻度の高いモジュールID2のソフトウェアモジュール1をメインメモリ7から削除せずに残す。   At the end of execution of the corresponding software module 1, the memory management unit 10 takes the processing from the CPU device 5, refers to the access frequency flag 3, and does not delete the software module 1 with the module ID 2 having the high access frequency from the main memory 7. leave.

一方で、アクセス頻度の低いソフトウェアモジュール1に関しては、メインメモリ7から排除し、CPU装置5に処理を戻す。   On the other hand, the software module 1 with low access frequency is excluded from the main memory 7 and the process is returned to the CPU device 5.

アクセス頻度は、インターバルタイマ14を用いて、所定時間内に同一ソフトウェアモジュールが何回呼び出されたかを、モジュールID2でメモリ管理ユニット10が管理することで算出される。   The access frequency is calculated by managing how many times the same software module has been called within a predetermined time by the memory management unit 10 using the module ID 2 by using the interval timer 14.

図3は、本実施例における、アクセス頻度に応じてソフトウェアモジュール1をメインメモリ7に残すか否かを管理する処理についてのフローチャートである。   FIG. 3 is a flowchart of processing for managing whether to leave the software module 1 in the main memory 7 according to the access frequency in the present embodiment.

まず、実行モジュール4の処理終了を検知し(ステップA1)、アクセス頻度フラグ3を参照し(ステップA2)、アクセスが初回であるかどうかを判断する(ステップA3)。初回のアクセスの場合は(ステップA3/YES)、アクセス頻度フラグ3の書き込み値を、アクセス済み状態を示す所定の値に設定する(ステップA8)。その後、ソフトウェアモジュール1をメインメモリ7に残し(ステップA9)、アクセス頻度フラグ3を更新して終了となる(ステップA10)。   First, the processing end of the execution module 4 is detected (step A1), the access frequency flag 3 is referenced (step A2), and it is determined whether or not the access is the first time (step A3). In the case of the first access (step A3 / YES), the write value of the access frequency flag 3 is set to a predetermined value indicating the accessed state (step A8). Thereafter, the software module 1 is left in the main memory 7 (step A9), the access frequency flag 3 is updated, and the process ends (step A10).

一方で、ステップA2にて、初回アクセス以外の場合には(ステップA2/NO)、インターバルタイマ14の所定時間内での該当ソフトウェアモジュール1のアクセス頻度をメモリ管理ユニット10により算出する(ステップA4)。   On the other hand, if it is not the first access in step A2 (step A2 / NO), the memory management unit 10 calculates the access frequency of the corresponding software module 1 within the predetermined time of the interval timer 14 (step A4). .

算出されたアクセス頻度の値があらかじめ設定した任意の値以上であれば(ステップA5/YES)、該当ソフトウェアモジュール1を残す処理を行い(ステップA9)、アクセス頻度フラグ3を更新して終了となる(ステップA10)。また、アクセス頻度の値が設定値に満たない場合には(ステップA5/NO)、アクセス頻度フラグをクリアし(ステップA6)、ソフトウェアモジュール1をメインメモリ7から削除する処理を実施する(ステップA7)。   If the calculated access frequency value is greater than or equal to an arbitrary value set in advance (step A5 / YES), a process for leaving the corresponding software module 1 is performed (step A9), the access frequency flag 3 is updated, and the process ends. (Step A10). If the access frequency value is less than the set value (step A5 / NO), the access frequency flag is cleared (step A6), and the process of deleting the software module 1 from the main memory 7 is performed (step A7). ).

以上、本実施例の処理によれば、アクセス頻度フラグ3の利用により、頻繁に呼び出されると判断されるソフトウェアモジュール1はCPU装置5に近いメインメモリ7に保持されるため、従来のようにCPU装置5からの呼び出し待ち時間を二次記憶装置8から毎回呼び出す場合と比較すると、最小限に抑えることが可能となり、プログラムの処理時間が高速化される。   As described above, according to the processing of the present embodiment, the software module 1 that is determined to be frequently called by using the access frequency flag 3 is held in the main memory 7 close to the CPU device 5, so that the CPU is conventionally used. Compared to the case where the call waiting time from the device 5 is called from the secondary storage device 8 each time, it is possible to minimize the waiting time, and the processing time of the program is increased.

よって、従来、ソフトウェアモジュール1がハードディスクドライブなどの二次記憶装置8に存在しているため、CPU装置に読み込まれるまでのアクセス時間は、数ms程度必要となるが、本実施例によれば、頻繁に呼び出されるソフトウェアモジュール1に関しては、メインメモリ7上に配置されることになり、CPU装置に読み込まれるまでのアクセス時間は、およそ0.5μs程度となり、数千倍程度の高速化を実現することが可能となる。   Therefore, conventionally, since the software module 1 is present in the secondary storage device 8 such as a hard disk drive, an access time of about several ms is required until it is read into the CPU device. The software module 1 that is frequently called up is placed on the main memory 7, and the access time until it is read into the CPU device is about 0.5 μs, and a high speed of about several thousand times is realized. Is possible.

例えば、リアルタイム応答性が必要なソフトウェアモジュールが呼ばれるアクセス頻度に閾値を設定すれば、対象とするソフトウェアモジュールは、主記憶内に残るため、このモジュールの呼び出し時間は、安定かつ高速となる。   For example, if a threshold is set for the access frequency at which a software module that requires real-time responsiveness is called, the target software module remains in the main memory, so that the calling time of this module becomes stable and fast.

本実施例の動作概要を、図7に示す。
従来のLFUによるモジュール管理は、図7(a)に示すように、(1)において、最初の1回である応答時間は読み出し時間が含まれる。(2)において、実行予定のソフトウェア(プログラム)E,F,Gが割り込む場合、既存のソフトウェアはアクセス頻度の低い順にメインメモリから解放されてしまう(図6参照)。これは、応答性が重視されるソフトウェアについても同様である。そして、(3)において、応答時間は(1)の応答時間と一緒になってしまう。よって、応答時間が不安定となる。
An outline of the operation of this embodiment is shown in FIG.
In the conventional module management by LFU, as shown in FIG. 7A, in (1), the first response time includes a read time. In (2), when the scheduled software (programs) E, F, and G interrupts, the existing software is released from the main memory in the order of low access frequency (see FIG. 6). The same applies to software for which responsiveness is important. In (3), the response time becomes the same as the response time in (1). Therefore, the response time becomes unstable.

これに対し、本実施例のモジュール管理は、図7(b)に示すように、(1)において、最初の1回である応答時間は読み出し時間が含まれる。(2),(3)において、アクセス頻度の閾値を調整することで、ソフトウェアCがメインメモリ上に残ることとなり、応答時間が安定かつ向上する(なお、アクセス頻度が落ちれば解放される)。このように、アクセス頻度の閾値で所定のソフトウェアをロックすることにより、閾値以上のアクセス頻度があれば、別の割り込み処理が起こる間は応答時間が保証される。
特に、本実施例は、図7(c)に示すようなバースト割り込みが発生する場合の応答処理時間の保証に有効である。
On the other hand, in the module management of the present embodiment, as shown in FIG. 7B, in (1), the first response time includes the read time. In (2) and (3), by adjusting the access frequency threshold, the software C remains in the main memory, and the response time is stable and improved (it is released when the access frequency decreases). In this way, by locking predetermined software with the access frequency threshold, if there is an access frequency equal to or higher than the threshold, the response time is guaranteed while another interrupt process occurs.
In particular, this embodiment is effective for guaranteeing response processing time when a burst interrupt as shown in FIG. 7C occurs.

本発明の実施例2について図4を参照して説明する。本実施例は、図4に示すように、物理的なメモリ管理ユニットも持たずに、ソフトウェアで仮想的にメインメモリ7へのソフトウェアモジュール1の配置管理を処理する。よって、実施例1に比べ、簡単なハードウェア構成で実現している。   A second embodiment of the present invention will be described with reference to FIG. In the present embodiment, as shown in FIG. 4, the management of the placement of the software module 1 in the main memory 7 is virtually processed by software without having a physical memory management unit. Therefore, compared with the first embodiment, it is realized with a simple hardware configuration.

ソフトウェアモジュールを実行処理するCPU装置5は、データバス9及び実アドレスバス11を介してメインメモリ7に接続される。メインメモリ7は、CPU装置5が処理を行うのに必要となるソフトウェアモジュール1が必要に応じて複数配置される。二次記憶装置8には、プログラムなどのソフトウェアモジュール1が複数記憶されており、CPU装置5が処理に必要となったソフトウェアモジュール1を、データバス9を通じてメインメモリ7に呼び込み、処理の対象とする。インターバルタイマ14は、ソフトウェアモジュール1のアクセス頻度を算出するための時間計測に用いられる。   The CPU device 5 that executes the software module is connected to the main memory 7 via the data bus 9 and the real address bus 11. In the main memory 7, a plurality of software modules 1 required for the CPU device 5 to perform processing are arranged as necessary. The secondary storage device 8 stores a plurality of software modules 1 such as programs. The software module 1 required for processing by the CPU device 5 is called into the main memory 7 through the data bus 9 and processed. To do. The interval timer 14 is used for time measurement for calculating the access frequency of the software module 1.

以下、本実施例の動作について説明する。
CPU装置5がプログラムを実行することにより、通常は二次記憶装置8にある任意のソフトウェアモジュール1がデータバス9を通じてメインメモリ7へ配置される。このときメモリモジュール1をメインメモリ7に配置するための情報は、CPU装置5から出力される実アドレスバス11の情報に基づいて実施される。
Hereinafter, the operation of this embodiment will be described.
When the CPU device 5 executes the program, an arbitrary software module 1 that is normally in the secondary storage device 8 is arranged in the main memory 7 through the data bus 9. At this time, information for placing the memory module 1 in the main memory 7 is implemented based on information on the real address bus 11 output from the CPU device 5.

CPU装置5は、メインメモリ7に配置された該当ソフトウェアモジュール1の実行モジュール4を、データバス9を通じて読み込み、実行する。   The CPU device 5 reads and executes the execution module 4 of the corresponding software module 1 arranged in the main memory 7 through the data bus 9.

該当ソフトウェアモジュール1の実行終了時に、CPU装置5は、アクセス頻度フラグ3を参照し、アクセス頻度の高いモジュールID2のソフトウェアモジュール1をメインメモリ7から削除せずに残す。   When the execution of the corresponding software module 1 is finished, the CPU device 5 refers to the access frequency flag 3 and leaves the software module 1 with the module ID 2 having a high access frequency without deleting it from the main memory 7.

一方で、アクセス頻度の低いソフトウェアモジュール1に関しては、メインメモリ7から排除する。   On the other hand, the software module 1 with low access frequency is excluded from the main memory 7.

アクセス頻度は、インターバルタイマ14を用いて、所定時間内に同一ソフトウェアモジュールが何回呼び出されたかを、モジュールID2でCPU装置5が管理することで算出される。   The access frequency is calculated by the CPU device 5 managing how many times the same software module has been called within a predetermined time by using the interval timer 14 with the module ID 2.

図5は、本実施例における、アクセス頻度に応じてソフトウェアモジュール1をメインメモリ7に残すか否かを管理する処理についてのフローチャートである。   FIG. 5 is a flowchart of processing for managing whether to leave the software module 1 in the main memory 7 according to the access frequency in the present embodiment.

まず、実行モジュール4の処理終了を検知し(ステップA1)、アクセス頻度フラグ3を参照し(ステップA2)、アクセスが初回であるかどうかを判断する(ステップA3)。初回のアクセスの場合は(ステップA3/YES)、アクセス頻度フラグ3の書き込み値を、アクセス済み状態を示す所定の値に設定する(ステップA8)。その後、ソフトウェアモジュール1をメインメモリ7に残し(ステップA9)、アクセス頻度フラグ3を更新して終了となる(ステップA10)。   First, the processing end of the execution module 4 is detected (step A1), the access frequency flag 3 is referenced (step A2), and it is determined whether or not the access is the first time (step A3). In the case of the first access (step A3 / YES), the write value of the access frequency flag 3 is set to a predetermined value indicating the accessed state (step A8). Thereafter, the software module 1 is left in the main memory 7 (step A9), the access frequency flag 3 is updated, and the process ends (step A10).

一方で、ステップA2にて、初回アクセス以外の場合には(ステップA2/NO)、インターバルタイマ14の所定時間内での該当ソフトウェアモジュール1のアクセス頻度をCPU装置5により算出する(ステップA4)。   On the other hand, if the access is other than the first access in step A2 (step A2 / NO), the CPU device 5 calculates the access frequency of the corresponding software module 1 within the predetermined time of the interval timer 14 (step A4).

算出されたアクセス頻度の値があらかじめ設定した任意の値以上であれば(ステップA5/YES)、該当ソフトウェアモジュール1を残す処理を行い(ステップA9)、アクセス頻度フラグ3を更新して終了となる(ステップA10)。また、アクセス頻度の値が設定値に満たない場合には(ステップA5/NO)、アクセス頻度フラグをクリアし(ステップA6)、ソフトウェアモジュール1をメインメモリ7から削除する処理を実施する(ステップA7)。   If the calculated access frequency value is greater than or equal to an arbitrary value set in advance (step A5 / YES), a process for leaving the corresponding software module 1 is performed (step A9), the access frequency flag 3 is updated, and the process ends. (Step A10). If the access frequency value is less than the set value (step A5 / NO), the access frequency flag is cleared (step A6), and the process of deleting the software module 1 from the main memory 7 is performed (step A7). ).

以上、本実施例の処理によれば、アクセス頻度フラグ3の利用により、頻繁に呼び出されると判断されるソフトウェアモジュール1はCPU装置5に近いメインメモリ7に保持されるため、従来のようにCPU装置5からの呼び出し待ち時間を二次記憶装置8から毎回呼び出す場合と比較すると、最小限に抑えることが可能となり、プログラムの処理時間が高速化される。   As described above, according to the processing of the present embodiment, the software module 1 that is determined to be frequently called by using the access frequency flag 3 is held in the main memory 7 close to the CPU device 5, so that the CPU is conventionally used. Compared to the case where the call waiting time from the device 5 is called from the secondary storage device 8 each time, it is possible to minimize the waiting time, and the processing time of the program is increased.

以上、本発明の実施例についてそれぞれ説明したが、上記実施例に限定されるものではなく、その要旨を逸脱しない範囲において種々の変形が可能である。   The embodiments of the present invention have been described above. However, the present invention is not limited to the above embodiments, and various modifications can be made without departing from the scope of the invention.

本発明は、ディジタル家電やカーナビゲーションなどの組込み系システム全般に適用できる。   The present invention can be applied to all embedded systems such as digital home appliances and car navigation systems.

本発明の実施例1に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on Example 1 of this invention. 本発明の実施例1に係るソフトウェアモジュールの構成を示すブロック図である。It is a block diagram which shows the structure of the software module which concerns on Example 1 of this invention. 本発明の実施例1に係る動作を示すフローチャートである。It is a flowchart which shows the operation | movement which concerns on Example 1 of this invention. 本発明の実施例2に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on Example 2 of this invention. 本発明の実施例2に係る動作を示すフローチャートである。It is a flowchart which shows the operation | movement which concerns on Example 2 of this invention. 従来技術の動作と本発明の動作の相違を示す概念図である。It is a conceptual diagram which shows the difference of operation | movement of a prior art and operation | movement of this invention. 本発明の動作の概要を示す概念図である。It is a conceptual diagram which shows the outline | summary of operation | movement of this invention.

符号の説明Explanation of symbols

1 ソフトウェアモジュール
2 モジュールID
3 アクセス頻度フラグ
4 実行モジュール
5 CPU装置
6 キャッシュメモリ
7 メインメモリ
8 二次記憶装置
9 データバス
10 メモリ管理ユニット
11 実アドレスバス
12 論理アドレスバス
13 キャッシュメモリバス
14 インターバルタイマ
1 Software module 2 Module ID
3 Access frequency flag 4 Execution module 5 CPU device 6 Cache memory 7 Main memory 8 Secondary storage device 9 Data bus 10 Memory management unit 11 Real address bus 12 Logical address bus 13 Cache memory bus 14 Interval timer

Claims (12)

ソフトウェアモジュールに設定されたアクセス頻度に基づいて、前記ソフトモジュールを管理することを特徴とする情報処理装置。   An information processing apparatus that manages the software module based on an access frequency set for the software module. ソフトウェアモジュールを実行するソフトウェアモジュール実行手段と、
前記実行手段が実行するソフトウェアモジュールが配置される主記憶手段と、
複数のソフトウェアモジュールが記憶されている副記憶手段と、
前記ソフトウェアモジュールに対するアクセス頻度を算出し、算出されたアクセス頻度に基づいて、前記ソフトモジュールを管理するソフトウェアモジュール管理手段と、を有し、
前記ソフトウェアモジュール管理手段は、前記副記憶手段から前記主記憶手段に配置されたソフトウェアモジュールの実行終了時に、前記ソフトウェアモジュールに対するアクセス頻度を算出し、該アクセス頻度が所定の閾値より高いソフトウェアモジュールを前記主記憶手段に残すことを特徴とする請求項1記載の情報処理装置。
Software module execution means for executing the software module;
Main storage means in which software modules executed by the execution means are arranged;
A secondary storage means for storing a plurality of software modules;
Software module management means for calculating an access frequency for the software module and managing the software module based on the calculated access frequency;
The software module management means calculates an access frequency to the software module at the end of execution of the software module arranged in the main storage means from the secondary storage means, and selects a software module whose access frequency is higher than a predetermined threshold value. The information processing apparatus according to claim 1, wherein the information processing apparatus is left in the main storage unit.
前記ソフトウェアモジュール管理手段は、前記アクセス頻度が予め設定された閾値より低いソフトウェアモジュールを前記主記憶手段から削除することを特徴とする請求項2記載の情報処理装置。   3. The information processing apparatus according to claim 2, wherein the software module management unit deletes a software module whose access frequency is lower than a preset threshold value from the main storage unit. 前記アクセス頻度の算出に利用するための時間を計測するタイマ手段を有し、
前記ソフトウェアモジュール管理手段は、前記タイマ手段により計測された所定の時間内の同一ソフトウェアモジュールに対するアクセス回数に基づいて、前記アクセス頻度を算出することを特徴とする請求項2又は3記載の情報処理装置。
Timer means for measuring time for use in calculating the access frequency;
4. The information processing apparatus according to claim 2, wherein the software module management unit calculates the access frequency based on the number of accesses to the same software module within a predetermined time measured by the timer unit. .
情報処理装置で行われるソフトウェアモジュールのリンク管理方法であって、
ソフトウェアモジュールにアクセス頻度を設定し、該アクセス頻度に基づいて、前記ソフトモジュールを管理することを特徴とするソフトウェアモジュールのリンク管理方法。
A software module link management method performed in an information processing apparatus,
A software module link management method comprising: setting an access frequency for a software module and managing the software module based on the access frequency.
所定のソフトウェアモジュールの実行終了時に、前記ソフトウェアモジュールに対するアクセス頻度を算出し、該アクセス頻度が所定の閾値より高いソフトウェアモジュールを主記憶手段に残すことを特徴とする請求項5記載のソフトウェアモジュールのリンク管理方法。   6. The software module link according to claim 5, wherein when the execution of the predetermined software module is finished, an access frequency to the software module is calculated, and a software module whose access frequency is higher than a predetermined threshold is left in the main storage means. Management method. 所定のソフトウェアモジュールの実行終了時に、前記ソフトウェアモジュールに対するアクセス頻度を算出し、前記アクセス頻度が予め設定された閾値より低いソフトウェアモジュールを前記主記憶手段から削除することを特徴とする請求項6記載のソフトウェアモジュールのリンク管理方法。   The access frequency for the software module is calculated at the end of execution of the predetermined software module, and the software module whose access frequency is lower than a preset threshold is deleted from the main storage unit. Software module link management method. 前記アクセス頻度の算出に利用するための時間を計測し、
計測された所定の時間内の同一ソフトウェアモジュールに対するアクセス回数に基づいて、前記アクセス頻度を算出することを特徴とする請求項6又は7記載のソフトウェアモジュールのリンク管理方法。
Measure the time used to calculate the access frequency,
8. The software module link management method according to claim 6, wherein the access frequency is calculated based on the measured number of accesses to the same software module within a predetermined time.
情報処理装置に、ソフトウェアモジュールのリンク管理方法を実行させるプログラムであって、
ソフトウェアモジュールにアクセス頻度を設定し、該アクセス頻度に基づいて、前記ソフトモジュールを管理する処理を情報処理装置に実行させることを特徴とするプログラム。
A program for causing an information processing apparatus to execute a link management method for software modules,
A program that sets an access frequency for a software module and causes an information processing apparatus to execute processing for managing the software module based on the access frequency.
所定のソフトウェアモジュールの実行終了時に、前記ソフトウェアモジュールに対するアクセス頻度を算出し、該アクセス頻度が所定の閾値より高いソフトウェアモジュールを主記憶手段に残す処理を情報処理装置に実行させることを特徴とする請求項9記載のプログラム。   When the execution of a predetermined software module is finished, an access frequency for the software module is calculated, and the information processing apparatus is caused to execute a process of leaving a software module whose access frequency is higher than a predetermined threshold in a main storage unit. Item 10. The program according to Item 9. 所定のソフトウェアモジュールの実行終了時に、前記ソフトウェアモジュールに対するアクセス頻度を算出し、前記アクセス頻度が予め設定された閾値より低いソフトウェアモジュールを前記主記憶手段から削除する処理を情報処理装置に実行させることを特徴とする請求項10記載のプログラム。   Calculating an access frequency for the software module at the end of execution of the predetermined software module, and causing the information processing apparatus to execute a process of deleting a software module whose access frequency is lower than a preset threshold from the main storage unit The program according to claim 10, wherein 前記アクセス頻度の算出に利用するための時間を計測し、計測された所定の時間内の同一ソフトウェアモジュールに対するアクセス回数に基づいて、前記アクセス頻度を算出する処理を情報処理装置に実行させることを特徴とする請求項10又は11記載のプログラム。   Time for use in calculating the access frequency is measured, and the information processing apparatus is caused to execute processing for calculating the access frequency based on the number of accesses to the same software module within the measured predetermined time. The program according to claim 10 or 11.
JP2005372687A 2005-12-26 2005-12-26 Information processor, link management method for software module, and program Withdrawn JP2007172519A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005372687A JP2007172519A (en) 2005-12-26 2005-12-26 Information processor, link management method for software module, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005372687A JP2007172519A (en) 2005-12-26 2005-12-26 Information processor, link management method for software module, and program

Publications (1)

Publication Number Publication Date
JP2007172519A true JP2007172519A (en) 2007-07-05

Family

ID=38298959

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005372687A Withdrawn JP2007172519A (en) 2005-12-26 2005-12-26 Information processor, link management method for software module, and program

Country Status (1)

Country Link
JP (1) JP2007172519A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011067982A (en) * 2009-09-24 2011-04-07 Kyocera Mita Corp Image forming apparatus
JP2019145049A (en) * 2018-02-23 2019-08-29 Necソリューションイノベータ株式会社 Dynamic link management device, method for managing dynamic link, and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011067982A (en) * 2009-09-24 2011-04-07 Kyocera Mita Corp Image forming apparatus
JP2019145049A (en) * 2018-02-23 2019-08-29 Necソリューションイノベータ株式会社 Dynamic link management device, method for managing dynamic link, and program
JP7067781B2 (en) 2018-02-23 2022-05-16 Necソリューションイノベータ株式会社 Dynamic link management device, dynamic link management method, and program

Similar Documents

Publication Publication Date Title
US9639280B2 (en) Ordering memory commands in a computer system
US7856533B2 (en) Probabilistic method for performing memory prefetching
US8341321B2 (en) Managing a resource lock
CN109446112B (en) Method and system for improved control of prefetch traffic
JP4189402B2 (en) Cache circuit
JP2008009647A (en) Information processing apparatus
CN107544926B (en) Processing system and memory access method thereof
US7882285B2 (en) Buffer cache management to prevent deadlocks
US10853250B2 (en) Storage management method, electronic device and computer program product
JP6167646B2 (en) Information processing apparatus, control circuit, control program, and control method
JP2015001909A (en) Information processor, control circuit, control program, and control method
US20150026694A1 (en) Method of processing information, storage medium, and information processing apparatus
US9740618B2 (en) Memory nest efficiency with cache demand generation
CN113778914A (en) Apparatus, method, and computing device for performing data processing
US20120331235A1 (en) Memory management apparatus, memory management method, control program, and recording medium
CN108829345B (en) Data processing method of log file and terminal equipment
JP4376787B2 (en) Event notification method, device, and processor system
JP2007172519A (en) Information processor, link management method for software module, and program
JP2021135538A (en) Storage control apparatus and storage control program
JP2012123762A (en) Information processing device and information processing method
JP2000148515A (en) Memory scheduling method and storage medium storing memory scheduling program
JP2019160155A (en) Information processing device, information processing method, and program
JP2017201481A (en) Information processing apparatus, method for controlling information processing apparatus, and program for controlling information processing apparatus
US6968437B2 (en) Read priority caching system and method
TWI435267B (en) Processing circuit and method for reading data

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090303