WO2013108380A1 - セグメント割当管理システム及び方法 - Google Patents

セグメント割当管理システム及び方法 Download PDF

Info

Publication number
WO2013108380A1
WO2013108380A1 PCT/JP2012/050959 JP2012050959W WO2013108380A1 WO 2013108380 A1 WO2013108380 A1 WO 2013108380A1 JP 2012050959 W JP2012050959 W JP 2012050959W WO 2013108380 A1 WO2013108380 A1 WO 2013108380A1
Authority
WO
WIPO (PCT)
Prior art keywords
segment
memory
buffer
main memory
information
Prior art date
Application number
PCT/JP2012/050959
Other languages
English (en)
French (fr)
Inventor
細木 浩二
石川 誠
浩晃 中谷
岳彦 長野
淳 崎山
洋渡 加賀
敦介 新原
Original Assignee
株式会社日立製作所
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 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2012/050959 priority Critical patent/WO2013108380A1/ja
Publication of WO2013108380A1 publication Critical patent/WO2013108380A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration

Definitions

  • the present invention relates to a system and method for managing variable length segment allocation.
  • Computer equipment includes processors composed of CPU (Central Processing Unit) and cache memory, main memory composed of DRAM (Dynamic Random Access Memory), and various I / O such as hard disk, optical disk, USB memory, etc. It is configured by connecting storage devices.
  • processors composed of CPU (Central Processing Unit) and cache memory, main memory composed of DRAM (Dynamic Random Access Memory), and various I / O such as hard disk, optical disk, USB memory, etc. It is configured by connecting storage devices.
  • An I / O storage device such as a hard disk is composed of a large-capacity memory such as terabytes.
  • the main storage memory composed of DRAM or the like has a capacity from megabytes to gigabytes, and is sufficiently low compared with the capacity of the I / O storage device.
  • the cache memory installed in the processor has a capacity of kilobytes to megabytes, and is sufficiently low compared with the main memory. Due to this capacity difference, the cache memory and the main memory in the processor are used as so-called cache memories that duplicate and hold a part of the total capacity of the I / O storage device. This is because, in a certain period of time, an application running on the processor accesses a relatively small data area, that is, only a part of the entire capacity in the I / O storage device. This is because sufficient I / O performance can be obtained only by copying necessary data.
  • the cache memory in the processor is the memory closest to the CPU, it is defined as a primary cache memory or the like.
  • the main storage memory is a low-capacity memory arranged between the processor and the storage device, and therefore can be defined as a secondary cache memory.
  • the primary cache memory is composed of SRAM (Static Random Access Memory), which is sufficiently faster than the main memory composed of DRAM, etc.
  • the DRAM of the main memory is composed of a hard disk or the like. Fast enough for I / O storage devices. Therefore, in order to effectively use SRAM and DRAM used as a low-capacity primary or secondary cache memory, it is important to avoid data communication with a low-speed memory in the next layer as much as possible. Become.
  • Patent Document 1 a basic technique for exchanging data between a primary cache memory and a secondary cache memory is disclosed.
  • This data replacement is data transfer accompanied by data transfer from the primary cache to the secondary cache as well as data transfer from the secondary cache to the primary cache.
  • Various methods for this data eviction method are also disclosed.
  • the important point regarding the data eviction method is that the data with a high possibility of referring to data in the future can be prevented from degrading performance by not making it a eviction target.
  • This eviction target is defined as a victim way.
  • Patent Document 2 and Patent Document 3 it is possible to specify that one of the two cache memories in the same hierarchy is used and one of the cache memories is used by switching the software.
  • the system user places a data area that does not want to be evicted on one cache memory and controls the usage of that cache memory. It is possible to stay in.
  • the LRU (Least Recently Used) management method is a method in which the resource with the oldest reference is used as a victim way, and a frequently used resource is less frequently used as a victim way. By doing so, performance degradation is suppressed.
  • the victim way can be kept for a longer period of time by holding the selected victim way in a FIFO (First-In-First-Out) exchange list.
  • These disclosed technologies relate to data transfer related to a cache memory between a processor and a main memory.
  • the technologies related to these cache memories relate to a mounting method in which main functions such as a direct map method and a set associative cache memory are implemented by hardware.
  • the access unit and management unit between the memories have a fixed length such as a cache line. For example, when data having a fixed length of 512 bytes or the like is used as a cache line unit and data of 4096 bytes is managed, eight address space information (4096 bytes ⁇ 512 bytes) can be consumed and managed.
  • an address space table is used, and in the case of the fixed length of this example, it can be managed with a table of 8 entries.
  • a management method using a variable length line size there is a management method using a variable length line size.
  • 4096 bytes of data can be managed in one address space table by additionally managing capacity information in addition to address information.
  • a storage device such as a hard disk and a main storage memory constituted by a DRAM or the like
  • management with such a variable length size enables more efficient management with a small table capacity.
  • this management method is different from the above-described fixed-length line cache segment management method, it is defined as a variable-length segment management method.
  • variable-length segment management is highly versatile, so it can be implemented by software via the operating system and segment management. Therefore, it is a resource independent of a general cache memory mounted in hardware.
  • the CPU core mounted in the processor is composed of a plurality of CPUs and one application is executed by a plurality of CPU cores, or when a plurality of applications cooperate to perform cooperative processing, a plurality of applications are included. And are executed while synchronizing each thread.
  • Information for performing this synchronization is also arranged in the memory space on the storage device.
  • the data transfer related to such synchronization information has a feature that the data capacity is small, and when the acquisition of the synchronization information is completed, it is possible to execute a subsequent thread to be continued, so that responsiveness is required. It has the characteristic that Therefore, from these characteristics, the data reference for the synchronization processing is required not to improve the performance by improving the throughput but to improve the performance by improving the response. Further, the access frequency varies depending on the execution time of each divided thread, the access frequency is high in small thread units, and the access frequency is low in large thread units.
  • variable length segments are handled as low capacity data.
  • the access frequency is low.
  • the selection of victim ways to be evicted from the cache memory disclosed in Patent Document 2 and Patent Document 3 is realized by software. This has the problem of placing a burden on software developers and system developers. Further, in the victim way selection method using LRU disclosed in Patent Document 4 and Patent Document 5, since the access frequency of the synchronization information is low, this synchronization information is easily selected as a victim way, resulting in performance degradation. In addition, the management method using variable-length segments has a high reference frequency to other large-capacity data that requires high throughput, so that large-capacity data tends to remain in the address space table and small-capacity data such as synchronization information However, it has the feature that it is easy to be selected as a victim way.
  • An object of the present invention is to easily set a segment management method in a variable-length segment so that even data with low access frequency and small data capacity, such as synchronization information, cannot be excluded as a victim way. Is to realize.
  • a part of the I / O space is duplicated as a segment in the main memory, and the processor stores the segment, ie, main memory Means for accessing the memory, and the segment has at least an I / O address start address, capacity, main storage start address, main storage state, and reference order segment information.
  • the processor stores the segment, ie, main memory Means for accessing the memory, and the segment has at least an I / O address start address, capacity, main storage start address, main storage state, and reference order segment information.
  • There is a means for allocating variable-length segments in the main memory and when deleting a segment, if the segment to be deleted has a capacity equal to or less than the threshold, there is a buffer that temporarily holds the segment information. At this time, there is a means for holding the segment without deleting it from the main memory.
  • the CPU in the processor has means for referring to the I / O address space in the memory. If the memory reference address indicated by the memory reference instruction is the same address space as the segment held in the buffer, it is stored in the buffer. Means for storing the segment information again in the segment management table and returning the segment in the buffer to the main memory.
  • the I / O device has means for holding a part of the memory area of the low-speed storage device as a segment in the high-speed storage device, , Low-speed storage device start address, capacity, high-speed storage device start address, high-speed storage device status, reference order segment information, and this segment information is used to allocate multiple variable length segments on the low-speed storage device And when deleting a segment, if the segment to be deleted has a capacity equal to or less than a threshold, it has a buffer that temporarily holds the segment information. At this time, the segment is deleted from the high-speed storage device. This means that this segment information is stored in the segment management table.
  • the segment information stored in the buffer is And means for storing in the segment management table.
  • data is accessed with low frequency and low-capacity data, and the data is required to be responsive, and the data is allowed to stay in the main memory faster than the I / O address space for a long period of time. It is possible to improve responsiveness in a computer system having a reference to this data structure.
  • Example 1 3 is a diagram showing an internal configuration of a segment management unit 120.
  • FIG. Example 1 It is the figure which showed the segment management table 121 used for the segment management of the segment management part 120.
  • FIG. Example 1 It is explanatory drawing of the memory space information 128 which the segment management table 121 outputs.
  • Example 1 It is a flowchart for demonstrating the processing content of the determination part 127.
  • FIG. Example 1 FIG. 2 illustrates a computer system that includes a second I / O device. (Example 2) It is the figure which showed the 2nd segment management table 611 used for the segment management of the 2nd segment management part 610.
  • FIG. 1 illustrates a computer system that includes a second I / O device.
  • Example 2 (Example 3) which is explanatory drawing of the method of performing a segment management program It is explanatory drawing of the eviction and return procedure to the buffer of the data in a memory. It is a figure which shows the comparison of the data eviction according to a threshold value.
  • FIG. 1 is a diagram for explaining a computer system 1 according to the present invention.
  • the computer system 1 includes a CPU 110 that issues four arithmetic operations and a memory reference instruction, a segment management unit 120 that manages a memory space that the CPU 110 refers to using a memory reference instruction, and a cache that temporarily stores data referred to by the CPU 110
  • a processor 100 including a memory 130, a main storage memory 300 connected to the outside, and a memory control unit 140 that performs control for performing memory reference to the I / O memory space, and a main storage memory of the processor 100
  • the main memory 300 connected via the first bus 500 and the I / O connected to the processor 100 via the second bus 510 and controlling the data reference to the I / O space
  • the adapter 200 and the I / O adapter 200 include an I / O device for communicating with an I / O device.
  • O bus 520 is connected.
  • the I / O bus 520 is connected with a plurality of I / O devices 400
  • the cache memory 130 is a cache memory arranged between the CPU 110 and the main memory 300 for speeding up main memory access.
  • the memory control unit 140 accesses the main memory 300 when the memory reference address 160 indicated by the memory reference instruction issued by the CPU 110 is the main memory space, and similarly, the memory reference address 160 uses the I / O device space. In the case shown, the I / O adapter 200 is accessed.
  • the segment management unit 120 holds and manages the current state of the main memory 130.
  • the capacity of the main memory 300 is smaller than the capacity of the I / O memory space composed of a hard disk or the like.
  • the transfer speed of the main memory 300 is higher than the transfer speed of the I / O memory space, a part of the I / O memory space is mapped to the main memory 130, and the processor 100
  • the I / O space is referred to in a pseudo manner.
  • the cache memory 130 has a lower capacity and higher speed than the main memory 300, a part of the space of the main memory 300 is mapped onto the cache memory 130, and the CPU 110 refers to the cache memory 130.
  • the main memory 130 or the I / O memory space is operated at high speed.
  • the segment management unit 120 performs management by holding the mapping state, that is, which space in the I / O memory space is mapped on the cache memory 130.
  • FIG. 2 is a diagram showing an internal configuration of the segment management unit 120.
  • the segment management unit 120 temporarily stores a segment management table 121 that holds information for segment management, which will be described later, and a victim segment 132 that indicates the oldest segment space among the segment information 128 that the segment management table 121 holds.
  • the maximum capacity) 131 is input, and the determination unit 127 transmits the processing contents to the memory control unit 140.
  • the buffer 129 is configured by a buffer such as a multi-stage FIFO, and has a path for outputting segment information 133 to be described later and re-storing it in the segment management table 121.
  • the threshold 131 can be set by software and its capacity can be specified. Alternatively, it may be a minimum unit that is allocated as a segment by the operating system or file system.
  • FIG. 3 is a diagram showing the segment management table 121 used for the segment management of the segment management unit 120.
  • the segment management table 121 In the description of the segment management table 121, only the minimum necessary information is shown in order to briefly explain the basic operation of the segment management unit 120.
  • the main memory state has at least three states of VALID, DIRTY, and INVALID.
  • the segment management table 121 holds these five types of information as one entry, which is composed of a plurality of entries.
  • FIG. 4 is a diagram for explaining the segment information 128 output from the segment management table 121.
  • the first segment entry has an I / O space address of 0x100, a capacity of 0x100, a main storage head address of 0x0, a main storage state of VALID, and a reference order of 4. This indicates that data having a capacity of 0x100 from the I / O space start address 0x100 is mapped to the start address 0x0 of the main memory 300, and that VALID is not write-referenced by the CPU 110, and is in the reference order. Indicates that there is a fourth oldest reference in all segments.
  • the data of I / O space start address 0x300 to capacity 0x200 is the start address 0x100 of the main memory 300, and is not write-referenced by the CPU 110, and is the third among all the segments. Indicates that an old reference existed.
  • the third segment is defined by the main memory state DIRTY indicating that the data of the capacity 0x100 from the I / O space head address 0x600 is the write address reference from the CPU 110 at the head address 0x300 of the main memory 300. Further, since the reference order is 2, it indicates that the second oldest reference exists in all the segments.
  • the fourth segment indicates that the data of I / O space start address 0x800 to capacity 0x10 is the start address 0x500 of the main storage memory 300 and is not write-referenced by the CPU 110, and is the first of all the segments. Indicates that an old reference existed, that is, the oldest reference existed.
  • the fifth segment indicates that the main memory state is INVALID and this segment entry is invalid.
  • the segment management table 121 can indicate how a specific area of the I / O memory space is mapped to the main memory. In addition, it is possible to hold a reference order for each segment. Since the capacity of the main memory 300 is finite, the sum of the capacities of the segments in the main memory state VALID and the main memory state DIRTY held in the segment management table 121 is less than or equal to the capacity of the main memory 300. There is a need.
  • the data egress method differs depending on the threshold (the maximum capacity of the segment to be managed by the buffer 129, which is P). Comparison of data eviction according to the threshold value will be described with reference to FIG.
  • the segment information management table 121 stores segment information in the order of old segments.
  • the segment in the memory 300 is driven out to the buffer 129, (1) the segment whose size is larger than the threshold value P and the old one is excluded, that is, saved from the memory to the I / O storage device, and (2) old If the size of the segment is smaller than the threshold value P, it is saved in the buffer 129.
  • FIG. 5 is a flowchart for explaining the processing content of the determination unit 127.
  • the state where the segment management table 121 is completely filled will be described in order to show the means and effects of the present invention.
  • Steps 1200 to 1210 in FIG. 5 are existing segment eviction processing, and steps 1211 to 1215 are segment recall processing. Further, steps 1201 to 1204 relate to registration processing in the segment information management table 121, steps 1205 to 1210 relate to selection processing of eviction targets, and steps 1213 to 215 relate to new memory reference.
  • step 1200 it is determined whether the memory reference address 160 of the memory reference instruction issued by the CPU 110 exists in the main memory 300 based on the segment information defined in the segment management table 121. The process proceeds to step 1213. If there is no such process, the process proceeds to step 1201.
  • step 1201 among the segments held in the segment management table 121, the oldest segment entry is selected as the victim segment 132 to be discarded from the segment management table 121, deleted from the segment management table 121, and step 1202 Transition to.
  • step 1202 whether the memory reference address 160 indicated by the memory reference instruction issued by the CPU 110 exists in the main memory 300 is determined based on the segment information held in the buffer 160 and exists in the main memory 300. If yes, the process goes to Step 1204. If not, the process goes to Step 1203.
  • step 1204 when the memory reference address 160 exists in the buffer 129, that is, when the process proceeds to step 1204 (data already exists), the segment information 133 in the target buffer 129 is re-registered in the segment management table 121, and the step Transition to 1205.
  • step 1205 when the capacity of the victim segment 132 to be discarded from the segment management table 121 instructed in step 1201 is larger than the threshold 131, the process proceeds to step 1206, and the victim segment 132 is discarded (second And the process proceeds to Step 1209.
  • step 1207 when the capacity of the victim segment 132 is smaller than the threshold 131, the process proceeds to step 1207, and the oldest segment in the buffer 129 is set as the second victim segment to be discarded, and the process proceeds to step 1208.
  • step 1208 the victim segment 132 is held in the buffer 129, and the process proceeds to step 1209. That is, in the buffer 129, only the segment having a capacity smaller than the threshold among the segment information held in the segment management table 121 is held.
  • step 1209 when the main memory state of the second victim segment to be discarded is DIRTY (when there is a write reference), the process proceeds to step 1210, where the data of the main memory head address 124 of the second victim segment is stored. Processing to read from the main memory 300 and write data to the I / O memory space is instructed to the memory control unit 140, and the process proceeds to Step 1211.
  • step 1211 it is determined whether or not the segment registered in the segment management table 121 exists in the main memory 300. If data already exists, the process proceeds to step 1213, and if it does not exist (data is new), step 1212. Transition to.
  • the segment registered in the segment 121 exists when the segment originally existing in the buffer 129 is rearranged in step 1204. If the segment does not exist, a new segment must be generated in step 1203. Shows the case.
  • step 1212 the memory control unit 140 reads the data from the I / O memory space based on the memory reference address 160 issued by the CPU 110, that is, the newly generated segment information, and returns the data to the main memory 300. To wait for data return, that is, segment generation.
  • step 1213 when the memory reference instruction issued by the CPU 110 is a write reference, the process proceeds to step 1214, the main storage state of the segment management table is set to DIRTY, the segment having the write reference is held, and the process proceeds to step 1215. .
  • the process directly proceeds to step 1215 to request the memory control unit 140 to access the cache memory 130.
  • the cache memory 130 and the memory control unit 140 are general memory controllers that can access the I / O address space and the cache memory 130.
  • the segment management unit 120 is controlled through an operating system and memory management software. These softwares adjust the segment allocation size according to the application running on the CPU 110.
  • a segment smaller than the threshold 131 is compared with an eviction algorithm such as a cache memory called an LRU algorithm. Can be suppressed from being kicked out.
  • an eviction algorithm such as a cache memory called an LRU algorithm.
  • access frequency such as data used for synchronization of multithread processing is extremely low, and access to extremely small capacity data requires high-speed response rather than throughput.
  • data with such characteristics has a high probability of being evicted from the segment and is one of the performance degradations.
  • the main memory It can be retained on the memory 300 for a long period of time, and it is possible to suppress performance degradation factors.
  • a target to be held as a segment is a segment having a capacity smaller than the threshold 131. Since these are small in capacity, they are sufficiently small relative to the capacity of the main memory 300. Therefore, it is possible to suppress the performance deterioration due to the small capacity segment itself contaminating the main memory 300.
  • segment management between the main memory 300 and the I / O device 400 connected to the I / O address space is shown. This is because the data transfer speed of the I / O device 400 via the I / O bus 520 is slower than the speed of the main memory 300.
  • a segment management method related to an I / O device will be described.
  • FIG. 6 is a diagram showing a computer system including the second I / O device.
  • the processor 650 is the same configuration as the processor 1 shown in the first embodiment, or a normal processor that does not have segment management for the processor 1.
  • the I / O adapter 200, the main storage memory 300, the I / O bus 520, and the I / O device 400 are the same as those in the first embodiment.
  • the second I / O device 600 includes a second segment management unit 610 having the same means as the segment management unit 120 of the first embodiment, and low-speed storage instead of the I / O adapter 200 of the first embodiment.
  • a device 630 is connected, and a high-speed storage device 640 is connected instead of the main storage memory 300 of the first embodiment.
  • the low-speed storage device 630 is, for example, a magnetic storage medium in a hard disk drive
  • the high-speed storage device 640 is a high-speed storage device with respect to a low-speed storage device such as a magnetic recording medium such as a semiconductor memory such as a DRAM. .
  • the I / O device 600 Since the I / O device 600 is accessed from the processor 650 via the I / O bus 520, the I / O device 600 is a sufficiently low-speed I / O device with respect to the main memory 300. Therefore, the high-speed storage device 640 and the like are also installed in the I / O device 600 and used as a cache memory, and the speed of the low-speed storage device 630 is concealed so that the speed of the entire I / O device 600 is increased. .
  • the segment management unit 610 performs the same segment management as the variable length segment management method described in the first embodiment.
  • a second segment management table 611 equivalent to the segment management table 121 described in the first embodiment is arranged.
  • the second segment management table 611 includes a low-speed storage device start address 622 as a substitute for the I / O space start address 122, a capacity 623 indicating the segment capacity, and a high-speed storage device start address as a substitute for the main storage start address 124. 624, a high-speed storage device state 625 as a substitute for the main storage state 125, and a reference order 626. These meanings are the same as those in the first embodiment.
  • the access frequency is extremely low, and high-speed access is realized for access to extremely small capacity data.
  • Example 1 and Example 2 describe a method of configuring the segment management units 120 and 610 with hardware.
  • an embodiment using software will be described.
  • segments are managed by information such as address information and capacity information, and actual data is arranged in the main storage memory 300 and the high-speed storage device 640. Therefore, since the management information has a small capacity and an easy management method, it can be performed by software.
  • the variable length segment management of the present invention is realized through file management and memory management software under the management of the operating system.
  • the realization means is the same as the means shown in FIG. 5 of the first embodiment.
  • Such software is generally provided as an operating system or device driver software.
  • FIG. 8 is a diagram for explaining a method of executing the segment management program on the computer system 700.
  • the computer system 700 includes a display 710 and a computer housing 720.
  • the computer housing 720 includes an optical disk drive 730, a processor 760, and a hard disk 740.
  • the segment management program 750 is held as data on the hard disk 740.
  • the segment management program 750 is provided as the segment management program 780 stored in the external optical disc 770 or the segment management program 800 provided by the external provider 790 via the Internet or the like, and as data in the hard disk 740. Retained.
  • the segment management program 750 is executed via an operating system or file system operating in the computer system 700, and performs segment management in the computer system.
  • the segment management program 750 is a hard disk, 750... Segment management program, 770... Optical disc, 780... Segment management program, 790.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

 速度差の大きな記憶媒体間のセグメントキャッシュ管理にて、応答性が要求され、かつ小容量でアクセス頻度の低いデータに関し、その応答性を向上させる。低速記憶媒体の一部の領域を高速メモリ媒体にセグメントとして複製し、そのセグメント容量を可変長と指定する手段を有し、複数の可変長セグメントを高速記憶媒体上に配置する手段と、セグメント情報を保持するセグメント管理テーブルを有し、また、セグメントを削除する際に、削除対象となるセグメントが閾値以下の容量の場合、そのセグメント情報を一時的に保持するバッファを有し、高速記憶媒体からセグメントを削除せずに保持する手段を有し、本バッファが管理するセグメントに対してアクセスが発生した際、バッファ内に格納されたセグメント情報を、再び、セグメント管理テーブルに格納する手段を有する。

Description

セグメント割当管理システム及び方法
 本発明は、可変長セグメント割当を管理するシステム及び方法に関する。
 コンピュータ機器は、CPU(Central Processing Unit)やキャッシュメモリなどで構成されるプロセッサ、DRAM(Dynamic Random Access Memory)などで構成する主記憶メモリ、並びに、ハードディスク、光ディスク、USBメモリなどの様々なI/O記憶デバイスを接続することにより構成される。ハードディスクなどのI/O記憶デバイスは、テラバイトなどの大容量メモリで構成される。
 一方、DRAMなどで構成する主記憶メモリは、メガバイトからギガバイトの容量を有し、I/O記憶デバイスの容量と比較し、十分に低容量である。同様に、プロセッサ内に搭載されるキャッシュメモリは、キロバイトからメガバイトの容量であり、主記憶メモリと比較して、十分に低容量である。この容量差より、プロセッサ内のキャッシュメモリや主記憶メモリは、I/O記憶デバイス全容量の一部を複製して保持する、いわゆるキャッシュメモリとして利用される。これは、ある期間において、プロセッサ上で動作するアプリケーションは、比較的狭いデータ領域をアクセスする、すなわち、I/O記憶デバイス内の全容量の一部のみをアクセスするため、低容量のキャッシュメモリに、必要となるデータを複製するのみで、十分なI/O性能が得られるためである。
 ここで、プロセッサ内のキャッシュメモリは、CPUに最も近いメモリであるため、1次キャッシュメモリなどと定義される。また、主記憶メモリは、プロセッサと記憶デバイス間に配置される低容量メモリであるため、2次キャッシュメモリと定義することが出来る。
 一般に、1次キャッシュメモリはSRAM(Static Random Access Memory)で構成し、DRAMなどで構成する主記憶メモリに対し、十分に高速であり、同様に主記憶メモリのDRAMは、ハードディスクなどで構成されるI/O記憶デバイスに対し、十分に高速である。従って、低容量の1次、又は2次キャッシュメモリとして使用されるSRAMやDRAMを有効利用するためには、可能な限り、次階層の低速メモリとの間でデータ通信を行わないことが重要となる。
 例えば、特許文献1で開示される技術では、1次キャッシュメモリと2次キャッシュメモリ間のデータを入れ替える基本的な技術が公開されている。このデータ入替えにより、より低次階層のメモリ(ハードディスクなど)に対するアクセスのアクセス頻度を低減可能であり、性能が向上する。このデータ入替えは、2次キャッシュから1次キャッシュへのデータ転送と共に、1次キャッシュから2次キャッシュへのデータ追い出しを伴うデータ転送である。このデータの追い出し方法に関しても、様々な方式が開示されている。ここで、データの追い出し方法に関して重要な点は、将来、データ参照する可能性の高いデータに関しては、追い出し対象としないことで、性能低下を抑止できる。この追い出し対象をビクティムウエイ(victim way)と定義する。
 特許文献2や特許文献3に開示される方式では、同一階層のキャッシュメモリを2種類有し、ソフトウェアの切り替えにより、どちらか一方のキャッシュメモリを使用すると指定することが出来る。システム利用者は、データの追い出しを行いたくないデータ領域を一方のキャッシュメモリに対して配置し、そのキャッシュメモリの使用量を制御することで、結果的に、対象データを長期間、キャッシュメモリ上に滞在させることが可能となる。
 また、特許文献4に開示される技術では、LRU(Least Recently Used)管理方式により、参照が最も古いリソースをビクティムウエイとする方式であり、使用頻度の高いリソースは、ビクティムウエイとなる頻度を低くすることで、性能低下を抑止している。加えて、特許文献5に開示される技術では、選択されたビクティムウエイをFIFO(First In First Out)交換リストに保持することで、本ビクティムウエイをより長期間滞在させることが可能となる。
 これらの開示技術は、プロセッサと主記憶メモリ間のキャッシュメモリに係わるデータ転送に関する技術である。これらキャッシュメモリに係わる技術では、ダイレクトマップ方式やセットアソシアティブ方式のキャッシュメモリなど、その主たる機能をハードウェアで実装する実装方式に関する。この場合、メモリ間のアクセス単位や管理単位は、キャッシュラインなど固定長となる。例えば、512バイトなどの固定長をキャッシュライン単位とし、4096バイト長のデータを管理する場合、8個(4096バイト÷512バイト)のアドレス空間情報を消費して管理することが出来る。
 一般にアドレス空間を管理する場合、アドレス空間テーブルが用いられ、本例の固定長の場合、8エントリのテーブルにて、管理できる。これをより容易に管理する方式として、可変長ラインサイズによる管理方式がある。これは、アドレス情報に加え、容量情報を追加で管理することにより、4096バイトのデータを一つのアドレス空間テーブルで管理することが出来る。例えば、ハードディスクなどの記憶デバイスとDRAMなどで構成する主記憶メモリとの間では、このような、可変長サイズで管理したほうが、少ないテーブル容量で、より効率的な管理が可能となる。ここで、この管理方法は、上述した固定長ラインのキャッシュセグメント管理方式とは異なることから、可変長セグメントの管理方式と定義する。
 また、可変長セグメント管理は汎用性が高いため、オペレーティング・システムやセグメント管理などを経由した、ソフトウェアによる実行で実現される。従って、ハードウェア内に搭載される一般的なキャッシュメモリとは独立したリソースである。
 次に、可変長セグメントで管理するアクセスの形態について説明する。コンピュータ機器では、オペレーティング・システムの管理の下、オペレーティング・システムを含む複数のアプリケーションがマルチプロセスとして動作し、各プロセスの参照する命令列やデータ列は、ハードディスクなどの記憶デバイスの異なるメモリ領域に配置される。このようなマルチプロセスの実行形態にて性能を向上するには、各プロセスが必要とするデータをあらかじめハードディスクなどのI/O記憶デバイスから主記憶メモリにプリフェッチすることで、プロセッサが真にデータを参照する時点では、既に主記憶メモリに必要データが格納され、応答性を向上することが出来る。また、プロセス毎に必要とするデータ容量が異なるため、セグメント管理方式により、プロセス、もしくはアプリケーション毎に最適なデータ容量を主記憶メモリに配置することで、性能低下を抑止している。このように、事前のI/O記憶デバイスからのプリフェッチが可能な処理は、I/O記憶デバイスと主記憶メモリ間のスループットを向上することで、結果的に、プロセッサと主記憶メモリ間の応答性を高め、性能向上を実現する。
 一方、プロセッサ内に搭載されるCPUコアが複数のCPUで構成され、1つのアプリケーションを複数のCPUコアで実行する場合、もしくは、複数のアプリケーションが連携しながら協調処理を行う場合、各アプリケーションは複数のスレッド(処理単位)に分割され、各スレッド同士で同期を取りながら実行される。この同期を行うための情報(同期化情報)も、同様に記憶デバイス上のメモリ空間に配置される。
 このような同期化情報に関するデータ転送は、データ容量が小さいという特徴と共に、この同期化情報の取得が終了した時点で、継続すべき後発のスレッドの実行が可能となるため、応答性が要求されるという特徴を持つ。従って、これらの特徴から、同期処理向けのデータ参照は、スループット向上による性能向上ではなく、応答性向上による性能向上が求められる。また、分割された各スレッドの実行時間に依存してアクセス頻度が異なり、小さなスレッド単位ではアクセス頻度が高く、大きなスレッド単位では、アクセス頻度が低い。
特開平5-73415号公報 特開平7-98673号公報 特開2001-249846号公報 特開2002-108705号公報 特表2009-537912号公報
 このような特徴を有する同期化情報に関し、可変長セグメントで管理する場合について説明する。まず、同期化情報は低容量であるため、可変長セグメントにおいても、低容量データとして扱われる。また、大きなスレッド単位の同期においては、アクセス頻度が低い。
 特許文献2と特許文献3に開示されたキャッシュメモリからの追い出し対象であるビクティムウエイの選択は、ソフトウェア的に実現される。これは、ソフトウェア開発者やシステム開発者に負担をもたらすという課題を有する。また、特許文献4と特許文献5に開示されたLRUによるビクティムウエイの選択方式では、同期化情報のアクセス頻度が低いことから、本同期情報はビクティムウエイとして選択されやすく、性能低下をもたらす。加えて、可変長セグメントによる管理方式では、他の高スループットが要求される大容量データに対する参照頻度が高いため、大容量のデータがアドレス空間テーブルに残りやすいと共に、同期化情報などの小容量データが、ビクティムウエイとして選択されやすいという特徴を持つ。
 本発明の目的は、可変長セグメントにおけるセグメント管理方式において、同期化情報のような、アクセス頻度が低く、かつデータ容量が小さいデータであっても、ビクティムウエイとして排除されないように設定できることを容易に実現することである。
 プロセッサと、主記憶メモリとI/OデバイスなどのI/Oアドレス空間を有するコンピュータ・システムにおいて、I/O空間の一部をセグメントとして主記憶メモリに複製し、プロセッサはそのセグメント、すなわち主記憶メモリをアクセスする手段を有し、セグメントは少なくとも、I/Oアドレス先頭アドレス、容量、主記憶先頭アドレス、主記憶状態、参照順序のセグメント情報を有し、本セグメント情報を使用して、複数の可変長セグメントを主記憶メモリ上にアロケーションする手段を有し、また、セグメントを削除する際に、削除対象となるセグメントが閾値以下の容量の場合、そのセグメント情報を一時的に保持するバッファを有し、この時、主記憶メモリからセグメントを削除せずに保持する手段を有し、本セグメント情報をセグメント管理テーブルに複数エントリ分保持する手段を有する。また、プロセッサ内のCPUは、I/Oアドレス空間をメモリ参照する手段を有し、そのメモリ参照命令が示すメモリ参照アドレスがバッファ内に保持されたセグメントと同一アドレス空間の場合、バッファ内に格納されたセグメント情報を、再び、セグメント管理テーブルに格納し、バッファ内のセグメントを主記憶メモリに戻す手段を有する。
 また、第2の実施形態として、高速記憶デバイスと低速記憶デバイスを有するI/Oデバイスにおいて、低速記憶デバイスのメモリ領域の一部を高速記憶デバイスにセグメントとして保持する手段を有し、セグメントは少なくとも、低速記憶デバイス先頭アドレス、容量、高速記憶デバイス先頭アドレス、高速記憶デバイス状態、参照順序のセグメント情報を有し、本セグメント情報を使用して、複数の可変長セグメントを低速記憶デバイス上にアロケーションする手段を有し、また、セグメントを削除する際に、削除対象となるセグメントが閾値以下の容量の場合、そのセグメント情報を一時的に保持するバッファを有し、この時、高速記憶デバイスからセグメントを削除せずに保持する手段を有し、本セグメント情報をセグメント管理テーブルに複数エントリ保持する手段を有する。また、本I/Oデバイスに対し、アクセスされた場合、そのメモリ参照命令が示すメモリ参照アドレスがバッファ内に保持されたセグメントと同一アドレス空間の場合、バッファ内に格納されたセグメント情報を、再び、セグメント管理テーブルに格納する手段を有する。
 本発明のセグメント管理方式は、アクセス頻度が低く、低容量のデータであって、応答性の求められるデータ参照に関し、I/Oアドレス空間よりも高速な主記憶メモリ上にデータを長期間滞在させることが可能で、本データ構造への参照を有するコンピュータ・システムにおいて、応答性を向上できる。
本発明におけるコンピュータ・システム1の説明図である。(実施例1) セグメント管理部120の内部構成を示す図である。(実施例1) セグメント管理部120のセグメント管理に使用される、セグメント管理テーブル121を示した図である。(実施例1) セグメント管理テーブル121の出力するメモリ空間情報128の説明図である。(実施例1) 判定部127の処理内容を説明するためのフローチャートである。(実施例1) 第2のI/Oデバイスを含むコンピュータ・システムを示す図である。(実施例2) 第2のセグメント管理部610のセグメント管理に使用される、第2のセグメント管理テーブル611を示した図である。(実施例2) セグメント管理プログラムを実行する方法の説明図である(実施例3) メモリ内のデータのバッファへの追い出し及び戻し手順の説明図である。 閾値に応じたデータ追い出しの比較を示す図である。
 本発明の第1の実施形態を、図面を参照して説明する。図1は、本発明におけるコンピュータ・システム1の説明をするための図である。コンピュータ・システム1は、四則演算やメモリ参照命令を発行するCPU110と、CPU110がメモリ参照命令により参照するメモリ空間のメモリ空間管理を行うセグメント管理部120と、CPU110が参照するデータを一時保存するキャッシュメモリ130と、外部に接続された主記憶メモリ300とI/Oメモリ空間に対してメモリ参照を行うための制御を行うメモリ制御部140とから構成されるプロセッサ100と、プロセッサ100の主記憶メモリとして動作し、第一のバス500を介して接続される主記憶メモリ300と、プロセッサ100に第2のバス510を介して接続され、I/O空間へのデータ参照の制御を行うI/Oアダプタ200と、I/Oアダプタ200には、I/Oデバイスとの通信を行うためのI/Oバス520が接続される。I/Oバス520には、ハードディスクや光ディスクなどで構成する複数のI/Oデバイス400が接続される。
 キャッシュメモリ130は、CPU110と主記憶メモリ300との間に配置される、主記憶メモリアクセスの高速化のためのキャッシュメモリである。メモリ制御部140は、CPU110が発行するメモリ参照命令が示すメモリ参照アドレス160が主記憶メモリ空間の場合、主記憶メモリ300に対してアクセスし、同様にメモリ参照アドレス160がI/Oデバイス空間を示す場合、I/Oアダプタ200に対してアクセスを行う。セグメント管理ユニット120は、現在の主記憶メモリ130の状態を保持、管理する。
 一般に、主記憶メモリ300の容量は、ハードディスクなどで構成されるI/Oメモリ空間の容量に対して小さい。一方、主記憶メモリ300の転送速度は、I/Oメモリ空間の転送速度よりも高速であるため、I/Oメモリ空間の一部の空間を主記憶メモリ130に写像し、プロセッサ100は、主記憶メモリ130を参照することで、擬似的にI/O空間を参照していることとなる。同様に、キャッシュメモリ130は、主記憶メモリ300に対して低容量かつ高速であるため、主記憶メモリ300の空間の一部をキャッシュメモリ130上に写像し、CPU110はキャッシュメモリ130を参照することで、主記憶メモリ130、もしくは、I/Oメモリ空間を高速に参照しているように動作する。ここで、セグメント管理部120は、その写像状態、すなわち、I/Oメモリ空間中のどの空間がキャッシュメモリ130上に写像されているかを保持し、管理を行う。
 図2は、セグメント管理部120の内部構成を示す図である。セグメント管理部120には、後述するセグメント管理のための情報を保持するセグメント管理テーブル121と、セグメント管理テーブル121が保持するセグメント情報128のうち、最も参照の古いセグメント空間を示すビクティムセグメント132を一時的に保持するバッファ129と、CPU110が発行するメモリ参照命令のメモリ参照アドレス160と、セグメント管理テーブル121の出力するセグメント情報128と、バッファ129の出力値134、並びに閾値(管理対象とするセグメントの容量の最大値)131を入力とし、メモリ制御部140に対して、処理内容を伝達する判定部127により構成する。またバッファ129は、複数段FIFOなどのバッファで構成し、後述するセグメント情報133を出力し、セグメント管理テーブル121に再格納する経路を有する。
 なお、閾値131は、ソフトウェアにより設定可能で、その容量を指定できることが望ましい。または、オペレーティング・システムやファイルシステムがセグメントとしてアロケーションする最小単位としてもよい。
 図3は、セグメント管理部120のセグメント管理に使用される、セグメント管理テーブル121を示した図である。本セグメント管理テーブル121の説明では、セグメント管理部120の基本動作を簡潔に説明するために、必要最低限の情報のみを示す。セグメント管理テーブル121に保持する情報は、I/O空間先頭アドレス122、容量123、主記憶先頭アドレス124、主記憶状態125、参照順序126の5種である。主記憶状態は、VALID、DIRTY、INVALIDの、少なくとも3つの状態を有する。セグメント管理テーブル121には、これら5種の情報を1つのエントリとして保持し、これを複数エントリで構成する。
 図4は、セグメント管理テーブル121の出力するセグメント情報128を説明するための図である。図3に示したセグメント管理テーブル121において、第1のセグメント・エントリは、I/O空間アドレスは0x100、容量は0x100、主記憶先頭アドレスは0x0、主記憶状態はVALID、参照順序は4であり、これは、I/O空間先頭アドレス0x100から容量0x100のデータが主記憶メモリ300の先頭アドレス0x0に写像されていることを示し、VALIDは、CPU110からライト参照されていないことを示し、参照順序は全セグメントの中で4番目に古い参照が存在したことを示す。
 同様に、第2のセグメント・エントリは、I/O空間先頭アドレス0x300から容量0x200のデータが主記憶メモリ300の先頭アドレス0x100で、CPU110からライト参照されていなく、全セグメントの中で3番目に古い参照が存在したことを示す。
 また、第3のセグメントは、I/O空間先頭アドレス0x600から容量0x100のデータが主記憶メモリ300の先頭アドレス0x300で、CPU110からライト参照されたことを示す主記憶状態DIRTYで定義する。また、参照順序が2であるため、全セグメントの中で2番目に古い参照が存在したことを示す。
 また、第4のセグメントは、I/O空間先頭アドレス0x800から容量0x10のデータが主記憶メモリ300の先頭アドレス0x500で、CPU110からライト参照されていないことを示し、全セグメントの中で1番目に古い参照が存在した、すなわち、最も古い参照が存在したことを示す。
 第5のセグメントは、主記憶状態がINVALIDであり、本セグメント・エントリは無効であることを示す。
 このように、セグメント管理テーブル121により、I/Oメモリ空間の特定領域が主記憶メモリに、どのように写像されているかを示すことができる。また、セグメント単位の参照順位を保持可能である。なお、主記憶メモリ300の容量は有限であるため、セグメント管理テーブル121に保持された、主記憶状態VALIDと主記憶状態DIRTYであるセグメントの容量の総和は、主記憶メモリ300の容量以下である必要がある。
 ここで、図9を用いてメモリ内のデータのバッファへの追い出し及び戻し手順の概要を説明する。(図5の処理の概要説明)
 データの追い出しの場合:(1)メモリ300内のセグメントがビクティムウエイとして選択されると、(2)そのセグメントがメモリ300から削除されてバッファ129に追い出され、(3)セグメント情報管理テーブル121に格納されていた、そのセグメントに対応するセグメント情報もバッファ121に退避され、バッファ内では追い出されたセグメントと退避されたセグメント情報とが関連付けられて格納される。
 データをメモリに戻す場合:(1)メモリ300に対して、バッファに追い出されたセグメントに対するアクセスが要求されると、(2)バッファ129に退避され、アクセスが要求されたセグメントに対応するセグメント情報をセグメント情報管理テーブル121に戻し、(3)そのセグメント情報に格納されているアドレス情報に基づいて、バッファ内のセグメントをメモリ内に戻す。
 データ(セグメント)の追い出しの際に、閾値(バッファ129の管理対象とするセグメントの容量の最大値、Pとする)に応じてデータ追い出し方法が異なる。図10を用いて、閾値に応じたデータの追い出しの比較を説明する。
 セグメント情報管理テーブル121には、古いセグメントの順にセグメント情報が格納されている。メモリ300内のセグメントをバアッファ129に追い出す場合、(1)セグメントのサイズが閾値Pよりも大きく、かつ古いものを排除し、即ち、メモリからI/O記憶デバイスに退避し、(2)古くても、セグメントのサイズが閾値Pより小さければバッファ129へ退避する。
 その結果、閾値Pよりもサイズが小さく、かつ、新しいセグメントがバッファ129に追い出されるので、サイズが小さくても必要なデータが、メモリ内でビクティムウエイとして排除されないようにすることができる。
 図5は、判定部127の処理内容を説明するためのフローチャートである。なお、本説明では、本発明の手段と効果を示すために、セグメント管理テーブル121が完全に埋まっている状態について説明する。
 図5のステップ1200~1210は既存のセグメントの追い出し処理であり、ステップ1211~1215はセグメントの呼び戻し処理である。さらに、ステップ1201~1204はセグメント情報管理テーブル121への登録処理、ステップ1205~1210は追い出し対象の選択処理に関するものであり、ステップ1213から215は新規メモリ参照に関するものである。
 まず、ステップ1200にて、CPU110が発行したメモリ参照命令のメモリ参照アドレス160が主記憶メモリ300に存在するかを、セグメント管理テーブル121に定義されたセグメント情報を元に判断し、存在する場合はステップ1213へ遷移し、存在しない場合はステップ1201に遷移する。
 ステップ1201では、セグメント管理テーブル121に保持された各セグメントのうち、最も古いセグメント・エントリをセグメント管理テーブル121からの破棄対象であるビクティムセグメント132として選択し、セグメント管理テーブル121から削除し、ステップ1202に遷移する。
 ステップ1202では、CPU110が発行したメモリ参照命令が示すメモリ参照アドレス160が主記憶メモリ300上に存在するかを、バッファ160内で保持するセグメント情報を元に判断し、主記憶メモリ300上に存在する場合はステップ1204に遷移し、存在しない場合は、ステップ1203に遷移する。
 メモリ参照アドレス160がセグメント管理テーブル121とバッファ129両者に存在しない場合(データが新規である)、すなわちステップ1203に遷移した場合、メモリ参照アドレス160のアドレス空間を主記憶メモリ300にアロケーションするために、セグメント情報をセグメント管理テーブル121に登録し、ステップ1205に遷移する。
 一方、メモリ参照アドレス160がバッファ129に存在する場合、すなわちステップ1204に遷移した場合(データは既に存在する)、対象となるバッファ129内のセグメント情報133をセグメント管理テーブル121に再登録し、ステップ1205に遷移する。
 ステップ1205では、ステップ1201で指示された、セグメント管理テーブル121からの破棄対象であるビクティムセグメント132の容量が、閾値131よりも大きい場合はステップ1206に遷移し、ビクティムセグメント132を廃棄対象(第2のビクティムセグメント)とし、ステップ1209に遷移する。
 一方、ビクティムセグメント132の容量が、閾値131よりも小さい場合はステップ1207に遷移し、バッファ129内の最も古いセグメントを廃棄対象である第2のビクティムセグメントとして、ステップ1208に遷移する。ステップ1208では、ビクティムセグメント132をバッファ129に保持し、ステップ1209に遷移する。すなわちバッファ129には、セグメント管理テーブル121に保持されたセグメント情報の中で、閾値よりも小さな容量のセグメントのみが保持される。
 ステップ1209では、廃棄対象である第2のビクティムセグメントの主記憶状態がDIRTYの場合(ライト参照があった場合)、ステップ1210に遷移し、第2のビクティムセグメントの主記憶先頭アドレス124のデータを主記憶メモリ300から読み出し、I/Oメモリ空間にデータを書き出す処理を、メモリ制御部140に指示し、ステップ1211に遷移する。
 一方、廃棄対象である第2のビクティムセグメントの主記憶状態がDIRTYでない場合(ライト参照がなかった場合)、直ちに、ステップ1211に遷移する。ステップ1211では、セグメント管理テーブル121に登録したセグメントが主記憶メモリ300に存在するか判断し、データが既に存在する場合はステップ1213に遷移し、存在しない場合(データは新規である)はステップ1212に遷移する。なお、セグメント121に登録したセグメントが存在するとは、ステップ1204にて、もともとバッファ129に存在したセグメントを再配置した場合であり、セグメントが存在しないとは、ステップ1203にて新規にセグメント生成が必要な場合を示す。
 ステップ1212では、CPU110が発行するメモリ参照アドレス160、すなわち、新規に生成するセグメント情報を元に、I/Oメモリ空間からデータを読み出し、主記憶メモリ300にデータを返送することをメモリ制御部140に依頼し、データ返送、すなわちセグメント生成までウエイトする。ステップ1213では、CPU110が発行したメモリ参照命令がライト参照の場合は、ステップ1214に遷移し、セグメント管理テーブルの主記憶状態をDIRTYとし、書き込み参照の存在したセグメントとして保持し、ステップ1215に遷移する。
 一方、PU110が発行したメモリ参照命令がライト参照でない場合(リード参照の場合)は、直接ステッ1215に遷移し、メモリ制御部140に対して、キャッシュメモリ130にアクセスするよう依頼する。キャッシュメモリ130、メモリ制御部140は、I/Oアドレス空間とキャッシュメモリ130をアクセス可能な、一般的なメモリコントローラである。
 また、セグメント管理部120は、オペレーティング・システムやメモリ管理ソフトウェアを通して制御される。これらのソフトウェアは、CPU110上で動作するアプリケーションに従い、セグメント確保のサイズを調整する。
 本実施形態に従えば、オペレーティング・システムやメモリ管理ソフトウェアを通して、可変長のセグメントを生成できるコンピュータ・システム1において、LRUアルゴリズムと呼ばれる、キャッシュメモリなどの追い出しアルゴリズムと比較し、閾値131よりも小さなセグメントに関し、その追い出しを抑制することが出来る。特に、可変長セグメント管理方式の場合、大きなセグメントが主記憶を主体的に使用するため、他のセグメントは、主記憶メモリ130からの追い出しが発生しやすい。一方、本方式に従えば、小さなセグメントを長期間、主記憶メモリ130に保持することが出来る。
 例えば、マルチスレッド処理の同期化に使用するデータなど、アクセス頻度は極めて低く、また極めて小容量のデータに対するアクセスは、スループットではなく高速な応答性が求められる。通常のLRUアルゴリズムでは、このような特徴のデータは、セグメントから追い出される確率が高く、性能低下の一つであるが、本実施形態に従えば、低アクセス頻度の小容量データにおいても、主記憶メモリ300上に長期間保持可能であり、性能低下要因を抑止することが出来る。また、セグメントとして保持する対象は、閾値131よりも小さな容量のセグメントである。これらは小容量のため、主記憶メモリ300の容量に対して十分に小さい。従って、この小容量セグメント自身が主記憶メモリ300を汚染することによる性能劣化も抑えることができる。
 実施例1では、主記憶メモリ300とI/Oアドレス空間に接続されたI/Oデバイス400との間のセグメント管理について示している。これは、I/Oバス520を介したI/Oデバイス400のデータ転送速度が、主記憶メモリ300の速度に対して遅いために示したものである。第2の実施形態では、I/Oデバイスに関するセグメント管理方式について示す。
 図6は、第2のI/Oデバイスを含むコンピュータ・システムを示す図である。プロセッサ650は、第1の実施形態で示したプロセッサ1と同一の構成、もしくは、プロセッサ1に対し、セグメント管理を有しない通常のプロセッサである。I/Oアダプタ200、主記憶メモリ300、I/Oバス520、並びにI/Oデバイス400は、第1の実施形態と同一である。
 第2のI/Oデバイス600は、第1の実施形態のセグメント管理部120と同一手段を有する第2のセグメント管理部610と、第1の実施形態におけるI/Oアダプタ200の代わりに低速記憶デバイス630が接続され、第1の実施形態の主記憶メモリ300の代わりに高速記憶デバイス640が接続された形態である。低速記憶デバイス630は、たとえば、ハードディスク・ドライブにおける磁気記憶媒体などであり、高速記憶デバイス640は、DRAMなどの半導体メモリなど、磁気記録媒体などの低速記憶デバイスに対して、高速な記憶デバイスを示す。I/Oデバイス600は、プロセッサ650からI/Oバス520を介してアクセスされるため、主記憶メモリ300に対して、十分に低速なI/Oデバイスである。そこで、I/Oデバイス600内にも高速記憶デバイス640などを搭載してキャッシュメモリとして使用し、低速記憶デバイス630の速度を隠蔽し、I/Oデバイス600全体としての高速化を実現している。
 そこで、本実施形態も第1の実施形態で説明した可変長セグメントの管理方式と同一のセグメント管理をセグメント管理部610で実施する。
 図7に示すように、第2のセグメント管理部610には、第1の実施形態で説明したセグメント管理テーブル121と同等な、第2のセグメント管理テーブル611が配置される。
 第2のセグメント管理テーブル611は、I/O空間先頭アドレス122の代用としての低速記憶デバイス先頭アドレス622と、セグメント容量を示す容量623と、主記憶先頭アドレス124の代用としての高速記憶デバイス先頭アドレス624と、主記憶状態125の代用としての高速記憶デバイス状態625と、参照順序626で構成する。これらの意味は、第1の実施形態同一である。
 本実施形態により、I/Oデバイス600においても、アクセス頻度は極めて低く、また極めて小容量のデータに対するアクセスに対して、高速アクセスを実現する。
 実施例1、並びに実施例2では、セグメント管理部120と610に関し、ハードウェアで構成する方式を述べている。本実施形態では、ソフトウェアによる実施形態について述べる。セグメント管理は、セグメント管理テーブル121に示したとおり、アドレス情報、容量情報などの情報でセグメントを管理し、実際のデータは、主記憶メモリ300や高速記憶デバイス640に配置される。従って、その管理情報は小容量であり、管理方法も容易なため、ソフトウェアで行うことが出来る。ソフトウェアで実現する場合、オペレーティング・システムの管理の下、ファイル管理やメモリ管理ソフトウェアを介して、本発明の可変長セグメント管理を実現する。その実現手段は、実施形態1の図5で示した手段と同様である。これらのソフトウェアは、一般にオペレーティング・システムやデバイス・ドライバ・ソフトウェアとして提供される。
 図8は、コンピュータ・システム700上でセグメント管理プログラムを実行する方法について説明するための図である。
 コンピュータ・システム700は、ディスプレイ710と、コンピュータ筐体720で構成され、コンピュータ筐体720には、光ディスクドライブ730と、プロセッサ760と、ハードディスク740から構成される。セグメント管理プログラム750はハードディスク740のデータとして、保持される。本セグメント管理プログラム750は、外部の光ディスク770内に格納されたセグメント管理プログラム780、もしくは、インタネットなどを介して、外部提供者790が提供するセグメント管理プログラム800として提供され、ハードディスク740内のデータとして保持される。
 本セグメント管理プログラム750は、コンピュータ・システム700内で動作するオペレーティング・システムやファイルシステムを経由して実行され、コンピュータ・システム内のセグメント管理を実施する。
 本構成により、コンピュータ・システム全体のI/Oデータ転送性能を向上することが出来る。
1・・・コンピュータ・システム、100・・・プロセッサ、110・・・CPU、120・・・セグメント管理ユニット、121・・・セグメント管理テーブル、122・・・I/O空間先頭アドレス・フィールド、123・・・容量フィールド、124・・・主記憶先頭アドレス・フィールド、125・・・主記憶状態フィールド、126・・・参照順序フィールド、127・・・判定部、128・・・セグメント情報、129・・・バッファ、130・・・キャッシュメモリ、131・・・閾値、132・・・ビクティムセグメント、133・・・セグメント情報、140・・・メモリ制御部、160・・・メモリ参照アドレス、200・・・I/Oアダプタ、300・・・主記憶メモリ、400・・・I/Oデバイス、500・・・第一のバス、510・・・第2のバス、520・・・I/Oバス、600・・・第2のI/Oデバイス、610・・・第2のセグメント管理部、611・・・第2のセグメント管理テーブル、620・・・メモリ制御部、622・・・低速記憶デバイス先頭アドレス・フィールド、623・・・容量フィールド、624・・・高速記憶媒体先頭アドレス・フィールド、625・・・高速記憶媒体状態フィールド、126・・・参照順序フィールド、630・・・低速記憶デバイス、640・・・高速記憶デバイス、650・・・プロセッサ、700・・・コンピュータ・システム、ディスプレイ、720・・・コンピュータ筐体、730・・・光ディスクドライブ、760・・・プロセッサ760、740・・・ハードディスク740から構成される。セグメント管理プログラム750はハードディスク、750・・・セグメント管理プログラム、770・・・光ディスク、780・・・セグメント管理プログラム、790・・・外部提供者、800・・・セグメント管理プログラム

Claims (9)

  1.  プロセッサと、主記憶メモリを有し、I/Oアドレス空間を管理するコンピュータ・システムにおいて、前記プロセッサは、
     I/Oアドレス空間の一部をセグメントとして前記主記憶メモリに複製し、前記主記憶メモリ内の前記セグメントにアクセスする手段、
     前記セグメントの容量を可変長に設定する手段、
     複数の可変長セグメントを前記主記憶メモリ上に割り当てる手段、
     前記セグメントを削除する際に、削除対象となるセグメントが閾値以下の容量の場合、前記セグメントのセグメント情報を一時的に保持するバッファ、
     前記主記憶メモリから前記セグメントを削除せずに保持する手段、
     前記セグメント情報をセグメント管理テーブルに保持する手段、
     前記I/Oアドレス空間をメモリ参照する手段、
     前記メモリ参照命令が示すメモリ参照アドレスが前記バッファ内に保持されたセグメントと同一アドレス空間の場合、前記バッファ内に格納されたセグメント情報を、再び、前記セグメント管理テーブルに格納する手段を有することを特徴とするコンピュータ・システム。
  2. 請求項1に記載のコンピュータ・システムにおいて、閾値はソフトウェアにより指定されることを特徴とするコンピュータ・システム。
  3. 請求項1に記載のコンピュータ・システムにおいて、オペレーティング・システム及びメモリ管理プログラムのいずれかがセグメントとして指定可能な容量の最小容量を前記閾値として使用することを特徴とするコンピュータ・システム。
  4.  高速記憶デバイスと低速記憶デバイスを有するI/Oデバイスにおいて、
     前記低速記憶デバイスのメモリ領域の一部を前記高速記憶デバイスにセグメントとして保持する手段、
     前記セグメントの容量を可変長に設定する手段、
     複数の可変長セグメントを前記高速記憶デバイス上に割り当てる手段、
     前記セグメントを削除する際に、削除対象となるセグメントが閾値以下の容量の場合、前記セグメントのセグメント情報を一時的に保持するバッファ、
     前記高速記憶デバイスから前記セグメントを削除せずに保持する手段、
     前記セグメント情報をセグメント管理テーブルに保持する手段、
     前記I/Oデバイスが参照された場合、メモリ参照命令が示すメモリ参照アドレスが前記バッファ内に保持されたセグメントと同一アドレス空間の場合、前記バッファ内に格納された前記セグメント情報を、再び、前記セグメント管理テーブルに格納する手段を有することを特徴とするI/Oデバイス。
  5. 請求項4に記載のI/Oデバイスにおいて、閾値はソフトウェアにより指定されることを特徴とするI/Oデバイス。
  6. 請求項4に記載のI/Oデバイスにおいて、オペレーティング・システム及びメモリ管理プログラムのいずれかがセグメントとして指定可能な容量の最小容量を閾値として使用することを特徴とするI/Oデバイス。
  7.  プロセッサと、主記憶メモリを有し、I/Oアドレス空間を管理するコンピュータ・システムにおけるセグメント割当管理方法であって、前記プロセッサは、
     前記主記憶メモリからセグメントを追い出す際は、
     前記主記憶メモリ内のセグメントがビクティムウエイとして選択し、
     前記選択されたセグメントが前記主記憶メモリから削除してバッファに追い出し、
     セグメント情報管理テーブルに格納されていた、前記セグメントに対応するセグメント情報も前記バッファに退避し、
     前記セグメントを前記主記憶メモリに戻す際は、
     前記記憶メモリに対して、前記バッファに追い出された前記セグメントに対するアクセスの要求を受け取り、
     前記バッファに退避され、前記アクセスが要求された前記セグメントに対応する前記セグメント情報を前記セグメント情報管理テーブルに戻し、
     前記セグメント情報に格納されているアドレス情報に基づいて、前記バッファ内のセグメントを前記主記憶メモリ内に戻す、
     ことを特徴とするセグメント割当管理方法。
  8.  前記セグメントの追い出しの際に、前記バッファの管理対象とする前記セグメントの容量の最大値である閾値に基づいて、古いセグメントの順に前記セグメント情報が格納されている前記セグメント情報管理テーブルから、前記セグメントのサイズが前記閾値よりも大きく、かつ古い前記セグメント情報を排除して、前記主記憶メモリからI/O記憶デバイスに退避し、古くても、前記セグメントのサイズが前記閾値より小さければ前記セグメント情報を前記バッファへ退避する、ことを特徴とする請求項7記載のセグメント割当管理方法。
  9.  処理装置を用いて、請求項7記載のセグメント割当管理方法を実行するためのプログラム。
PCT/JP2012/050959 2012-01-18 2012-01-18 セグメント割当管理システム及び方法 WO2013108380A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/050959 WO2013108380A1 (ja) 2012-01-18 2012-01-18 セグメント割当管理システム及び方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/050959 WO2013108380A1 (ja) 2012-01-18 2012-01-18 セグメント割当管理システム及び方法

Publications (1)

Publication Number Publication Date
WO2013108380A1 true WO2013108380A1 (ja) 2013-07-25

Family

ID=48798828

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/050959 WO2013108380A1 (ja) 2012-01-18 2012-01-18 セグメント割当管理システム及び方法

Country Status (1)

Country Link
WO (1) WO2013108380A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH035853A (ja) * 1989-06-01 1991-01-11 Nec Software Kansai Ltd ファイルアクセス管理装置
JPH06149670A (ja) * 1992-11-11 1994-05-31 Fujitsu Ltd キャッシュメモリ制御方法,及び、変換テーブル制御方法
JP2001350669A (ja) * 2000-06-07 2001-12-21 Hitachi Ltd 先読み予測装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH035853A (ja) * 1989-06-01 1991-01-11 Nec Software Kansai Ltd ファイルアクセス管理装置
JPH06149670A (ja) * 1992-11-11 1994-05-31 Fujitsu Ltd キャッシュメモリ制御方法,及び、変換テーブル制御方法
JP2001350669A (ja) * 2000-06-07 2001-12-21 Hitachi Ltd 先読み予測装置

Similar Documents

Publication Publication Date Title
US11687446B2 (en) Namespace change propagation in non-volatile memory devices
US8892520B2 (en) Storage device including a file system manager for managing multiple storage media
KR101726824B1 (ko) 캐시 아키텍처에서 하이브리드 미디어의 효율적인 사용
US10282292B2 (en) Cluster-based migration in a multi-level memory hierarchy
JP5943096B2 (ja) 複合不揮発性記憶装置のためのデータ移行
US9489239B2 (en) Systems and methods to manage tiered cache data storage
JP6384375B2 (ja) 情報処理装置、記憶装置制御方法、記憶装置制御プログラム及び情報処理システム
JP2017138852A (ja) 情報処理装置、記憶装置およびプログラム
US9639481B2 (en) Systems and methods to manage cache data storage in working memory of computing system
JP2013105489A (ja) 階層間の効率的なデータ移行を管理する装置
JP2018163659A (ja) 逆キャッシュテーブルを用いるハードウェアベースのマップアクセラレーション
EP2784683B1 (en) Storage control program, storage control method, storage system and hierarchy control apparatus thereof
US10324760B2 (en) Leases for blocks of memory in a multi-level memory
US20170083444A1 (en) Configuring fast memory as cache for slow memory
US10042773B2 (en) Advance cache allocator
CN114281719A (zh) 用于通过地址映射来扩展命令编排的系统及方法
US8356141B2 (en) Identifying replacement memory pages from three page record lists
JP2014010604A (ja) ストレージ装置とプログラムと方法
JP6243884B2 (ja) 情報処理装置、プロセッサ、および情報処理方法
US11875152B2 (en) Methods and systems for optimizing file system usage
JP6254986B2 (ja) 情報処理装置、アクセスコントローラ、および情報処理方法
WO2013108380A1 (ja) セグメント割当管理システム及び方法
US9454488B2 (en) Systems and methods to manage cache data storage
JP4792065B2 (ja) データ記憶方法
US20220058128A1 (en) Information processing apparatus and non-transitory computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12866344

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12866344

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP