KR20080012664A - Safe sharing of heap memory among multiple applications without the virtual memory capabilities and thereof computer - Google Patents

Safe sharing of heap memory among multiple applications without the virtual memory capabilities and thereof computer Download PDF

Info

Publication number
KR20080012664A
KR20080012664A KR1020060073844A KR20060073844A KR20080012664A KR 20080012664 A KR20080012664 A KR 20080012664A KR 1020060073844 A KR1020060073844 A KR 1020060073844A KR 20060073844 A KR20060073844 A KR 20060073844A KR 20080012664 A KR20080012664 A KR 20080012664A
Authority
KR
South Korea
Prior art keywords
memory
heap
application
management module
applications
Prior art date
Application number
KR1020060073844A
Other languages
Korean (ko)
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 KR1020060073844A priority Critical patent/KR20080012664A/en
Publication of KR20080012664A publication Critical patent/KR20080012664A/en

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/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • G06F12/0269Incremental or concurrent garbage collection, e.g. in real-time systems
    • G06F12/0276Generational garbage collection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1458Protection against unauthorised use of memory or access to memory by checking the subject access rights
    • G06F12/1483Protection against unauthorised use of memory or access to memory by checking the subject access rights using an access-table, e.g. matrix or list
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • 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/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Abstract

A computer and a method for managing a heap area of a plurality of application programs without any virtual memory are provided to manage a memory to minimize forcible termination of the application program owing to memory shortage in a computing environment having no virtual memory and a physically limited memory. A heap managing module requests return to a physical memory pool by assigning the memory to a heap space distributed to respective application programs and finding the memory not used by the heap through garbage collection. A global heap memory pool managing module of an OS(Operating System) level registers the memory returned from the heap memory module of an application program level to the pool of the physical memory usable as the heap area and sets access right to the registered memory. A memory protector sets the access right for permitting only the global heap memory pool managing module to access the registered memory and protecting the returned memory from the access of other application programs.

Description

가상 메모리없이 다수의 응용프로그램들의 힙 영역을 관리하는 컴퓨터 및 그 방법{Safe sharing of heap memory among multiple applications without the virtual memory capabilities and thereof computer}Computer and method for managing heap area of multiple applications without virtual memory {Safe sharing of heap memory among multiple applications without the virtual memory capabilities and according computer}

도 1은 가상 메모리 기능이 없는 컴퓨팅 환경에서 여러 개의 응용프로그램들 별로 메모리를 할당 하는 종래의 방식을 예시하는 도면이다.1 is a diagram illustrating a conventional method of allocating memory for several applications in a computing environment without a virtual memory function.

도 2는 본 발명의 실시 시의 응용프로그램들 간의 물리적인 힙 사용 개념도이다.2 is a conceptual diagram of physical heap usage between applications in the practice of the present invention.

도 3은 응용프로그램 레벨의 힙 메모리 관리 모듈과 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈 및 상기 두 관리 모듈의 상호작용을 보여주는 개념도이다.3 is a conceptual diagram illustrating an interaction between an application level heap memory management module, an operating system level global heap memory pool management module, and the two management modules.

도 4는 여러 개의 응용프로그램들이 필요에 따라, 힙을 더 요구하여 할당 받고, 반납함으로써, 수행됨을 예시하는 도면이다.4 is a diagram illustrating that several application programs are performed by requesting, allocating, and returning a heap as needed.

도 5는 하나의 응용프로그램의 힙 공간이 불연속적인 작은 공간들로 이루질 수 있음을 보여주는 개념도이다.5 is a conceptual diagram showing that heap space of one application program may consist of discrete small spaces.

도 6, 7은 응용프로그램 레벨의 힙 관리 모듈과 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈의 상호작용을 설명하기 위한 일 실시예에 대한 흐름도이다.6 and 7 are flowcharts illustrating an embodiment for describing an interaction between an application level heap management module and an operating system level global heap memory pool management module.

본 발명은 가상 메모리 기능이 부재한 컴퓨팅 환경에서, 여러 개의 응용프로그램 간에 안전한 메모리 공유에 관한 것으로써, 특히 제한된 물리적인 메모리를 최대한 이용해서, 메모리의 부족으로 인한 응용프로그램 수행의 중단을 최소화하는 방법에 관한 것이다. The present invention relates to secure memory sharing among multiple applications in a computing environment without virtual memory functions, and in particular, a method of minimizing interruption of application execution due to lack of memory, in particular by making full use of limited physical memory. It is about.

사용자의 요구가 다양화 됨에 따라, 요즈음에는 프로세서(processor), 메모리, 파워(power) 등의 컴퓨팅 환경이 제한된 소형 휴대 기기, 모바일 및 내장형 기기 등에도, 복수개의 응용프로그램이 함께 동작하는 멀티프로그래밍(multiprogramming) 이 선호되고 있는 추세이다. 가상 메모리 기능이 없는 컴퓨팅 환경에서 멀티프로그래밍을 지원하려면, 이미 가상 메모리를 가정하고 개발된 종래의 코드 생성 툴들을(예: 컴파일러, 로더, 링커) 최대한 이용하기 위해서, 각 응용프로그램 별로 일정한 크기의 연속된 주소 공간을 할당하는 것이 일반적이다. 도 1은 종래 기술이 각 응용 프로그램 별로 메모리를 할당한 모습을 보여준다. 이러한 종래의 메모리 할당은 하나의 응용프로그램이 할당된 메모리의 일부만을 사용하더라도, 다른 하나의 응용프로그램은 메모리가 부족한 상황이 일어날 수 있다는 문제점을 지닌다. 이와 같은 상황에서, 메모리가 부족한 응용프로그램은 강제 종료된다. As user demands diversify, nowadays, multiple applications that work together in small portable devices, mobile devices, and embedded devices that have limited computing environments such as processors, memory, power, etc. Multiprogramming is the preferred trend. To support multiprogramming in computing environments that do not have virtual memory capabilities, a constant size sequence for each application program can be used to make full use of conventional code generation tools (eg compilers, loaders, and linkers) that assume virtual memory. It is common to allocate reserved address space. 1 shows a state in which the prior art allocates memory for each application program. This conventional memory allocation has a problem that even if one application uses only a part of allocated memory, another application may run out of memory. In such a situation, an application that runs out of memory is forced to terminate.

본 발명은 상기와 같은 문제점을 해결하기 위해 창작된 것으로서, 본 발명의 목적은 가상 메모리가 없고 물리적인 메모리가 제한된 컴퓨팅 환경에서도, 응용프 로그램의 수행이 메모리 부족으로 인해 강제 종료되는 상황이 최소화 되도록 메모리를 관리하는 것이다. The present invention was created to solve the above problems, and an object of the present invention is to minimize the situation in which execution of an application is forcibly terminated due to insufficient memory, even in a computing environment in which virtual memory is limited and physical memory is limited. Manage memory as much as possible.

좀 더 구체적으로는, 응용프로그램이 수행 도중에 필요한 만큼 메모리를 더 할당 받을 수 있도록 하고, 반대로 할당 받은 메모리의 일부분이 더 이상 사용되지 않을 때에는 다른 응용프로그램에 의해 사용될 수 있도록 반납함으로써, 제한된 물리적인 메모리 공간이 여러 개의 응용프로그램에 의해 효과적으로 이용될 수 있게 한다. 특히, 본 발명은 전체적인 사용량이 크고, 프로그램 수행 도중에 그 양이 동적으로 변하는 힙 메모리 영역 관리를 목적으로 한다. More specifically, limited physical memory by allowing an application to allocate more memory as needed during execution and, conversely, returning some of the allocated memory for use by other applications when it is no longer used. Allows space to be used effectively by multiple applications. In particular, the present invention aims to manage a heap memory area in which the overall amount of usage is large and the amount thereof changes dynamically during program execution.

상기 본 발명의 목적을 달성하기 위한 기술적 사상으로서, 본 발명에서는 다수의 응용프로그램들이 실행시 가상 메모리가 존재하지 않는 컴퓨터에서, 하나의 응용프로그램이 실행중 메모리가 부족할 때 응용프로그램 레벨의 힙 관리 모듈이 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈에게 소정의 크기의 힙 메모리를 요청하는 제 1단계와, 상기 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈이 물리적 메모리의 풀에서 소정의 크기 이상의 비어있는 메모리를 찾는 제 2단계와, 상기 찾아진 메모리에 대하여 상기 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈이 접근 권한을 설정하는 제 3단계를 포함하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 방법이 제시된다.As a technical idea for achieving the object of the present invention, in the present invention, a heap management module at the application level when one application is running out of memory in a computer that does not exist a virtual memory when a plurality of applications are running A first step of requesting a heap memory of a predetermined size from the operating system-level global heap memory pool management module, and the operating system-level global heap memory pool management module finding an empty memory of a predetermined size or more in a pool of physical memory. Managing a heap area of a plurality of applications in a computer in which virtual memory does not exist, including a second step and a third step of setting an access right by the operating system-level global heap memory pool management module to the found memory. The method is presented.

이하에서는 본 발명의 실시예에 대한 발명의 구성 및 작용에 대하여 첨부된 도면을 참조하면서 상세히 설명하기로 한다.Hereinafter, with reference to the accompanying drawings for the configuration and operation of the invention for the embodiment of the present invention will be described in detail.

도 2는 본 발명의 실시 시의 응용프로그램들 간의 물리적인 힙 사용 개념도이다. 도 1에 나타난 종래 기술에서와는 달리, 각 응용프로그램이 물리적인 메모리 풀로부터 힙 영역을 필요에 따라 할당받아서 사용한다. 각 응용프로그램 별로 할당받은 공간들의 집합이 그 응용프로그램의 전체 힙을 구성하며, 각 공간들은 더 이상 사용되지 않을 때에, 시스템에 반납될 수 있다. 하나의 응용프로그램의 힙에 속한 공간들은 서로 물리적으로 연속적일 필요가 없다.2 is a conceptual diagram of physical heap usage between applications in the practice of the present invention. Unlike the prior art shown in FIG. 1, each application program allocates and uses a heap area from a physical memory pool as needed. The set of space allocated for each application constitutes the entire heap of that application, and each space can be returned to the system when it is no longer used. The spaces in a heap of an application need not be physically contiguous with each other.

도 3에 본 발명의 구성 요소인, 응용프로그램 레벨의 힙 메모리 관리 모듈과, 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈 및 상기 두 모듈의 상호 작용이 도시되어 있다. 본 발명은, 응용프로그램 별로 할당된 힙 공간에 객체의 할당 및 가비지 수거(garbage collection)를 담당하고, 응용프로그램의 필요에 따라 힙 공간을 더 요구하고, 남는 힙 공간이 있으면 반납하는, 응용프로그램 레벨의 힙 메모리 관리 모듈과; 각 응용프로그램의 요구에 따라 힙 공간을 더 할당하고, 응용프로그램이 반납한 힙 공간을 수집하여 관리하며, 각 응용프로그램의 메모리 주소 공간의 보호를 위해 메모리 주소의 영역 별로 접근권한을 설정하는 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈을 포함하여 구성된다.3 illustrates an application level heap memory management module, an operating system level global heap memory pool management module, and the interaction between the two modules, which are components of the present invention. The present invention is responsible for allocating and garbage collection of objects in the heap space allocated for each application, requiring more heap space according to the needs of the application, and returning any remaining heap space if there is an application level. Heap memory management module; An operating system level that allocates more heap space as required by each application, collects and manages the heap space returned by the application, and sets access permissions by area of memory address to protect each application's memory address space. It is configured to include the global heap memory pool management module.

가상 메모리가 없는 상태에서, 응용프로그램이 힙 영역을 동적으로 더 할당 받거나, 반납하게 되면, 그 응용프로그램의 전체적인 힙 영역은 물리적으로 불연속적인(non-contiguous) 공간이 될 수 있는데, 본 발명의 상기 응용프로그램 레벨의 힙 메모리 관리 모듈은 한 응용프로그램이 불연속적인 힙 공간을 하나의 힙으로서 관리할 수 있게 하는 방법을 포함한다. In the absence of virtual memory, if an application dynamically allocates or returns a heap area dynamically, the overall heap area of the application may become a physical non-contiguous space. Application-level heap memory management modules include a method that allows an application to manage discrete heap space as a heap.

또한, 활성화된 응용프로그램의 접근으로부터 대기 상태에 있는 응용프로그램들의 모든 메모리 주소 공간을 보호하기 위하여, 본 발명은 운영체제 레벨에서 메모리 주소 보호 메커니즘에 필요한 설정을 유지 및 갱신하는 단계를 포함한다. 주소 보호 메커니즘은 특정 주소 범위에 접근 권한을 지정하여, 이 접근권한에 어긋나는 접근을 허용하지 않는 방식을 취하기만 하면, 하드웨어 또는 소프트웨어적인 방법 중 구체적으로 어떻게 구현되는 지는 본 발명이 실시되는 데 상관이 없다. In addition, to protect all memory address space of applications in standby from access of an activated application, the present invention includes maintaining and updating the settings required for the memory address protection mechanism at the operating system level. The address protection mechanism only specifies the access rights to a particular address range, and takes a manner that does not allow access contrary to this access rights, and it is irrelevant how the present invention is implemented whether it is a hardware or software method. none.

도 4는 본 발명을 실행했을 시, 세 개의 응용프로그램이 힙 영역으로 사용가능한 물리적 메모리의 풀을 사용하는 예이다. 시스템에 주어진 힙으로 사용 가능한 물리적인 메모리의 총량은 256 KB이다. 응용프로그램 1, 2, 3 은 각각 총 64 KB, 96 KB, 128 KB의 힙을 사용한다. 따라서 종래의 응용프로그램마다 연속된 하나의 주소 공간을 할당하는 방식으로는 메모리의 부족으로 인해 세 개의 응용프로그램이 같이 수행될 수 없다. 그러나 본 발명을 실행하면 각 응용프로그램들은 처음에는 각각 32 KB, 32 KB, 64 KB의 힙 영역을 할당 받아 수행을 시작하고, 수행 도중 힙 영역을 필요한 만큼 더 할당받음으로써, 세 개의 응용프로그램 모두 성공적으로 수행될 수 있다. 4 illustrates an example in which three application programs use a pool of physical memory available as a heap area when the present invention is implemented. The total amount of physical memory available to a given heap in the system is 256 KB. Applications 1, 2, and 3 each use a total of 64 KB, 96 KB, and 128 KB of heap. Therefore, in the conventional method of allocating one continuous address space for each application, the three applications cannot be executed together due to lack of memory. However, according to the present invention, each application program is initially allocated with 32 KB, 32 KB, and 64 KB of heap space, and starts to execute. All three applications are successfully allocated by allocating more heap space as necessary during execution. It can be performed as.

도 4에서 보듯, 본 발명을 실행하면, 하나의 응용프로그램의 힙이 메모리 주소상으로 불연속적일 수 있다. 도 5에 예시된 바처럼 상기 응용프로그램 레벨의 힙 관리 모듈은 하나의 연속된 힙 공간을 하나의 서브-힙으로 보고, 하나의 응용프로그램의 전체 힙을 서브-힙들의 집합으로 관리할 수 있다. 상기 응용프로그램 레벨의 힙 메모리 관리 모듈은, 응용프로그램 별로 배분된 힙 공간에 객체를 할당하고, 가비지 수집을 통해서 힙에서 더 이상 사용되지 않는 빈 공간을 관리한다. 힙에 할당된 객체에 대한 참조는 메모리의 물리적 주소로 이루어지기 때문에, 서브-힙들이 물리적으로 서로 떨어진 공간에 있더라도 문제없다. As shown in FIG. 4, when the present invention is implemented, a heap of one application program may be discontinuous on a memory address. As illustrated in FIG. 5, the application level heap management module may view one contiguous heap space as one sub-heap and manage the entire heap of one application as a set of sub-heaps. The application-level heap memory management module allocates objects to heap space allocated for each application and manages empty space that is no longer used in the heap through garbage collection. Since references to objects allocated on the heap are made up of physical addresses in memory, there is no problem even if the sub-heaps are physically separated from each other.

또한 도 6에 도시된 바와 같이, 응용프로그램 레벨의 힙 관리 모듈은 응용프로그램이 수행 도중, 힙 공간이 부족함을 인지하면 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈에게 일정 크기의 힙을 더 요청하여 할당받고, 이를 하나의 서브-힙으로서 전체 힙에 편입시킨다. 이 때, 할당된 메모리 주소 공간의 접근 및 보호는 메모리보호장치(memory protection unit)와 같은 전용 하드웨어의 도움을 받을 수 있다. 메모리보호장치는 특정 주소 범위에 접근 권한을 지정하여, 권한에 어긋나는 접근이 시도되면, 하드웨어적인 폴트를 일으키는 방식으로 메모리 주소 공간을 보호한다. 상기 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈은 요청한 응용프로그램이 읽기-쓰기 권한을 가지며, 나머지 응용프로그램의 메모리 주소 공간들은 변함없이 현재 활성화된 응용프로그램으로부터 접근 가능하지 못하도록 제공하는 힙의 접근 권한을 설정해준다. In addition, as shown in FIG. 6, when the application level heap management module recognizes that the heap space is insufficient while the application is running, the heap level management module requests an additional heap of a certain size from the global heap memory pool management module at the operating system level. , It is incorporated into the entire heap as one sub-heap. At this time, access and protection of the allocated memory address space may be assisted by dedicated hardware such as a memory protection unit. The memory protector assigns access rights to specific address ranges, which protects the memory address space in a way that causes a hardware fault if an unauthorized access is attempted. The operating system-level global heap memory pool management module sets the heap's access rights so that the requesting application has read-write permission, and the memory address spaces of the remaining applications are invariably accessible from the currently active application. Do it.

즉, 상기 접근권한은, 특정 응용프로그램에 대한 할당된 전체 힙 메모리가 다수의 서브 힙의 집합이 될 경우에도 힙 메모리의 할당을 요청한 응용프로그램에 대한 다수의 서로 다른 서브 힙들에 대하여 그 응용프로그램이 활성화되었을 때 그 응용프로그램의 읽기-쓰기 접근이 다함께 가능하게 하고, 그 응용프로그램이 비활성화되었을 때에는 다른 응용프로그램의 접근을 금하게 하도록, 다수의 서로 다른 메모리 주소 공간별로 접근 권한을 설정하는 메모리보호장치의 기능을 이용하여 설 정된다. 이로 인하여 상기 응용프로그램 레벨의 힙 관리 모듈은 물리적으로 서로 떨어져 있는 서브 힙들을 통틀어 자신의 힙으로 관리할 수 있게 된다.That is, the access right means that the application program is executed on a plurality of different sub heaps for the application requesting the allocation of the heap memory even when the total heap memory allocated for the specific application becomes the set of the plurality of sub heaps. A memory protector that sets access permissions for a number of different memory address spaces to enable read-write access for the application when enabled, and to prohibit access by other applications when the application is deactivated. It is set using the function of. As a result, the heap management module at the application level can manage the sub heaps physically separated from each other as its own heap.

도 7에 도시된 바와 같이, 가비지 수집에 의해 어떤 서브-힙의 전체 또는 일부가 빈 공간이 되면, 비게 된 서브-힙 전체 또는 일부를 해당 응용프로그램의 힙 영역에서 제외시킬 수 있다. 상기 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈은 응용프로그램으로부터 반납된 영역을 비어있는 힙 공간으로 풀에 등록하고, 활성화된 응용프로그램의 접근으로부터 보호되도록 접근 권한을 갱신한다. 즉, 이때의 접근권한은, 상기 등록된 힙메모리에 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈만이 접근하게 하고, 다른 응용프로그램의 접근으로부터 상기 반납된 메모리를 보호하도록 메모리 보호 장치를 이용하여 설정된다. 이렇게 하나의 응용프로그램으로부터 제외된 힙 공간은 다른 응용프로그램의 요청에 의해 그 응용프로그램의 서브-힙이 될 수 있다. As shown in FIG. 7, if all or part of a sub-heap becomes empty by garbage collection, all or part of the empty sub-heap may be excluded from the heap area of the corresponding application. The operating system-level global heap memory pool management module registers an area returned from an application as an empty heap space in the pool and updates an access right to be protected from access of an activated application. That is, the access right at this time is set using a memory protection device to allow only the operating system level global heap memory pool management module to access the registered heap memory, and to protect the returned memory from the access of other applications. . This heap space excluded from one application can become a sub-heap of that application at the request of another application.

문맥 전환(context switch)시에는 활성화 상태에서 대기 상태로 들어가는 응용프로그램의 모든 메모리 주소 공간에 대한 정보가 운영체제에 의해 저장되고, 대기 상태에서 활성화 상태로 올라가는 응용프로그램의 메모리 주소 공간에 대한 저장된 정보가 역시 운영 체제에 의해 적용된다.At the context switch, the operating system stores information about all the memory address spaces of the application that goes from the active state to the standby state, and the stored information about the memory address spaces of the application that goes from the standby state to the active state. It is also applied by the operating system.

이상으로 첨부된 도면을 참조하여 본 발명의 실시 예를 설명하였으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 따라서 이상에서 기술한 실시 예는 모든 면에서 예시적인 것이 며 한정적이 아닌 것이다.Although embodiments of the present invention have been described above with reference to the accompanying drawings, those skilled in the art to which the present invention pertains may implement the present invention in other specific forms without changing the technical spirit or essential features thereof. You will understand that. Therefore, the exemplary embodiments described above are exemplary in all respects and are not intended to be limiting.

본 발명은 제한된 메모리 공간을 가지며 가상 메모리 기능이 부재한 컴퓨팅 환경에서의 힙 메모리 관리에 관한 것으로서, 여러 개의 응용프로그램 간에 힙 영역으로 사용할 수 있는 메모리 공간을 안전하게 공유함으로써, 물리적인 메모리 공간의 한계를 극복하고, 응용프로그램들이 원활하게 수행되도록 한다. 본 발명은 제한된 컴퓨팅 자원을 가지며, 가상 메모리 기능이 탑재되지 않은 각종 내장형 기기(embedded devices), 예를 들면, 휴대폰, 소형 멀티미디어, 인터넷 기기 등의 메모리 관리에 활용 가능하다.The present invention relates to heap memory management in a computing environment having a limited memory space and virtual memory capabilities, and to securely share the memory space that can be used as a heap area between multiple applications, thereby limiting the physical memory space limitations Overcome and allow applications to run smoothly. The present invention has limited computing resources and can be utilized for memory management of various embedded devices (eg, mobile phones, small multimedia, Internet devices, etc.) that are not equipped with a virtual memory function.

Claims (13)

다수의 응용프로그램들이 실행시 가상 메모리가 존재하지 않는 컴퓨터에서, On computers that do not have virtual memory when many applications run, 하나의 응용프로그램이 실행중 메모리가 부족할때 응용프로그램 레벨의 힙 관리 모듈이 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈에게 소정의 크기의 힙 메모리를 요청하는 제 1단계와,A first step in which a heap management module at an application level requests a heap memory of a predetermined size from an operating system level global heap memory pool management module when one application runs out of memory; 상기 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈이 물리적 메모리의 풀에서 소정의 크기 이상의 비어있는 메모리를 찾는 제 2단계와,A second step of the operating system-level global heap memory pool management module finding an empty memory of a predetermined size or more in a pool of physical memory; 상기 찾아진 메모리에 대하여 상기 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈이 접근 권한을 설정하는 제 3단계를 포함하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 방법.And a third step of setting an access right by the operating system level global heap memory pool management module to the found memory. 청구항 1에 있어서,The method according to claim 1, 상기 제 3단계 후 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈이 소정의 크기의 힙 메모리를 응용프로그램 레벨의 힙 관리 모듈에게 전송하는 제 4단계를 더 포함하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 방법.And a fourth step of transmitting, by the operating system level global heap memory pool management module, the heap memory of a predetermined size to the application level heap management module after the third step. How to manage heap areas of programs. 청구항 2에 있어서,The method according to claim 2, 상기 제 4단계 후 전송받은 힙 메모리를 응용프로그램 레벨의 힙 관리 모듈 이 응용프로그램의 전체 힙에 편입시키고 관리하는 제 5단계를 더 포함하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 방법.The heap area of the plurality of applications in the computer does not exist further comprising a fifth step of the heap memory module received after the fourth step to incorporate and manage the heap level management module of the application level to the entire heap of the application How to manage it. 청구항 3에 있어서,The method according to claim 3, 상기 제 5 단계에서 응용프로그램의 전체 힙 메모리는, 메모리 주소 상으로 불연속적이고 다수의 서로 다른 메모리 주소를 갖는 서브 힙들의 집합인 것을 특징으로 하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 방법.The total heap memory of the application program in the fifth step is a collection of sub-heaps that are discontinuous on the memory address and have a plurality of different memory addresses. How to manage your realms. 청구항 4에 있어서,The method according to claim 4, 상기 제 3 단계에서 찾아진 메모리에 대해 설정되는 접근권한은, The access right set for the memory found in the third step is 다수의 서로 다른 메모리 주소 공간별로 접근 권한을 설정하는 메모리보호장치의 기능을 이용하여 설정되고, 하나의 응용프로그램에 대한 다수의 서로 다른 서브 힙들에 대하여 그 응용프로그램이 활성화되었을 때 그 응용프로그램의 읽기-쓰기 접근이 다함께 가능하게 하고, 그 응용프로그램이 비활성화되었을 때에는 다른 응용프로그램의 접근을 금하게 하는 것을 특징으로 하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 방법.It is configured using the ability of a memory protector to set access rights by multiple different memory address spaces, and when the application is activated for multiple different sub- heaps for an application A method of managing a heap area of multiple applications on a computer without virtual memory, characterized by enabling write access together and forbidding other applications when the application is deactivated. 다수의 응용프로그램들이 실행시 가상 메모리가 존재하지 않는 컴퓨터에서, On computers that do not have virtual memory when many applications run, 응용프로그램 레벨의 힙 관리 모듈이 다수의 응용프로그램의 메모리에서 가비지를 수집하여 서브-힙의 빈 메모리를 찾는 단계와,An application level heap management module collecting garbage in the memory of multiple applications to find free memory in the sub-heap; 상기 찾아진 빈 메모리를 응용프로그램 레벨의 힙 관리 모듈이 응용프로그램에서 제외시키는 단계와,An application level heap management module excluding the found free memory from the application; 상기 제외된 빈 메모리를 응용프로그램 레벨의 힙 관리 모듈이 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈에게 반납을 요청하는 단계와,Requesting, by the application level heap management module, to return the excluded free memory to an operating system level global heap memory pool management module; 상기 반납된 메모리를 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈이 힙 영역으로 사용가능한 물리적 메모리의 풀에 등록하는 단계와,Registering the returned memory in a pool of physical memory available to the heap area by an operating system level global heap memory pool management module; 상기 물리적 메모리의 풀에 등록된 메모리에 대해 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈이 접근 권한을 설정하는 단계를 포함하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 방법.And setting an access right by an operating system level global heap memory pool management module to a memory registered in the pool of physical memory. 청구항 6에 있어서,The method according to claim 6, 상기 등록된 메모리에 대하여 설정되는 접근 권한은,The access authority set for the registered memory is 상기 등록된 메모리에 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈만이 접근하게 하고, 다른 응용프로그램의 접근으로부터 상기 반납된 메모리를 보호하도록 메모리 보호 장치를 이용하여 설정되는 것을 특징으로 하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 방법.Virtual memory does not exist, characterized in that it is set using a memory protection device to allow only the operating system-level global heap memory pool management module to access the registered memory, and to protect the returned memory from access of other applications. To manage the heap area of multiple applications on a non-computer. 다수의 응용프로그램들이 실행시 가상 메모리가 존재하지 않는 컴퓨터에 있 어서,Many applications reside on computers that do not have virtual memory at run time, 다수의 응용프로그램별로 배분된 힙 공간에 메모리를 할당하고, 다수의 응용프로그램 중 임의의 프로그램에 대한 메모리가 부족할 때 소정 크기의 메모리를 요청하는 응용프로그램 레벨의 힙 관리 모듈과,An application level heap management module that allocates memory to heap space allocated by a plurality of applications and requests a predetermined amount of memory when the memory for any of the plurality of applications is insufficient; 상기 응용프로그램 레벨의 힙 관리 모듈이 요청한 소정의 크기의 메모리를 물리적 메모리의 풀에서 찾고, 이 찾아진 메모리에 대하여 접근권한을 설정한 후 응용프로그램 레벨의 힙 관리 모듈에게 메모리를 전송하는 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈을 포함하는 가상 메모리없이 다수의 응용프로그램들의 힙 영역을 관리하는 컴퓨터.An operating system level that finds a predetermined size of memory requested by the application level heap management module in a pool of physical memory, sets access rights to the found memory, and then transfers the memory to an application level heap management module. A computer that manages the heap area of many applications without virtual memory, including the global heap memory pool management module. 청구항 8에 있어서,The method according to claim 8, 상기 전송받은 메모리를 응용프로그램 레벨의 힙 관리 모듈이 응용프로그램의 전체 힙에 편입시키고 관리하는 하는 것을 특징으로 하는 가상 메모리없이 다수의 응용프로그램들의 힙 영역을 관리하는 컴퓨터.An application level heap management module incorporates and manages the received memory into the entire heap of an application. The computer managing heap areas of a plurality of applications without virtual memory. 청구항 9에 있어서,The method according to claim 9, 상기 응용프로그램의 전체 힙은, 메모리 주소 상으로 불연속적이고 다수의 서로 다른 메모리 주소를 갖는 서브 힙들의 집합인 것을 특징으로 하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 컴퓨터.The entire heap of the application is a computer that manages a heap area of a plurality of applications in a computer without virtual memory, wherein the entire heap is a set of sub-heaps that are discrete on a memory address and have a plurality of different memory addresses. . 청구항 10에 있어서,The method according to claim 10, 상기 찾아진 메모리에 대해 설정되는 접근권한은, The access right set for the found memory is 다수의 서로 다른 메모리 주소 공간별로 접근 권한을 설정하는 메모리보호장치의 기능을 이용하여 설정되고, 상기 임의의 응용프로그램에 대한 다수의 서로 다른 서브 힙들에 대하여 그 응용프로그램이 활성화되었을 때 그 응용프로그램의 읽기-쓰기 접근이 다함께 가능하게 하고, 그 응용프로그램이 비활성화되었을 때에는 다른 응용프로그램의 접근을 금하게 하는 것을 특징으로 하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 컴퓨터.It is configured using the function of a memory protector that sets access rights by a plurality of different memory address spaces, and when the application is activated for a plurality of different sub- heaps for the arbitrary application, A computer that manages a heap area of multiple applications on a computer that does not have virtual memory, characterized by enabling read-write access together and forbidding other applications when the application is deactivated. 다수의 응용프로그램들이 실행시 가상 메모리가 존재하지 않는 컴퓨터에 있어서,In computers where virtual applications do not exist when multiple applications run, 다수의 응용프로그램별로 배분된 힙 공간에 메모리를 할당하고 가비지 수집을 통해서 힙에서 사용하지 않는 메모리를 찾아내 물리적 메모리의 풀로 반납을 요청하는 응용프로그램 레벨의 힙 관리 모듈과,An application level heap management module that allocates memory to heap space allocated by multiple applications, finds unused memory in the heap through garbage collection, and requests that it be returned to the pool of physical memory; 상기 응용프로그램 레벨의 힙 관리 모듈이 반납한 메모리를 힙 영역으로 사용가능한 물리적 메모리의 풀에 등록하고 그 등록된 메모리에 대하여 접근권한을 설정하는 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈을 포함하는 가상 메모리없이 다수의 응용프로그램들의 힙 영역을 관리하는 컴퓨터.A virtual memory including an operating system-level global heap memory pool management module that registers the memory returned by the application-level heap management module to a pool of available physical memory as a heap area and sets access rights to the registered memory A computer that manages a heap area of a number of applications without the need. 청구항 12에 있어서,The method according to claim 12, 상기 등록된 메모리에 대하여 설정된 접근권한은,The access right set for the registered memory is 상기 등록된 메모리에 운영체제 레벨의 전역 힙 메모리 풀 관리 모듈만이 접근하게 하고, 다른 응용프로그램의 접근으로부터 상기 반납된 메모리를 보호하도록 메모리 보호 장치를 이용하여 설정되는 것을 특징으로 하는 가상 메모리가 존재하지 않는 컴퓨터에서 다수의 응용프로그램들의 힙 영역을 관리하는 컴퓨터.Virtual memory does not exist, characterized in that it is set using a memory protection device to allow only the operating system-level global heap memory pool management module to access the registered memory, and to protect the returned memory from access of other applications. A computer that manages the heap area of many applications on a non-computer.
KR1020060073844A 2006-08-04 2006-08-04 Safe sharing of heap memory among multiple applications without the virtual memory capabilities and thereof computer KR20080012664A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060073844A KR20080012664A (en) 2006-08-04 2006-08-04 Safe sharing of heap memory among multiple applications without the virtual memory capabilities and thereof computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060073844A KR20080012664A (en) 2006-08-04 2006-08-04 Safe sharing of heap memory among multiple applications without the virtual memory capabilities and thereof computer

Publications (1)

Publication Number Publication Date
KR20080012664A true KR20080012664A (en) 2008-02-12

Family

ID=39340747

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060073844A KR20080012664A (en) 2006-08-04 2006-08-04 Safe sharing of heap memory among multiple applications without the virtual memory capabilities and thereof computer

Country Status (1)

Country Link
KR (1) KR20080012664A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846546B2 (en) 2013-06-20 2017-12-19 Hanwha Techwin Co., Ltd. Method and apparatus for storing image
WO2022030964A1 (en) * 2020-08-04 2022-02-10 삼성전자 주식회사 Method for allocating virtual memory and electronic device supporting same
US20230137181A1 (en) * 2020-07-21 2023-05-04 Cisco Technology, Inc. Reuse of execution environments while guaranteeing isolation in serverless computing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9846546B2 (en) 2013-06-20 2017-12-19 Hanwha Techwin Co., Ltd. Method and apparatus for storing image
US20230137181A1 (en) * 2020-07-21 2023-05-04 Cisco Technology, Inc. Reuse of execution environments while guaranteeing isolation in serverless computing
US11882184B2 (en) * 2020-07-21 2024-01-23 Cisco Technology, Inc. Reuse of execution environments while guaranteeing isolation in serverless computing
WO2022030964A1 (en) * 2020-08-04 2022-02-10 삼성전자 주식회사 Method for allocating virtual memory and electronic device supporting same

Similar Documents

Publication Publication Date Title
US10423435B1 (en) Page swapping in virtual machine environment
US9529611B2 (en) Cooperative memory resource management via application-level balloon
JP4639233B2 (en) System and method for virtualization of processor resources
US7757034B1 (en) Expansion of virtualized physical memory of virtual machine
US7870363B2 (en) Methods and arrangements to remap non-volatile storage
US8255431B2 (en) Managing memory
CN113094700A (en) System for executing safety operation and method for executing safety operation by system
KR20110050457A (en) Avoidance of self eviction caused by dynamic memory allocation in a flash memory storage device
US8117418B1 (en) Method and system for managing virtual addresses of a plurality of processes corresponding to an application
Wang et al. Canvas: Isolated and Adaptive Swapping for {Multi-Applications} on Remote Memory
US5875487A (en) System and method for providing efficient shared memory in a virtual memory system
Aron et al. The SawMill framework for virtual memory diversity
Jo et al. RackMem: a tailored caching layer for rack scale computing
EP0747827B1 (en) System and method for providing shared memory in a multi-tasking environment
CN103782273A (en) Memory allocation method, program, and system
Elkaduwe et al. Kernel design for isolation and assurance of physical memory
KR20080012664A (en) Safe sharing of heap memory among multiple applications without the virtual memory capabilities and thereof computer
US20140289739A1 (en) Allocating and sharing a data object among program instances
US7840772B2 (en) Physical memory control using memory classes
US7793051B1 (en) Global shared memory subsystem
CN105677481A (en) Method and system for processing data and electronic equipment
KR101460451B1 (en) Apparatus and method for controlling process address space
KR101535792B1 (en) Apparatus for configuring operating system and method thereof
WO2017142525A1 (en) Allocating a zone of a shared memory region
CN110929304A (en) RISC-V based memory protection method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application