JP2009288849A - Information processing apparatus, and memory management method - Google Patents

Information processing apparatus, and memory management method Download PDF

Info

Publication number
JP2009288849A
JP2009288849A JP2008137933A JP2008137933A JP2009288849A JP 2009288849 A JP2009288849 A JP 2009288849A JP 2008137933 A JP2008137933 A JP 2008137933A JP 2008137933 A JP2008137933 A JP 2008137933A JP 2009288849 A JP2009288849 A JP 2009288849A
Authority
JP
Japan
Prior art keywords
function
calls
memory
program
call
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
JP2008137933A
Other languages
Japanese (ja)
Inventor
Keisuke Yasui
啓介 安井
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008137933A priority Critical patent/JP2009288849A/en
Publication of JP2009288849A publication Critical patent/JP2009288849A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a memory management technique of more general demand paging type. <P>SOLUTION: In a system executing a program performing a function call through a function pointer table, and adopting a demand paging memory management system, this information processing apparatus has: a memory arranged with a function; and a control part counting a calling frequency upon the function call of the program, periodically monitoring the calling frequency, and changing the memory arrangement of the function according to the calling frequency. The control part operates such that the function having the relatively small calling frequency is driven out from the memory by demand paging. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、情報処理装置に係わり、特にそのメモリ管理方法に関する。   The present invention relates to an information processing apparatus, and more particularly to a memory management method thereof.

情報処理装置における制御方法のうち、装置のメモリ管理方法は重要な役割を担っているが、一般的なデマンドページング方式のメモリ管理では、同じページに読み出し回数の少ない関数と多い関数が混在していた場合に、読み出し回数の少ない関数は必要ないにも関わらず、ページアウトされず、メモリ使用効率が悪い。   Of the control methods in information processing equipment, the memory management method of the equipment plays an important role, but in general demand paging memory management, functions with few reads and many functions are mixed on the same page. In this case, although a function with a small number of readings is not necessary, the page is not paged out and the memory use efficiency is poor.

対して特許文献1には概要として、デマンドページング・スワップアウト方式において、各ページのスワップアウト優先度に基づいてスワップアウトページ選択手段と対象ページのタイムスタンプ値(現在時刻)、優先度Pから平均スワップアウト時間を計算して、メモリ資源の有効活用を狙った方式なるものが記載されている。しかしながら、カーネル空間のデマンドページング・スワップアウト方式であって、単一のロードモジュールとして生成されているモノリシックカーネルを採用する仮想記憶計算システムにおける技術という制約のあるものであった。
特許第3726701号公報
On the other hand, as an outline in Patent Document 1, in the demand paging / swap-out method, the swap-out page selection means, the time stamp value (current time) of the target page, and the priority P are averaged based on the swap-out priority of each page. A method for calculating the swap-out time and aiming at effective use of memory resources is described. However, this is a demand paging / swap-out method in the kernel space, and there is a limitation in technology in a virtual memory computing system that adopts a monolithic kernel generated as a single load module.
Japanese Patent No. 3726701

本発明は、より一般的なデマンドページング方式のメモリ管理技術を提供することを目的とする。   An object of the present invention is to provide a more general demand paging type memory management technique.

上記課題を解決するために、本発明の情報処理装置は、関数ポインタテーブル経由で関数呼び出しを行うプログラムを実行し、デマンドページングのメモリ管理方式を採用したシステムにおいて、関数が配置されるメモリと、プログラムの関数呼び出し時に呼び出し回数をカウントし、この呼び出し回数を定期的に監視し、この呼び出し回数に合わせて前記関数の前記メモリ配置を変更する制御部を備え、前記制御部は前記呼び出し回数の相対的に少ない前記関数がデマンドページングにより前記メモリより追い出されるよう働くことを特徴とする。   In order to solve the above problems, an information processing apparatus of the present invention executes a program that performs a function call via a function pointer table, and in a system employing a demand paging memory management method, a memory in which a function is arranged, A control unit that counts the number of calls at the time of a function call of a program, periodically monitors the number of calls, and changes the memory arrangement of the function according to the number of calls, the control unit relative to the number of calls It is characterized in that a small number of functions work to be evicted from the memory by demand paging.

本発明によれば、より効果的なデマンドページング方式のメモリ管理技術が得られる。   According to the present invention, a more effective demand paging memory management technique can be obtained.

以下、本発明の実施形態を説明する。   Embodiments of the present invention will be described below.

本発明による実施形態1を図1乃至図7を参照して説明する。まず、図6 および図7 を参照して、本発明の一実施形態に係る情報処理装置の構成について一般的に説明する。この情報処理装置は、例えば、ノートブック型パーソナルコンピュータ10として実現されている。   A first embodiment of the present invention will be described with reference to FIGS. First, the configuration of an information processing apparatus according to an embodiment of the present invention will be generally described with reference to FIGS. This information processing apparatus is realized as, for example, a notebook personal computer 10.

図6 はノートブック型パーソナルコンピュータ10のディスプレイユニットを開いた状態における正面図である。本コンピュータ1 0 は、コンピュータ本体1 1 と、ディスプレイユニット12 とから構成されている。ディスプレイユニット12 には、L C D ( Liquid Crystal Display) 1 7 から構成される表示装置が組み込まれており、そのL C D 1 7 の表示画面はディスプレイユニット1 2 のほぼ中央に位置されている。   FIG. 6 is a front view of the notebook personal computer 10 with the display unit opened. The computer 1 0 is composed of a computer main body 1 1 and a display unit 12. The display unit 12 incorporates a display device composed of an LCD (Liquid Crystal Display) 17, and the display screen of the LCD 17 is located substantially at the center of the display unit 12. .

ディスプレイユニット1 2 は、コンピュータ本体1 1 に対して開放位置と閉塞位置との間を回動自在に取り付けられている。コンピュータ本体11は薄い箱形の筐体を有しており、その上面にはキーボード1 3 、本コンピュータ1 を電源オン/ オフするためのパワーボタン14 、入力操作パネル1 5 、およびタッチパッド1 6 などが配置されている。 The display unit 1 2 is attached to the computer main body 1 1 so as to be rotatable between an open position and a closed position. The computer main body 11 has a thin box-shaped housing. On the upper surface of the computer main body 11, a keyboard 1 3, a power button 14 for powering on / off the computer 1, an input operation panel 1 5, and a touch pad 16 are provided. Etc. are arranged.

入力操作パネル1 5 は、押されたボタンに対応するイベントを入力する入力装置であり、複数の機能をそれぞれ起動するための複数のボタンを備えている。これらボタン群には、TV起動ボタン1 5 A 、D V D / C D 起動ボタン1 5 B も含まれている。T V 起動ボタン1 5 A は、T V 放送番組データの再生及び記録を行うためのTV 機能を起動するためのボタンである。T V 起動ボタン1 5 A がユーザによって押下された時、TV 機能を実行するためのT V アプリケーションプログラムが自動的に起動される。 The input operation panel 1 5 is an input device for inputting an event corresponding to the pressed button, and includes a plurality of buttons for starting a plurality of functions. These button groups also include a TV start button 15A and a DVD / CD start button 15B. The TV start button 1 5 A is a button for starting a TV function for reproducing and recording TV broadcast program data. When the TV start button 1 5 A is pressed by the user, the TV application program for executing the TV function is automatically started.

本コンピュータにおいては、汎用の主オペレーティングシステムの他に、A V ( オーディオ・ビデオ) データを処理するための専用の副オペレーティングシステムがインストールされている。T V アプリケーションプログラムは、副オペレーティングシステム上で動作するプログラムである。 In this computer, in addition to a general-purpose main operating system, a dedicated sub-operating system for processing AV (audio / video) data is installed. The TV application program is a program that operates on the sub-operating system.

パワーボタン1 4 がユーザによって押下された時、主オペレーティングシステムが起動される。一方、T V 起動ボタン1 5 A がユーザによって押下された時は、主オペレーティングシステムではなく、副オペレーティングシステムが起動され、そしてT V アプリケーションプログラムが自動的に実行される。副オペレーティングシステムはA V 機能を実行するための最小限の機能のみを有している。このため、副オペレーティングシステムのブートアップに要する時間は、主オペレーティングシステムのブートアップに要する時間に比べて遙かに短い。よって、ユーザは、TV起動ボタン1 5 A を押すだけで、T V 視聴/録画を即座に行うことが出来る。 When the power button 1 4 is pressed by the user, the main operating system is activated. On the other hand, when the TV start button 15A is pressed by the user, the sub operating system is started instead of the main operating system, and the TV application program is automatically executed. The sub-operating system has only a minimum function for executing the AV function. For this reason, the time required for booting up the sub operating system is much shorter than the time required for booting up the main operating system. Therefore, the user can immediately perform TV viewing / recording simply by pressing the TV start button 15A.

D V D / C D 起動ボタン1 5 B は、D V D またはC D に記録されたビデオコンテンツを再生するためのボタンである。D V D / C D 起動ボタン1 5 B がユーザによって押下された時、ビデオコンテンツを再生するためのビデオ再生アプリケーションプログラムが自動的に起動される。このビデオ再生アプリケーションプログラムも、副オペレーティングシステム上で動作するアプリケーションプログラムである。DVD / C D 起動ボタン1 5 Bがユーザによって押下された時は、主オペレーティングシステムではなく、副オペレーティングシステムが起動され、そしてビデオ再生アプリケーションプログラムが自動的に実行される。 The DVD / CD activation button 15B is a button for playing back video content recorded in DVD or CD. When the D V D / C D activation button 1 5 B is pressed by the user, a video reproduction application program for reproducing video content is automatically activated. This video playback application program is also an application program that runs on the sub-operating system. When the DVD / CD start button 15B is pressed by the user, the sub operating system is started instead of the main operating system, and the video playback application program is automatically executed.

次に、図7 を参照して、本コンピュータ10のシステム構成について説明する。
本コンピュータ1 0 は、図7 に示されているように、C P U 1 1 1 、ノースブリッジ11 2 、主メモリ1 1 3 、グラフィクスコントローラ1 1 4 、サウスブリッジ1 1 9 、B IO S − R O M 1 2 0 、ハードディスクドライブ(HD D ) 1 2 1 、光ディスクドライブ(O D D ) 1 2 2 、T V チューナ1 2 3 、エンベデッドコントローラ/ キーボードコントローラIC ( E C / K B C ) 1 2 4 、およびネットワークコントローラ12 5 等を備えている。
Next, the system configuration of the computer 10 will be described with reference to FIG.
As shown in FIG. 7, the computer 10 includes a CPU 1 1 1, a north bridge 11 2, a main memory 1 1 3, a graphics controller 1 1 4, a south bridge 1 1 9, a BIOS − ROM 1220, hard disk drive (HD D) 1 2 1, optical disk drive (OD D) 1 2 2, TV tuner 1 2 3, embedded controller / keyboard controller IC (EC / KBC) 1 2 4, network controller 12 5, and the like.

C P U 1 1 1 は本コンピュータ1 0 の動作を制御するために設けられたプロセッサであり、ハードディスクドライブ( H D D ) 1 2 1 から主メモリ1 1 3 にロードされる、主オペレーティングシステム( 主O S ) / 副オペレーティングシステム( 副O S ) 、および各種アプリケーションプログラムを実行する。 CP U 1 1 1 is a processor provided for controlling the operation of the computer 1 0, and is a main operating system (loaded from the hard disk drive (HD D) 1 2 1 to the main memory 1 1 3). The main OS) / sub operating system (sub OS) and various application programs are executed.

また、C P U 1 1 1 は、B I O S − R O M 1 2 0 に格納されたシステムB I O S ( Basic Input Output System) も実行する。システムBIO S はハードウェア制御のためのプログラムである。 The CP U 1 1 1 also executes a system basic input output system (BIOS) stored in the BIOS-ROM 1220. The system BIOS is a program for hardware control.

ノースブリッジ1 1 2 はC P U 1 1 1 のローカルバスとサウスブリッジ1 1 9 との間を接続するブリッジデバイスである。ノースブリッジ1 1 2 には、主メモリ1 1 3 をアクセス制御するメモリコントローラも内蔵されている。また、ノースブリッジ112 は、A G P ( Accelerated Graphics Port) バスなどを介してグラフィクスコントローラ11 4 との通信を実行する機能も有している。 The north bridge 1 1 2 is a bridge device that connects the local bus of the C P U 1 1 1 and the south bridge 1 1 9. The north bridge 1 1 2 also includes a memory controller that controls access to the main memory 1 1 3. The north bridge 112 also has a function of executing communication with the graphics controller 11 4 via an AGP (Accelerated Graphics Port) bus or the like.

グラフィクスコントローラ1 1 4 は本コンピュータ1 0 のディスプレイモニタとして使用されるL C D 1 7 を制御する表示コントローラである。このグラフィクスコントローラ1 1 4 はビデオメモリ( V R A M ) 1 1 4 A を有しており、O S / アプリケーションプログラムによってビデオメモリに書き込まれた表示データから、LCD 1 7 に表示すべき表示イメージを形成する映像信号を生成する。 The graphics controller 1 1 4 is a display controller that controls L CD 1 7 used as a display monitor of the computer 1 0. The graphics controller 1 1 4 has a video memory (VRAM) 1 1 4 4 A, and a display image to be displayed on the LCD 1 7 from display data written in the video memory by the OS / application program. Is generated.

サウスブリッジ1 1 9 は、L P C ( Low Pin Count) バス上の各デバイス、およびP C I ( Peripheral Component Interconnect) バス上の各デバイスを制御する。また、サウスブリッジ119 は、H D D 1 2 1 、O D D 1 2 2 を制御するためのI D E ( Integrated Drive Electronics) コントローラを内蔵している。さらに、サウスブリッジ11 9 は、T V チューナ1 2 3 を制御する機能、およびB I O S − R O M 1 2 0 をアクセス制御するための機能も有している。 The south bridge 1 1 9 controls each device on a low pin count (LPC) bus and each device on a peripheral component interconnect (PCI) bus. The south bridge 119 incorporates an IDE (Integrated Drive Electronics) controller for controlling the HD 1 12 1 and O DD 1 12 2. Further, the south bridge 11 9 also has a function of controlling the TV tuner 1 2 3 and a function of controlling access to the BIOS-RO M 1 2 0.

H D D 1 2 1 は、各種ソフトウェア及びデータを格納する記憶装置である。このH D D 1 2 1 はA T A コマンドに従って動作するように構成されており、ATA − 5 コマンドセットをサポートする。H D D 1 2 1 は、主O S 領域1 2 1 A と副O S 領域1 2 1 B とを有している。主O S 領域1 2 1 A には、上述の主O S およびその主O S 上で動作するアプリケーションプログラム群がインストールされている。主OS 領域1 2 1 A は、主O S によって管理されている。副O S 領域1 2 1 B には、上述の副O S 、T V アプリケーションプログラム、およびビデオ再生アプリケーションプログラムがインストールされている。副OS領域1 2 1 B は副O S によって管理されている。副O S 領域1 2 1 B は副O S によって管理されることによって、主OS からは隠蔽されている。H D D 1 2 1 は、外付けタイプの形態のものでも差し支えない。 H D D 1 2 1 is a storage device that stores various software and data. This H D D 1 2 1 is configured to operate according to the A T A command and supports the ATA-5 command set. H D D 1 2 1 has a main O S region 1 2 1 A and a sub O S region 1 2 1 B. In the main OS area 1 2 1 A, the above-described main OS and an application program group operating on the main OS are installed. The main OS area 1 2 1 A is managed by the main OS. In the secondary OS area 1 2 1 B, the secondary OS, TV application program, and video playback application program described above are installed. The secondary OS area 1 2 1 B is managed by the secondary OS. The secondary OS region 1 2 1 B is concealed from the main OS by being managed by the secondary OS. H D D 1 2 1 may be in the form of an external type.

光ディスクドライブ( O D D ) 1 2 3 は、ビデオコンテンツが格納されたD V D 、C Dなどの記憶メディアを駆動するためのドライブユニットである。T V チューナ1 2 3 は、T V 放送番組のような放送番組データを外部から受信するための受信装置である。 The optical disk drive (ODD) 1 2 3 is a drive unit for driving a storage medium such as DVD and CD in which video content is stored. The TV tuner 1 2 3 is a receiving device for receiving broadcast program data such as TV broadcast programs from the outside.

エンベデッドコントローラ/ キーボードコントローラIC( E C / K B C ) 1 2 4 は、電力管理のためのエンベデッドコントローラと、キーボード(K B ) 1 3 およびタッチパッド1 6 を制御するためのキーボードコントローラとが集積された1 チップマイクロコンピュータである。このエンベデッドコントローラ/キーボードコントローラI C ( E C /K B C ) 1 2 4 は、ユーザによるパワーボタン14 の操作に応じて本コンピュータ10 をパワーオン/パワーオフする機能を有している。さらに、エンベデッドコントローラ/キーボードコントローラI C ( E C / K B C ) 1 2 4 は、ユーザによるT V 起動ボタン1 5A 、D V D / C D 起動ボタン1 5 B の操作に応じて、本コンピュータ10 をパワーオンすることもできる。 The embedded controller / keyboard controller IC (EC / KBC) 1 2 4 is an integrated controller for power management and a keyboard controller for controlling the keyboard (KB) 1 3 and the touch pad 1 6. 1-chip microcomputer. The embedded controller / keyboard controller I C (EC / KBC) 1 2 4 has a function of powering on / off the computer 10 in accordance with the operation of the power button 14 by the user. Furthermore, the embedded controller / keyboard controller I C (EC / KBC) 1 2 4 is used for the computer according to the operation of the TV start button 15 A and the DV D / CD start button 15 B by the user. 10 can also be powered on.

ネットワークコントローラ1 2 5 は、例えばインターネットなどの外部ネットワークとの通信を実行する通信装置である。
さて図1は、実施形態の機能ブロック構成図を示している。
CPU111とRAM113と外部記憶装置121を持つシステムで、外部記憶装置121の中に格納されたプログラムがRAM113へコピーされて実行される。メモリ管理の機能としてデマンドページングを行うため、例えば4KBサイズのページごとに、必要なページのみがコピーされて実行される。また、しばらく実行されないページは、RAM113上からは削除され、再度実行されるタイミングで外部記憶装置121からコピーされることで、RAM113を効率的に利用する。
The network controller 1 2 5 is a communication device that executes communication with an external network such as the Internet.
Now, FIG. 1 has shown the functional block block diagram of embodiment.
In a system having a CPU 111, a RAM 113, and an external storage device 121, a program stored in the external storage device 121 is copied to the RAM 113 and executed. In order to perform demand paging as a memory management function, for example, only necessary pages are copied and executed for each page of 4 KB size. Also, pages that are not executed for a while are deleted from the RAM 113 and copied from the external storage device 121 at the time of execution again, thereby efficiently using the RAM 113.

この実施形態のシステムでは、プログラムは関数テーブル経由で関数を呼び出す。図2のように、関数FuncAから関数FuncBを呼び出すときに共通関数呼び出しコード(アプリケーションプログラムの一種)であるStat_Callへジャンプし、関数テーブルの呼び出し回数1をインクリメントしてから、関数テーブル中のFuncBの関数ポインタの指すアドレスへジャンプする構成となっている。FuncBの実行後には、FuncAまで戻る。   In the system of this embodiment, a program calls a function via a function table. As shown in Figure 2, when calling the function FuncB from the function FuncA, it jumps to Stat_Call, which is a common function call code (a type of application program), increments the number of calls to the function table 1, and then the FuncB in the function table It jumps to the address pointed to by the function pointer. After executing FuncB, return to FuncA.

関数テーブルにある呼出回数Sは一定時間N(例えば1秒程度)内に呼び出される回数のカウントに使用する。短期的な呼び出し状態を把握するのに使用する。
呼出回数Lは、一定時間Nの間に1度でも呼び出されるとインクリメントするカウンタで長期的な呼出状態の把握に使用する。
オフセットとサイズは、プログラムファイル上のオフセットと関数のサイズを示し、ページリンクは、同じページ内の関数を接続するリンクとなっている。ページフォルト処理でのコードの再ロードで利用する。
The number of calls S in the function table is used to count the number of calls within a certain time N (for example, about 1 second). Used to understand short-term call status.
The number of calls L is a counter that is incremented when called even once during a fixed time N, and is used for grasping a long-term call state.
The offset and size indicate the offset and function size on the program file, and the page link is a link connecting the functions in the same page. Used to reload code in page fault handling.

図3はプログラムの実行と並行して、OSによって処理される関数呼び出し回数監視処理のフローチャートである。プログラム起動後、一定時間Nで(ステップS301)、対象とする全ての関数について関数テーブル内の呼び出し回数情報を参照し、一定時間内の呼出回数Sをチェックする。呼出回数Sが0で(ステップS302のYES)、かつその関数の実行中でない場合は該当関数をコード領域の最後尾に再配置し(ステップS303)、関数テーブルの関数ポインタを再配置後のアドレスに更新する(ステップS304)。呼出回数Sが0以外の場合は(ステップS302のNO)、呼出回数Lをインクリメントし(ステップS305)、呼出回数Sをゼロクリアする(ステップS306)。   FIG. 3 is a flowchart of the function call number monitoring process processed by the OS in parallel with the execution of the program. After the program is started, at a certain time N (step S301), the number of calls S within a certain time is checked by referring to the number-of-calls information in the function table for all the targeted functions. If the number of calls S is 0 (YES in step S302) and the function is not being executed, the corresponding function is relocated to the end of the code area (step S303), and the function pointer in the function table is relocated (Step S304). If the number of calls S is other than 0 (NO in step S302), the number of calls L is incremented (step S305), and the number of calls S is cleared to zero (step S306).

また一定時間Nよりも長い間隔M(例えば数分程度)で(ステップS307)、呼出回数Lをゼロクリアする(ステップS308)。
図4はプログラムのコード領域の関数再配置処理を示す図である。再配置前には、呼び出し回数Sが0回のFuncDと4回のFuncCが同じページに含まれていたため、関数FuncDがページアウトされる可能性が低かった。再配置後には、関数FuncDが別のページに配置されるため、ページアウトされる可能性が高くなる。呼出回数Sが0回の関数が複数存在した場合には、関数テーブルの呼出回数Lの少ない方を後方に配置することでより効率的に動作させることができる。
Further, at an interval M (for example, about several minutes) longer than the predetermined time N (step S307), the number of calls L is cleared to zero (step S308).
FIG. 4 is a diagram showing the function relocation processing of the code area of the program. Before relocation, FunDD with 0 calls and FuncC with 4 calls were included in the same page, so the function FuncD was less likely to be paged out. After the rearrangement, the function FuncD is arranged on another page, so that the possibility of being paged out increases. When there are a plurality of functions having the number of calls S of 0, it is possible to operate more efficiently by arranging the function table with a smaller number of calls L behind.

また、呼出回数0回の関数群の先頭がページ境界となるように配置することで、効率的にページアウトされることが可能となる。
図5はページエントリと関数テーブルの関係を示す図である。物理メモリを管理するページテーブル情報に、実際の物理アドレスを指すページアドレスAdと関数テーブルのエントリを指す関数エントリEnが含まれる。
Further, by arranging the function group having the number of calls of 0 so that the top of the function group is a page boundary, it is possible to efficiently page out.
FIG. 5 is a diagram showing the relationship between the page entry and the function table. The page table information for managing the physical memory includes a page address Ad indicating an actual physical address and a function entry En indicating a function table entry.

ページフォルトが発生したときは、ページテーブルから関数テーブルをたどり該当関数のオフセットとサイズ情報を参照し、外部記憶装置から関数のコードをRAMへコピーする。 When a page fault occurs, the function table is traced from the page table, the function offset and size information are referenced, and the function code is copied from the external storage device to the RAM.

一般に同じページに読み出し回数の少ない関数と多い関数が混在していた場合に、読み出し回数の少ない関数は必要ないにも関わらず、ページアウトされず、メモリ使用効率が悪いが、上記のように本実施形態では、関数の読み出し回数に応じて関数を再配置するため、読み出し回数の低い関数が同じページにまとまり、ページアウトされやすくなり、メモリ使用効率が向上する。   In general, when a function with a small number of reads and a function with a large number of reads are mixed on the same page, a function with a small number of reads is not required, but the page is not paged out and the memory usage efficiency is poor. In the embodiment, since the functions are rearranged according to the number of function reads, functions with a low number of reads are grouped on the same page, and are easily paged out, improving the memory usage efficiency.

プログラム実行後に、呼出回数情報を外部に吐き出し、その情報を元に最適な関数配置にプログラムを再リンクすることにより、共通関数呼び出しコードのオーバヘッドの必要なく、最適化されたプログラムを実行することが可能となる。   After the program is executed, it is possible to execute the optimized program without the overhead of the common function call code by discharging the information on the number of calls to the outside and relinking the program to the optimal function layout based on that information. It becomes possible.

即ち関数の呼び出す回数に応じて関数のメモリ上の配置を動的に変更することにより、呼び出し回数の少ない関数の存在するページがメモリから追い出され易くなり、メモリが効率的に利用できる。関数の読み出し回数に応じて関数を再配置するため、読み出し回数の低い関数が同じページにまとまり、ページアウトされやすくなり、メモリ使用効率が向上する。   That is, by dynamically changing the arrangement of the function in the memory according to the number of times the function is called, a page where the function with a small number of calls is present can be easily removed from the memory, and the memory can be used efficiently. Since the functions are rearranged according to the number of function reads, functions with a low number of reads are grouped on the same page, and are easily paged out, improving the memory usage efficiency.

なお、この発明は上記実施形態に限定されるものではなく、この外その要旨を逸脱しない範囲で種々変形して実施することができる。PCではなくDTV(Digital Television)で実施してもよい。   In addition, this invention is not limited to the said embodiment, In the range which does not deviate from the summary, it can implement in various modifications. You may implement not with PC but with DTV (Digital Television).

また、上記した実施の形態に開示されている複数の構成要素を適宜に組み合わせることにより、種々の発明を形成することができる。例えば、実施の形態に示される全構成要素から幾つかの構成要素を削除しても良いものである。さらに、異なる実施の形態に係る構成要素を適宜組み合わせても良いものである。   Various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the above-described embodiments. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements according to different embodiments may be appropriately combined.

この発明の一実施形態の装置(システム)を示す概略ブロック図。1 is a schematic block diagram showing an apparatus (system) according to an embodiment of the present invention. 実施例の関数呼び出し手順を示すブロック図。The block diagram which shows the function call procedure of an Example. 実施例の関数呼び出し回数監視処理のフローチャート図。The flowchart figure of the function call frequency monitoring process of an Example. プログラムのコード領域の関数再配置処理を示す図Diagram showing function relocation processing of program code area ページ管理構造を示す図Diagram showing page management structure 本発明の一実施形態に係るコンピュータの概観を示す斜視図。The perspective view showing the general view of the computer concerning one embodiment of the present invention. 図6 のコンピュータのシステム構成を示すブロック図。The block diagram which shows the system configuration | structure of the computer of FIG.

符号の説明Explanation of symbols

1 0 … コンピュータ、1 1 1 … C P U 、1 1 3 … R A M、1 2 1 … H D D。   1 0... Computer, 1 1 1... C PU, 1 1 3... R A M, 1 2 1.

Claims (4)

関数ポインタテーブル経由で関数呼び出しを行うプログラムを実行し、デマンドページングのメモリ管理方式を採用したシステムにおいて、
関数が配置されるメモリと、
プログラムの関数呼び出し時に呼び出し回数をカウントし、この呼び出し回数を定期的に監視し、この呼び出し回数に合わせて前記関数の前記メモリ配置を変更する制御部を備え、
前記制御部は前記呼び出し回数の相対的に少ない前記関数がデマンドページングにより前記メモリより追い出されるよう働くことを特徴とする情報処理装置。
In a system that uses a demand paging memory management method to execute a program that calls a function via a function pointer table
The memory where the function is located,
Counting the number of calls at the time of a function call of the program, periodically monitoring the number of calls, comprising a control unit for changing the memory arrangement of the function according to the number of calls,
The information processing apparatus, wherein the control unit operates such that the function with a relatively small number of calls is evicted from the memory by demand paging.
前記制御部内の呼び出し回数カウント部がプログラム起動後、一定時間間隔Nで、関数の呼出回数の変化を参照し、呼び出しカウントの変化がない場合、関数をメモリ最後尾へ再配置し、関数テーブルの関数ポインタを更新することを特徴とする請求項1に記載の情報処理装置。   When the call count counter in the control unit refers to the change in the number of call of the function at a fixed time interval N after the program is started, if there is no change in the call count, the function is rearranged at the end of the memory, and the function table The information processing apparatus according to claim 1, wherein the function pointer is updated. 呼出回数カウントデータが呼出回数Sと呼出回数Lから構成され、前記呼出回数Sは呼出ごとにカウントアップされ、一定時間間隔Nで前記呼出回数Sが1以上ならば前記呼出回数Lをカウントアップし、前記呼出回数Sはクリアされさらに、Nより長い一定時間Mで呼出回数Lがクリアされ、関数再配置時に前記呼出回数Sを評価してから前記呼出回数Lを評価することにより、長時間呼び出されない関数がより後方に配置されるよう働くことを特徴とする請求項1に記載の情報処理装置。   The call count data consists of the call count S and the call count L. The call count S is counted up for each call. If the call count S is 1 or more at a fixed time interval N, the call count L is counted up. The number of calls S is cleared, and the number of calls L is cleared at a fixed time M longer than N, and the number of calls is evaluated for a long time by evaluating the number of calls S after evaluating the number of calls S during function relocation. The information processing apparatus according to claim 1, wherein the information processing apparatus functions so as to dispose a function that is not rearranged. 関数ポインタテーブル経由で関数呼び出しを行うプログラムを実行し、デマンドページングのメモリ管理方式を採用したシステムにおいて、
プログラムの関数呼び出し時に呼び出し回数をカウントし、この呼び出し回数を定期的に監視し、この呼び出し回数に合わせて前記関数のメモリ配置を変更し、呼び出し回数の少ない関数がデマンドページングにより前記メモリより追い出されるよう動作することを特徴とするメモリ管理方法。
In a system that uses a demand paging memory management method to execute a program that calls a function via a function pointer table
The number of calls is counted when a function is called in the program, the number of calls is periodically monitored, the memory allocation of the function is changed according to the number of calls, and a function with a small number of calls is evicted from the memory by demand paging. A memory management method characterized by operating as described above.
JP2008137933A 2008-05-27 2008-05-27 Information processing apparatus, and memory management method Pending JP2009288849A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008137933A JP2009288849A (en) 2008-05-27 2008-05-27 Information processing apparatus, and memory management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008137933A JP2009288849A (en) 2008-05-27 2008-05-27 Information processing apparatus, and memory management method

Publications (1)

Publication Number Publication Date
JP2009288849A true JP2009288849A (en) 2009-12-10

Family

ID=41458041

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008137933A Pending JP2009288849A (en) 2008-05-27 2008-05-27 Information processing apparatus, and memory management method

Country Status (1)

Country Link
JP (1) JP2009288849A (en)

Similar Documents

Publication Publication Date Title
US6289399B1 (en) Computer and parameter setting method
TWI601093B (en) Performing scheduling operations for graphics hardware
JP2014106882A (en) Information processing device and display control method
CN101526901B (en) Method and device for viewing files in computer
WO2013036252A1 (en) Multiple display device taskbars
JP2007035010A (en) Method for initializing instance and executing computer program by loading operation system core program from high-speed data access memory
JP2006330912A (en) Information processor and program
JP2008276395A (en) Information processor and program execution control method
US20090225090A1 (en) Apparatus for adjusting parameters of display card
JP4635092B2 (en) Information processing apparatus and storage device control method
JP2006048131A (en) Information processing device and display luminance control method
JP2010231626A (en) Information processing apparatus
JP2006236079A (en) Computer and disk management method
JP2008090390A (en) Microcomputer debugging system and microcomputer
JP4607545B2 (en) Information processing apparatus and power control method
CN105807893A (en) Information processing method and electronic device
US20150317185A1 (en) Method for switching operating system and electronic device using the method
JP2005321975A (en) Information processor and control method therefor
US20120274645A1 (en) Aligning animation state update and frame composition
JP2009134626A (en) Information processing apparatus and method for starting up information processing apparatus
JP2009288849A (en) Information processing apparatus, and memory management method
KR20100050098A (en) Image processing apparatus and control method thereof
JP2011076387A (en) Power saving control apparatus, method and program in terminal device having power-saving mode
JP2006040063A (en) Image processing device and smi processing method thereof
JP2007293604A (en) Information processor and program load method