WO2011151963A1 - メモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路 - Google Patents

メモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路 Download PDF

Info

Publication number
WO2011151963A1
WO2011151963A1 PCT/JP2011/001946 JP2011001946W WO2011151963A1 WO 2011151963 A1 WO2011151963 A1 WO 2011151963A1 JP 2011001946 W JP2011001946 W JP 2011001946W WO 2011151963 A1 WO2011151963 A1 WO 2011151963A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
termination
process group
candidate
group
Prior art date
Application number
PCT/JP2011/001946
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 JP2012518215A priority Critical patent/JP5405663B2/ja
Priority to US13/387,000 priority patent/US8601232B2/en
Priority to CN201180003028.5A priority patent/CN102473136B/zh
Publication of WO2011151963A1 publication Critical patent/WO2011151963A1/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/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0284Multiple user address space allocation, e.g. using different base addresses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to a memory management device that manages memory consumed by a plurality of programs, a memory management method, a memory management program, and a computer-readable recording medium on which the memory management program is recorded in an information processing apparatus capable of operating the plurality of programs. And an integrated circuit.
  • a memory management device when there is some relationship between a memory free space and a program, a memory management device, a memory management method, a memory management program, and a memory management program that appropriately release the memory consumed by the program
  • the present invention relates to a computer-readable recording medium and an integrated circuit that record the above.
  • Patent Document 1 discloses a technique for selecting a program to be terminated based on an execution priority set in a program and a memory size consumed by the program as a conventional memory release mechanism. .
  • the operating system sets the main memory release process to an executable state when the memory capacity of the information processing system falls below a predetermined value. For example, when a new program is started as a process, the main memory release process operates when the memory capacity is insufficient.
  • the main memory release process refers to process management information managed by the OS, selects a process with a low priority from among processes deployed in the main memory, and releases the memory consumed by the selected process. As a result, it is possible to avoid a situation in which a process with a high priority cannot be newly started by executing a process with a low priority.
  • the amount of memory used by each process is stored in the process management information managed by the OS, but it is impossible to grasp where each process is using the memory.
  • a used memory area is allocated across a plurality of memory blocks, such as a plurality of memory chips or a plurality of memory banks, for an operating process.
  • the present invention has been made to solve the above problem, and provides a memory management device, a memory management method, a memory management program, and a memory management program capable of securing as much free space as possible in a specific memory block. It is an object of the present invention to provide a recorded computer-readable recording medium and an integrated circuit.
  • a memory management device is a memory management device that manages a memory including a plurality of memory blocks, and is assigned to the process used in an information processing system capable of operating a plurality of processes.
  • a process allocation memory management unit that manages the allocation size of a plurality of memory blocks in units of memory blocks for each process, a system memory management unit that manages free memory capacity of the entire plurality of memory blocks, and releases the memory
  • a plurality of processes allocated for each of the plurality of memory blocks have a large allocation size based on the allocation size managed by the process allocation memory management unit Extract in order and extract multiple processes Is selected for each of the plurality of memory blocks, and the end candidate process group selected by the end candidate process selection unit is already held by the end candidate process group.
  • a priority termination determination unit that determines whether or not to be preferentially terminated, and a selection that is selected by the termination candidate process selection unit and that should be terminated preferentially by the priority termination determination unit
  • the order of the completed end candidate processes is rearranged according to the priority, and the rearranged end candidate processes are arranged based on the free memory capacity of the entire memory blocks managed by the system memory management unit.
  • a process group end possibility determination unit that determines whether or not a group can be ended, and a process group that is an end candidate held by the process group. When the selection of the end candidate process group for all the memory blocks is completed, the retained end candidate process group is rewritten. And an end process determining unit that determines the process group to be ended.
  • the allocation size of a plurality of memory blocks allocated to a process used in an information processing system capable of operating a plurality of processes is managed for each process in units of memory blocks.
  • the free memory capacity of the entire plurality of memory blocks is managed.
  • the order of the end candidate process groups determined to be terminated preferentially is rearranged according to the priority, and the rearranged process groups are rearranged based on the memory free capacity of the entire plurality of managed memory blocks. It is determined whether or not the end candidate process group can be ended.
  • the retained termination candidate process group is rewritten to the termination candidate process group determined to be capable of termination and selection of the termination candidate process group for all the memory blocks is completed, the retained termination candidate process Is determined as a process group to be terminated.
  • an end candidate process group is selected for each of a plurality of memory blocks, it is determined whether or not the selected end candidate process group can be ended, and a process determined to be able to end Since the group is terminated, it is possible to secure as much free space as possible in a specific memory block.
  • FIG. 1 is a diagram showing a configuration of an information processing apparatus according to an embodiment of the present invention.
  • the information processing apparatus 100 can be used by a user as it is, but may be incorporated in various electric devices.
  • An example of the information processing apparatus 100 is typically a general-purpose computer such as a PC (Personal Computer; personal computer or personal computer).
  • the information processing apparatus 100 may be a PDA (Personal Digital Assistance) or a mobile communication terminal such as a mobile phone.
  • the information processing apparatus 100 may be a television, a hard disk recorder, various disk recorders that record information on a DVD or Blu-ray disc, various disk players that reproduce information from a DVD or Blu-ray disc, or a car navigation system. Good.
  • the information processing apparatus 100 includes a processor 1, a memory device 2, a communication device 34, an input device 40, a display device 45, a timer circuit 51, and an interrupt controller 55.
  • the processor 1 is typically an arithmetic processing device such as a CPU (Central Processing Unit), a media processing or graphic processing processor, or a DSP (Digital Signal Processor).
  • the processor 1, the memory device 2, the communication device 34, the input device 40, the display device 45, the timer circuit 51, and the interrupt controller 55 are connected to each other through the bus line 50.
  • the hard disk device 25 and the reading device 32 can be connected to the bus line 50 as necessary.
  • the hard disk device 25, the reading device 32, the input device 40, and the display device 45 are connected to the bus line 50 via I / F (interfaces) 26, 35, 41, and 46, respectively.
  • the processor 1 may be composed of a single processor or a plurality of processors.
  • the information processing apparatus 100 includes a plurality of processors 11, 12, 13,.
  • the memory device 2 includes a ROM (Read Only Memory) 21 and a RAM (Random Access Memory) 22.
  • the ROM 21 stores computer programs and data that define the operation of the processor 1.
  • the computer program and data can also be stored in the hard disk device 25.
  • the processor 1 executes processing defined by the computer program while writing the computer program and data stored in the ROM 21 or the hard disk device 25 to the RAM 22 as necessary.
  • the RAM 22 also functions as a medium for temporarily storing data generated as the processor 1 executes processing.
  • the ROM 21 includes a nonvolatile memory and a storage medium that can be written like a flash ROM and can retain stored contents even when the power is turned off.
  • the RAM 22 includes a volatile memory and a storage medium whose stored contents are not retained when the power is turned off.
  • the hard disk device 25 writes the computer program and data to a built-in hard disk (not shown) and reads the computer program and data from the hard disk.
  • the reading device 32 reads a computer program or data recorded on a recording medium 31 such as a CD, a DVD, or a memory card, for example.
  • the communication device 34 exchanges computer programs or data between the outside and itself through a communication line 33 such as a telephone line, a network line, wireless or infrared communication.
  • the input device 40 receives input of data and the like by user operation.
  • the input device 40 is, for example, a keyboard arranged on a PDA, an input button arranged on a mobile phone, a detachable mouse, or a detachable keyboard.
  • the display device 45 displays data, images, and the like on a screen, and outputs data and the like by voice.
  • the display device 45 is, for example, an LCD (Liquid Crystal Display), a cathode ray tube, or a speaker.
  • the timer circuit 51 outputs a timer interrupt signal at a constant cycle.
  • the interrupt controller 55 relays an interrupt request signal sent from the timer circuit 51, the input device 40, the processor 1, the communication device 34 as a network device, the hard disk device 25, the reading device 32, and the like to the processor 1. Priorities are assigned to interrupt requests from each device.
  • the interrupt controller 55 has a function of arbitrating requests according to priority when interrupts are simultaneously generated from a plurality of devices.
  • the information processing apparatus 100 is configured as a computer.
  • the computer program can be supplied through the recording medium 31 such as the ROM 21, the hard disk device 25, a flexible disk (not shown) and a CD-ROM, or can be supplied through a transmission medium such as the communication line 33.
  • a computer program recorded on a computer-readable recording medium 31 can be read out via a reading device 32 connected to the information processing device 100.
  • the RAM 22 or the hard disk device 25 can store the read computer program.
  • the processor 1 can execute processing according to the computer program by installing the ROM 21 in the information processing apparatus 100.
  • a computer program supplied through a transmission medium such as the communication line 33 is received through the communication device 34 and stored in, for example, the RAM 22 or the hard disk device 25.
  • the transmission medium is not limited to a wired transmission medium, and may be a wireless transmission medium.
  • the transmission medium includes not only a communication line but also a relay device that relays the communication line, for example, a router.
  • the substance of the memory management function is stored in the memory device 2 or the hard disk device 25, and is executed in cooperation with the processor 1, thereby realizing the memory management device 10.
  • the memory management device 10 includes at least one processor and a memory device.
  • the information processing system includes at least one processor and a memory device. The information processing system executes a plurality of processes. A predetermined area of the memory device 2 is assigned to the plurality of processes, and the information processing system executes the plurality of processes using the predetermined area.
  • FIG. 2 is a block diagram showing the configuration of the memory management device according to the embodiment of the present invention.
  • the memory management device 10 is realized by the processor 1 and the external memory operating in cooperation.
  • the external memory typically includes a recording medium 31 read by the ROM 21 or RAM 22, the hard disk device 25, or the reading device 32 included in the memory device 2 shown in FIG.
  • the memory management device 10 includes a memory allocation unit 201, a process allocation memory management unit 202, a system memory management unit 203, an end candidate process selection unit 204, a process group end availability determination unit 205, an end process determination unit 206, and a selection process end unit 207. Is provided.
  • the memory allocation unit 201 When the memory allocation unit 201 receives a memory allocation request from the information processing system, the memory allocation unit 201 allocates a free area of the memory (typically RAM 22) managed by the information processing system to the process.
  • a process or task is one way of calling a program execution unit. The process uses the memory allocated by the memory allocation unit 201 to store the execution code or data of each process.
  • the RAM 22 may be composed of a plurality of memory blocks that can individually manage power supply.
  • the RAM 22 may be a plurality of memory chips that can individually manage power supply.
  • the RAM 22 may be a single memory chip, or may be configured in a plurality of memory blocks that can individually manage power supply. That is, the plurality of memory blocks are individually supplied with power, and the power supply can be switched on / off for each memory block.
  • the memory allocation unit 201 stores information indicating which process is allocated, information indicating which memory block is allocated, and information indicating the size allocated to each memory block. Notification to the unit 202. In addition, the memory allocation unit 201 notifies the system memory management unit 203 of information indicating which memory block is allocated and information indicating the size allocated to each memory block.
  • the process allocation memory management unit 202 manages the allocation size of a plurality of memory blocks allocated to a process used in an information processing system capable of operating a plurality of processes in units of each memory block.
  • the process allocation memory management unit 202 stores, for each process, memory allocation information indicating how much size is allocated to each memory block.
  • the process allocation memory management unit 202 obtains information on the above-described memory allocation from the memory allocation unit 201 (information indicating which process is allocated, information indicating which memory block is allocated, and the size allocated to each memory block). Information), the memory allocation information of the corresponding process is updated.
  • the system memory management unit 203 manages the memory free capacity of the entire plurality of memory blocks and the memory free capacity of each of the plurality of memory blocks.
  • the system memory management unit 203 stores the memory free capacity of the entire plurality of memory blocks and the memory free capacity of the plurality of memory blocks.
  • the system memory management unit 203 acquires information related to the above-described memory allocation (information indicating which memory block is allocated and information indicating the size allocated to each memory block) from the memory allocation unit 201, the system memory management unit 203, based on the acquired information Thus, the memory free capacity of all the memory blocks and the memory free capacity of each memory block are updated.
  • the termination candidate process selection unit 204 operates when a memory release request for releasing the memory is received from the information processing system.
  • the memory release request is a request for securing a predetermined free space from the entire memory including a plurality of memory blocks, including the free memory space requested by the information processing system.
  • the termination candidate process selection unit 204 selects a termination candidate process in order to secure an available memory capacity requested from the information processing system.
  • the termination candidate process selection unit 204 selects a termination candidate process so that as many areas as possible can be released from a specific memory block among a plurality of memory blocks.
  • the termination candidate process selection unit 204 acquires information indicating how much memory block each process is currently allocated from the process allocation memory management unit 202.
  • the termination candidate process selection unit 204 When the termination candidate process selection unit 204 receives a memory release request for releasing the memory from the information processing system, the termination candidate process selection unit 204 is allocated to each of the plurality of memory blocks based on the allocation size managed by the process allocation memory management unit 202. The plurality of processes are extracted in descending order of allocation size, and the plurality of extracted processes are selected for each of a plurality of memory blocks as a process group of termination candidates.
  • the termination candidate process selection unit 204 selects a termination candidate process for each memory block and passes it to the process group termination possibility determination unit 205.
  • the termination candidate process selection unit 204 inquires of the process group termination possibility determination unit 205 whether or not the plurality of selected processes can be terminated in the current information processing system.
  • the process group termination possibility determination unit 205 receives a plurality of processes from the termination candidate process selection unit 204, receives information on the current memory free capacity from the system memory management unit 203. In addition, the process group termination possibility determination unit 205 adjusts the termination order of the processes received from the termination candidate process selection unit 204 based on the memory free capacity defined in the information processing system and the condition for termination of each process. To do.
  • the process group end possibility determination unit 205 acquires the end candidate process group selected by the end candidate process selection unit 204, acquires the memory free capacity of the entire plurality of memory blocks from the system memory management unit 203, Based on the relationship between the memory free space condition of the entire block and the process that can be terminated under the condition, the process groups that are candidates for termination are rearranged in the order of termination, and whether or not the rearranged process group can be terminated. Determine.
  • the process group termination possibility determination unit 205 notifies the termination candidate process selection unit 204 of termination result determination result information, and when there is a process that cannot be terminated, the process that cannot be terminated further includes a termination candidate process. Notify the selection unit 204.
  • the termination candidate process selection unit 204 When the termination candidate process selection unit 204 receives a notification from the process group termination possibility determination unit 205 that all the selected process groups can be terminated, the termination candidate process selection unit 204 passes the selected process group and memory allocation information to the termination process determination unit 206. . After that, the termination candidate process selection unit 204 selects termination candidate processes in the same manner for the remaining other memory blocks.
  • the termination process determination unit 206 determines that the received termination candidate process group has been received from the termination candidate process selection unit 204. Whether to end preferentially with respect to the end candidate process group for the memory block and to notify whether the end candidate process group should be the end candidate. 204.
  • the termination process determination unit 206 obtains termination process groups for all the memory blocks from the termination candidate process selection unit 204, the termination process determination unit 206 determines that the process group that finally remains as a candidate is terminated, and selects the termination process group. 207 is notified.
  • the termination process determination unit 206 determines whether the termination candidate process group selected by the termination candidate process selection unit 204 should be terminated preferentially with respect to the termination candidate process group already held. To do.
  • the termination process determination unit 206 terminates the free space of the memory block that can be secured by terminating the termination candidate process group selected by the termination candidate process selection unit 204 and the termination candidate process group already held.
  • the end candidate process group selected by the end candidate process selection unit 204 has priority over the already held end candidate process group based on the magnitude relationship with the free space of the memory block that can be secured by It is determined whether or not the process should be terminated.
  • the end process determination unit 206 also includes the number of processes of a plurality of processes constituting the end candidate process group selected by the end candidate process selection unit 204 and a plurality of processes constituting the end candidate process group already held.
  • the termination candidate process group selected by the termination candidate process selection unit 204 should be terminated preferentially with respect to the already held termination candidate process group based on the magnitude relationship with the number of processes. It is determined whether or not.
  • the process group termination possibility determination unit 205 determines the order of the process groups of the termination candidates that are selected by the termination candidate process selection unit 204 and determined to be terminated preferentially by the termination process determination unit 206. Based on the free memory capacity of the entire plurality of memory blocks managed by the system memory management unit 203, it is determined whether or not the rearranged end candidate process group can be terminated.
  • the process group termination possibility determination unit 205 rearranges a plurality of processes constituting the termination candidate process group selected by the termination candidate process selection unit 204 based on a priority level set in advance for each process. .
  • the termination process determination unit 206 rewrites the retained termination candidate process group to the termination candidate process group determined to be capable of termination by the process group termination availability determination unit 205, and terminates all memory blocks. When the selection of the candidate process group is completed, the retained termination candidate process group is determined as the process group to be terminated.
  • the selection process termination unit 207 Upon receiving the process group to be terminated from the termination process determination unit 206, the selection process termination unit 207 transmits a termination command to the corresponding process to the information processing system, and the information processing system terminates the corresponding process. Let As a result, the memory originally used by the terminated process is released, and the free memory capacity requested from the information processing system is secured.
  • the process allocation memory management unit 202 corresponds to an example of a process allocation memory management unit
  • the system memory management unit 203 corresponds to an example of a system memory management unit
  • the end candidate process selection unit 204 ends.
  • the end process determination unit 206 corresponds to an example of a candidate process selection unit
  • the end process determination unit 206 corresponds to an example of a priority end determination unit and an end process determination unit
  • the process group end availability determination unit 205 corresponds to an example of a process group end availability determination unit. .
  • FIG. 3 is a diagram showing an example of memory allocation information managed by the process allocation memory management unit according to the embodiment of the present invention.
  • FIG. 3 exemplifies memory allocation information 301, 302, and 303 for the three processes of the first process A, the second process B, and the third process C.
  • Memory allocation information 301, 302, 303 includes process identification information 311, allocation size information 312, and total size information 315.
  • the memory allocation information 301 of the first process A will be taken up and described.
  • the process allocation memory management unit 202 manages process identification information 311 for identifying which process is memory allocation information. In addition, the process allocation memory management unit 202 manages allocation size information 312, 313, and 314 representing the allocation size allocated to each of the plurality of memory blocks for each process. The process allocation memory management unit 202 manages total size information 315 that represents the total size of the memory area allocated to the process. 3 is merely an example of the management form, and the number of processes and the number of memory blocks are not limited to the numbers shown in FIG.
  • the process allocation memory management unit 202 When the process allocation memory management unit 202 receives the information on the memory allocation from the memory allocation unit 201, the process allocation memory management unit 202 updates the allocation size information and the total size information of the memory block corresponding to the memory allocation information of the corresponding process. For example, the process allocation memory management unit 202 has the memory allocation information illustrated in FIG. 3, and the memory allocation unit 201 indicates that 1 MB is allocated to the third memory block for the first process A. The case of receiving will be described.
  • the process allocation memory management unit 202 adds 1 MB to the allocation size of the allocation size information 314 corresponding to the third memory block included in the memory allocation information 301 of the corresponding first process A. Thereby, the allocation size information 314 is changed from 0 MB to 1 MB. Further, 1 MB is added to the total size of the total size information 315 included in the memory allocation information 301 of the first process A. Thereby, the total size information 315 is changed from 3 MB to 4 MB.
  • the memory allocation unit 201 may notify the memory allocation information to the process allocation memory management unit 202 and the system memory management unit 203 at the timing when the physical memory is allocated to the process, that is, when the physical memory is really consumed.
  • the process allocation memory management unit 202 determines to what memory block each process is currently allocated based on the memory allocation information illustrated in FIG. Information to be expressed is passed to the end candidate process selection unit 204.
  • FIG. 4 is a diagram showing an example of memory free capacity information managed by the system memory management unit in the embodiment of the present invention.
  • the memory free capacity information 401 includes a memory free capacity 411 of the entire plurality of memory blocks and a memory free capacity 412 of each memory block.
  • the system memory management unit 203 When the system memory management unit 203 is requested by the process group end possibility determination unit 205 for the memory free capacity of the entire plurality of memory blocks, the system memory management unit 203 sets the memory free capacity 411 of the plurality of memory blocks based on the memory free capacity information 401. It is passed to the process group end possibility determination unit 205. Further, when the end process determining unit 206 requests the free memory capacity of each memory block, the system memory management unit 203 determines the free memory capacity 412 of each memory block based on the memory free capacity information 401. To 206.
  • 5 and 6 are flowcharts showing an example of processing of the termination candidate process selection unit in the embodiment of the present invention.
  • the termination candidate process selection unit 204 receives a memory release request for releasing the memory upon completion of the process from the information processing system (step S1).
  • a memory release request for releasing the memory upon completion of the process from the information processing system (step S1).
  • the information processing system requests to release a memory area having a size of N bytes.
  • the termination candidate process selection unit 204 acquires memory allocation information from the process allocation memory management unit 202 (step S2). Accordingly, the termination candidate process selection unit 204 can acquire memory allocation information necessary for selecting a termination candidate process for each memory block.
  • the termination candidate process selection unit 204 selects a termination candidate process for each memory block and evaluates the selected process in order to release the memory area as much as possible from the specific memory block.
  • the termination candidate process selection unit 204 determines whether there is an unselected memory block among the plurality of existing memory blocks, that is, whether there is a memory block that has not selected a termination candidate process (step S3). Normally, if the termination candidate process selection unit 204 has not yet selected a process to be terminated for any memory block, an unselected memory block always exists.
  • step S3 If it is determined that there is a memory block that has not selected an end candidate process (YES in step S3), the end candidate process selection unit 204 selects one unselected memory block (step S4).
  • the termination candidate process selection unit 204 proceeds to a process of selecting a process to be terminated so that the memory area can be released as much as possible from the selected memory block.
  • the end candidate process selection unit 204 selects a process having the largest allocation size in the memory block selected in step S4 from among the unselected processes (step S5). For example, a case where the termination candidate process selection unit 204 acquires the memory allocation information shown in FIG. 3 from the process allocation memory management unit 202 and the first memory block is selected in step S4 will be described. In this case, the termination candidate process selection unit 204 selects the third process C having the largest allocation size in the first memory block among the unselected first to third processes.
  • the termination candidate process selection unit 204 adds the process selected in step S5 to the process group to be terminated for the memory block. Further, the termination candidate process selection unit 204 adds the total allocation size of the process selected in step S5 to the total total allocation size of the processes selected so far (step S6).
  • the termination candidate process selection unit 204 determines whether or not the total allocated size of each process selected so far is equal to or larger than the N bytes requested in step S1 (step S7). If it is determined that the total allocated size of each selected process is smaller than N bytes (NO in step S7), the process returns to step S5, and the termination candidate process selection unit 204 selects the next unselected process. select. If the total allocation size of each selected process does not exceed N bytes and there are no unselected processes, that is, if the memory size requested by the information processing system cannot be released, the termination candidate process selection unit The process 204 needs to interrupt the process and return an error to the information processing system. In this description, error processing is not shown in the flowcharts shown in FIGS. 5 and 6 in order to explain the main functions of the termination candidate process selection unit 204.
  • the termination candidate process selection unit 204 relates to the selected memory block and the selected process group.
  • the information is passed to the end process determination unit 206 (step S8).
  • the termination process determination unit 206 compares the process group selected for the currently selected memory block with the process group selected so far for the same memory block as the currently selected memory block, and selects the current process block. It is confirmed whether or not the process group selected for the selected memory block can be an end candidate. Note that processing in the termination process determination unit 206 will be described later.
  • the termination candidate process selection unit 204 passes information indicating which memory block has been selected and information indicating which process group has been selected to the termination process determination unit 206.
  • the termination candidate process selection unit 204 receives information indicating whether or not the passed process group is a termination candidate from the termination process determination unit 206, and based on the received information, the passed process group becomes the termination candidate. It is determined whether or not (step S9). If it is determined that the passed process group is not an end candidate (NO in step S9), the end candidate process selection unit 204 discards the process group selected for the memory block selected in step S4. The process returns to step S3.
  • the end candidate process selection unit 204 passes the process group to the process group end availability determination unit 205 in a format that indicates the selected order (step S9). Step S10).
  • the process shifts to a process of inquiring the process group end possibility determination unit 205 whether or not the selected process group can be actually ended.
  • the processing in the process group end possibility determination unit 205 will be described later.
  • the termination candidate process selection unit 204 receives information indicating whether or not the passed process group includes a process that cannot be terminated from the process group termination feasibility determination unit 205, and selects the selected process group based on the received information. It is determined whether there is any process that cannot be terminated (step S11). If it is determined that there is no process that cannot be terminated in the selected process group (NO in step S11), the termination candidate process selection unit 204 represents information indicating the selected memory block and a process group for which selection has been confirmed. The information is passed to the end process determination unit 206 together with a notification indicating that the selection has been confirmed (step S12), and the process returns to step S3.
  • the termination candidate process selection unit 204 excludes the process that cannot be terminated from the selected process group (step S11). S13), the process returns to step S3.
  • step S3 If it is determined in step S3 that all memory blocks have been processed and there is no memory block for which no termination candidate process has been selected (NO in step S3), the termination candidate process selection unit 204 determines the termination process. A process selection end notification indicating that selection of the end candidate process has ended is transmitted to the unit 206 (step S14), and the processing is completed.
  • FIG. 7 is a diagram illustrating an example of an end permission determination condition managed by the process group end permission determination unit according to the embodiment of the present invention.
  • the process group termination possibility determination unit 205 defines whether or not a certain process can be terminated by a memory free capacity and a process priority level corresponding to the memory free capacity. This is because the process to be terminated is given an importance level, and the urgency level on the system is ascertained based on the free memory capacity, and control is performed so that the process with the higher importance level can be terminated only when the urgency level is high. is there.
  • the process group termination possibility determination unit 205 can terminate the process by associating the condition 611 for the free memory capacity of the entire plurality of memory blocks and the condition 612 for the priority level of the process that can be terminated.
  • the level management information 601, process priority level values, and process level management information 602 in which processes corresponding to the priority level values are associated with each other are stored.
  • the termination possibility determination condition includes termination level management information 601 and process level management information 602. In the example of FIG. 7, the smaller the priority level value, the higher the priority, that is, the stricter the end condition.
  • the memory free space condition 611 of the ending level management information 601 can set the memory free space conditions of the entire plurality of memory blocks in stages, and the priority level condition 612 includes a memory free space condition 612. It is possible to set a priority level condition for a process that can be terminated when the capacity condition is met.
  • the memory free capacity of the current plurality of memory blocks is 3 MB (MegaByte: megabyte)
  • the memory free capacity is “4 MB.
  • the priority level of the process that can be terminated is “level 2 or higher”, which satisfies the memory free space condition 611 of “below” (item 621 in FIG. 7).
  • the processes whose priority level is level 2 or higher are the second process B, the third process C, the fourth process D, and the fifth process E. Therefore, the processes that can be terminated are the second process B, the third process C, the fourth process D, and the fifth process E, and the first process A cannot be terminated.
  • the configurations of the ending possible level management information 601 and the process level management information 602 shown in FIG. 7 are merely examples, and any information may be used as long as the ending process can be managed according to the memory free capacity of the entire plurality of memory blocks. .
  • FIGS. 8 and 9 are flowcharts showing an example of processing of the process group end availability determination unit in the embodiment of the present invention.
  • the process group termination possibility determination unit 205 receives information on the selected process group from the termination candidate process selection unit 204 (step S21).
  • the process group end possibility determination unit 205 acquires the end possibility determination condition illustrated in FIG. 7 (step S22).
  • the process group termination possibility determination unit 205 rearranges the process groups selected by the termination candidate process selection unit 204 in descending order of priority, that is, in the order of strict termination conditions (step S23). At this time, if the termination conditions of the plurality of processes are the same, the process group termination possibility determination unit 205 may hold the processes in the order of the processes acquired from the termination candidate process selection unit 204.
  • the process group end availability determination unit 205 receives ⁇ second process B, fourth process D, third process C, and first process A from the process group end availability determination unit 205. ⁇ And the process group end availability determination unit 205 determines that the process group is ⁇ first process A, third process C, second The process B and the fourth process D ⁇ are rearranged.
  • the process group termination possibility determination unit 205 acquires the current memory free capacity of the entire plurality of memory blocks from the system memory management unit 203 (step S24).
  • the process group end possibility determination unit 205 acquires memory allocation information from the process allocation memory management unit 202 (step S25). Thereafter, the process group end possibility determination unit 205 proceeds to a process of confirming whether the process groups rearranged in step S23 can be ended in order.
  • the process group termination possibility determination unit 205 determines whether or not an unselected process exists in the process group (step S26). If it is determined that there is an unselected process (YES in step S26), the process group end possibility determination unit 205 selects the first process among the unselected processes from the process group (step S27). Next, the process group termination possibility determination unit 205 can terminate the selected process based on the memory free capacity of the entire plurality of memory blocks acquired in step S24 and the termination permission determination condition acquired in step S22. Whether or not (step S28).
  • step S28 If it is determined that the selected process can be terminated (YES in step S28), the process group termination possibility determination unit 205 adds the memory allocation size of the selected process to the value of the currently available memory capacity. Then update (step S29). As described above, the process group termination possibility determination unit 205 stores the memory free space that changes when the selected process is terminated. The memory allocation size of the selected process may be acquired from the memory allocation information for each process acquired in step S25. Thereafter, in order to determine whether or not the remaining processes in the process group can be terminated, the process returns to step S26 and the process is continued.
  • step S28 if it is determined that the selected process cannot be terminated (NO in step S28), the process group termination possibility determination unit 205 stores that the selected process cannot be terminated (step S30). Thereafter, in order to determine whether or not the remaining processes in the process group can be terminated, the process returns to step S26 and the process is continued.
  • step S26 If it is determined in step S26 that there is no unselected process by determining whether or not all processes in the process group acquired in step S21 can be terminated (NO in step S26), The process group termination possibility determination unit 205 determines whether there is a process that cannot be terminated in the process group (step S31).
  • step S31 If it is determined that there is no process that cannot be terminated (NO in step S31), the process group termination possibility determination unit 205 notifies the termination candidate process selection unit 204 that there is no process that cannot be terminated (step S31). Step S32). On the other hand, if it is determined that there is a process that cannot be terminated (YES in step S31), the process group termination possibility determination unit 205 determines that there is information indicating the process that cannot be terminated and that there is a process that cannot be terminated. The process selection unit 204 is notified (step S32).
  • the process group termination possibility determination unit 205 can avoid selecting a process having a higher priority as a termination candidate from the process group selected by the termination candidate process selection unit 204.
  • the end permission determination condition illustrated in FIG. 7 is acquired in step S22, the free memory capacity acquired in step S24 is 0.5 MB, and the process group acquired from the end candidate process selection unit 204 is ⁇ second Process B, third process C, and first process A ⁇ .
  • the process group acquired from the end candidate process selection unit 204 is ⁇ second Process B, third process C, and first process A ⁇ .
  • the total size of the memory areas allocated to the second process B is 6 MB (memory allocation information 302 in FIG. 3).
  • the memory free capacity of the entire plurality of memory blocks is 6.5 MB.
  • the third process C that is 2 and the first process A that has priority level 1 cannot be terminated.
  • the process group end possibility determination unit 205 ends in the order of ⁇ second process B, third process C, and first process A ⁇ based on the end possibility determination condition illustrated in FIG. 7 in step S23.
  • the process groups to be processed are rearranged in the order of ⁇ first process A, third process C, and second process B ⁇ .
  • the current memory free space is 0.5 MB, only the process of level 1 or higher can be terminated based on the termination possibility determination condition of FIG. 7, and the first process A can be terminated in step S28. Can be determined.
  • the memory free capacity of the entire memory blocks becomes 3.5 MB in step S29. . Since the memory free capacity of all the memory blocks is 3.5 MB, the process of level 2 or higher can be ended based on the condition for determining whether to end in FIG. 7, and the third process C to be selected next is ended. It can be determined that it is possible.
  • the memory free capacity of the entire plurality of memory blocks is 7.5 MB in step S29. Become. Since the memory free capacity of all the plurality of memory blocks is 7.5 MB, the process of level 3 or higher can be terminated based on the termination determination condition in FIG. 7, and the second process B to be selected next is terminated. It can be determined that it is possible.
  • 10 and 11 are flowcharts showing an example of processing of the end process determination unit in the embodiment of the present invention.
  • the termination process determination unit 206 receives information representing the selected memory block and information representing the selected process group from the termination candidate process selection unit 204 (step S31).
  • the termination process determination unit 206 selects information indicating the selected memory block, information indicating the selected process group, and selection. Is received from the end candidate process selection unit 204.
  • the termination process determination unit 206 determines whether or not the received process group is a process group that has been selected and confirmed (step S42). If it is determined that the received process group is a process group that has been selected and confirmed (YES in step S42), the termination process determination unit 206 sets the memory block and process group received from the termination candidate process selection unit 204 as termination candidates. Hold (step S43).
  • step S42 determines whether or not the received process group is not the process group that has been selected and confirmed. Judgment is made (step S44). If it is determined that the memory block and the end candidate process group are not held (NO in step S44), the end process determination unit 206 selects the end candidate process because there is no process group to be compared. The memory block and process group received from the unit 204 are held as end candidates (step S43).
  • the end process determination unit 206 determines the number of processes in the process group received from the end candidate process selection unit 204. Is less than or equal to the number of processes in the retained process group (step S45). When it is determined that the number of processes in the process group received from the termination candidate process selection unit 204 is not less than the number of processes in the retained process group, that is, the number of processes in the received process group is the retained process group. If it is determined that the number of processes is greater than the number of processes (NO in step S45), the termination process determination unit 206 notifies the termination candidate process selection unit 204 that the received process group is not a termination candidate (step S46).
  • the termination process determination unit 206 determines that the number of processes in the process group received from the termination candidate process selection unit 204 is equal to or less than the number of processes in the retained process group (YES in step S45).
  • the termination process determination unit 206 The free capacity of each memory block is acquired from the memory management unit 203 (step S47).
  • the termination process determination unit 206 acquires memory allocation information of each process from the process allocation memory management unit 202 (step S48).
  • the termination process determination unit 206 calculates the free space of the corresponding memory block that can be secured when the process group received from the termination candidate process selection unit 204 is terminated based on the information acquired in steps S47 and S48 ( Step S49).
  • the termination process determination unit 206 determines each process group received from the termination candidate process selection unit 204 for the memory block received from the termination candidate process selection unit 204 based on the memory allocation information acquired in step S48. Calculate the process allocation size. Further, the termination process determination unit 206 calculates the free space of the memory block received from the termination candidate process selection unit 204 based on the free memory capacity of each memory block acquired in step S47. The termination process determination unit 206 sums the memory free capacity of the memory block received from the termination candidate process selection unit 204 and the allocation size of each process group received from the termination candidate process selection unit 204 to the memory block of each process. Thus, the free capacity of the corresponding memory block that can be secured when the process group received from the termination candidate process selection unit 204 is terminated can be calculated.
  • step S41 of FIG. 10 the memory block received from the end candidate process selection unit 204 is the second memory block, and the process group received from the end candidate process selection unit 204 is the first process A and the first process block. 3 process C.
  • the first process A is allocated 3 MB and the third process C is allocated 1 MB to the second memory block.
  • the free memory capacity of the second memory block is 1 MB. Therefore, the free capacity of the corresponding memory block (second memory block) that can be secured when the process group (first process A and third process C) received from the termination candidate process selection unit 204 is terminated is 5 MB in total. It becomes.
  • the termination process determination unit 206 calculates the free space of the corresponding memory block that can be secured when the process group currently held as the termination candidate is terminated (step S50).
  • the procedure for calculating the free space is the same as the procedure performed in step S49.
  • the corresponding memory block handled in step S50 is a memory block received from the end candidate process selection unit 204 when a process group held as a current end candidate has been received, and the memory handled in step S49. Different from block.
  • FIG. 3 For example, assume that the retained memory block is the first memory block, and the retained process group is the third process C and the second process B.
  • the first process block is allocated 3 MB for the third process C and 1 MB for the second process B.
  • the memory free space of the first memory block is 2 MB. Therefore, the free capacity of the corresponding memory block (first memory block) that can be secured when the process group (third process C and second process B) currently held as a termination candidate is terminated is a total of 6 MB. Become.
  • the termination process determination unit 206 has a free space that can be secured when the process group received from the termination candidate process selection unit 204 is terminated, and a free space that can be secured when the retained termination candidate process group is terminated. It is determined whether it is larger (step S51).
  • the free space of the second memory block becomes 5 MB
  • the first memory block becomes 6MB. Therefore, the free capacity that can be secured when the retained process group is terminated becomes larger than the free capacity that can be secured when the received process group is terminated.
  • step S51 NO, the termination process determination unit 206 notifies the termination candidate process selection unit 204 that the received process group is not a termination candidate (step S46).
  • step S51 when it is determined that the free capacity that can be secured when the process group received from the termination candidate process selection unit 204 is terminated is larger than the free capacity that can be secured when the retained termination candidate process group is terminated ( In step S51, YES, the termination process determination unit 206 notifies the termination candidate process selection unit 204 that the received process group is a termination candidate (step S52).
  • the termination process determination unit 206 can hold a specific memory block that can be released as large as possible among the plurality of memory blocks received from the termination candidate process selection unit 204. Further, the termination process determination unit 206 can hold a group of termination candidate processes for releasing a specific memory block as much as possible.
  • FIG. 12 is a flowchart illustrating an example of processing of the end process determination unit when a process selection end notification is received from the end candidate process selection unit.
  • the termination process determination unit 206 receives a process selection termination notification indicating that the selection of termination candidate processes is terminated from the termination candidate process selection unit 204 (step S61). Next, the termination process determination unit 206 determines the currently held process group as a termination target process group (step S62). Next, the termination process determination unit 206 passes the determined process group to be terminated to the selection process termination unit 207 (step S63).
  • the selected process end unit 207 When the selection process end unit 207 receives the process group to be ended from the end process determination unit 206, the selected process end unit 207 secures the memory blocks used by each process and each process by a predetermined procedure determined by the information processing system. Release various resources and terminate each process to be terminated.
  • the end process determination unit 206 deletes the currently held memory block and process group (step S64), and ends the process.
  • the memory management device can create as much free space as possible in a specific memory block. Therefore, data can be saved to cut off power supply to a specific memory block. Cost is reduced and it is easier to shift to a power saving state.
  • a continuous free area in a specific memory block can be used in a codec that compresses or decompresses image data.
  • each functional block of the memory management device shown in FIG. 2 is typically realized as a program processed in cooperation with a processor and an external memory, but may be realized by an LSI which is an integrated circuit.
  • LSI which is an integrated circuit.
  • Each of these functional blocks may be individually made into one chip, or may be made into one chip so as to include a part or all of them.
  • LSI it may be referred to as IC, system LSI, super LSI, or ultra LSI depending on the degree of integration.
  • the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor.
  • An FPGA Field Programmable Gate Array
  • a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
  • the memory management device can be applied to any electronic device, information device, AV (Audio Visual) device, communication device, and home appliance as long as the information processing device includes a processor and a memory device.
  • the information processing device includes a processor and a memory device.
  • PCs personal computers
  • personal digital assistants cell phones, smartphones, PDAs (Personal Digital Assistants, etc.
  • TVs hard disk recorders
  • various disc recorders using DVDs Blu-ray discs, DVDs, Blu-ray discs, etc.
  • DVDs Blu-ray discs
  • Blu-ray discs etc.
  • It can also be applied to various disc players using car and car navigation systems.
  • a memory management device is a memory management device that manages a memory including a plurality of memory blocks, and is assigned to the process used in an information processing system capable of operating a plurality of processes.
  • a process allocation memory management unit that manages the allocation size of a plurality of memory blocks in units of memory blocks for each process, a system memory management unit that manages free memory capacity of the entire plurality of memory blocks, and releases the memory
  • a plurality of processes allocated for each of the plurality of memory blocks have a large allocation size based on the allocation size managed by the process allocation memory management unit Extract in order and extract multiple processes Is selected for each of the plurality of memory blocks, and the end candidate process group selected by the end candidate process selection unit is already held by the end candidate process group.
  • a priority termination determination unit that determines whether or not to be preferentially terminated, and a selection that is selected by the termination candidate process selection unit and that should be terminated preferentially by the priority termination determination unit
  • the order of the completed end candidate processes is rearranged according to the priority, and the rearranged end candidate processes are arranged based on the free memory capacity of the entire memory blocks managed by the system memory management unit.
  • a process group end possibility determination unit that determines whether or not a group can be ended, and a process group that is an end candidate held by the process group. When the selection of the end candidate process group for all the memory blocks is completed, the retained end candidate process group is rewritten. And an end process determining unit that determines the process group to be ended.
  • a memory management method is a memory management method for managing a memory including a plurality of memory blocks, and is assigned to the process used in an information processing system capable of operating a plurality of processes.
  • a process allocation memory management step for managing the allocation size of a plurality of memory blocks for each process in units of memory blocks, a system memory management step for managing the free memory capacity of the entire plurality of memory blocks, and releasing the memory
  • a memory release request for receiving is received from the information processing system, a plurality of processes allocated for each of the plurality of memory blocks are allocated based on the allocation size managed in the process allocation memory management step.
  • An end candidate process selection step for selecting a plurality of issued processes as an end candidate process group for each of the plurality of memory blocks, and an end candidate process group selected in the end candidate process selection step are already held.
  • a priority end determination step for determining whether or not to end preferentially for a process group of end candidates, and a selection in the end candidate process selection step, and a preferential end in the priority end determination step. The order of the process groups of the end candidates determined to be rearranged according to the priority, and the rearrangement is performed based on the memory free capacity of the entire plurality of memory blocks managed in the system memory management step.
  • Process group that determines whether or not a process group that is a candidate for termination can be terminated
  • an end process determination step of determining the process group to be held as a process group to be ended is included.
  • a memory management program is a memory management program for managing a memory including a plurality of memory blocks, and is allocated to the process used in an information processing system capable of operating a plurality of processes.
  • the process allocation memory management unit that manages the allocation size of a plurality of memory blocks in units of memory blocks for each process, the system memory management unit that manages the free memory capacity of the entire memory blocks, and the memory is released
  • a memory release request for receiving is received from the information processing system, a plurality of processes allocated for each of the plurality of memory blocks are allocated based on the allocation size managed by the process allocation memory management unit.
  • Extract in descending order extract An end candidate process selection unit that selects a plurality of processes as an end candidate process group for each of the plurality of memory blocks, and an end candidate that is already held by the end candidate process group selected by the end candidate process selection unit
  • a priority termination determination unit that determines whether or not the process group should be terminated preferentially and the termination candidate process selection unit, and should be terminated preferentially by the priority termination determination unit.
  • the order of the process groups of the end candidates determined to be rearranged according to the priority, and the rearranged end based on the memory free capacity of the entire plurality of memory blocks managed by the system memory management unit Process group termination possibility determination unit that determines whether or not a candidate process group can be terminated, and a retained termination candidate process To the end candidate process group determined to be ending by the process group end possibility determination unit, and when selection of the end candidate process group for all the memory blocks is completed,
  • the computer is caused to function as an end process determination unit that determines a process group as a process group to be ended.
  • a computer-readable recording medium recording a memory management program is a computer-readable recording medium recording a memory management program for managing a memory including a plurality of memory blocks.
  • a process allocation memory management unit for managing an allocation size of a plurality of memory blocks allocated to the process used in an information processing system capable of operating a process in units of memory blocks for each process; and the plurality of memory blocks When receiving a memory release request for releasing the memory from the information processing system, based on the allocation size managed by the process allocation memory manager, The plurality of memories; A plurality of processes allocated for each lock are extracted in descending order of allocation size, and the plurality of extracted processes are selected as a candidate process group for each of the plurality of memory blocks, and the termination candidate A priority termination determination unit that determines whether or not the termination candidate process group selected by the process selection unit should be terminated with respect to the termination candidate process group that is already held; and the termination candidate The order of the process groups of the end candidates selected by the process selection unit and determined to be preferentially ended by the priority
  • An integrated circuit is an integrated circuit that manages a memory including a plurality of memory blocks, and is a plurality of processes assigned to the process used in an information processing system capable of operating a plurality of processes.
  • a process allocation memory management circuit for managing a memory block allocation size for each process in units of memory blocks, a system memory management circuit for managing a memory free capacity of the entire plurality of memory blocks, and for releasing the memory
  • a plurality of processes assigned to the plurality of memory blocks are assigned in descending order of the assigned size based on the assigned size managed by the process assigned memory management circuit.
  • An end candidate process selection circuit that selects each of the plurality of memory blocks as an end candidate process group, and an end candidate process group selected by the end candidate process selection circuit is an end candidate process group that is already held.
  • the priority end determination circuit that determines whether or not to end preferentially and the end candidate process selection circuit, and the priority end determination circuit determines that it should be preferentially ended.
  • the order of the end candidate process group is rearranged according to the priority, and the rearranged end candidate process group is based on the free memory capacity of the entire memory blocks managed by the system memory management circuit.
  • a process group end possibility determination circuit for determining whether or not the process can be terminated, and a process group of termination candidates held by the process group
  • the process group termination possibility determination circuit rewrites the process group as the termination candidate process determined to be terminated, and when selection of the termination candidate process group for all the memory blocks is completed, the retained termination candidate process group
  • an end process determining circuit for determining as a process group to be ended.
  • the allocation size of a plurality of memory blocks allocated to a process used in an information processing system capable of operating a plurality of processes is managed for each process in units of memory blocks.
  • the free memory capacity of the entire plurality of memory blocks is managed.
  • the order of the end candidate process groups determined to be terminated preferentially is rearranged according to the priority, and the rearranged process groups are rearranged based on the memory free capacity of the entire plurality of managed memory blocks. It is determined whether or not the end candidate process group can be ended.
  • the retained termination candidate process group is rewritten to the termination candidate process group determined to be capable of termination and selection of the termination candidate process group for all the memory blocks is completed, the retained termination candidate process Is determined as a process group to be terminated.
  • an end candidate process group is selected for each of a plurality of memory blocks, it is determined whether or not the selected end candidate process group can be ended, and the process group determined to be endable is ended. Therefore, it is possible to secure as much free space as possible in a specific memory block.
  • the priority termination determination unit has already retained a free space of a memory block that can be secured by terminating the termination candidate process group selected by the termination candidate process selection unit.
  • the termination candidate process group selected by the termination candidate process selection unit based on the size relationship with the free capacity of the memory block that can be secured by ending the termination candidate process group is already held by the termination candidate process group It is preferable to determine whether or not the candidate process group should be terminated preferentially.
  • the free space of the memory block that can be secured by ending the selected end candidate process group and the free space of the memory block that can be secured by ending the already held end candidate process group It is determined whether or not the selected end candidate process group should be preferentially ended with respect to the already held end candidate process group.
  • the size relationship between the free space of the memory block that can be secured by terminating the selected termination candidate process group and the free space of the memory block that can be secured by terminating the already held termination candidate process group It is possible to determine which of the selected end candidate process group and the already held end candidate process group is to be preferentially ended.
  • the priority termination determination unit includes the number of processes of a plurality of processes constituting the termination candidate process group selected by the termination candidate process selection unit, and termination candidates already held.
  • the end candidate process group selected by the end candidate process selection unit based on the magnitude relationship with the number of processes of a plurality of processes constituting the process group is compared with the end candidate process group already held. It is preferable to determine whether or not to end preferentially.
  • the process group termination possibility determination unit configures a process group of termination candidates selected by the termination candidate process selection unit based on a priority level preset for each process. It is preferable to rearrange a plurality of processes.
  • the order of the end candidate process group is given priority. Can be sorted according to the degree.
  • the plurality of memory blocks are individually supplied with power.
  • the memory management device, the memory management method, the memory management program, the computer-readable recording medium on which the memory management program is recorded, and the integrated circuit according to the present invention can secure as much free space as possible for a specific memory block.
  • the present invention is useful as a memory management device that manages a memory including a plurality of memory blocks, a memory management method, a memory management program, a computer-readable recording medium that records the memory management program, and an integrated circuit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)

Abstract

 特定のメモリブロックの空き容量を可能な限り多く確保する。終了候補プロセス選択部(204)は、複数のプロセスを終了候補のプロセス群として複数のメモリブロックごとに選択し、終了プロセス決定部(206)は、選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定し、プロセス群終了可否判定部(205)は、終了すべきであると判定された終了候補のプロセス群が終了可能であるか否かを判定し、終了プロセス決定部(206)は、保持している終了候補のプロセス群を、終了可能であると判定された終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する。

Description

メモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路
 本発明は、複数のプログラムが動作可能な情報処理装置において、複数のプログラムが消費するメモリを管理するメモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路に関するものである。特に、情報処理装置おいて、メモリの空き容量とプログラムとに何らかの関係付けがある場合に、プログラムが消費するメモリの解放を適切に行うメモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路に関するものである。
 従来、複数のプログラムが動作可能な情報処理システム、すなわちマルチタスク又はマルチプロセスで動作可能な情報処理システムにおいて、動作するプログラムを終了させることによりプログラムが消費していたメモリを解放し、情報処理システムが備えるメモリの空き容量を確保する技術があった。
 例えば、特許文献1には、従来のメモリ解放の仕組みとして、プログラムに設定されている実行優先度やそのプログラムが消費しているメモリサイズに基づき、終了させるプログラムを選択する技術が開示されている。
 具体的には、オペレーティングシステム(OS)は、情報処理システムのメモリの空き容量が所定の値以下になると、メインメモリ解放プロセスを実行可能状態にする。例えば、新規にプログラムをプロセスとして起動しようとした際に、メモリの空き容量が不足するような場合に、メインメモリ解放プロセスが動作する。
 メインメモリ解放プロセスは、OSが管理するプロセス管理情報を参照し、メインメモリに展開されているプロセスの中から優先度が低いプロセスを選択し、選択したプロセスが消費していたメモリを解放させる。これにより、優先度の低いプロセスが実行されていることにより、優先度の高いプロセスが新規に起動できないという事態を回避できる。
 しかしながら、従来の構成では、OSが管理するプロセス管理情報に各プロセスの使用メモリ量は記憶されているが、各プロセスがメモリ内のどこを使用しているかは把握できない。電力供給をブロック単位で別々に管理できるメモリがある。このようなメモリは、例えば、メモリのチップごとに、あるいはメモリ内部のバンクごとに電力を供給することが可能である。一般に、動的なメモリ割り当てを行う情報処理システムでは、動作するプロセスに対して、複数のメモリチップ又は複数のメモリバンクなどの複数のメモリブロックにまたがって使用メモリ領域を割り当てる。従来の構成では、各プロセスがメモリ内のどこを使用しているかを把握できない。そのため、選択したプロセスを終了させた場合に、メモリ内の各領域がどの程度解放されるかを把握できない。
 従来技術では、新規にプロセスを起動する際にメモリが不足した場合、優先度の低いプロセスに割り当てられているメモリを解放し、すぐに解放したメモリが利用されることを想定している。そのため、プロセスがどのメモリブロックを使用しているかについては知る必要がなかった。
 しかしながら、情報処理装置の省電力モードを実現するために、複数のメモリチップ又は複数のメモリバンクなどの複数のメモリブロックのうちいくつかのメモリブロックへの電力供給を切りたい場合がある。メモリブロックへの電力供給を切る場合、そのメモリブロック上のデータは消去されるため、適切な手順でそのデータを待避させる必要がある。
 また、画像データを圧縮又は伸張するコーデックなどでは、メモリ内の連続した領域を使用することが望まれる。しかしながら、上記のように、1つのプロセスに対して複数のメモリブロックの領域が割り当てられている場合、当該プロセスを終了させたとしても、各メモリブロック内の領域がそれぞれ解放されることになり、連続した領域を確保することが困難となる。
 また、近年の情報処理装置において、各プロセスとメモリの空き容量とを関連付け、メモリの空き容量に応じて終了させることが可能なプロセスを規定している場合がある。従来の構成では、情報処理システムのメモリの消費状況を把握することができない。そのため、終了させるために選択したプロセスが現在の情報処理システムのメモリの消費状況により本当に終了させることが可能かどうかを判断することができない。
特開2000-215099号公報
 本発明は、上記の問題を解決するためになされたもので、特定のメモリブロックの空き容量を可能な限り多く確保することができるメモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路を提供することを目的とするものである。
 本発明の一局面に係るメモリ管理装置は、複数のメモリブロックを含むメモリを管理するメモリ管理装置であって、複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理部と、前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理部と、前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理部によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択部と、前記終了候補プロセス選択部によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定部と、前記終了候補プロセス選択部によって選択され、かつ前記優先終了判定部によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理部によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定部と、保持している終了候補のプロセス群を、前記プロセス群終了可否判定部によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定部とを備える。
 この構成によれば、複数のプロセスを動作可能な情報処理システムで使用されるプロセスに割り当てられている複数のメモリブロックの割り当てサイズが、プロセスごとにメモリブロック単位で管理される。また、複数のメモリブロック全体のメモリ空き容量が管理される。メモリを解放するためのメモリ解放要求を情報処理システムから受け取ると、管理されている割り当てサイズに基づき、複数のメモリブロックごとに割り当てられている複数のプロセスが割り当てサイズが大きい順に抽出され、抽出された複数のプロセスが終了候補のプロセス群として複数のメモリブロックごとに選択される。次に、選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かが判定される。優先的に終了すべきであると判定された終了候補のプロセス群の順序が優先度に応じて並べ替えられ、管理されている複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えられた終了候補のプロセス群が終了可能であるか否かが判定される。保持している終了候補のプロセス群が、終了可能であると判定された終了候補のプロセス群に書き換えられ、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群が終了すべきプロセス群として決定される。
 本発明によれば、複数のメモリブロックごとに終了候補のプロセス群が選択され、選択された終了候補のプロセス群が終了可能であるか否かが判定され、終了可能であると判定されたプロセス群が終了されるので、特定のメモリブロックの空き容量を可能な限り多く確保することができる。
本発明の実施の形態における情報処理装置の構成を示す図である。 本発明の実施の形態におけるメモリ管理装置の構成を示すブロック図である。 本発明の実施の形態におけるプロセス割り当てメモリ管理部が管理するメモリ割り当て情報の一例を示す図である。 本発明の実施の形態におけるシステムメモリ管理部が管理するメモリ空き容量情報の一例を示す図である。 本発明の実施の形態における終了候補プロセス選択部の処理の一例を示す第1のフローチャートである。 本発明の実施の形態における終了候補プロセス選択部の処理の一例を示す第2のフローチャートである。 本発明の実施の形態におけるプロセス群終了可否判定部が管理する終了可否判定条件の一例を示す図である。 本発明の実施の形態におけるプロセス群終了可否判定部の処理の一例を示す第1のフローチャートである。 本発明の実施の形態におけるプロセス群終了可否判定部の処理の一例を示す第2のフローチャートである。 本発明の実施の形態における終了プロセス決定部の処理の一例を示す第1のフローチャートである。 本発明の実施の形態における終了プロセス決定部の処理の一例を示す第2のフローチャートである。 終了候補プロセス選択部からプロセス選択終了通知を受け取った場合の終了プロセス決定部の処理の一例を示すフローチャートである。
 以下、本発明の実施の形態について、図面を参照しながら説明する。尚、以下の実施の形態は、本発明を具体化した一例であって、本発明の技術的範囲を限定する性格のものではない。
 図1は、本発明の実施の形態における情報処理装置の構成を示す図である。この情報処理装置100は、それ自体としてユーザの使用に供することもできるが、様々な電気機器に組み込まれてもよい。情報処理装置100の一例は、代表的にはPC(Personal Computer;パーソナルコンピュータあるいはパソコン)等の汎用のコンピュータである。なお、情報処理装置100は、PDA(Personal Digital Assistance)又は携帯電話機等の携帯通信端末でもよい。さらに、情報処理装置100は、テレビ、ハードディスクレコーダー、DVD又はブルーレイディスクなどに情報を記録する各種ディスクレコーダー、DVD又はブルーレイディスクなどから情報を再生する各種ディスクプレイヤー、又はカーナビゲーションシステムなどであってもよい。
 情報処理装置100は、プロセッサ1、メモリ装置2、通信装置34、入力装置40、表示装置45、タイマ回路51及び割り込みコントローラ55を備えている。プロセッサ1は、代表的には、CPU(Central Processing Unit;中央演算処理装置)、メディア処理用又はグラフィック処理用のプロセッサ、又はDSP(Digital Signal Processor)などの演算処理装置である。プロセッサ1、メモリ装置2、通信装置34、入力装置40、表示装置45、タイマ回路51及び割り込みコントローラ55は、バスライン50を通じて互いに接続されている。また、必要に応じて、バスライン50には、ハードディスク装置25及び読取装置32を接続することが可能となっている。ハードディスク装置25、読取装置32、入力装置40及び表示装置45は、それぞれ、I/F(インタフェース)26、35、41及び46を介してバスライン50に接続される。
 プロセッサ1は、単一のプロセッサで構成されても良く、複数のプロセッサで構成されてもよい。一例として、情報処理装置100は、複数のプロセッサ11、12、13、・・・を有する。
 メモリ装置2は、ROM(Read Only Memory)21及びRAM(Random Access Memory)22を備えている。ROM21は、プロセッサ1の動作を規定するコンピュータプログラム及びデータを記憶している。コンピュータプログラム及びデータは、ハードディスク装置25に記憶させることもできる。
 プロセッサ1は、ROM21又はハードディスク装置25が格納するコンピュータプログラム及びデータを、必要に応じてRAM22に書き込みつつ、コンピュータプログラムが規定する処理を実行する。RAM22は、プロセッサ1が処理を実行するのに伴って発生するデータを一時的に記憶する媒体としても機能する。ROM21には、フラッシュROMのように書き込みが可能で、電源を切っても記憶内容を保持できる不揮発性のメモリ及び記憶媒体も含まれる。RAM22には、電源を切ると記憶内容が保持されない揮発性のメモリ及び記憶媒体が含まれる。
 ハードディスク装置25は、内蔵する不図示のハードディスクへ、コンピュータプログラム及びデータを書き込むとともに、ハードディスクからコンピュータプログラム及びデータを読み出す。読取装置32は、例えば、CD、DVD又はメモリカードなどの記録媒体31に記録されたコンピュータプログラム又はデータを読み取る。通信装置34は、電話回線、ネットワーク線、無線又は赤外線通信等の通信回線33を通じて、外部と自身との間で、コンピュータプログラム又はデータを交換する。
 入力装置40は、ユーザの操作によりデータ等の入力を受け付ける。入力装置40は、例えば、PDAに配列されたキーボード、携帯電話機に配列された入力ボタン、着脱自在のマウス、又は着脱自在のキーボードである。表示装置45は、データ及び画像等を画面に表示したり、データ等を音声で出力したりする。表示装置45は、例えばLCD(Liguid Crystal Display;液晶表示器)、ブラウン管、又はスピーカである。
 タイマ回路51は、一定の周期でタイマ割り込み信号を出力する。割り込みコントローラ55は、タイマ回路51、入力装置40、プロセッサ1、ネットワークデバイスとしての通信装置34、ハードディスク装置25及び読取装置32等から送られる割り込み要求信号を、プロセッサ1へ中継する。各装置からの割り込み要求には優先度が付けられている。割り込みコントローラ55は、同時に複数の装置から割り込みが発生した場合には、それらの要求を優先度に応じて調停する機能を有している。
 以上のように、情報処理装置100は、コンピュータとして構成されている。上記コンピュータプログラムは、ROM21、ハードディスク装置25、又は不図示のフレキシブルディスク及びCD-ROM等の記録媒体31を通じて供給することも、通信回線33等の伝送媒体を通じて供給することも可能である。例えば、コンピュータ読み取り可能な記録媒体31(CD-ROM)に記録されたコンピュータプログラムは、情報処理装置100に接続された読取装置32を介して、読み出すことができる。また、RAM22又はハードディスク装置25は、読み出したコンピュータプログラムを格納することができる。
 ROM21からコンピュータプログラムが供給される場合には、当該ROM21を情報処理装置100に搭載することにより、プロセッサ1は上記コンピュータプログラムに従った処理を実行可能となる。通信回線33等の伝送媒体を通じて供給されるコンピュータプログラムは、通信装置34を通じて受信され、例えば、RAM22又はハードディスク装置25に格納される。伝送媒体は、有線の伝送媒体に限られず、無線の伝送媒体であってもよい。また、伝送媒体は通信線路のみでなく、通信線路を中継する中継装置、例えばルータも含む。
 通常、このメモリ管理機能の実体はメモリ装置2又はハードディスク装置25に格納され、プロセッサ1と協働して実行することにより、メモリ管理装置10を実現している。なお、メモリ管理装置10は、少なくとも1つのプロセッサと、メモリ装置とで構成される。また、情報処理システムは、少なくとも1つのプロセッサと、メモリ装置とで構成される。情報処理システムは、複数のプロセスを実行する。複数のプロセスには、メモリ装置2の所定の領域が割り当てられており、情報処理システムは、当該所定の領域を利用して複数のプロセスを実行する。
 図2は、本発明の実施の形態におけるメモリ管理装置の構成を示すブロック図である。メモリ管理装置10は、プロセッサ1と外部メモリとが協同して動作することにより実現される。外部メモリとしては、典型的には、図1に示すメモリ装置2に含まれるROM21又はRAM22、ハードディスク装置25、又は読取装置32によって読み出される記録媒体31が挙げられる。
 メモリ管理装置10は、メモリ割り当て部201、プロセス割り当てメモリ管理部202、システムメモリ管理部203、終了候補プロセス選択部204、プロセス群終了可否判定部205、終了プロセス決定部206及び選択プロセス終了部207を備える。
 メモリ割り当て部201は、情報処理システムからメモリ割り当て要求を受け取ると、情報処理システムが管理しているメモリ(典型的にはRAM22)の空き領域をプロセスに割り当てる。プロセス又はタスクは、プログラムの実行単位の呼び方の一つである。プロセスは、メモリ割り当て部201により割り当てられたメモリを、各プロセスの実行コード又はデータを格納するために使用する。
 RAM22は、電力供給の管理を個別に実施できる複数のメモリブロックから構成されてもよい。例えば、RAM22は、電力供給の管理を個別に実施できる複数のメモリチップであってもよい。また、RAM22は、単一のメモリチップであってもよく、電力供給の管理を個別に実施できる複数のメモリブロック単位でチップ内を構成してもよい。すなわち、複数のメモリブロックは、それぞれ個別に電力供給され、メモリブロックごとに、電力供給のオン/オフを切り替えることができる。
 メモリ割り当て部201は、プロセスにメモリを割り当てると、どのプロセスに対して割り当てたかを表す情報、どのメモリブロックに割り当てたかを表す情報、及び各メモリブロックに割り当てたサイズを表す情報をプロセス割り当てメモリ管理部202に通知する。また、メモリ割り当て部201は、どのメモリブロックに割り当てたかを表す情報、及び各メモリブロックに割り当てたサイズを表す情報をシステムメモリ管理部203に通知する。
 プロセス割り当てメモリ管理部202は、複数のプロセスを動作可能な情報処理システムで使用されるプロセスに割り当てられている複数のメモリブロックの割り当てサイズを、プロセスごとに各メモリブロック単位で管理する。プロセス割り当てメモリ管理部202は、各メモリブロックにどれだけのサイズが割り当てられているかを表すメモリ割り当て情報をプロセスごとに記憶している。プロセス割り当てメモリ管理部202は、メモリ割り当て部201から前述するメモリ割り当てに関する情報(どのプロセスに対して割り当てたかを表す情報、どのメモリブロックに割り当てたかを表す情報、及び各メモリブロックに割り当てたサイズを表す情報)を取得すると、該当するプロセスのメモリ割り当て情報を更新する。
 システムメモリ管理部203は、複数のメモリブロック全体のメモリ空き容量及び複数のメモリブロックのそれぞれのメモリ空き容量を管理する。システムメモリ管理部203は、複数のメモリブロック全体のメモリ空き容量及び複数のメモリブロックのメモリ空き容量を記憶している。システムメモリ管理部203は、メモリ割り当て部201から前述するメモリ割り当てに関する情報(どのメモリブロックに割り当てたかを表す情報、及び各メモリブロックに割り当てたサイズを表す情報)を取得すると、取得した情報に基づいて複数のメモリブロック全体のメモリ空き容量及び各メモリブロックのメモリ空き容量を更新する。
 終了候補プロセス選択部204は、メモリを解放するためのメモリ解放要求を情報処理システムから受け取ると動作する。メモリ解放要求は、情報処理システムが要求するメモリ空き容量を含み、複数のメモリブロックで構成されるメモリ全体から所定の空き容量を確保するための要求である。
 終了候補プロセス選択部204は、情報処理システムから要求されたメモリ空き容量を確保するために、終了候補のプロセスを選択する。終了候補プロセス選択部204は、複数のメモリブロックのうち、特定のメモリブロックから可能な限り多くの領域が解放できるように、終了候補のプロセスを選択する。そのために、終了候補プロセス選択部204は、各プロセスが現在どのメモリブロックにどの程度のサイズが割り当てられているかを表す情報を、プロセス割り当てメモリ管理部202から取得する。
 終了候補プロセス選択部204は、メモリを解放するためのメモリ解放要求を情報処理システムから受け取ると、プロセス割り当てメモリ管理部202によって管理されている割り当てサイズに基づき、複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として複数のメモリブロックごとに選択する。
 終了候補プロセス選択部204は、各メモリブロックに対して、終了候補のプロセスを選択し、プロセス群終了可否判定部205に渡す。終了候補プロセス選択部204は、選択した複数のプロセスが現在の情報処理システムの状況下で終了可能か否かをプロセス群終了可否判定部205に問い合わせる。
 プロセス群終了可否判定部205は、終了候補プロセス選択部204から複数のプロセスを受け取ると、現在のメモリ空き容量に関する情報をシステムメモリ管理部203から受け取る。また、プロセス群終了可否判定部205は、情報処理システムで規定されているメモリ空き容量と各プロセスの終了可否の条件とに基づいて、終了候補プロセス選択部204から受け取ったプロセスの終了順序を調整する。
 プロセス群終了可否判定部205は、終了候補プロセス選択部204によって選択された終了候補のプロセス群を取得すると、システムメモリ管理部203から複数のメモリブロック全体のメモリ空き容量を取得し、複数のメモリブロック全体のメモリ空き容量の条件と、当該条件で終了可能なプロセスとの関係に基づき、終了候補のプロセス群を終了させる順序に並べ替え、当該並べ替えたプロセス群を終了可能であるか否かを判定する。プロセス群終了可否判定部205は、終了可否の判定結果情報を終了候補プロセス選択部204に通知し、終了させることができないプロセスが存在する場合には当該終了させることができないプロセスをさらに終了候補プロセス選択部204に通知する。
 終了候補プロセス選択部204は、選択したプロセス群が全て終了可能であるとプロセス群終了可否判定部205から通知を受け取ると、選択したプロセス群と、メモリ割り当て情報とを終了プロセス決定部206に渡す。その後、終了候補プロセス選択部204は、残りの他のメモリブロックに関しても同様に終了候補のプロセスを選択する。
 終了プロセス決定部206は、終了候補プロセス選択部204から終了候補のプロセス群とメモリ割り当て情報とを受け取ると、受け取った終了候補のプロセス群が、これまでに終了候補プロセス選択部204から受け取った別のメモリブロックに対する終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定し、当該終了候補のプロセス群を終了候補とすべきか否かを表す通知を終了候補プロセス選択部204に送信する。終了プロセス決定部206は、終了候補プロセス選択部204から全ての各メモリブロックに対して終了プロセス群を得ると、最終的に候補として残ったプロセス群を終了させるプロセスと決定し、選択プロセス終了部207に通知する。
 終了プロセス決定部206は、終了候補プロセス選択部204によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する。
 また、終了プロセス決定部206は、終了候補プロセス選択部204によって選択された終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量と、既に保持している終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量との大小関係に基づいて、終了候補プロセス選択部204によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する。
 また、終了プロセス決定部206は、終了候補プロセス選択部204によって選択された終了候補のプロセス群を構成する複数のプロセスのプロセス数と、既に保持している終了候補のプロセス群を構成する複数のプロセスのプロセス数との大小関係に基づいて、終了候補プロセス選択部204によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する。
 また、プロセス群終了可否判定部205は、終了候補プロセス選択部204によって選択され、かつ終了プロセス決定部206によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、システムメモリ管理部203によって管理されている複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定する。
 また、プロセス群終了可否判定部205は、プロセスごとに予め設定されている優先度レベルに基づいて、終了候補プロセス選択部204によって選択された終了候補のプロセス群を構成する複数のプロセスを並べ替える。
 さらに、終了プロセス決定部206は、保持している終了候補のプロセス群を、プロセス群終了可否判定部205によって終了可能であると判定された終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する。
 選択プロセス終了部207は、終了すべきプロセス群を終了プロセス決定部206から受け取ると、情報処理システムに対して該当するプロセスに対して終了する命令を送信し、情報処理システムが該当するプロセスを終了させる。これにより、終了させたプロセスが元々使用していたメモリが解放されて、情報処理システムから要求されていたメモリ空き容量が確保される。
 なお、本実施の形態において、プロセス割り当てメモリ管理部202がプロセス割り当てメモリ管理部の一例に相当し、システムメモリ管理部203がシステムメモリ管理部の一例に相当し、終了候補プロセス選択部204が終了候補プロセス選択部の一例に相当し、終了プロセス決定部206が優先終了判定部及び終了プロセス決定部の一例に相当し、プロセス群終了可否判定部205がプロセス群終了可否判定部の一例に相当する。
 図3は、本発明の実施の形態におけるプロセス割り当てメモリ管理部が管理するメモリ割り当て情報の一例を示す図である。図3では、第1のプロセスA、第2のプロセスB及び第3のプロセスCの3つのプロセスのメモリ割り当て情報301,302,303を例示している。
 メモリ割り当て情報301,302,303は、プロセス識別情報311、割り当てサイズ情報312及び合計サイズ情報315を含む。ここでは、第1のプロセスAのメモリ割り当て情報301を取り上げて説明する。
 プロセス割り当てメモリ管理部202は、どのプロセスのメモリ割り当て情報であるかを識別するためのプロセス識別情報311を管理する。また、プロセス割り当てメモリ管理部202は、複数のメモリブロックのそれぞれに割り当てられている割り当てサイズを表す割り当てサイズ情報312,313,314を、プロセスごとに管理する。また、プロセス割り当てメモリ管理部202は、プロセスに割り当てているメモリ領域の合計サイズを表す合計サイズ情報315を管理する。なお、図3は、あくまで管理形態の一例に過ぎず、プロセスの数及びメモリブロックの数は、図3に示す数の限りではない。
 プロセス割り当てメモリ管理部202は、メモリ割り当て部201からメモリ割り当てに関する情報を受け取ると、該当するプロセスのメモリ割り当て情報に該当するメモリブロックの割り当てサイズ情報と合計サイズ情報とを更新する。例えば、プロセス割り当てメモリ管理部202が、図3に示すメモリ割り当て情報を有しており、メモリ割り当て部201から、第1のプロセスAに対して第3のメモリブロックに1MBを割り当てたという情報を受け取った場合について説明する。
 この場合、プロセス割り当てメモリ管理部202は、該当する第1のプロセスAのメモリ割り当て情報301に含まれる第3のメモリブロックに対応する割り当てサイズ情報314の割り当てサイズに1MBを加算する。これにより、割り当てサイズ情報314は、0MBから1MBに変更される。さらに、第1のプロセスAのメモリ割り当て情報301に含まれる合計サイズ情報315の合計サイズに1MBを加算する。これにより、合計サイズ情報315は、3MBから4MBに変更される。
 なお、仮想アドレス空間を持つ情報処理システムの場合、プロセスの仮想アドレス空間にメモリ領域を割り当てても、物理メモリを消費していない状況が起こりうる。そのため、メモリ割り当て部201が、物理メモリをプロセスに割り当てるタイミング、すなわち本当に物理メモリを消費するタイミングで、プロセス割り当てメモリ管理部202及びシステムメモリ管理部203にメモリ割り当て情報を通知してもよい。
 プロセス割り当てメモリ管理部202は、終了候補プロセス選択部204から要求されると、図3に例示するメモリ割り当て情報に基づいて、各プロセスが現在どのメモリブロックにどの程度のサイズが割り当てられているかを表す情報を、終了候補プロセス選択部204に渡す。
 図4は、本発明の実施の形態におけるシステムメモリ管理部が管理するメモリ空き容量情報の一例を示す図である。メモリ空き容量情報401は、複数のメモリブロック全体のメモリ空き容量411、及び各メモリブロックのメモリ空き容量412を含む。
 システムメモリ管理部203は、プロセス群終了可否判定部205から複数のメモリブロック全体のメモリ空き容量を要求されると、メモリ空き容量情報401に基づいて、複数のメモリブロック全体のメモリ空き容量411をプロセス群終了可否判定部205に渡す。また、システムメモリ管理部203は、終了プロセス決定部206から各メモリブロックのメモリ空き容量を要求されると、メモリ空き容量情報401に基づいて、各メモリブロックのメモリ空き容量412を終了プロセス決定部206に渡す。
 図5及び図6は、本発明の実施の形態における終了候補プロセス選択部の処理の一例を示すフローチャートである。
 まず、終了候補プロセス選択部204は、情報処理システムからプロセス終了によりメモリを解放するメモリ解放要求を受け取る(ステップS1)。一例として、情報処理システムからNバイトのサイズのメモリ領域を解放するように要求されたとする。
 次に、終了候補プロセス選択部204は、プロセス割り当てメモリ管理部202からメモリ割り当て情報を取得する(ステップS2)。これにより、終了候補プロセス選択部204は、メモリブロックごとに終了候補のプロセスを選択するために必要なメモリ割り当て情報を取得することができる。
 以後、終了候補プロセス選択部204は、特定のメモリブロックから可能な限りメモリ領域を解放するために、メモリブロックごとに終了候補のプロセスを選択し、選択したプロセスを評価する。
 次に、終了候補プロセス選択部204は、存在する複数のメモリブロックのうち未選択のメモリブロック、すなわち終了候補のプロセスを選択していないメモリブロックが存在するか否かを判断する(ステップS3)。通常、終了候補プロセス選択部204がまだどのメモリブロックに対しても終了すべきプロセスを選択していない場合、未選択のメモリブロックは必ず存在する。
 終了候補のプロセスを選択していないメモリブロックが存在すると判断された場合(ステップS3でYES)、終了候補プロセス選択部204は、未選択のメモリブロックを一つ選択する(ステップS4)。終了候補プロセス選択部204は、選択したメモリブロックから可能な限りメモリ領域を解放できるように、終了させるべきプロセスを選択する処理に移る。
 次に、終了候補プロセス選択部204は、未選択のプロセスの中から、ステップS4で選択したメモリブロックにおける割り当てサイズが最も大きいプロセスを選択する(ステップS5)。例えば、終了候補プロセス選択部204がプロセス割り当てメモリ管理部202から図3に示すメモリ割り当て情報を取得し、かつ第1のメモリブロックがステップS4で選択された場合について説明する。この場合、終了候補プロセス選択部204は、未選択の第1~3のプロセスのうち、第1のメモリブロックにおける割り当てサイズが最も大きい第3のプロセスCを選択する。
 次に、終了候補プロセス選択部204は、ステップS5で選択したプロセスをメモリブロックに対して終了すべきプロセス群に加える。また、終了候補プロセス選択部204は、これまでに選択したプロセスの合計割り当てサイズの総計に、ステップS5で選択したプロセスの合計割り当てサイズを加算する(ステップS6)。
 次に、終了候補プロセス選択部204は、これまでに選択した各プロセスの合計割り当てサイズの総計が、ステップS1で要求されたNバイト以上であるか否かを判定する(ステップS7)。選択した各プロセスの合計割り当てサイズの総計が、Nバイトより小さいと判定された場合(ステップS7でNO)、ステップS5の処理に戻り、終了候補プロセス選択部204は、次の未選択のプロセスを選択する。選択した各プロセスの合計割り当てサイズの総計が、Nバイト以上にならない状態で、未選択のプロセスがなくなった場合、すなわち、情報処理システムから要求されたメモリサイズを解放できない場合、終了候補プロセス選択部204は処理を中断し、情報処理システムにエラーを返す必要がある。本説明では、終了候補プロセス選択部204の主要な機能を説明するため、図5及び図6に示すフローチャートの中でエラー処理を図示しない。
 選択した各プロセスの合計割り当てサイズの総計が、Nバイト以上であると判定された場合(ステップS7でYES)、終了候補プロセス選択部204は、選択したメモリブロックに関する情報と、選択したプロセス群に関する情報とを終了プロセス決定部206に渡す(ステップS8)。終了プロセス決定部206は、今回選択したメモリブロックに対して選択されたプロセス群と、今回選択したメモリブロックと同じメモリブロックに対してこれまでに選択されたプロセス群とを比較して、今回選択したメモリブロックに対して選択されたプロセス群が、終了候補になりうるか否かを確認する。なお、終了プロセス決定部206における処理については後述する。具体的には、終了候補プロセス選択部204は、どのメモリブロックを選択したのかという情報と、どのプロセス群を選択したのかという情報とを、終了プロセス決定部206に渡す。
 次に、終了候補プロセス選択部204は、渡したプロセス群が終了候補になるか否かを表す情報を終了プロセス決定部206から受け取り、受け取った情報に基づいて、渡したプロセス群が終了候補になるか否かを判断する(ステップS9)。ここで、渡したプロセス群が終了候補にならないと判断された場合(ステップS9でNO)、終了候補プロセス選択部204は、ステップS4で選択したメモリブロックに対して選択されたプロセス群を破棄し、ステップS3の処理に戻る。
 一方、渡したプロセス群が終了候補になると判断された場合(ステップS9でYES)、終了候補プロセス選択部204は、選択した順序がわかる形式でプロセス群をプロセス群終了可否判定部205に渡す(ステップS10)。これにより、選択したプロセス群が本当に終了可能かどうかを、プロセス群終了可否判定部205に問い合わせる処理に移る。なお、プロセス群終了可否判定部205における処理については後述する。
 次に、終了候補プロセス選択部204は、渡したプロセス群に終了不可のプロセスがあるか否かを表す情報をプロセス群終了可否判定部205から受け取り、受け取った情報に基づいて、選択したプロセス群の中に終了不可のプロセスがあるか否かを判断する(ステップS11)。選択したプロセス群の中に終了不可のプロセスがないと判断された場合(ステップS11でNO)、終了候補プロセス選択部204は、選択したメモリブロックを表す情報と、選択が確定したプロセス群を表す情報とを、選択が確定したことを表す通知とともに終了プロセス決定部206に渡し(ステップS12)、ステップS3の処理に戻る。
 一方、渡したプロセス群に終了不可のプロセスがあると判断された場合(ステップS11でYES)、終了候補プロセス選択部204は、選択したプロセス群の中から、終了不可のプロセスを除外し(ステップS13)、ステップS3の処理に戻る。
 ステップS3において、全てのメモリブロックに対する処理が済み、終了候補のプロセスを選択していないメモリブロックが存在しないと判断された場合(ステップS3でNO)、終了候補プロセス選択部204は、終了プロセス決定部206に終了候補のプロセスの選択が終了したことを表すプロセス選択終了通知を送信し(ステップS14)、処理を完了する。
 次に、プロセス群終了可否判定部205が管理するメモリ空き容量と各プロセスの終了可否の条件とについて説明する。図7は、本発明の実施の形態におけるプロセス群終了可否判定部が管理する終了可否判定条件の一例を示す図である。プロセス群終了可否判定部205は、あるプロセスを終了することが可能か否かを、メモリ空き容量とメモリ空き容量に応じたプロセスの優先度レベルとで規定している。これは、終了させるプロセスに重要度を付け、またメモリ空き容量によりシステム上の緊急度を把握し、緊急度が高い場合にのみ重要度が高いプロセスを終了させることができるように制御するためである。
 例えば、図7に示す例では、プロセス群終了可否判定部205は、複数のメモリブロック全体のメモリ空き容量の条件611と、終了可能なプロセスの優先度レベルの条件612とを対応付けた終了可能レベル管理情報601と、プロセスの優先度レベル値と、優先度レベル値に該当するプロセスとを対応付けたプロセスレベル管理情報602とを記憶している。終了可否判定条件は、終了可能レベル管理情報601とプロセスレベル管理情報602とを含む。図7の例では、優先度レベルの値が小さいものほど優先度が高い、すなわち終了条件が厳しいことを示している。
 終了可能レベル管理情報601のメモリ空き容量の条件611には、複数のメモリブロック全体のメモリ空き容量の条件を段階的に設定することが可能であり、優先度レベルの条件612には、メモリ空き容量の条件に合致した際に終了させることができるプロセスの優先度レベルの条件を設定することが可能である。
 具体的に一例を挙げて説明すると、現在の複数のメモリブロック全体のメモリ空き容量が3MB(MegaByte:メガバイト)であった場合、終了可能レベル管理情報601に従うと、当該メモリ空き容量は、“4MB以下”というメモリ空き容量の条件611に合致し(図7の項目621)、終了可能なプロセスの優先度レベルは“レベル2以上”となる。プロセスレベル管理情報602によると、優先度レベルがレベル2以上のプロセスは、第2のプロセスB、第3のプロセスC、第4のプロセスD及び第5のプロセスEである。したがって、終了可能なプロセスは、第2のプロセスB、第3のプロセスC、第4のプロセスD及び第5のプロセスEであり、第1のプロセスAは終了不可となる。
 なお、図7に示す終了可能レベル管理情報601及びプロセスレベル管理情報602の構成は例示に過ぎず、複数のメモリブロック全体のメモリ空き容量に応じて終了可能なプロセスを管理できる情報であればよい。
 次に、プロセス群終了可否判定部205の処理について説明する。図8及び図9は、本発明の実施の形態におけるプロセス群終了可否判定部の処理の一例を示すフローチャートである。
 まず、プロセス群終了可否判定部205は、選択されたプロセス群に関する情報を、終了候補プロセス選択部204から受け取る(ステップS21)。
 次に、プロセス群終了可否判定部205は、図7に例示する終了可否判定条件を取得する(ステップS22)。
 次に、プロセス群終了可否判定部205は、終了候補プロセス選択部204によって選択されたプロセス群を優先度が高い順、すなわち終了条件が厳しい順に並べ替える(ステップS23)。その際、複数のプロセスの終了条件が同じである場合は、プロセス群終了可否判定部205は、終了候補プロセス選択部204から取得したプロセスの順序で保持すればよい。
 一例を挙げて説明すると、例えば、プロセス群終了可否判定部205が、プロセス群終了可否判定部205から{第2のプロセスB、第4のプロセスD、第3のプロセスC及び第1のプロセスA}というプロセス群を取得し、図7に例示するような終了可否判定条件を有する場合、プロセス群終了可否判定部205は、プロセス群を{第1のプロセスA、第3のプロセスC、第2のプロセスB及び第4のプロセスD}という順序に並べ替える。
 次に、プロセス群終了可否判定部205は、システムメモリ管理部203から現在の複数のメモリブロック全体のメモリ空き容量を取得する(ステップS24)。次に、プロセス群終了可否判定部205は、プロセス割り当てメモリ管理部202からメモリ割り当て情報を取得する(ステップS25)。その後、プロセス群終了可否判定部205は、ステップS23で並べ替えたプロセス群を順に終了可能か否かを確認する処理に移る。
 次に、プロセス群終了可否判定部205は、プロセス群のうち未選択のプロセスが存在するか否かを判断する(ステップS26)。未選択のプロセスが存在すると判断された場合(ステップS26でYES)、プロセス群終了可否判定部205は、プロセス群の中から未選択のプロセスのうちの先頭のプロセスを選択する(ステップS27)。次に、プロセス群終了可否判定部205は、ステップS24で取得した複数のメモリブロック全体のメモリ空き容量と、ステップS22で取得した終了可否判定条件とに基づいて、選択したプロセスが終了可能であるか否かを判定する(ステップS28)。
 選択したプロセスが終了可能であると判定された場合(ステップS28でYES)、プロセス群終了可否判定部205は、現在保持しているメモリ空き容量の値に、選択したプロセスのメモリ割り当てサイズを加算し更新する(ステップS29)。このように、プロセス群終了可否判定部205は、選択したプロセスを終了した場合に変化するメモリ空き容量を記憶する。選択したプロセスのメモリ割り当てサイズは、ステップS25で取得した各プロセスに対するメモリ割り当て情報から取得すればよい。その後、プロセス群の残りのプロセスに対して終了可能であるか否かを判定するために、ステップS26の処理に戻り処理を継続する。
 一方、選択したプロセスが終了可能でないと判定された場合(ステップS28でNO)、プロセス群終了可否判定部205は、選択したプロセスが終了不可であることを記憶する(ステップS30)。その後、プロセス群の残りのプロセスに対して終了可能であるか否かを判定するために、ステップS26の処理に戻り処理を継続する。
 ステップS26において、ステップS21で取得したプロセス群の全てのプロセスに対して終了可能であるか否かを判定することにより、未選択のプロセスが存在しないと判断された場合(ステップS26でNO)、プロセス群終了可否判定部205は、プロセス群の中に終了不可のプロセスが存在するか否かを判断する(ステップS31)。
 ここで、終了不可のプロセスが存在しないと判断された場合(ステップS31でNO)、プロセス群終了可否判定部205は、終了不可のプロセスが存在しないことを終了候補プロセス選択部204に通知する(ステップS32)。一方、終了不可のプロセスが存在すると判断された場合(ステップS31でYES)、プロセス群終了可否判定部205は、終了不可のプロセスを表す情報と、終了不可のプロセスが存在することとを終了候補プロセス選択部204に通知する(ステップS32)。
 以上の動作により、プロセス群終了可否判定部205は、終了候補プロセス選択部204により選択されたプロセス群の中から、優先度が高いプロセスが終了候補として選択されるのを回避することができる。
 例えば、ステップS22で図7に例示する終了可否判定条件を取得し、かつステップS24で取得したメモリ空き容量が0.5MBであり、かつ終了候補プロセス選択部204から取得したプロセス群が{第2のプロセスB、第3のプロセスC及び第1のプロセスA}であったとする。この場合、選択された順番通りに第2のプロセスBを先に終了すると、第2のプロセスBに割り当てられているメモリ領域の合サイズが6MBであるため(図3のメモリ割り当て情報302)、複数のメモリブロック全体のメモリ空き容量は6.5MBになる。この場合、次の第3のプロセスC及び第1のプロセスAを終了しようとしても、図7の終了可否判定条件に基づくと、優先度レベル3以上のプロセスのみが終了可能になり、優先度レベル2である第3のプロセスC及び優先度レベル1である第1のプロセスAは終了できなくなる。
 しかしながら、プロセス群終了可否判定部205は、ステップS23において、図7に例示する終了可否判定条件に基づき、{第2のプロセスB、第3のプロセスC及び第1のプロセスA}という順番で終了されるプロセス群を{第1のプロセスA、第3のプロセスC及び第2のプロセスB}という順番に並べ替える。この場合、現在のメモリ空き容量が0.5MBなので、図7の終了可否判定条件に基づくと、レベル1以上のプロセスのみが終了可能になり、ステップS28で第1のプロセスAを終了可能であると判定することができる。
 また、第1のプロセスAに割り当てられているメモリ領域の合サイズが3MBであるため(図3のメモリ割り当て情報301)、ステップS29で複数のメモリブロック全体のメモリ空き容量は3.5MBとなる。複数のメモリブロック全体のメモリ空き容量が3.5MBであるで、図7の終了可否判定条件に基づくと、レベル2以上のプロセスが終了可能になり、次に選択する第3のプロセスCを終了可能であると判定することができる。
 最後に、第3のプロセスCに割り当てられているメモリ領域の合サイズが4MBであるため(図3のメモリ割り当て情報303)、ステップS29で複数のメモリブロック全体のメモリ空き容量は7.5MBとなる。複数のメモリブロック全体のメモリ空き容量が7.5MBであるで、図7の終了可否判定条件に基づくと、レベル3以上のプロセスが終了可能になり、次に選択する第2のプロセスBを終了可能であると判定することができる。
 以上の例で示す通り、終了候補プロセス選択部204により選択されたプロセス群{第2のプロセスB、第3のプロセスC及び第1のプロセスA}では、第2のプロセスBのみ終了可能であった。しかしながら、プロセス群終了可否判定部205の動作により、終了可否判定条件に基づいてプロセス群の順序を並べ替えることにより、全てのプロセスを終了させることができる。
 次に、終了プロセス決定部206の処理について説明する。図10及び図11は、本発明の実施の形態における終了プロセス決定部の処理の一例を示すフローチャートである。
 まず、終了プロセス決定部206は、選択されたメモリブロックを表す情報と、選択されたプロセス群を表す情報とを終了候補プロセス選択部204から受け取る(ステップS31)。なお、図6のステップS12で選択が確定したことを表す通知が付与された場合、終了プロセス決定部206は、選択されたメモリブロックを表す情報と、選択されたプロセス群を表す情報と、選択が確定したことを表す通知とを、終了候補プロセス選択部204から受け取る。
 終了候補プロセス選択部204から選択が確定したことが通知された場合、当該通知と共に送信されたプロセス群は、現在終了プロセス決定部206が保持しているプロセス群より優先して終了すべきと判断することができる。したがって、終了プロセス決定部206は、受け取ったプロセス群が選択確定したプロセス群であるか否かを判断する(ステップS42)。受け取ったプロセス群が選択確定したプロセス群であると判断された場合(ステップS42でYES)、終了プロセス決定部206は、終了候補プロセス選択部204から受け取ったメモリブロックとプロセス群とを終了候補として保持する(ステップS43)。
 一方、受け取ったプロセス群が選択確定したプロセス群でないと判断された場合(ステップS42でNO)、終了プロセス決定部206は、すでにメモリブロックと終了候補のプロセス群とを保持しているか否かを判断する(ステップS44)。ここで、メモリブロックと終了候補のプロセス群とを保持していないと判断された場合(ステップS44でNO)、比較すべきプロセス群が存在しないので、終了プロセス決定部206は、終了候補プロセス選択部204から受け取ったメモリブロックとプロセス群とを終了候補として保持する(ステップS43)。
 一方、すでにメモリブロックと終了候補のプロセス群とを保持していると判断された場合(ステップS44でYES)、終了プロセス決定部206は、終了候補プロセス選択部204から受け取ったプロセス群のプロセス数が、保持しているプロセス群のプロセス数以下であるか否かを判断する(ステップS45)。終了候補プロセス選択部204から受け取ったプロセス群のプロセス数が、保持しているプロセス群のプロセス数以下ではないと判断された場合、すなわち受け取ったプロセス群のプロセス数が、保持しているプロセス群のプロセス数より多いと判断された場合(ステップS45でNO)、終了プロセス決定部206は、受け取ったプロセス群が終了候補にならないことを終了候補プロセス選択部204に通知する(ステップS46)。
 一方、終了候補プロセス選択部204から受け取ったプロセス群のプロセス数が、保持しているプロセス群のプロセス数以下であると判断された場合(ステップS45でYES)、終了プロセス決定部206は、システムメモリ管理部203から各メモリブロックの空き容量を取得する(ステップS47)。
 次に、終了プロセス決定部206は、プロセス割り当てメモリ管理部202から各プロセスのメモリ割り当て情報を取得する(ステップS48)。
 次に、終了プロセス決定部206は、ステップS47及びステップS48で取得した情報に基づき、終了候補プロセス選択部204から受け取ったプロセス群を終了した場合に確保できる該当メモリブロックの空き容量を算出する(ステップS49)。
 具体的には、終了プロセス決定部206は、ステップS48で取得したメモリ割り当て情報に基づいて、終了候補プロセス選択部204から受け取ったメモリブロックに対する、終了候補プロセス選択部204から受け取ったプロセス群の各プロセスの割り当てサイズを算出する。また、終了プロセス決定部206は、ステップS47で取得した各メモリブロックのメモリ空き容量に基づいて、終了候補プロセス選択部204から受け取ったメモリブロックの空き容量を算出する。終了プロセス決定部206は、終了候補プロセス選択部204から受け取ったメモリブロックのメモリ空き容量と、終了候補プロセス選択部204から受け取ったプロセス群の各プロセスのメモリブロックへの割り当てサイズとを合計することにより、終了候補プロセス選択部204から受け取ったプロセス群を終了した場合に確保できる該当メモリブロックの空き容量を算出することができる。
 ここで、終了候補プロセス選択部204から受け取ったプロセス群を終了した場合に確保できる該当メモリブロックの空き容量を算出する一例について、図3及び図4を用いて説明する。例えば、図10のステップS41で、終了候補プロセス選択部204から受け取ったメモリブロックが、第2のメモリブロックであり、終了候補プロセス選択部204から受け取ったプロセス群が、第1のプロセスA及び第3のプロセスCであったとする。
 この場合、図3のプロセス割り当てメモリ管理部202のメモリ割り当て情報の例から、第2のメモリブロックには、第1のプロセスAが3MB、第3のプロセスCが1MB割り当てられている。図4のシステムメモリ管理部203のメモリ空き容量情報の例から、第2のメモリブロックのメモリ空き容量は、1MBである。したがって、終了候補プロセス選択部204から受け取ったプロセス群(第1のプロセスA及び第3のプロセスC)を終了した場合に確保できる該当メモリブロック(第2のメモリブロック)の空き容量は、合計5MBとなる。
 次に、終了プロセス決定部206は、現在終了候補として保持しているプロセス群を終了した場合に確保できる該当メモリブロックの空き容量を算出する(ステップS50)。空き容量の算出手順は、ステップS49で実施した手順と同様である。なお、ステップS50で扱う該当メモリブロックとは、以前、現在終了候補として保持しているプロセス群を受け取った時に終了候補プロセス選択部204から受け取ったメモリブロックのことであり、ステップS49で扱ったメモリブロックとは異なる。
 ここで、現在終了候補として保持しているプロセス群を終了した場合に確保できる該当メモリブロックの空き容量を算出する一例について、図3及び図4を用いて説明する。例えば、保持しているメモリブロックが、第1のメモリブロックであり、保持しているプロセス群が、第3のプロセスC及び第2のプロセスBであったとする。
 この場合、図3のプロセス割り当てメモリ管理部202のメモリ割り当て情報の例から、第1のメモリブロックには、第3のプロセスCが3MB、第2のプロセスBが1MB割り当てられている。また、図4のシステムメモリ管理部203のメモリ空き容量情報の例から、第1のメモリブロックのメモリ空き容量は、2MBである。したがって、現在終了候補として保持しているプロセス群(第3のプロセスC及び第2のプロセスB)を終了した場合に確保できる該当メモリブロック(第1のメモリブロック)の空き容量は、合計6MBとなる。
 次に、終了プロセス決定部206は、終了候補プロセス選択部204から受け取ったプロセス群を終了した場合に確保できる空き容量が、保持している終了候補のプロセス群を終了した場合に確保できる空き容量より大きいか否かを判定する(ステップS51)。前述の例では、終了候補プロセス選択部204から受け取ったプロセス群を終了すると、第2のメモリブロックの空き容量が5MBになり、現在保持しているプロセス群を終了すると、第1のメモリブロックの空き容量が6MBになる。そのため、保持しているプロセス群を終了した場合に確保できる空き容量が、受け取ったプロセス群を終了した場合に確保できる空き容量より大きくなる。
 終了候補プロセス選択部204から受け取ったプロセス群を終了した場合に確保できる空き容量が、保持している終了候補のプロセス群を終了した場合に確保できる空き容量以下であると判定された場合(ステップS51でNO)、終了プロセス決定部206は、受け取ったプロセス群が終了候補にならないことを終了候補プロセス選択部204に通知する(ステップS46)。
 一方、終了候補プロセス選択部204から受け取ったプロセス群を終了した場合に確保できる空き容量が、保持している終了候補のプロセス群を終了した場合に確保できる空き容量より大きいと判定された場合(ステップS51でYES)、終了プロセス決定部206は、受け取ったプロセス群が終了候補になることを終了候補プロセス選択部204に通知する(ステップS52)。
 以上の動作により、終了プロセス決定部206は、終了候補プロセス選択部204から受け取った複数のメモリブロックのうち、可能な限り大きく解放できる特定のメモリブロックを保持することができる。また、終了プロセス決定部206は、特定のメモリブロックを可能な限り大きく解放させる終了候補のプロセス群を保持することができる。
 次に、終了候補プロセス選択部204からプロセス選択終了通知を受け取った場合の終了プロセス決定部206の処理について説明する。図12は、終了候補プロセス選択部からプロセス選択終了通知を受け取った場合の終了プロセス決定部の処理の一例を示すフローチャートである。
 まず、終了プロセス決定部206は、終了候補プロセス選択部204から、終了候補のプロセスの選択が終了したことを表すプロセス選択終了通知を受け取る(ステップS61)。次に、終了プロセス決定部206は、現在保持しているプロセス群を終了対象のプロセス群に決定する(ステップS62)。次に、終了プロセス決定部206は、決定した終了対象のプロセス群を選択プロセス終了部207に渡す(ステップS63)。
 選択プロセス終了部207は、終了プロセス決定部206から終了対象のプロセス群を受け取ると、情報処理システムで定められた所定の手続きにより、各プロセスが使用しているメモリブロック及び各プロセスが確保している各種リソースを解放させ、終了対象の各プロセスを終了させる。
 次に、終了プロセス決定部206は、現在保持しているメモリブロックとプロセス群とを消去し(ステップS64)、処理を終了する。
 以上の動作により、本実施の形態のメモリ管理装置は、特定のメモリブロックに可能な限り多くの空き領域を作ることが可能になるため、特定のメモリブロックに対する電力供給を切るためのデータ退避のコストが小さくなり、省電力状態に移行しやすくなる。
 また、特定のメモリブロックに可能な限り多くの空き領域を作ることが可能になるため、特定のメモリブロック内に連続した空き領域を確保することができる。そのため、画像データを圧縮又は伸張するコーデックなどにおいて、特定のメモリブロック内の連続した空き領域を使用することができる。
 なお、図2に示すメモリ管理装置の各機能ブロックは、典型的にはプロセッサと外部メモリとの協同で処理されるプログラムとして実現されるが、集積回路であるLSIで実現してもよい。これらの各機能ブロックは個別に1チップ化されても良いし、一部又は全てを含むように1チップ化されても良い。ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI又はウルトラLSIと呼称されることもある。
 また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセッサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用しても良い。
 さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。
 本実施の形態に係るメモリ管理装置は、プロセッサとメモリ装置とを備えた情報処理装置であれば、あらゆる電子機器、情報機器、AV(Audio Visual)機器、通信機器及び家電機器にも適用可能であり、例えば、PC(パーソナルコンピュータ)、携帯情報端末(携帯電話、スマートフォン及びPDA(Personal Digital Assistant)など)、テレビ、ハードディスクレコーダー、DVD及びブルーレイディスクなどを用いた各種ディスクレコーダー、DVD及びブルーレイディスクなどを用いた各種ディスクプレイヤー、及びカーナビゲーションシステムなどにも応用できる。
 なお、前述の説明はあらゆる点において本発明の例示に過ぎず、その範囲を限定しようとするものではない。本発明の範囲を逸脱することなく種々の改良や変形を行うことができることは言うまでもない。
 なお、上述した具体的実施形態には以下の構成を有する発明が主に含まれている。
 本発明の一局面に係るメモリ管理装置は、複数のメモリブロックを含むメモリを管理するメモリ管理装置であって、複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理部と、前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理部と、前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理部によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択部と、前記終了候補プロセス選択部によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定部と、前記終了候補プロセス選択部によって選択され、かつ前記優先終了判定部によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理部によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定部と、保持している終了候補のプロセス群を、前記プロセス群終了可否判定部によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定部とを備える。
 本発明の他の局面に係るメモリ管理方法は、複数のメモリブロックを含むメモリを管理するメモリ管理方法であって、複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理ステップと、前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理ステップと、前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理ステップにおいて管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択ステップと、前記終了候補プロセス選択ステップにおいて選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定ステップと、前記終了候補プロセス選択ステップにおいて選択され、かつ前記優先終了判定ステップにおいて優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理ステップにおいて管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定ステップと、保持している終了候補のプロセス群を、前記プロセス群終了可否判定ステップにおいて終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定ステップとを含む。
 本発明の他の局面に係るメモリ管理プログラムは、複数のメモリブロックを含むメモリを管理するメモリ管理プログラムであって、複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理部と、前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理部と、前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理部によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択部と、前記終了候補プロセス選択部によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定部と、前記終了候補プロセス選択部によって選択され、かつ前記優先終了判定部によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理部によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定部と、保持している終了候補のプロセス群を、前記プロセス群終了可否判定部によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定部としてコンピュータを機能させる。
 本発明の他の局面に係るメモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体は、複数のメモリブロックを含むメモリを管理するメモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体であって、複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理部と、前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理部と、前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理部によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択部と、前記終了候補プロセス選択部によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定部と、前記終了候補プロセス選択部によって選択され、かつ前記優先終了判定部によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理部によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定部と、保持している終了候補のプロセス群を、前記プロセス群終了可否判定部によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定部としてコンピュータを機能させるメモリ管理プログラムを記録する。
 本発明の他の局面に係る集積回路は、複数のメモリブロックを含むメモリを管理する集積回路であって、複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理回路と、前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理回路と、前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理回路によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択回路と、前記終了候補プロセス選択回路によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定回路と、前記終了候補プロセス選択回路によって選択され、かつ前記優先終了判定回路によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理回路によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定回路と、保持している終了候補のプロセス群を、前記プロセス群終了可否判定回路によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定回路とを備える。
 これらの構成によれば、複数のプロセスを動作可能な情報処理システムで使用されるプロセスに割り当てられている複数のメモリブロックの割り当てサイズが、プロセスごとにメモリブロック単位で管理される。また、複数のメモリブロック全体のメモリ空き容量が管理される。メモリを解放するためのメモリ解放要求を情報処理システムから受け取ると、管理されている割り当てサイズに基づき、複数のメモリブロックごとに割り当てられている複数のプロセスが割り当てサイズが大きい順に抽出され、抽出された複数のプロセスが終了候補のプロセス群として複数のメモリブロックごとに選択される。次に、選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かが判定される。優先的に終了すべきであると判定された終了候補のプロセス群の順序が優先度に応じて並べ替えられ、管理されている複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えられた終了候補のプロセス群が終了可能であるか否かが判定される。保持している終了候補のプロセス群が、終了可能であると判定された終了候補のプロセス群に書き換えられ、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群が終了すべきプロセス群として決定される。
 したがって、複数のメモリブロックごとに終了候補のプロセス群が選択され、選択された終了候補のプロセス群が終了可能であるか否かが判定され、終了可能であると判定されたプロセス群が終了されるので、特定のメモリブロックの空き容量を可能な限り多く確保することができる。
 また、上記のメモリ管理装置において、前記優先終了判定部は、前記終了候補プロセス選択部によって選択された前記終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量と、既に保持している終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量との大小関係に基づいて、前記終了候補プロセス選択部によって選択された前記終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定することが好ましい。
 この構成によれば、選択された終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量と、既に保持している終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量との大小関係に基づいて、選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かが判定される。
 したがって、選択された終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量と、既に保持している終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量との大小関係を判断することによって、選択された終了候補のプロセス群と、既に保持している終了候補のプロセス群とのうちのどちらを優先的に終了させるかを決定することができる。
 また、上記のメモリ管理装置において、前記優先終了判定部は、前記終了候補プロセス選択部によって選択された前記終了候補のプロセス群を構成する複数のプロセスのプロセス数と、既に保持している終了候補のプロセス群を構成する複数のプロセスのプロセス数との大小関係に基づいて、前記終了候補プロセス選択部によって選択された前記終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定することが好ましい。
 この構成によれば、選択された前記終了候補のプロセス群を構成する複数のプロセスのプロセス数と、既に保持している終了候補のプロセス群を構成する複数のプロセスのプロセス数との大小関係に基づいて、選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かが判定される。
 したがって、選択された前記終了候補のプロセス群を構成する複数のプロセスのプロセス数と、既に保持している終了候補のプロセス群を構成する複数のプロセスのプロセス数との大小関係を判断することによって、選択された終了候補のプロセス群と、既に保持している終了候補のプロセス群とのうちのどちらを優先的に終了させるかを決定することができる。
 また、上記のメモリ管理装置において、前記プロセス群終了可否判定部は、プロセスごとに予め設定されている優先度レベルに基づいて、前記終了候補プロセス選択部によって選択された終了候補のプロセス群を構成する複数のプロセスを並べ替えることが好ましい。
 この構成によれば、プロセスごとに予め設定されている優先度レベルに基づいて、選択された終了候補のプロセス群を構成する複数のプロセスが並べ替えられるので、終了候補のプロセス群の順序を優先度に応じて並べ替えることができる。
 また、上記のメモリ管理装置において、前記複数のメモリブロックは、それぞれ個別に電力供給されることが好ましい。
 この構成によれば、複数のメモリブロックは、それぞれ個別に電力供給されるので、最も空き容量の大きいメモリブロックに供給される電力を遮断することにより、省電力化を実現することができる。
 なお、発明を実施するための形態の項においてなされた具体的な実施態様または実施例は、あくまでも、本発明の技術内容を明らかにするものであって、そのような具体例にのみ限定して狭義に解釈されるべきものではなく、本発明の精神と特許請求事項との範囲内で、種々変更して実施することができるものである。
 本発明に係るメモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路は、特定のメモリブロックの空き容量を可能な限り多く確保することができ、複数のメモリブロックを含むメモリを管理するメモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路として有用である。

Claims (9)

  1.  複数のメモリブロックを含むメモリを管理するメモリ管理装置であって、
     複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理部と、
     前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理部と、
     前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理部によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択部と、
     前記終了候補プロセス選択部によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定部と、
     前記終了候補プロセス選択部によって選択され、かつ前記優先終了判定部によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理部によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定部と、
     保持している終了候補のプロセス群を、前記プロセス群終了可否判定部によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定部とを備えるメモリ管理装置。
  2.  前記優先終了判定部は、前記終了候補プロセス選択部によって選択された前記終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量と、既に保持している終了候補のプロセス群を終了することにより確保できるメモリブロックの空き容量との大小関係に基づいて、前記終了候補プロセス選択部によって選択された前記終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する請求項1記載のメモリ管理装置。
  3.  前記優先終了判定部は、前記終了候補プロセス選択部によって選択された前記終了候補のプロセス群を構成する複数のプロセスのプロセス数と、既に保持している終了候補のプロセス群を構成する複数のプロセスのプロセス数との大小関係に基づいて、前記終了候補プロセス選択部によって選択された前記終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する請求項1又は2記載のメモリ管理装置。
  4.  前記プロセス群終了可否判定部は、プロセスごとに予め設定されている優先度レベルに基づいて、前記終了候補プロセス選択部によって選択された終了候補のプロセス群を構成する複数のプロセスを並べ替える請求項1~3のいずれかに記載のメモリ管理装置。
  5.  前記複数のメモリブロックは、それぞれ個別に電力供給される請求項1~4のいずれかに記載のメモリ管理装置。
  6.  複数のメモリブロックを含むメモリを管理するメモリ管理方法であって、
     複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理ステップと、
     前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理ステップと、
     前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理ステップにおいて管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択ステップと、
     前記終了候補プロセス選択ステップにおいて選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定ステップと、
     前記終了候補プロセス選択ステップにおいて選択され、かつ前記優先終了判定ステップにおいて優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理ステップにおいて管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定ステップと、
     保持している終了候補のプロセス群を、前記プロセス群終了可否判定ステップにおいて終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定ステップとを含むメモリ管理方法。
  7.  複数のメモリブロックを含むメモリを管理するメモリ管理プログラムであって、
     複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理部と、
     前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理部と、
     前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理部によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択部と、
     前記終了候補プロセス選択部によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定部と、
     前記終了候補プロセス選択部によって選択され、かつ前記優先終了判定部によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理部によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定部と、
     保持している終了候補のプロセス群を、前記プロセス群終了可否判定部によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定部としてコンピュータを機能させるメモリ管理プログラム。
  8.  複数のメモリブロックを含むメモリを管理するメモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体であって、
     複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理部と、
     前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理部と、
     前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理部によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択部と、
     前記終了候補プロセス選択部によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定部と、
     前記終了候補プロセス選択部によって選択され、かつ前記優先終了判定部によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理部によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定部と、
     保持している終了候補のプロセス群を、前記プロセス群終了可否判定部によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定部としてコンピュータを機能させるメモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体。
  9.  複数のメモリブロックを含むメモリを管理する集積回路であって、
     複数のプロセスを動作可能な情報処理システムで使用される前記プロセスに割り当てられている複数のメモリブロックの割り当てサイズを、前記プロセスごとにメモリブロック単位で管理するプロセス割り当てメモリ管理回路と、
     前記複数のメモリブロック全体のメモリ空き容量を管理するシステムメモリ管理回路と、
     前記メモリを解放するためのメモリ解放要求を前記情報処理システムから受け取ると、前記プロセス割り当てメモリ管理回路によって管理されている前記割り当てサイズに基づき、前記複数のメモリブロックごとに割り当てられている複数のプロセスを割り当てサイズが大きい順に抽出し、抽出した複数のプロセスを終了候補のプロセス群として前記複数のメモリブロックごとに選択する終了候補プロセス選択回路と、
     前記終了候補プロセス選択回路によって選択された終了候補のプロセス群が、既に保持している終了候補のプロセス群に対して優先的に終了すべきであるか否かを判定する優先終了判定回路と、
     前記終了候補プロセス選択回路によって選択され、かつ前記優先終了判定回路によって優先的に終了すべきであると判定された終了候補のプロセス群の順序を優先度に応じて並べ替え、前記システムメモリ管理回路によって管理されている前記複数のメモリブロック全体のメモリ空き容量に基づいて、当該並べ替えた終了候補のプロセス群が終了可能であるか否かを判定するプロセス群終了可否判定回路と、
     保持している終了候補のプロセス群を、前記プロセス群終了可否判定回路によって終了可能であると判定された前記終了候補のプロセス群に書き換え、全てのメモリブロックに対する終了候補のプロセス群の選択が終了すると、保持している終了候補のプロセス群を終了すべきプロセス群として決定する終了プロセス決定回路とを備える集積回路。
PCT/JP2011/001946 2010-05-31 2011-03-31 メモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路 WO2011151963A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2012518215A JP5405663B2 (ja) 2010-05-31 2011-03-31 メモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路
US13/387,000 US8601232B2 (en) 2010-05-31 2011-03-31 Memory management device, memory management method, memory management program, computer-readable recording medium recording memory management program and integrated circuit
CN201180003028.5A CN102473136B (zh) 2010-05-31 2011-03-31 存储器管理装置、存储器管理方法以及集成电路

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010124410 2010-05-31
JP2010-124410 2010-05-31

Publications (1)

Publication Number Publication Date
WO2011151963A1 true WO2011151963A1 (ja) 2011-12-08

Family

ID=45066357

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/001946 WO2011151963A1 (ja) 2010-05-31 2011-03-31 メモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路

Country Status (4)

Country Link
US (1) US8601232B2 (ja)
JP (1) JP5405663B2 (ja)
CN (1) CN102473136B (ja)
WO (1) WO2011151963A1 (ja)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914322A (zh) * 2013-01-05 2014-07-09 腾讯科技(深圳)有限公司 终端加速方法及终端
US20150095603A1 (en) * 2013-09-30 2015-04-02 Samsung Electronics Co., Ltd. Method and device for clearing process in electronic device
CN107203477A (zh) * 2017-06-16 2017-09-26 深圳市万普拉斯科技有限公司 内存分配方法、装置、电子设备及可读存储介质
JP6662819B2 (ja) * 2017-08-10 2020-03-11 ファナック株式会社 制御システム
JP6968016B2 (ja) * 2018-03-22 2021-11-17 キオクシア株式会社 ストレージデバイスおよびコンピュータシステム
JP7103167B2 (ja) * 2018-11-02 2022-07-20 京セラドキュメントソリューションズ株式会社 画像処理装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09212416A (ja) * 1995-11-30 1997-08-15 Toshiba Corp 計算機システムおよび計算機システムの電力管理方法
JP2000215099A (ja) * 1996-01-31 2000-08-04 Toshiba Corp 情報処理装置の資源管理装置、及び情報処理システムにおける資源管理方法
JP2000293386A (ja) * 1999-04-12 2000-10-20 Hitachi Ltd メモリ管理方式
JP2005011434A (ja) * 2003-06-19 2005-01-13 Mitsubishi Electric Corp ダイナミックメモリ制御装置及びこれを用いた携帯端末
JP2005196343A (ja) * 2004-01-05 2005-07-21 Mitsubishi Electric Corp メモリ管理装置及びメモリ管理方法及びプログラム
JP2005301801A (ja) * 2004-04-14 2005-10-27 Nec Corp 情報処理装置、メモリ管理装置、およびプログラム
JP2007086909A (ja) * 2005-09-20 2007-04-05 Nec Corp コンピュータ、携帯端末装置、電力制御方法、電力制御プログラム

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100608012B1 (ko) * 2004-11-05 2006-08-02 삼성전자주식회사 데이터 백업 방법 및 장치
JP4690783B2 (ja) * 2005-06-08 2011-06-01 株式会社日立製作所 ボリューム管理システムおよびその方法
JP5406363B2 (ja) * 2009-10-27 2014-02-05 株式会社日立製作所 プール領域の一部の領域を動的にデータ格納領域として割り当てる記憶制御装置及び記憶制御方法
JP5531091B2 (ja) * 2009-11-19 2014-06-25 株式会社日立製作所 計算機システム及びその負荷均等化制御方法
US20110191447A1 (en) * 2010-01-29 2011-08-04 Clarendon Foundation, Inc. Content distribution system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09212416A (ja) * 1995-11-30 1997-08-15 Toshiba Corp 計算機システムおよび計算機システムの電力管理方法
JP2000215099A (ja) * 1996-01-31 2000-08-04 Toshiba Corp 情報処理装置の資源管理装置、及び情報処理システムにおける資源管理方法
JP2000293386A (ja) * 1999-04-12 2000-10-20 Hitachi Ltd メモリ管理方式
JP2005011434A (ja) * 2003-06-19 2005-01-13 Mitsubishi Electric Corp ダイナミックメモリ制御装置及びこれを用いた携帯端末
JP2005196343A (ja) * 2004-01-05 2005-07-21 Mitsubishi Electric Corp メモリ管理装置及びメモリ管理方法及びプログラム
JP2005301801A (ja) * 2004-04-14 2005-10-27 Nec Corp 情報処理装置、メモリ管理装置、およびプログラム
JP2007086909A (ja) * 2005-09-20 2007-04-05 Nec Corp コンピュータ、携帯端末装置、電力制御方法、電力制御プログラム

Also Published As

Publication number Publication date
US20120124320A1 (en) 2012-05-17
CN102473136A (zh) 2012-05-23
JP5405663B2 (ja) 2014-02-05
CN102473136B (zh) 2014-12-31
US8601232B2 (en) 2013-12-03
JPWO2011151963A1 (ja) 2013-07-25

Similar Documents

Publication Publication Date Title
JP5405663B2 (ja) メモリ管理装置、メモリ管理方法、メモリ管理プログラム、メモリ管理プログラムを記録したコンピュータ読み取り可能な記録媒体及び集積回路
CA2988269C (en) Opportunistic multitasking
US8429374B2 (en) System and method for read-while-write with NAND memory device
US20080301673A1 (en) Information Terminal, Computer Resource Managine Method, and Virtual Machine Execution Switching Method
JP4886866B2 (ja) 主記憶装置へのアクセスを高速化する方法および記憶装置システム
US20140067879A1 (en) Application management for a terminal
JP2007026094A (ja) 実行装置およびアプリケーションプログラム
CN103443770A (zh) 终端装置、进程管理方法以及进程管理程序
KR102100458B1 (ko) 메모리를 관리하기 위한 방법 및 그 전자 장치
CN109960589B (zh) 嵌入式系统的系统软件层的实现方法、装置及可读介质
CN104104705B (zh) 分布式存储系统的接入方法和设备
US11431182B2 (en) Resource statistics collection method and apparatus and terminal
CN103201720B (zh) 虚拟计算机控制装置、虚拟计算机控制方法以及集成电路
JP5184268B2 (ja) 情報処理装置及びプログラム
JP4719137B2 (ja) 複数プログラムの制御管理方法および制御管理装置
JP2009020555A (ja) スワップ処理装置
JP2012221217A (ja) メモリ管理装置、メモリ管理方法、および、制御プログラム
JP6273907B2 (ja) 車両用機器
US9058113B2 (en) Storage region providing device, storage region providing method, and recording medium
JP5424574B2 (ja) ナビゲーション装置
JP6166758B2 (ja) 情報処理システム、情報処理方法、および情報処理プログラム
US20220353874A1 (en) Method and Apparatus for Maximizing a Number of Connections That Can Be Executed from a Mobile Application
JP2012032896A (ja) 情報処理装置、メモリ容量制御方法及びメモリ容量制御プログラム
CN117389744A (zh) 一种闪存调度方法、系统、设备及计算机可读存储介质
CN112905344A (zh) 一种存储系统中的资源调度方法、装置、设备及介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180003028.5

Country of ref document: CN

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

Ref document number: 11789378

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 13387000

Country of ref document: US

Ref document number: 2012518215

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11789378

Country of ref document: EP

Kind code of ref document: A1