JP2018063505A - Memory management control unit, memory management control method and memory management control program - Google Patents

Memory management control unit, memory management control method and memory management control program Download PDF

Info

Publication number
JP2018063505A
JP2018063505A JP2016200550A JP2016200550A JP2018063505A JP 2018063505 A JP2018063505 A JP 2018063505A JP 2016200550 A JP2016200550 A JP 2016200550A JP 2016200550 A JP2016200550 A JP 2016200550A JP 2018063505 A JP2018063505 A JP 2018063505A
Authority
JP
Japan
Prior art keywords
swap
data
memory management
management control
processor
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
JP2016200550A
Other languages
Japanese (ja)
Inventor
安蒜 康仁
Yasuhito Abiru
康仁 安蒜
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2016200550A priority Critical patent/JP2018063505A/en
Publication of JP2018063505A publication Critical patent/JP2018063505A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To improve response of a memory management control unit in a swap-out according to one embodiment.SOLUTION: A memory management control unit according to one embodiment includes a memory including a data area and a swap area, and a processor. The processor compresses data at a first compression rate when predetermined conditions are met in swapping data, stored in the data area, out to the swap area. The processor compresses data at a second compression rate lower than the first compression rate when the predetermined conditions are not met in swapping the data, stored in the data area, out to the swap area.SELECTED DRAWING: Figure 5

Description

本発明は、メモリ管理制御装置、メモリ管理制御方法、及びメモリ管理制御プログラムに関する。   The present invention relates to a memory management control device, a memory management control method, and a memory management control program.

近年、メモリ管理制御装置において、オペレーティングシステム(OS)が使用する物理メモリのサイズが増加している。なお、メモリ管理制御装置は、例えば、携帯電話機、スマートフォン、タブレット端末、車載器(例えば、カーナビゲーションシステム)、及びユビキタス製品などのメモリの管理や制御を行う装置を含む。OSが使用する物理メモリのサイズの増加に対処するために、例えば、物理メモリを効率よく利用するための技術が知られている(例えば、特許文献1及び特許文献2)。   In recent years, the size of physical memory used by an operating system (OS) in memory management control devices has increased. Note that the memory management control device includes, for example, a device that performs memory management and control, such as a mobile phone, a smartphone, a tablet terminal, an in-vehicle device (for example, a car navigation system), and a ubiquitous product. In order to cope with an increase in the size of the physical memory used by the OS, for example, a technique for efficiently using the physical memory is known (for example, Patent Document 1 and Patent Document 2).

特開2014−116017号公報JP 2014-1116017 A 特開2002−24082号公報JP 2002-24082 A

メモリを効率的に利用するために、メモリに記憶されているデータをスワップ領域にスワップアウトすることがあり、スワップアウトする際に、データを圧縮が行われることがある。この場合、スワップアウトには、スワップする対象のメモリ領域の探索、スワップ対象のメモリ領域の圧縮、スワップアウトのためのメモリコピーなどのオーバーヘッドがある。そして、例えば、これらの処理を行うプロセッサの処理能力やメモリの読み書きのスピードに十分なパフォーマンスがない場合、或いは、他の処理によってそれらのリソースが使用されている場合、メモリ管理制御装置のレスポンスが遅くなってしまうことがある。   In order to use the memory efficiently, the data stored in the memory may be swapped out to the swap area, and the data may be compressed when the data is swapped out. In this case, swap-out has overhead such as searching for a memory area to be swapped, compression of the memory area to be swapped, and memory copy for swap-out. And, for example, when there is insufficient performance in the processing capacity of the processor that performs these processes and the speed of reading and writing of the memory, or when those resources are used by other processes, the response of the memory management control device is It may be late.

1つの側面では、本発明は、スワップアウトの際のメモリ管理制御装置のレスポンスを向上させることを目的とする。   In one aspect, the present invention aims to improve the response of the memory management control device at the time of swap-out.

本発明の一つの態様のメモリ管理制御装置は、データ領域とスワップ領域とを含むメモリと、プロセッサとを含む。プロセッサは、データ領域に記憶されているデータをスワップ領域にスワップアウトする際に、所定の条件が満たされればデータを第1の圧縮率で圧縮する。プロセッサは、データ領域に記憶されているデータをスワップ領域にスワップアウトする際に、所定の条件が満たされなければデータを第1の圧縮率よりも圧縮率の低い第2の圧縮率で圧縮する。   A memory management control device according to one aspect of the present invention includes a memory including a data area and a swap area, and a processor. When swapping out data stored in the data area to the swap area, the processor compresses the data at the first compression rate if a predetermined condition is satisfied. When swapping out the data stored in the data area to the swap area, the processor compresses the data at a second compression rate lower than the first compression rate if a predetermined condition is not satisfied. .

スワップアウトの際のメモリ管理制御装置のレスポンスを向上させることができる。   The response of the memory management control device at the time of swap-out can be improved.

例示的なメモリ管理制御装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of an example memory management control apparatus. 物理メモリの領域を例示する図である。It is a figure which illustrates the area | region of a physical memory. 例示的なメモリの領域確保処理を示す図である。It is a figure which shows the area | region securing process of an example memory. 第1の実施形態に係るメモリの領域確保処理を示す図である。It is a figure which shows the area | region ensuring process of the memory which concerns on 1st Embodiment. 第1の実施形態に係るスワップアウト処理を例示する図である。It is a figure which illustrates the swap-out process which concerns on 1st Embodiment. 実施形態に係る履歴情報を例示する図である。It is a figure which illustrates the history information concerning an embodiment. 第1の実施形態に係るスワップ情報を例示する図である。It is a figure which illustrates the swap information which concerns on 1st Embodiment. 第2の実施形態に係るスワップアウト処理を例示する図である。It is a figure which illustrates the swap-out process which concerns on 2nd Embodiment. 第2の実施形態に係るスワップ情報を例示する図である。It is a figure which illustrates the swap information which concerns on 2nd Embodiment. 第2の実施形態に係るスワップイン処理の動作フローを例示する図である。It is a figure which illustrates the operation | movement flow of the swap-in process which concerns on 2nd Embodiment.

以下、図面を参照しながら、本発明のいくつかの実施形態について詳細に説明する。なお、複数の図面において対応する要素には同一の符号を付す。   Hereinafter, some embodiments of the present invention will be described in detail with reference to the drawings. In addition, the same code | symbol is attached | subjected to the corresponding element in several drawing.

図1は、例示的なメモリ管理制御装置100のハードウェア構成示す図である。なお、メモリ管理制御装置100は、例えば、携帯電話機、スマートフォン、タブレット端末、車載器(例えば、カーナビゲーションシステム)、及びユビキタス製品などであってよい。メモリ管理制御装置100は、例えば、プロセッサ101、メモリ102、記憶装置103、入力装置104、及び表示装置105を含んでよい。なお、プロセッサ101、メモリ102、記憶装置103、入力装置104、及び表示装置105は、例えば、バス110を介して互いに接続されている。   FIG. 1 is a diagram illustrating a hardware configuration of an exemplary memory management control device 100. Note that the memory management control device 100 may be, for example, a mobile phone, a smartphone, a tablet terminal, an in-vehicle device (for example, a car navigation system), a ubiquitous product, or the like. The memory management control device 100 may include, for example, a processor 101, a memory 102, a storage device 103, an input device 104, and a display device 105. Note that the processor 101, the memory 102, the storage device 103, the input device 104, and the display device 105 are connected to each other via a bus 110, for example.

プロセッサ101は、メモリ管理制御装置100の各部を制御する。また、プロセッサ101は、例えば、メモリ102に記憶されているメモリ管理制御プログラムを読み出して実行することにより、後述する動作フローの手順を実行する。なお、プロセッサ101は、例えば、シングルプロセッサであっても、マルチプロセッサ及びマルチコアを備えるプロセッサであってもよい。   The processor 101 controls each unit of the memory management control device 100. Further, the processor 101 executes a procedure of an operation flow to be described later by reading and executing a memory management control program stored in the memory 102, for example. The processor 101 may be a single processor or a processor including a multiprocessor and a multicore, for example.

メモリ102は、例えば半導体メモリであり、RAM領域及びROM領域を含んでいてよい。なお、メモリ102は、メモリ管理制御装置100に実際に搭載されているメモリであり、以下の説明では、メモリ102を物理メモリ102と呼ぶことがある。記憶装置103は、例えばeMMCなどのフラッシュメモリ等の半導体メモリ、ハードディスク、又は外部記憶装置である。なお、RAM(ラム)は、Random Access Memoryの略称である。また、ROM(ロム)は、Read Only Memoryの略称である。eMMC(イーエムエムシー)は、Embedded Multi Media Cardの略称である。   The memory 102 is, for example, a semiconductor memory, and may include a RAM area and a ROM area. Note that the memory 102 is a memory that is actually mounted in the memory management control device 100, and in the following description, the memory 102 may be referred to as a physical memory 102. The storage device 103 is a semiconductor memory such as a flash memory such as eMMC, a hard disk, or an external storage device. Note that RAM (ram) is an abbreviation for Random Access Memory. ROM (ROM) is an abbreviation for Read Only Memory. eMMC (EMC) is an abbreviation for Embedded Multi Media Card.

入力装置104は、例えば、ボタンやキーなどの入力を受け付けるデバイスである。また、表示装置105は、例えばディスプレーなどであってよい。入力装置104と表示装置105は合わせて、タッチパネルとして実装されてもよい。また、メモリ管理制御装置100は、更に、プロセッサ101の指示に従って外部とデータを送受信する通信インタフェースを備えていてもよい。また、メモリ管理制御装置100は、音声出力装置や音声入力装置などのその他の入出力装置を備えていてもよい。   The input device 104 is a device that accepts inputs such as buttons and keys, for example. The display device 105 may be a display, for example. The input device 104 and the display device 105 may be combined and implemented as a touch panel. Further, the memory management control device 100 may further include a communication interface that transmits / receives data to / from the outside in accordance with an instruction from the processor 101. The memory management control device 100 may also include other input / output devices such as a voice output device and a voice input device.

上述のように、例えば、メモリ管理制御装置100において、オペレーティングシステムが使用する物理メモリのサイズが増加している。これに対応するために、例えば、容量の大きい物理メモリを搭載するとメモリ管理制御装置100のコストが高くなる。そのため、限られた容量で効率よくメモリを利用するための省メモリ制御技術が望まれている。   As described above, for example, in the memory management control device 100, the size of the physical memory used by the operating system has increased. In order to cope with this, for example, if a large-capacity physical memory is mounted, the cost of the memory management control device 100 increases. Therefore, a memory saving control technique for efficiently using a memory with a limited capacity is desired.

省メモリ制御の一例において、物理メモリ102内にスワップ領域を設けて、物理メモリ102上のスワップ対象のデータをスワップ領域に圧縮してスワップアウトすることがある。図2は、物理メモリ102内にスワップ領域を設ける場合の物理メモリ102の領域を例示する図である。この場合、物理メモリ102の一部にスワップ領域201が確保される。また、物理メモリ102上のスワップ領域201以外の通常のメモリとして用いる領域を、以下ではデータ領域202と呼ぶ。データ領域202には、例えば、オペレーティングシステムや、アプリケーションなどが参照するデータが記憶されている。そして、メモリ不足時には、物理メモリ102に確保したスワップ領域201に、スワップ対象のデータが圧縮されてスワップアウトされる。スワップ領域201にスワップアウトされたデータは圧縮されているため、メモリを効率的に使用することができる。なお、データ領域202には、メモリの管理に用いられる情報などが記憶されている管理領域203が含まれていてよい。管理領域203は、例えば、後述する履歴情報600、及びスワップ情報700,900などの情報を記憶していてよい。また、この様に物理メモリ102内にスワップ領域201を設けるメモリ管理方式の一例に、Linux(登録商標)のZRAMと呼ばれる方式がある。   In an example of memory saving control, a swap area may be provided in the physical memory 102, and swap target data on the physical memory 102 may be compressed into the swap area and swapped out. FIG. 2 is a diagram illustrating an area of the physical memory 102 when a swap area is provided in the physical memory 102. In this case, a swap area 201 is secured in a part of the physical memory 102. Further, an area used as a normal memory other than the swap area 201 on the physical memory 102 is hereinafter referred to as a data area 202. In the data area 202, for example, data referred to by an operating system, an application, or the like is stored. When the memory is insufficient, the swap target data is compressed and swapped out in the swap area 201 secured in the physical memory 102. Since the data swapped out to the swap area 201 is compressed, the memory can be used efficiently. The data area 202 may include a management area 203 in which information used for memory management is stored. The management area 203 may store information such as history information 600 and swap information 700 and 900, which will be described later. As an example of a memory management method in which the swap area 201 is provided in the physical memory 102 in this way, there is a method called Linux (registered trademark) ZRAM.

図3は、例示的なメモリ102の領域確保処理を示す図である。例えば、他のアプリケーションなどからデータ領域202においてメモリ領域を確保するように要求する領域確保要求が入力されると、プロセッサ101は、図3の例示的な領域確保処理を開始してよい。   FIG. 3 is a diagram illustrating an area securing process of the exemplary memory 102. For example, when an area reservation request for requesting to secure a memory area in the data area 202 is input from another application or the like, the processor 101 may start the exemplary area reservation process of FIG.

ステップ301(以降、ステップを“S”と記載し、例えば、S301と表記する)においてプロセッサ101は、要求されたメモリ領域を確保するのに十分な空き容量がメモリ102にあるか否かを判定する。空き容量がメモリ102にある場合(S301があり)、フローはS306に進む。この場合、S306においてプロセッサ101は、メモリ確保要求で要求された領域を空き領域に確保し、本動作フローは終了する。一方、空き容量がメモリ102にない場合(S301がなし)、フローはS302に進む。   In step 301 (hereinafter, the step is described as “S”, for example, expressed as S301), the processor 101 determines whether or not the memory 102 has sufficient free space to secure the requested memory area. To do. If there is free space in the memory 102 (there is S301), the flow proceeds to S306. In this case, in S306, the processor 101 secures the area requested by the memory securing request in a free area, and the operation flow ends. On the other hand, when there is no free space in the memory 102 (S301 is absent), the flow proceeds to S302.

S302においてプロセッサ101は、データ領域202においてスワップ対象のメモリ領域を探索する。例えば、プロセッサ101は、LRU(Least Recently Used)でスワップ対象のメモリ領域を探索してよい。LRUでは、例えば、メモリ102のデータ領域202に保存されているデータの中で最後に参照されてから最も時間が経過しているデータが保存されているメモリ領域が探し出される。なお、メモリ領域は、例えば、ページ単位の領域であってよい。   In S302, the processor 101 searches the data area 202 for a memory area to be swapped. For example, the processor 101 may search for a memory area to be swapped by LRU (Least Recently Used). In the LRU, for example, a memory area in which data that has passed the most time since it was last referred to is stored in the data stored in the data area 202 of the memory 102. The memory area may be a page unit area, for example.

S303においてプロセッサ101は、探索されたメモリ領域をスワップ対象にする。S304においてプロセッサ101は、スワップ対象のメモリ領域に保存されているデータを、所定の圧縮率で圧縮する。そして、S305でプロセッサ101は、圧縮した圧縮データを、スワップ領域201にスワップアウトする。S306においてプロセッサ101は、データをスワップアウトした後のメモリ領域を解放し、メモリ確保要求で要求された領域を確保して、本動作フローは終了する。   In S303, the processor 101 sets the searched memory area as a swap target. In S304, the processor 101 compresses data stored in the memory area to be swapped at a predetermined compression rate. In step S305, the processor 101 swaps out the compressed data to the swap area 201. In S306, the processor 101 releases the memory area after swapping out the data, secures the area requested by the memory securing request, and the operation flow ends.

例えば、以上で述べた様に、メモリ102にスワップ領域201を設けて、メモリ102の空き容量が不足した際に所定の圧縮率でデータを圧縮してスワップアウトを行ったとする。この場合、スワップアウトには、スワップする対象のメモリ領域の探索、スワップ対象のメモリ領域の圧縮、スワップアウトのためのメモリコピーなどのオーバーヘッドがある。そして、例えば、これらの処理を行うプロセッサの処理能力やメモリの読み書きのスピードに十分なパフォーマンスがない場合、或いは、他の処理によってそれらのリソースが使用されている場合、メモリ管理制御装置のレスポンスが遅くなってしまうことがある。そのため、例えば、装置のレスポンスを向上させることのできる技術が望まれている。   For example, as described above, it is assumed that the swap area 201 is provided in the memory 102 and the data is compressed at a predetermined compression rate and swapped out when the memory 102 has insufficient free space. In this case, swap-out has overhead such as searching for a memory area to be swapped, compression of the memory area to be swapped, and memory copy for swap-out. And, for example, when there is insufficient performance in the processing capacity of the processor that performs these processes and the speed of reading and writing of the memory, or when those resources are used by other processes, the response of the memory management control device is It may be late. Therefore, for example, a technique that can improve the response of the apparatus is desired.

そこで、実施形態では、スワップ対象となったデータの圧縮の際の圧縮率を動的に変更し、それにより、メモリ管理制御装置100のレスポンスを向上させて、メモリ管理制御装置100のパフォーマンスを改善する。実施形態では、スワップ領域201へのデータのスワップアウトの際の圧縮率を動的に変更するために、以下の情報をスワップアウトの圧縮率を決定する判定に用いる。
(1)メモリ管理制御装置100の操作状況
(2)プロセッサの使用率
(3)スワップ領域201へのスワップアウトからスワップインまでの時間間隔
Therefore, in the embodiment, the compression rate at the time of compressing the data to be swapped is dynamically changed, thereby improving the response of the memory management control device 100 and improving the performance of the memory management control device 100. To do. In the embodiment, in order to dynamically change the compression rate at the time of data swap-out to the swap area 201, the following information is used for the determination of determining the swap-out compression rate.
(1) Operation status of the memory management control device 100 (2) Processor usage rate (3) Time interval from swap-out to swap-in to the swap area 201

(1)について、例えば、圧縮の処理負荷が高く、メモリ管理制御装置100のレスポンスが遅くなったとしても、ユーザがメモリ管理制御装置100を利用していない場合、レスポンスの低下を感じることはない。そのため、例えば、メモリ管理制御装置100の操作状況が操作中でなければ、圧縮率を高い圧縮率に設定し、圧縮を実行してもよい。   Regarding (1), for example, even if the compression processing load is high and the response of the memory management control device 100 is delayed, if the user does not use the memory management control device 100, the response will not be felt. . Therefore, for example, if the operation status of the memory management control device 100 is not in operation, the compression rate may be set to a high compression rate and compression may be executed.

(2)について、例えば、プロセッサの使用率が既に高い場合、圧縮率を高くすると更なる負荷をプロセッサ101にかけてしまう。そのため、例えば、圧縮率を低くしてプロセッサ101への負荷を抑えることが好ましい。   With regard to (2), for example, when the processor usage rate is already high, increasing the compression rate causes a further load on the processor 101. For this reason, for example, it is preferable to reduce the compression ratio to reduce the load on the processor 101.

(3)について、例えば、スワップ領域201へのスワップアウトからスワップインまでの時間間隔が短い場合、スワップアウトしてもすぐにスワップインを行うことになる可能性が高い。そして、スワップ領域201に長期間保存されるデータではない場合には、高圧縮率で圧縮を施すよりも、低圧縮率で圧縮を施した方が圧縮にかかる時間や処理負荷を低減でき、好ましい。一方、スワップ領域201に長期間保存されるデータであれば、高圧縮率でデータを圧縮してメモリ102を占有する領域を抑えることで、メモリを効率的に利用することができる。   With regard to (3), for example, when the time interval from swap-out to swap area 201 to swap-in is short, there is a high possibility that swap-in will be performed immediately after swap-out. If the data is not stored in the swap area 201 for a long period of time, compression with a low compression rate is preferable to compression with a low compression rate, which can reduce the time and processing load required for compression. . On the other hand, if the data is stored in the swap area 201 for a long period of time, the memory can be used efficiently by compressing the data at a high compression rate and suppressing the area that occupies the memory 102.

そして、プロセッサ101は、例えば、以上のような情報を考慮して、スワップアウト時の圧縮率を決定することで、プロセッサ101に過剰な負荷がかかることを抑制することができる。また、一方で、プロセッサ101の処理能力に余裕がある状況や、メモリ管理制御装置100の操作状況に基づいてメモリ管理制御装置100が利用されていないと判定される場合には、高い圧縮率を選択し、メモリ102の利用効率を高めることができる。以下、第1の実施形態を説明する。   The processor 101 can suppress an excessive load on the processor 101 by determining the compression rate at the time of swap-out in consideration of the above information, for example. On the other hand, when it is determined that the memory management control device 100 is not used based on the situation where the processing capacity of the processor 101 is sufficient or the operation status of the memory management control device 100, a high compression ratio is set. The efficiency of using the memory 102 can be increased. The first embodiment will be described below.

<第1の実施形態>
図4は、第1の実施形態に係るメモリ102の領域確保処理を示す図である。例えば、他のアプリケーションなどからデータ領域202においてメモリ領域を確保するように要求する領域確保要求が入力されると、プロセッサ101は、図4の第1の実施形態に係る領域確保処理を開始してよい。
<First Embodiment>
FIG. 4 is a diagram showing an area securing process of the memory 102 according to the first embodiment. For example, when an area securing request for securing a memory area in the data area 202 is input from another application or the like, the processor 101 starts the area securing process according to the first embodiment of FIG. Good.

S401においてプロセッサ101は、メモリに空き容量があるか否かを判定する。メモリに空き容量がある場合(S401があり)、本動作フローは終了する。一方、メモリに空き容量がない場合(S401がなし)、フローはS402に進む。   In S401, the processor 101 determines whether or not there is free space in the memory. When there is free space in the memory (there is S401), this operation flow ends. On the other hand, if there is no free space in the memory (S401 is none), the flow proceeds to S402.

S402においてプロセッサ101は、データ領域202においてスワップ対象のメモリ領域を探索する。例えば、プロセッサ101は、LRUでスワップ対象のメモリ領域を探索してよい。S403においてプロセッサ101は、探索されたメモリ領域をスワップ対象にする。S404においてプロセッサ101は、スワップアウト処理を実行する。スワップアウト処理の詳細は、図5を参照して後述するが、スワップアウト処理では、圧縮率を動的に変更してデータを圧縮し、スワップアウトが実行される。そして、S405でプロセッサ101は、データをスワップアウトした後のメモリ領域を解放し、領域確保要求で要求されたメモリ領域を確保して、本動作フローは終了する。   In S402, the processor 101 searches the data area 202 for a memory area to be swapped. For example, the processor 101 may search for a memory area to be swapped by LRU. In S403, the processor 101 sets the searched memory area as a swap target. In S404, the processor 101 performs swap-out processing. Details of the swap-out process will be described later with reference to FIG. 5. In the swap-out process, data is compressed by dynamically changing the compression rate, and swap-out is executed. In step S405, the processor 101 releases the memory area after swapping out the data, secures the memory area requested by the area securing request, and the operation flow ends.

図5は、第1の実施形態に係るスワップアウト処理を例示する図である。プロセッサ101は、例えば、図4のS404に進むと、図5のスワップアウト処理を開始してよい。   FIG. 5 is a diagram illustrating a swap-out process according to the first embodiment. For example, when the processor 101 proceeds to S <b> 404 in FIG. 4, the processor 101 may start the swap-out process in FIG. 5.

S501においてプロセッサ101は、メモリ管理制御装置100の操作状況を示す操作情報を取得する。そして、S502においてプロセッサ101は、取得した操作状況を示す操作情報に基づいて、メモリ管理制御装置100が使用中であるか否かを判定してよい。例えば、プロセッサ101は、メモリ管理制御装置100の表示装置105の表示画面が消灯しているか否かの情報を、操作状況を示す操作情報として用いてよい。この場合、表示装置105の表示画面が消灯していれば、プロセッサ101は、ユーザがメモリ管理制御装置100を使用していないと判定してよい。一方、表示装置105の表示画面が点灯している場合に、プロセッサ101は、ユーザがメモリ管理制御装置100を使用していると判定してよい。なお、別の実施形態では、ユーザがメモリ管理制御装置100へのログイン状況を、操作状況を示す操作情報として用いてもよい。そして、S502においてメモリ管理制御装置100が未使用中であれば(S502が未使用中)、フローはS509に進み、プロセッサ101は圧縮率に第1の圧縮率に設定する。なお、第1の圧縮率は、後述する第2の圧縮率よりも高い圧縮率である。この様に、メモリ管理制御装置100が使用中ではないことが推定される状況では、たとえレスポンスが低下したとしてもユーザが体感する可能性が低く、プロセッサ101は、高圧縮率を用いて圧縮を行い、メモリを節約してよい。一方、S502においてメモリ管理制御装置100が使用中であれば(S502が使用中)、フローはS503に進む。   In step S <b> 501, the processor 101 acquires operation information indicating the operation status of the memory management control device 100. In step S <b> 502, the processor 101 may determine whether or not the memory management control device 100 is in use based on the acquired operation information indicating the operation status. For example, the processor 101 may use information as to whether or not the display screen of the display device 105 of the memory management control device 100 is turned off as operation information indicating the operation status. In this case, if the display screen of the display device 105 is turned off, the processor 101 may determine that the user is not using the memory management control device 100. On the other hand, when the display screen of the display device 105 is lit, the processor 101 may determine that the user is using the memory management control device 100. In another embodiment, a user may use a login status to the memory management control device 100 as operation information indicating the operation status. If the memory management control device 100 is not used in S502 (S502 is not used), the flow proceeds to S509, and the processor 101 sets the compression rate to the first compression rate. The first compression rate is a higher compression rate than a second compression rate described later. In this way, in a situation where it is estimated that the memory management control device 100 is not in use, even if the response decreases, the user is unlikely to experience it, and the processor 101 performs compression using a high compression rate. Yes, you may save memory. On the other hand, if the memory management control device 100 is in use in S502 (S502 is in use), the flow proceeds to S503.

S503においてプロセッサ101は、プロセッサ101の使用率の情報を取得する。S504においてプロセッサ101は、プロセッサ101の使用率が高いか否かを判定する。なお、プロセッサ101の使用率には、例えば、プロセッサのロードアベレージが使用されてよい。例えば、プロセッサ101は、ロードアベレージが所定の閾値を超えているかどうかでプロセッサの使用率が高いか否かを判定してよい。例えば、プロセッサ101は、プロセッサ101の使用率が所定の閾値以上である場合に、使用率が高いと判定してよい。一方、プロセッサ101は、プロセッサ101の使用率が所定の閾値よりも低ければ、使用率が低いと判定してよい。所定の閾値は、例えば、その閾値を超えた状態で、スワップ対象のデータを高圧縮率で圧縮した場合に、メモリ管理制御装置100のレスポンスに影響が出る可能性が高いと判定できる値に設定されてよい。S504においてプロセッサ101の使用率が高い場合(S504がYES)、フローはS507に進む。一方、プロセッサ101の使用率が高くない場合(S504がNO)、フローはS505に進む。   In step S <b> 503, the processor 101 acquires information on the usage rate of the processor 101. In S504, the processor 101 determines whether the usage rate of the processor 101 is high. For example, the processor load average may be used as the usage rate of the processor 101. For example, the processor 101 may determine whether the usage rate of the processor is high based on whether the load average exceeds a predetermined threshold. For example, the processor 101 may determine that the usage rate is high when the usage rate of the processor 101 is equal to or greater than a predetermined threshold. On the other hand, the processor 101 may determine that the usage rate is low if the usage rate of the processor 101 is lower than a predetermined threshold. For example, when the swap target data is compressed at a high compression rate in a state in which the predetermined threshold is exceeded, the predetermined threshold is set to a value that can determine that the response of the memory management control device 100 is likely to be affected. May be. If the usage rate of the processor 101 is high in S504 (YES in S504), the flow proceeds to S507. On the other hand, when the usage rate of the processor 101 is not high (NO in S504), the flow proceeds to S505.

S505においてプロセッサ101は、過去に実行されたスワップアウトとスワップインの履歴を格納する履歴情報600に基づいて、スワップ対象のデータのスワップアウトとスワップインの時間間隔を取得する。   In step S505, the processor 101 acquires the swap-out and swap-in time intervals of the swap target data based on the history information 600 that stores the history of swap-out and swap-in executed in the past.

図6は、実施形態に係る履歴情報600を例示する図である。履歴情報600には、過去に実行されたスワップアウト及びスワップインと対応するエントリが登録されている。エントリには、例えば、仮想アドレス、種別、及び日時の情報が対応付けられて含まれていてよい。仮想アドレスは、例えば、エントリと対応するスワップアウト又はスワップインで処理対象であったデータの仮想アドレスが登録されている。また、種別は、エントリがスワップインの情報を含むか、スワップアウトの情報を含むかを示す情報である。日時は、エントリと対応するスワップイン又はスワップアウトが実行された日時を表す情報である。   FIG. 6 is a diagram illustrating history information 600 according to the embodiment. In the history information 600, entries corresponding to swap-out and swap-in executed in the past are registered. The entry may include, for example, virtual address, type, and date / time information in association with each other. As the virtual address, for example, a virtual address of data to be processed by swap-out or swap-in corresponding to the entry is registered. The type is information indicating whether the entry includes swap-in information or swap-out information. The date and time is information indicating the date and time when the swap-in or swap-out corresponding to the entry was executed.

プロセッサ101は、例えば、スワップ対象のデータの仮想アドレスを有するエントリを履歴情報600から特定し、過去に行われたスワップアウトからスワップインまでの時間間隔を取得してよい。なお、時間間隔は、例えば、スワップ対象のデータに前回実行されスワップアウトからスワップインまでの時間間隔など1つの時間間隔に基づいていてもよい。或いは別の実施形態では、時間間隔は、例えば、スワップ対象のデータに過去に実行された複数のスワップアウトからスワップインまでの時間間隔を代表する代表値であってよい。代表値は、例えば、スワップ対象のデータに対する過去の複数のスワップアウトからスワップインまでの時間間隔の平均値であってよく、或いは、最大値や最小値などその他の値であってもよい。   For example, the processor 101 may identify an entry having a virtual address of data to be swapped from the history information 600 and obtain a time interval from swap-out to swap-in performed in the past. The time interval may be based on one time interval such as the time interval from the last time executed for swap target data to swap-out to swap-in. Alternatively, in another embodiment, the time interval may be, for example, a representative value representing a time interval from a plurality of swap-outs to a swap-in executed in the past on the data to be swapped. The representative value may be, for example, an average value of time intervals from a plurality of past swap-outs to swap-in for data to be swapped, or may be other values such as a maximum value and a minimum value.

そして、S506においてプロセッサ101は、スワップ対象のデータのスワップアウトからスワップインまでの時間間隔が短いか否かを判定する。スワップ対象のデータのスワップアウトからスワップインまでの時間間隔が所定時間よりも長い場合、プロセッサ101は、時間間隔が長いと判定し(S506が長)、フローはS509に進む。S509においてプロセッサ101は、圧縮率を高い第1の圧縮率に設定する。   In step S506, the processor 101 determines whether the time interval from swap-out to swap-in of the data to be swapped is short. When the time interval from swap-out to swap-in of the data to be swapped is longer than the predetermined time, the processor 101 determines that the time interval is long (S506 is long), and the flow proceeds to S509. In S509, the processor 101 sets the compression rate to the first compression rate that is high.

一方、S506において、例えば、スワップ対象のデータのスワップアウトからスワップインまでの時間間隔が所定時間以下である場合、プロセッサ101は、時間間隔が短いと判定し(S506が短)、フローはS507に進む。なお、履歴情報600に履歴がなく、スワップ対象のデータの初回のスワップアウトである場合には、時間間隔が短いと判定してよい。S507においてプロセッサ101は、圧縮率を第1の圧縮率よりも低い第2の圧縮率に設定する。なお、スワップ対象となったデータをスワップアウトしてからスワップインするまでの時間間隔が長い場合、データが長時間スワップアウトされていることになる。その場合、高圧縮率で圧縮することでメモリを効率的に利用することが可能になる。一方、スワップ対象となったメモリ領域をスワップアウトしてからスワップインするまでの時間間隔が短い場合、すぐにまたスワップインが行われる可能性があるため、低圧縮率で圧縮することでプロセッサ101にかかる負荷を抑えることができる。   On the other hand, in S506, for example, when the time interval from swap-out to swap-in of the data to be swapped is equal to or shorter than a predetermined time, the processor 101 determines that the time interval is short (S506 is short), and the flow goes to S507. move on. If the history information 600 has no history and is the first swap-out of data to be swapped, it may be determined that the time interval is short. In S507, the processor 101 sets the compression rate to the second compression rate lower than the first compression rate. If the time interval from swapping out the swapped data to swapping in is long, the data has been swapped out for a long time. In that case, the memory can be efficiently used by compressing at a high compression rate. On the other hand, if the time interval from swap-out of the memory area to be swapped to swap-in is short, swap-in may be performed again immediately. Therefore, the processor 101 is compressed by compressing at a low compression rate. It is possible to reduce the load on the machine.

S508においてプロセッサ101は、スワップアウトに関する情報を記録する。例えば、プロセッサ101は、管理領域203に記憶された履歴情報600に、スワップアウトの実行時刻に関するエントリを登録してよい。プロセッサ101は、例えば、履歴情報600のエントリの仮想アドレスとして、スワップ対象のデータの仮想アドレスを登録し、種別にスワップアウトと登録し、日時にスワップアウトの実行時刻として、現在の時刻を記録してする。なお、後述する第2の実施形態で例示するように、スワップインの際にもスワップインの実行時刻が履歴情報600に登録されるものとする。   In S508, the processor 101 records information regarding swap-out. For example, the processor 101 may register an entry relating to the swap-out execution time in the history information 600 stored in the management area 203. For example, the processor 101 registers the virtual address of the data to be swapped as the virtual address of the entry of the history information 600, registers the swap out as the type, and records the current time as the execution time of the swap out at the date and time. Do it. Note that, as exemplified in the second embodiment to be described later, it is assumed that the swap-in execution time is also registered in the history information 600 at the time of swap-in.

また、プロセッサは、管理領域203に記憶されたスワップ情報700にスワップアウトに関する情報を含むエントリを記録してよい。図7は、実施形態に係るスワップ情報700を例示する図である。スワップ情報700は、例えば、仮想アドレス、スワップアウト先アドレス、及びサイズを含む。仮想アドレスは、例えば、スワップ対象のデータに割り当てられている仮想アドレス空間上のアドレスである。スワップアウト先アドレスは、スワップ対象のデータを保存するスワップ領域201内でのアドレスである。また、サイズは、スワップ対象のデータのサイズである。   Further, the processor may record an entry including information regarding swap-out in the swap information 700 stored in the management area 203. FIG. 7 is a diagram illustrating swap information 700 according to the embodiment. The swap information 700 includes, for example, a virtual address, a swap-out destination address, and a size. The virtual address is, for example, an address on a virtual address space assigned to swap target data. The swap-out destination address is an address in the swap area 201 that stores data to be swapped. The size is the size of data to be swapped.

S510においてプロセッサ101は、スワップ情報700に登録したスワップアウト先のアドレスと対応するスワップ領域201内のメモリ領域に、圧縮したスワップ対象のデータをスワップアウトし、本動作フローは終了し、フローはS405の処理へと続く。   In S510, the processor 101 swaps out the compressed swap target data to the memory area in the swap area 201 corresponding to the swap-out destination address registered in the swap information 700, the operation flow ends, and the flow is S405. Continue to processing.

以上で述べた様に、実施形態によればプロセッサ101は、例えば、レスポンスに影響が出たとしてもユーザが体感する可能性の低いメモリ管理制御装置100が未使用と推定される状況で、スワップアウトに圧縮率の高い第1の圧縮率を利用する。それにより、メモリを節約することができる。   As described above, according to the embodiment, the processor 101 may, for example, perform swapping in a situation where it is estimated that the memory management control device 100 that is less likely to be experienced by the user even if the response is affected is unused. The first compression rate with a high compression rate is used for out. Thereby, memory can be saved.

また、実施形態によればプロセッサ101は、スワップアウトを実行する際に、プロセッサ101の使用率が高い場合、第1の圧縮率よりも圧縮率の低い第2の圧縮率を利用する。プロセッサ101の負荷が高い状態では圧縮率の低い第2の圧縮率を利用することで、スワップアウトの処理がプロセッサ101に与える影響を抑え、それにより、メモリ管理制御装置100のレスポンスが低下するのを抑制することができる。   Further, according to the embodiment, when executing the swap-out, the processor 101 uses the second compression rate that is lower than the first compression rate when the usage rate of the processor 101 is high. By using the second compression rate with a low compression rate when the load on the processor 101 is high, the influence of the swap-out process on the processor 101 is suppressed, thereby reducing the response of the memory management control device 100. Can be suppressed.

また、実施形態によればプロセッサ101は、スワップアウトを実行する際に、スワップ対象のデータのスワップアウトとスワップインの時間間隔が短い場合、第1の圧縮率よりも圧縮率の低い第2の圧縮率を利用する。一方、スワップ対象のデータのスワップアウトとスワップインの時間間隔が長い場合、第1の圧縮率を利用する。このように、スワップインが再度実行されるまでの時間が短いデータには、圧縮率の低い第2の圧縮率を利用して圧縮と復号の負荷を抑制することができる。一方、スワップインが再度実行されるまでの時間が長いデータには、圧縮率の高い第1の圧縮率を利用することで、メモリの利用効率を高めることができる。   Further, according to the embodiment, when the swap-out is executed, the processor 101 has a second compression rate lower than the first compression rate if the time interval between the swap-out and swap-in of the data to be swapped is short. Use compression ratio. On the other hand, when the time interval between swap-out and swap-in of data to be swapped is long, the first compression rate is used. As described above, for data having a short time until the swap-in is executed again, the compression and decoding loads can be suppressed by using the second compression rate having a low compression rate. On the other hand, for data having a long time until the swap-in is executed again, the use efficiency of the memory can be increased by using the first compression ratio having a high compression ratio.

従って、実施形態によれば、スワップアウトの処理がプロセッサ101に与える影響を抑え、それにより、メモリ管理制御装置100のレスポンスが低下するのを抑制することができる。   Therefore, according to the embodiment, it is possible to suppress the influence of the swap-out process on the processor 101, thereby suppressing the response of the memory management control device 100 from being lowered.

なお、別の実施形態では、例えば、上述の(1)〜(3)の情報うちのいずれか1つを用いて圧縮率を設定してもよい。例えば、図5のS502において使用中と判定された場合に、フローをS507に進めて、操作状況により圧縮率を設定する動作フローとしてもよい。また、同様に、S501の処理の後、フローをS503に進め、次のS504でNOと判定した場合に、フローをS509に進め、プロセッサの使用率により圧縮率を設定する動作フローとしてもよい。更に、S501の処理の後、フローをS505に進めて、スワップ対象のデータのスワップアウトからスワップインまでの時間間隔により圧縮率を設定する動作フローとしてもよい。或いは、更に別の実施形態では、上述の(1)〜(3)の情報のうちの2つを用いて圧縮率を設定してもよい。   In another embodiment, for example, the compression rate may be set using any one of the above-described information (1) to (3). For example, when it is determined in S502 of FIG. 5 that the device is in use, the flow may be advanced to S507, and an operation flow may be set in which the compression rate is set according to the operation status. Similarly, after the processing of S501, the flow may proceed to S503, and if NO is determined in the next S504, the flow may proceed to S509 to set the compression rate based on the processor usage rate. Furthermore, after the processing of S501, the flow may proceed to S505, and an operation flow may be set in which the compression rate is set according to the time interval from swap-out to swap-in of the data to be swapped. Or in another embodiment, you may set a compression rate using two of the information of the above-mentioned (1)-(3).

また、例えば、別の実施形態では、図5のS506において時間間隔が短いと判定した場合に、更に、スワップ対象のデータを参照するタスクの処理の時間間隔に基づいて、圧縮率を第1の圧縮率と第2の圧縮率のいずれかに振り分ける処理が含まれていてもよい。この場合、例えば、プロセッサ101は、タスクの処理の時間間隔が長い場合、圧縮率をS509の第1の圧縮率に振り分けてよい。また、プロセッサ101は、タスクの処理の時間間隔が短い場合、圧縮率をS507の第2の圧縮率に振り分けてよい。この様に、更なるパラメータを用いて圧縮率を振り分けることで、メモリの使用効率等を更に改善することが可能である。   Further, for example, in another embodiment, when it is determined in S506 in FIG. 5 that the time interval is short, the compression rate is further set based on the time interval of the processing of the task that references the swap target data. A process of allocating to either the compression rate or the second compression rate may be included. In this case, for example, when the task processing time interval is long, the processor 101 may allocate the compression rate to the first compression rate of S509. Further, when the task processing time interval is short, the processor 101 may allocate the compression rate to the second compression rate in S507. In this way, it is possible to further improve the memory usage efficiency and the like by assigning the compression ratio using further parameters.

<第2の実施形態>
第1の実施形態では、圧縮の際の圧縮率を設定するパラメータを変更することで圧縮率を変更する場合を例示したが、実施形態はこれに限定されるものではない。第2の実施形態では、圧縮アルゴリズムを変更することで圧縮率を変更する場合を例示する。
<Second Embodiment>
In the first embodiment, the case where the compression rate is changed by changing the parameter for setting the compression rate at the time of compression is illustrated, but the embodiment is not limited to this. The second embodiment exemplifies a case where the compression rate is changed by changing the compression algorithm.

図8は、第2の実施形態に係るスワップアウト処理を例示する図である。プロセッサ101は、例えば、図4のS404に進むと、図8のスワップアウト処理を開始してよい。   FIG. 8 is a diagram illustrating a swap-out process according to the second embodiment. For example, when the processor 101 proceeds to S <b> 404 in FIG. 4, the processor 101 may start the swap-out process in FIG. 8.

なお、図8においてS801〜S806までの処理までは、図5のS501〜S506までの処理と対応しており、プロセッサ101は、例えば、S501〜S506の処理と同様に処理を実行してよい。S809においてプロセッサ101は、圧縮率の高い第1のアルゴリズムでスワップ対象のデータを圧縮する。また、S807ではプロセッサ101は、第1のアルゴリズムよりも低い圧縮率でデータを圧縮する第2の圧縮アルゴリズムで、スワップ対象のデータを圧縮する。一例として、第1のアルゴリズムは、7‐ZIPであってよく、第2のアルゴリズムはZIPであってよい。また、RARなどのその他の圧縮アルゴリズムが用いられてもよい。   In FIG. 8, the processes from S801 to S806 correspond to the processes from S501 to S506 in FIG. In step S809, the processor 101 compresses the swap target data using the first algorithm having a high compression rate. In S807, the processor 101 compresses the data to be swapped with the second compression algorithm that compresses the data at a compression rate lower than that of the first algorithm. As an example, the first algorithm may be 7-ZIP and the second algorithm may be ZIP. Other compression algorithms such as RAR may also be used.

S808においてプロセッサ101は、スワップアウトに関する情報を記録する。例えば、プロセッサ101は、履歴情報600にスワップアウトの実行時刻に関するエントリを登録してよい。また、プロセッサ101は、例えば、メモリ102の管理領域203に記憶されている第2の実施形態に係るスワップ情報900にスワップアウトに関する情報を記録してよい。   In step S808, the processor 101 records information regarding swap-out. For example, the processor 101 may register an entry relating to the swap-out execution time in the history information 600. For example, the processor 101 may record information about swap-out in the swap information 900 according to the second embodiment stored in the management area 203 of the memory 102.

図9は、第2の実施形態に係るスワップ情報900を例示する図である。スワップ情報900は、例えば、仮想アドレス、スワップアウト先アドレス、サイズ、及び圧縮方式を含む。なお、仮想アドレス、スワップアウト先アドレス、及びサイズについては、スワップ情報700の仮想アドレス、スワップアウト先アドレス、及びサイズとそれぞれ対応する情報であってよい。そして、圧縮方式には、S807又はS809の処理でスワップ対象のデータの圧縮に用いた圧縮アルゴリズムを識別するための情報が登録される。   FIG. 9 is a diagram illustrating swap information 900 according to the second embodiment. The swap information 900 includes, for example, a virtual address, a swap-out destination address, a size, and a compression method. Note that the virtual address, the swap-out destination address, and the size may be information corresponding to the virtual address, the swap-out destination address, and the size of the swap information 700, respectively. In the compression method, information for identifying the compression algorithm used for compressing the swap target data in the processing of S807 or S809 is registered.

そして、S810でプロセッサ101は、スワップ情報900に登録したスワップアウト先のアドレスと対応するスワップ領域201内のメモリ領域に、圧縮したスワップ対象のデータをスワップアウトし、本動作フローは終了し、フローはS405の処理に続く。   In step S810, the processor 101 swaps out the compressed swap target data to the memory area in the swap area 201 corresponding to the swap-out destination address registered in the swap information 900, and the operation flow ends. Follows the process of S405.

以上の第2の実施形態で例示するように、実施形態は、圧縮の際のパラメータ以外にも、圧縮アルゴリズムを変更するなどその他の方法で圧縮率を変更して、実施されてもよい。また、例えば、圧縮アルゴリズムを適切に選択することで、圧縮率の更なる向上や、プロセッサに与える負荷の低減を図ることが可能である。   As exemplified in the above second embodiment, the embodiment may be implemented by changing the compression rate by other methods such as changing the compression algorithm in addition to the parameters at the time of compression. Further, for example, by appropriately selecting a compression algorithm, it is possible to further improve the compression rate and reduce the load applied to the processor.

図10は、第2の実施形態に係るスワップイン処理の動作フローを例示する図である。例えば、スワップ領域201に退避したデータの呼び出し指示が入力されるなどした場合、プロセッサ101は、図10のスワップイン処理を開始してよい。   FIG. 10 is a diagram illustrating an operation flow of the swap-in process according to the second embodiment. For example, when an instruction for calling data saved in the swap area 201 is input, the processor 101 may start the swap-in process of FIG.

S1001においてプロセッサ101は、呼び出されたデータをスワップ領域201において探索する。S1002において呼び出されたデータの探索に成功したか否かを判定する。探索に失敗した場合(S1002が失敗)、フローはS1003に進み、プロセッサ101はエラーを出力して、本動作フローは終了する。また、探索に成功した場合(S1002が成功)、フローは、S1004に進む。   In S1001, the processor 101 searches the swap area 201 for the called data. It is determined whether or not the search for the data called in S1002 has succeeded. If the search fails (S1002 fails), the flow proceeds to S1003, the processor 101 outputs an error, and the operation flow ends. If the search is successful (S1002 is successful), the flow proceeds to S1004.

S1004においてプロセッサ101は、スワップ情報900を参照し、呼び出し対象のデータと対応するエントリの圧縮方式を特定する。S1005においてプロセッサ101は、スワップ情報900において呼び出し対象のデータと対応するエントリのスワップアウト先アドレスから、データサイズに規定されるサイズのデータを読み出し、特定した圧縮方式を用いて復号する。そして、S1006においてプロセッサ101は、復号したデータをエントリの仮想アドレスと紐付けてメモリに確保した空き領域にスワップインする。   In S1004, the processor 101 refers to the swap information 900 and specifies the compression method of the entry corresponding to the data to be called. In S1005, the processor 101 reads data having a size defined by the data size from the swap-out destination address of the entry corresponding to the data to be called in the swap information 900, and decodes it using the specified compression method. In step S <b> 1006, the processor 101 swaps the decrypted data into a free area secured in the memory in association with the virtual address of the entry.

S1006においてプロセッサ101は、スワップインに関する情報を更新する。例えばプロセッサ101は、スワップ情報900からスワップインしたデータと対応するエントリを削除する。また、プロセッサ101は、履歴情報600にスワップインの実行時刻に関するエントリを登録する。S1006において情報の更新が完了すると、本動作フローは終了する。   In S1006, the processor 101 updates information regarding swap-in. For example, the processor 101 deletes the entry corresponding to the swapped-in data from the swap information 900. In addition, the processor 101 registers an entry related to the swap-in execution time in the history information 600. When the update of information is completed in S1006, this operation flow ends.

以上で述べた様に、第2の実施形態では、プロセッサ101は、スワップアウトの際にスワップ情報900に圧縮形式も保存している。そのため、プロセッサ101は、スワップインの際に適切な圧縮形式を選択してデータを復号することができる。   As described above, in the second embodiment, the processor 101 also stores the compression format in the swap information 900 at the time of swap-out. Therefore, the processor 101 can decode data by selecting an appropriate compression format at the time of swap-in.

なお、図10では、第2の実施形態に係る圧縮形式を変更する場合のスワップインの処理を例示している。しかしながら、例えば、圧縮アルゴリズムではなく圧縮のパラメータを変更する場合には、S1004の処理を省略し、S1005で所定の圧縮アルゴリズムを用いて復号を行うことで、第1の実施形態と対応するスワップインの処理を実行することができる。   FIG. 10 illustrates the swap-in process when changing the compression format according to the second embodiment. However, for example, when the compression parameter is changed instead of the compression algorithm, the processing of S1004 is omitted, and decoding is performed using a predetermined compression algorithm in S1005, so that the swap-in corresponding to the first embodiment is performed. Can be executed.

以上で述べたように、上述の実施形態によれば、スワップアウトの際のメモリ管理制御装置100のレスポンスを向上させることができる。   As described above, according to the above-described embodiment, the response of the memory management control device 100 at the time of swap-out can be improved.

なお、メモリ管理制御装置100の機種などによりプロセッサ101の処理の能力、タスクの数、各タスクの処理量が異なる。そのため、高圧縮率及び低圧縮率のそれぞれの圧縮で実際に用いるパラメータの値や圧縮アルゴリズムは、予め調査を行って最適解が決定されてよい。   The processing capability of the processor 101, the number of tasks, and the processing amount of each task differ depending on the model of the memory management control device 100 and the like. Therefore, the parameter values and compression algorithms that are actually used in each compression of the high compression rate and the low compression rate may be investigated in advance to determine the optimal solution.

以上において、実施形態を例示したが、実施形態はこれに限定されるものではない。例えば、上述の実施形態ではメモリ102にスワップ領域201が設けられている場合において実施形態を適用する例を述べた。しかしながら、実施形態はこれに限定されるものではない。例えば、ハードディスクなどの他の記憶装置103にスワップ領域201が設けられている場合にも実施形態は適用することができる。その場合にも、例えば、スワップアウトの際のメモリ管理制御装置100のレスポンスの影響を考慮して圧縮率を変更することができる。また、例えば、メモリ管理制御装置100のレスポンスへの影響が軽微な状況では、高圧縮率を用いることで、スワップアウトでデータを保存する記憶領域を削減することができる。また、更に、例えば、記憶装置103への読み書きの速度が遅い場合などには、高圧縮率を用いて圧縮したデータを書き込んだり読み込んだりすることで、スワップアウトの際の書き込み、スワップインの際の読み込みにかかる時間を短縮することができる。従って、実施形態は、例えば、パーソナルコンピュータ(PC)や、ノートPCなどのメモリ管理制御装置100にも適用することができる。   In the above, although embodiment was illustrated, embodiment is not limited to this. For example, in the above-described embodiment, the example in which the embodiment is applied when the swap area 201 is provided in the memory 102 has been described. However, the embodiment is not limited to this. For example, the embodiment can also be applied when the swap area 201 is provided in another storage device 103 such as a hard disk. Also in that case, for example, the compression rate can be changed in consideration of the influence of the response of the memory management control device 100 at the time of swap-out. Further, for example, in a situation where the influence on the response of the memory management control device 100 is slight, the storage area for storing data by swap-out can be reduced by using a high compression rate. Further, for example, when the reading / writing speed of the storage device 103 is low, the data compressed using the high compression rate is written or read, so that the data can be written at the time of swap-out or swap-in. The time required for loading can be reduced. Therefore, the embodiment can be applied to a memory management control device 100 such as a personal computer (PC) or a notebook PC.

また、例えば、上述の動作フローは例示であり、実施形態はこれに限定されるものではない。可能な場合には、動作フローは、処理の順番を変更して実行されてもよく、別に更なる処理を含んでもよく、又は、一部の処理が省略されてもよい。   Further, for example, the above-described operation flow is an example, and the embodiment is not limited to this. If possible, the operation flow may be executed by changing the order of processing, may include additional processing, or some processing may be omitted.

以上において、いくつかの実施形態が説明される。しかしながら、実施形態は上記の実施形態に限定されるものではなく、上述の実施形態の各種変形形態及び代替形態を包含するものとして理解されるべきである。例えば、各種実施形態は、その趣旨及び範囲を逸脱しない範囲で構成要素を変形して具体化できることが理解されよう。また、前述した実施形態に開示されている複数の構成要素を適宜組み合わせることにより、種々の実施形態が実施され得ることが理解されよう。更には、実施形態に示される全構成要素からいくつかの構成要素を削除して又は置換して、或いは実施形態に示される構成要素にいくつかの構成要素を追加して種々の実施形態が実施され得ることが当業者には理解されよう。   In the above, several embodiments are described. However, the embodiments are not limited to the above-described embodiments, and should be understood as including various modifications and alternatives of the above-described embodiments. For example, it will be understood that various embodiments can be embodied by modifying the components without departing from the spirit and scope thereof. It will be understood that various embodiments can be implemented by appropriately combining a plurality of components disclosed in the above-described embodiments. Further, various embodiments may be implemented by deleting or replacing some components from all the components shown in the embodiments, or adding some components to the components shown in the embodiments. Those skilled in the art will appreciate that this can be done.

100 メモリ管理制御装置
101 プロセッサ
102 メモリ
103 記憶装置
104 入力装置
105 表示装置
110 バス
201 スワップ領域
202 データ領域
203 管理領域
100 Memory Management Control Device 101 Processor 102 Memory 103 Storage Device 104 Input Device 105 Display Device 110 Bus 201 Swap Area 202 Data Area 203 Management Area

Claims (8)

データ領域とスワップ領域とを含むメモリと、
前記データ領域に記憶されているデータを前記スワップ領域にスワップアウトする際に、所定の条件が満たされれば前記データを前記第1の圧縮率で圧縮し、前記所定の条件が満たされなければ前記データを前記第1の圧縮率よりも圧縮率の低い第2の圧縮率で圧縮するプロセッサと、
を含む、メモリ管理制御装置。
Memory including data area and swap area;
When swapping out data stored in the data area to the swap area, the data is compressed at the first compression rate if a predetermined condition is satisfied, and if the predetermined condition is not satisfied, the data is compressed. A processor that compresses data at a second compression rate that is lower than the first compression rate;
A memory management control device.
前記第1の圧縮率での前記データの圧縮は、第1の圧縮アルゴリズムで実行され、
前記第2の圧縮率での前記データの圧縮は、前記第1の圧縮アルゴリズムよりも圧縮率の低い第2の圧縮アルゴリズムで実行されることを特徴とする、
請求項1に記載のメモリ管理制御装置。
Compression of the data at the first compression rate is performed with a first compression algorithm;
The compression of the data at the second compression rate is performed by a second compression algorithm having a compression rate lower than that of the first compression algorithm,
The memory management control device according to claim 1.
前記所定の条件は、前記プロセッサが前記メモリ管理制御装置の操作状況を示す操作情報に基づいて、前記メモリ管理制御装置が未使用中と判定することであり、
前記プロセッサは、前記メモリ管理制御装置が未使用中と判定した場合に、前記データを前記第1の圧縮率で圧縮する、
ことを特徴とする請求項1又は2に記載のメモリ管理制御装置。
The predetermined condition is that the processor determines that the memory management control device is not used based on operation information indicating an operation status of the memory management control device.
The processor compresses the data at the first compression rate when the memory management controller determines that the memory management controller is not in use.
The memory management control device according to claim 1, wherein the memory management control device is a memory management control device.
前記所定の条件は、前記プロセッサの使用率が所定の閾値よりも低いことを含み、
前記プロセッサは、前記プロセッサの使用率が所定の閾値以上である場合、前記データを前記第2の圧縮率で圧縮する、
ことを特徴とする請求項1又は2に記載のメモリ管理制御装置。
The predetermined condition includes that the usage rate of the processor is lower than a predetermined threshold;
The processor compresses the data at the second compression rate when the usage rate of the processor is equal to or greater than a predetermined threshold;
The memory management control device according to claim 1, wherein the memory management control device is a memory management control device.
前記所定の条件は、前記データに過去に実行されたスワップアウトとスワップインの履歴に基づく前記データのスワップアウトからスワップインまでの時間間隔が、所定時間よりも長いことであり、
前記プロセッサは、前記時間間隔が所定時間よりも長いと判定した場合に、前記データを前記第1の圧縮率で圧縮する、
ことを特徴とする請求項1又は2に記載のメモリ管理制御装置。
The predetermined condition is that a time interval from the swap-out of the data based on a history of swap-out and swap-in executed to the data in the past is longer than a predetermined time,
When the processor determines that the time interval is longer than a predetermined time, the processor compresses the data at the first compression rate.
The memory management control device according to claim 1, wherein the memory management control device is a memory management control device.
前記所定の条件は、前記メモリ管理制御装置の操作状況を示す操作情報と、前記プロセッサの使用率と、前記データに過去に実行されたスワップアウトとスワップインの履歴に基づく前記データのスワップアウトからスワップインまでの時間間隔とのうちの複数の情報を用いる複数の判定条件を含み、
前記プロセッサは、前記第1の圧縮率及び前記第2の圧縮率のうちから、前記複数の判定条件に基づいて決定した圧縮率を用いて前記データを圧縮する、
ことを特徴とする請求項1又は2に記載のメモリ管理制御装置。
The predetermined condition is based on the operation information indicating the operation status of the memory management control device, the usage rate of the processor, and the swap-out of the data based on the history of swap-out and swap-in executed in the past. Including a plurality of judgment conditions using a plurality of information of the time interval until the swap-in,
The processor compresses the data using a compression rate determined based on the plurality of determination conditions from the first compression rate and the second compression rate.
The memory management control device according to claim 1, wherein the memory management control device is a memory management control device.
メモリのデータ領域に記憶されているデータを、前記メモリのスワップ領域にスワップアウトする際に、所定の条件が満たされれば前記データを前記第1の圧縮率で圧縮し、前記所定の条件が満たされなければ前記データを前記第1の圧縮率よりも圧縮率の低い第2の圧縮率で圧縮する、
ことを含む、メモリ管理制御装置が実行するメモリ管理制御方法。
When data stored in the data area of the memory is swapped out to the swap area of the memory, if a predetermined condition is satisfied, the data is compressed at the first compression rate, and the predetermined condition is satisfied. Otherwise, the data is compressed at a second compression rate that is lower than the first compression rate.
A memory management control method executed by the memory management control device.
メモリのデータ領域に記憶されているデータを、前記メモリのスワップ領域にスワップアウトする際に、所定の条件が満たされれば前記データを前記第1の圧縮率で圧縮し、前記所定の条件が満たされなければ前記データを前記第1の圧縮率よりも圧縮率の低い第2の圧縮率で圧縮する、
処理を、メモリ管理制御装置に実行させるメモリ管理制御プログラム。
When data stored in the data area of the memory is swapped out to the swap area of the memory, if a predetermined condition is satisfied, the data is compressed at the first compression rate, and the predetermined condition is satisfied. Otherwise, the data is compressed at a second compression rate that is lower than the first compression rate.
A memory management control program for causing a memory management control device to execute processing.
JP2016200550A 2016-10-12 2016-10-12 Memory management control unit, memory management control method and memory management control program Pending JP2018063505A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016200550A JP2018063505A (en) 2016-10-12 2016-10-12 Memory management control unit, memory management control method and memory management control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016200550A JP2018063505A (en) 2016-10-12 2016-10-12 Memory management control unit, memory management control method and memory management control program

Publications (1)

Publication Number Publication Date
JP2018063505A true JP2018063505A (en) 2018-04-19

Family

ID=61967846

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016200550A Pending JP2018063505A (en) 2016-10-12 2016-10-12 Memory management control unit, memory management control method and memory management control program

Country Status (1)

Country Link
JP (1) JP2018063505A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110929478A (en) * 2018-09-03 2020-03-27 珠海全志科技股份有限公司 Anonymous webpage compression method, device and system
WO2021066308A1 (en) * 2019-10-02 2021-04-08 삼성전자(주) Electronic device and method for controlling same
JP2021111320A (en) * 2019-12-31 2021-08-02 北京百度網訊科技有限公司 Data output method, data acquisition method, device, and electronic apparatus
CN113885787A (en) * 2021-06-08 2022-01-04 荣耀终端有限公司 Memory management method and electronic equipment
CN114207571A (en) * 2019-10-25 2022-03-18 三星电子株式会社 Computing device and method of operating the same

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110929478A (en) * 2018-09-03 2020-03-27 珠海全志科技股份有限公司 Anonymous webpage compression method, device and system
WO2021066308A1 (en) * 2019-10-02 2021-04-08 삼성전자(주) Electronic device and method for controlling same
CN114207571A (en) * 2019-10-25 2022-03-18 三星电子株式会社 Computing device and method of operating the same
CN114207571B (en) * 2019-10-25 2024-04-05 三星电子株式会社 Computing device and method of operation thereof
JP2021111320A (en) * 2019-12-31 2021-08-02 北京百度網訊科技有限公司 Data output method, data acquisition method, device, and electronic apparatus
JP7083004B2 (en) 2019-12-31 2022-06-09 ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド Data output method, data acquisition method, equipment and electronic equipment
US11562241B2 (en) 2019-12-31 2023-01-24 Beijing Baidu Netcom Science and Technology Co., Ltd Data output method, data acquisition method, device, and electronic apparatus
CN113885787A (en) * 2021-06-08 2022-01-04 荣耀终端有限公司 Memory management method and electronic equipment
CN116243850A (en) * 2021-06-08 2023-06-09 荣耀终端有限公司 Memory management method and electronic equipment

Similar Documents

Publication Publication Date Title
JP2018063505A (en) Memory management control unit, memory management control method and memory management control program
EP3514689B1 (en) Memory management method and apparatus
JP6509895B2 (en) Resource management based on device specific or user specific resource usage profile
KR102114388B1 (en) Method and apparatus for compressing memory of electronic device
CN103870212B (en) Mobile device and its method for managing data using exchanging
US9043806B2 (en) Information processing device and task switching method
JP6069031B2 (en) Computer and memory management method
CN110187832B (en) Data operation method, device and system
WO2012159394A1 (en) Method and apparatus for managing mobile device memory
CN111338988A (en) Memory access method and device, computer equipment and storage medium
WO2017006675A1 (en) Information processing system, storage control device, storage control method, and storage control program
WO2017222739A1 (en) Selective flash memory compression/decompression using a storage usage collar
US9934100B2 (en) Method of controlling memory swap operation and data processing system using same
JP2009020555A (en) Swapping device
US9858204B2 (en) Cache device, cache system, and cache method
JP2012221217A (en) Memory management device, memory management method, and control program
JP6217008B2 (en) Electronic device, control method, and program
JP2011076497A (en) Information processing apparatus, semiconductor storage device and program
US9354812B1 (en) Dynamic memory utilization in a system on a chip
JP6541930B2 (en) Memory management system, information processing apparatus and memory management method
JP4727480B2 (en) Information processing method, information processing system, information processing apparatus, multiprocessor, information processing program, and computer-readable storage medium storing information processing program
JP5505195B2 (en) Memory control device and control method
CN109101188B (en) Data processing method and device
JP6358330B2 (en) Information processing apparatus, information processing system, memory management method, and memory management program
JP4715723B2 (en) Memory management device

Legal Events

Date Code Title Description
RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20180405

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20180409

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20180409

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20180725

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181019