KR20100067248A - Method for managing swap space for flash memory based swap storage device - Google Patents

Method for managing swap space for flash memory based swap storage device Download PDF

Info

Publication number
KR20100067248A
KR20100067248A KR1020080125722A KR20080125722A KR20100067248A KR 20100067248 A KR20100067248 A KR 20100067248A KR 1020080125722 A KR1020080125722 A KR 1020080125722A KR 20080125722 A KR20080125722 A KR 20080125722A KR 20100067248 A KR20100067248 A KR 20100067248A
Authority
KR
South Korea
Prior art keywords
segment
swap
segments
swap space
computer system
Prior art date
Application number
KR1020080125722A
Other languages
Korean (ko)
Other versions
KR100992079B1 (en
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 KR1020080125722A priority Critical patent/KR100992079B1/en
Publication of KR20100067248A publication Critical patent/KR20100067248A/en
Application granted granted Critical
Publication of KR100992079B1 publication Critical patent/KR100992079B1/en

Links

Images

Classifications

    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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/0653Monitoring storage devices or systems
    • 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/5016Allocation 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 the resource being the memory

Landscapes

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

Abstract

PURPOSE: A method for managing swap space using a flash memory in a swap storage device is provided to reduce termination or start-up time of a flash memory. CONSTITUTION: A swap space includes a plurality of segments(100). Each segment includes a plurality of blocks(101). Each blocks includes a plurality of page slots(102). Each segment uses the first page slot of the first block as a segment header(103). The segment header manages segment information.

Description

플래시 메모리를 사용하는 스왑 저장장치에서의 스왑공간 관리방법{Method for managing swap space for flash memory based swap storage device}Method for managing swap space for flash memory based swap storage device}

본 발명은 스왑공간 관리방법에 관한 것으로서, 특히 플래시 메모리를 스왑공간으로 사용하는 컴퓨터 시스템에서 필요한 메모리 용량을 줄이고 시스템의 종료시간과 기동시간을 줄일 수 있는 스왑공간 관리방법에 관한 것이다. The present invention relates to a swap space management method, and more particularly, to a swap space management method that can reduce the memory capacity required in a computer system using a flash memory as swap space, and can reduce the shutdown and startup time of the system.

컴퓨터 운영체제(OS)는 가상 메모리(virtual memory) 기능을 제공한다. 가상 메모리는 실제 물리 메모리의 크기에 상관없이 많은 프로세스를 수행할 수 있게 해주는 역할을 한다. 가상 메모리의 대표적인 구현 방법으로 요구 페이징(demand paging) 기법이 있다. The computer operating system (OS) provides a virtual memory function. Virtual memory plays a role in enabling many processes to be executed regardless of the size of physical physical memory. A typical implementation method of virtual memory is a demand paging technique.

도 1은 요구 페이징 기법을 설명하기 위한 도면이다. 도 1에 도시된 바와 같이, 요구 페이징 기법에서 물리 메모리(10)는 고정된 크기의 페이지 프레임으로 구성되며, 프로그램이 수행될 때 필요한 코드와 데이터(11)를 비휘발성 저장장치(20) 의 사용자 파일 시스템 영역(user file system region, 28) 상에 있는 해당 프로그램 파일(21)에서 페이지 단위로 읽어 물리 메모리(10)의 페이지 프레임에 로드한다. 프로세스가 수행될 때 스택과 힙(12)은 비휘발성 저장장치(20)의 프로그램에 있지 않으며 필요할 때 물리 메모리(10)의 페이지 프레임을 할당하여 생성된다. 1 is a diagram for explaining a required paging scheme. As shown in FIG. 1, in the demand paging scheme, the physical memory 10 is configured as a page frame having a fixed size, and the user of the nonvolatile storage device 20 may store code and data 11 required when the program is executed. The program file 21 in the user file system region 28 is read in units of pages and loaded into a page frame of the physical memory 10. When the process is performed, the stack and heap 12 are not in the program of nonvolatile storage 20 and are created by allocating page frames of physical memory 10 as needed.

많은 프로세스들이 물리 메모리(10)의 페이지 프레임을 할당하여 사용하게 되면 물리 메모리(10)의 가용(free) 페이지 프레임이 부족하게 된다. 운영체제(OS)는 충분한 가용 페이지 프레임의 확보를 위해서 특정 페이지들을 선택하여 원래의 저장장치, 즉 비휘발성 저장장치(20)에 저장하고 물리 메모리(10)에서 페이지가 사용하던 페이지 프레임을 가용 페이지 프레임으로 바꾸는 페이지 재생(page reclamation) 작업을 수행한다. When many processes allocate and use page frames of the physical memory 10, the free page frames of the physical memory 10 may be insufficient. The operating system (OS) selects specific pages in order to secure sufficient available page frames, stores them in the original storage device, that is, nonvolatile storage device 20, and uses the page frames used by the pages in physical memory 10. Perform page reclamation.

프로세스 내용 중에서 스택과 힙(12)은 비휘발성 저장장치(20)에 원본이 없기 때문에 이러한 페이지들을 위해서 비휘발성 저장장치(20)의 일부 공간을 스왑공간(29)으로 만들어 임시로 저장한다. 페이지 재생 작업에서 선택되어 스왑공간(29)에 저장하는 것을 스왑 아웃(swap out)이라 하고, 스왑 아웃된 페이지가 나중에 필요하게 되어 스왑공간(29)에서 읽어져 물리 메모리(10)의 페이지 프레임에 로드되는 것을 스왑 인(swap in)이라 한다.Since the stack and the heap 12 have no original in the nonvolatile storage device 20 in the process contents, some space of the nonvolatile storage device 20 is made into the swap space 29 for these pages and is temporarily stored. Swap out is selected in the page replay operation and is stored in swap space 29. Swap out pages are needed later and are read from swap space 29 and stored in page frames of physical memory 10. What is loaded is called swap in.

물리 메모리(10)로는 통상적으로 램(RAM)이 사용되고 비휘발성 저장장치(20)로는 하드디스크나 플래시 메모리가 사용된다. NAND 플래시 메모리는 여러 개의 삭제 블록(erase block)으로 이루어지며 하나의 삭제 블록은 고정된 개수의 페이지(page)로 이루어진다. 데이터의 입출력 단위는 페이지이다. 데이터를 쓰기 위해 서는 해당 블록이 삭제되어 초기화되어 있어야 한다. 따라서 데이터의 변경을 위해서는 해당 블록을 삭제한 후 새 데이터를 써야 한다. 플래시 메모리에서 삭제 연산은 약 2ms의 수행시간이 걸려 수 us가 걸리는 읽기와 쓰기 연산보다 매우 느리다. RAM is typically used as the physical memory 10, and a hard disk or flash memory is used as the nonvolatile storage device 20. A NAND flash memory consists of several erase blocks, and one erase block consists of a fixed number of pages. I / O units of data are pages. To write data, the block must be deleted and initialized. Therefore, to change the data, delete the block and write new data. Erase operations in flash memory are much slower than read and write operations, which can take several milliseconds and take several us.

도 2는 종래의 플래시 메모리의 구성을 설명하기 위한 도면이다. 도2를 참조하면, 플래시 메모리는 복수개의 블록(101)으로 구성되며, 블록(101)의 각각은 복수개의 페이지 슬롯(102)으로 구성된다. 읽기/쓰기 작업은 페이지 슬롯(102) 단위로 이루어지지만 삭제 작업은 블록(101) 단위로 이루어진다. 플래시 메모리는 삭제 연산이 선행되지 않으면 데이터를 저장할 수 없고 삭제 연산은 쓰기/읽기 연산에 비해 많은 시간이 소요된다. 2 is a view for explaining the configuration of a conventional flash memory. Referring to FIG. 2, the flash memory includes a plurality of blocks 101, and each of the blocks 101 includes a plurality of page slots 102. Read / write operations are performed in units of page slots 102, but delete operations are performed in blocks 101. Flash memory cannot store data unless the delete operation precedes it, and the delete operation takes more time than the write / read operation.

컴퓨터 시스템을 기동시켰을 때에 스왑 공간을 사용하기 위해서는 이미 사용되었던 블록(101)들을 삭제하여 초기화해야 한다. 스왑공간의 블록(101)을 삭제하고 초기화하는 작업은 컴퓨터 시스템이 종료될 때나 다시 기동될 때 수행될 수 있다. 그런데 스왑공간의 모든 블록(101)들을 삭제하는 것은 오랜 시간이 걸린다. 예를 들어, 스왑공간이 플래시 메모리의 삭제 블록 10,000개로 구성되어 있다면 한 블록의 삭제 시간이 2ms이므로 전체 스왑공간의 삭제에는 약 20초가 걸린다. In order to use the swap space when the computer system is started, it is necessary to delete and initialize blocks 101 that have already been used. Deleting and initializing the block 101 of the swap space may be performed when the computer system is shut down or restarted. However, deleting all the blocks 101 of the swap space takes a long time. For example, if the swap space consists of 10,000 erased blocks of flash memory, the erase time of one block is about 2ms, and the entire swap space is about 20 seconds.

또한 스왑공간의 상태를 관리하기 위해 상태 정보를 메모리에 저장할 때 블록(101) 단위로 관리가 이루어지면 메모리가 많이 필요하게 된다. 예로써 블록의 데이터 저장여부와 삭제 횟수와 같은 상태 정보를 위해서 블록(101)당 4바이트의 메모리가 사용된다면 스왑공간이 플래시 메모리의 삭제 블록 10,000개로 구성되어 있을 경우 40,000 바이트의 메모리가 필요하게 된다. Also, when the state information is stored in the memory in order to manage the state of the swap space, if the management is performed in units of blocks 101, a lot of memory is required. For example, if 4 bytes of memory per block 101 are used for status information such as whether data is stored and the number of deletions of a block, 40,000 bytes of memory are required if the swap space consists of 10,000 erased blocks of flash memory. .

상술한 바와 같이 종래의 스왑공간 관리방법은 블록(101) 단위로 이루어지기 때문에 스왑공간 관리를 위해 메모리 용량이 크게 요구되고 또한 컴퓨터 시스템의 종료와 기동시간이 길어진다는 단점이 있다. As described above, since the conventional swap space management method is performed in units of blocks 101, a large memory capacity is required for swap space management, and a shutdown and start-up time of a computer system are long.

따라서 본 발명이 해결하고자 하는 과제는, 플래시 메모리를 스왑공간으로 사용하는 컴퓨터 시스템에서 필요한 메모리 용량을 줄이고 시스템의 종료와 기동시간을 줄일 수 있는 스왑공간 관리방법을 제공하는 데 있다. Accordingly, an object of the present invention is to provide a swap space management method capable of reducing the required memory capacity of a computer system using a flash memory as a swap space and reducing the shutdown and startup time of the system.

상기 과제를 달성하기 위한 본 발명에 따른 스왑공간 관리방법은, 컴퓨터 시스템에서 플래시 메모리를 스왑 저장장치로 사용하는 경우에 스왑공간을 복수개의 세그먼트로 구성하되, 상기 세그먼트 각각은 복수개의 블록으로 구성하고, 상기 블록 각각은 복수개의 페이지 슬롯으로 구성하여, 상기 세그먼트 단위로 상기 스왑공간을 관리하는 것을 특징으로 한다. In the swap space management method according to the present invention for achieving the above object, in the case of using a flash memory as a swap storage device in a computer system, the swap space is composed of a plurality of segments, each of the segments is composed of a plurality of blocks Each block may include a plurality of page slots to manage the swap space on a segment basis.

이를 위해서 상기 세그먼트 각각은 특정영역을 세그먼트 헤더로 사용하고, 상기 세그먼트 헤더는 해당 세그먼트에 수행된 삭제연산 횟수, 세그먼트 사용상태와 같은 세그먼트 정보를 관리한다. To this end, each of the segments uses a specific region as a segment header, and the segment header manages segment information such as the number of deletion operations performed on the segment and the segment usage status.

상기 컴퓨터 시스템의 종료 또는 기동 시에 상기 스왑공간의 세그먼트들 중 에서 일부를 선별적으로 선택하여 그 선택된 세그먼트의 블록들을 삭제하여 초기화하고, 이 때 초기화되지 않은 세그먼트는 상기 컴퓨터 시스템의 기동 후 시스템의 사용 중에 백그라운드로 초기화되는 것을 특징으로 한다. Upon shutdown or startup of the computer system, some of the segments of the swap space are selectively selected to be deleted by initializing by deleting blocks of the selected segment. Characterized in the background during use.

상기 컴퓨터 시스템의 운영체제는 리눅스일 수 있다. The operating system of the computer system may be Linux.

본 발명에 의하면, 세그먼트 단위로 스왑공간이 관리되기 때문에 블록단위로 스왑공간을 관리하는 종래의 경우에 비해 필요한 메모리 용량이 줄어들게 된다. 또한 시스템의 종료 또는 기동 시에 몇 개의 세그먼트만 선택하여 삭제하여 초기화하고, 선택되지 않은 나머지 세그먼트들을 시스템 사용 중에 백그라운드로 초기화하기 때문에 종래에 비하여 플래시 메모리의 종료 또는 기동 시간(start-up time)이 줄어들게 된다. According to the present invention, since the swap space is managed on a segment basis, the required memory capacity is reduced as compared with the conventional case of managing the swap space on a block basis. In addition, when the system is shut down or started, only a few segments are deleted and initialized, and the remaining unselected segments are initialized in the background while the system is in use. Will be reduced.

이하에서, 본 발명의 바람직한 실시예를 첨부한 도면들을 참조하여 상세히 설명한다. 아래의 실시예는 본 발명의 내용을 이해하기 위해 제시된 것일 뿐이며 당 분야에서 통상의 지식을 가진 자라면 본 발명의 기술적 사상 내에서 많은 변형이 가능할 것이다. 따라서 본 발명의 권리범위가 이러한 실시예에 한정되는 것으로 해석돼서는 안 된다. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The following examples are only presented to understand the content of the present invention, and those skilled in the art will be capable of many modifications within the technical spirit of the present invention. Therefore, the scope of the present invention should not be construed as being limited to these embodiments.

도 3은 본 발명에 따른 스왑공간 관리방법을 설명하기 위한 도면이다. 도 3 에 도시된 바와 같이, 스왑 공간은 복수개의 세그먼트(100)로 구성되고, 각 세그먼트(100)는 복수개의 블록(101)으로 구성된다. 각 블록(101)은 복수개의 페이지 슬롯(102)으로 구성된다. 스왑공간의 관리는 세그먼트(100) 단위로 이루어지며 각 세그먼트(100)에 속하는 블록들(101)은 함께 삭제되어 초기화된다. 3 is a view for explaining a swap space management method according to the present invention. As shown in FIG. 3, the swap space is composed of a plurality of segments 100, and each segment 100 is composed of a plurality of blocks 101. Each block 101 is composed of a plurality of page slots 102. Swap space is managed in units of segments 100 and blocks 101 belonging to each segment 100 are deleted and initialized together.

각 세그먼트(100)는 특정영역, 예컨대 세그먼트(100) 안에서 첫 번째 블록(101)의 첫 번째 페이지 슬롯(102)을 세그먼트 헤더(103)로 사용한다. 세그먼트 헤더(103)는 세그먼트(100)에 수행된 삭제연산 횟수, 세그먼트 사용상태(used, free)와 같은 세그먼트 정보를 관리한다. 세그먼트(100)를 삭제하면 세그먼트 헤더(103)에 세그먼트(100)의 사용상태가 '가용(free)'으로 기록되며 삭제 연산횟수는 1 증가된 값으로 기록된다. 스왑 아웃되어 세그먼트(100)에 페이지가 저장된다면 세그먼트(100)의 사용상태는 '사용중(used)'으로 기록된다. Each segment 100 uses the first page slot 102 of the first block 101 as a segment header 103 within a particular area, for example segment 100. The segment header 103 manages segment information such as the number of deletion operations performed on the segment 100 and the segment usage state (used, free). When the segment 100 is deleted, the usage state of the segment 100 is recorded as 'free' in the segment header 103, and the number of deletion operations is recorded as one incremented value. If a page is stored in the segment 100 after being swapped out, the usage state of the segment 100 is recorded as 'used'.

이와 같이 세그먼트(100) 단위로 스왑공간을 관리하면 블록단위로 관리하는 종래의 방법에 비해 스왑공간의 관리를 위해 필요한 메모리 용량이 크게 줄어들게 된다. As such, when the swap space is managed in units of segments 100, the memory capacity required for managing the swap space is greatly reduced as compared to the conventional method of managing in units of blocks.

시스템이 기동되면 스왑영역의 모든 세그먼트 헤더(103)를 스캔하여 읽어 세그먼트 정보를 구한다. 이 때 세그먼트 관리를 위한 데이터 구조체를 램(RAM)에 생성한다. 이 데이터 구조체는 상기 세그먼트 정보를 저장한다. When the system is started, all segment headers 103 of the swap area are scanned and read to obtain segment information. At this time, a data structure for segment management is created in RAM. This data structure stores the segment information.

램(RAM) 상의 데이터 구조체가 완성되고 나면 스왑 시스템은 가용 세그먼트 개수를 고려하여 세그먼트(100)의 삭제가 필요한지를 결정한다. 가용 세그먼트의 개수가 부족하여 세그먼트의 삭제가 필요하면 삭제할 세그먼트들을 몇 개만 선택하 고 이렇게 선택된 세그먼트 내의 블록(101)들을 삭제하여 초기화한다. 이러한 초기화는 시스템의 기동 시가 아닌 종료 시에 이루어질 수도 있다. 시스템의 종료 또는 기동 시에 초기화가 안 된 세그먼트(100)는 시스템이 기동된 후 시스템 사용 중에 백그라운드로 초기화된다. After the data structure on the RAM is completed, the swap system determines whether the segment 100 needs to be deleted in consideration of the number of available segments. If the number of available segments is insufficient and the segment needs to be deleted, only a few segments to delete are selected, and the blocks 101 in the selected segment are deleted and initialized. This initialization may be done at shutdown rather than at system startup. Segments 100 that are not initialized at system shutdown or startup are initialized in the background during system use after the system is started.

이렇게 시스템의 종료 또는 기동 시에 몇 개의 세그먼트만 선택하여 삭제하여 초기화하고, 선택되지 않은 나머지 세그먼트들을 시스템 사용 중에 백그라운드로 초기화하기 때문에 종래에 비하여 플래시 메모리의 종료 또는 기동 시간(start-up time)이 줄어들게 된다. Thus, when the system is shut down or started, only a few segments are deleted and initialized, and the remaining unselected segments are initialized in the background while the system is in use. Will be reduced.

세그먼트 헤더(103)에는 세그먼트의 사용 상태값이 '가용(free)'과 '사용중(used)'으로 기록되지만, 램(RAM) 상의 데이터 구조체에 세그먼트 헤더(103)의 정보가 저장될 때에는 세그먼트의 사용 상태값이 '가용(free)', '구사용중(old-used), '신사용중(new-used)의 세 개의 값으로 구분되어 관리된다. In the segment header 103, the usage status values of the segments are recorded as 'free' and 'used', but when the information of the segment header 103 is stored in a data structure on RAM, The usage status values are divided into three categories: 'free', 'old-used' and 'new-used'.

처음 시스템이 기동될 때에 램(RAM) 상의 데이터 구조체에는 세그먼트 헤더(103)에서 읽은 세그먼트의 사용 상태값이 가용(free)이면 가용(free)으로, 사용중(used)이면 구사용중(old-used)으로 관리한다. 그리고 나중에 스왑 시스템에서 세그먼트에 페이지를 스왑 아웃하는 경우에는 데이터 구조체의 해당 세그먼트의 사용 상태값을 신사용중(new-used)으로 관리한다. When the system is first started, the data structure on RAM contains free if the segment's usage status value read from the segment header 103 is free, and if it is used, old-used. Manage with. If the swap system later swaps out a page to a segment, it manages the usage status of that segment in the data structure as new-used.

본 발명에서 시스템의 종료 또는 기동 시에 초기화 되는 세그먼트(100)를 선택할 때 램(RAM) 상의 데이터 구조체의 해당 세그먼트의 사용 상태값이 구사용중(old-used)인 것이 있다면 우선적으로 선택한다. In the present invention, when selecting the segment 100 to be initialized at the end or start of the system, if the use state value of the corresponding segment of the data structure on the RAM is old-used, it is preferentially selected.

상술한 바와 같이 본 발명에 의하면, 스왑공간이 복수개의 블록으로 구성되는 세그먼트 단위로 관리되므로 상태정보를 관리하기 위한 메모리 용량이 줄어들게 되고, 시스템의 종료 또는 기동 시에 스왑 아웃된 페이지를 저장했던 세그먼트 중에서 일부만 선별적으로 초기화하고 나머지는 시스템의 사용중에 백그라운드로 초기화하기 때문에 시스템의 종료 및 기동 시간이 단축되게 된다. As described above, according to the present invention, since the swap space is managed in units of segments composed of a plurality of blocks, the memory capacity for managing the status information is reduced, and the segment storing the swapped out page at the time of shutdown or startup of the system Only some of them are selectively initialized and the others are initialized in the background while the system is in use, thereby reducing system shutdown and startup time.

도 1은 요구 페이징 기법을 설명하기 위한 도면;1 is a diagram for explaining a required paging technique;

도 2는 종래의 플래시 메모리의 구성을 설명하기 위한 도면;2 is a diagram for explaining a configuration of a conventional flash memory;

도 3은 본 발명에 따른 스왑공간 관리방법을 설명하기 위한 도면이다.3 is a view for explaining a swap space management method according to the present invention.

<도면의 주요부분에 대한 참조번호의 설명><Description of reference numbers for the main parts of the drawings>

10: 물리 메모리 11: 코드와 데이터10: physical memory 11: code and data

12: 스택과 힙 20: 비휘발성 저장장치12: stack and heap 20: nonvolatile storage

21: 프로그램 파일 28: 사용자 파일 시스템 영역21: Program file 28: User file system area

29: 스왑 공간29: swap space

100: 세그먼트 101: 블록100: segment 101: block

102: 페이지 슬롯 103: 세그먼트 헤더102: Page Slot 103: Segment Header

Claims (7)

컴퓨터 시스템에서 플래시 메모리를 스왑 저장장치로 사용하는 경우에 스왑공간을 복수개의 세그먼트로 구성하되, 상기 세그먼트 각각은 복수개의 블록으로 구성하고, 상기 블록 각각은 복수개의 페이지 슬롯으로 구성하여, 상기 세그먼트 단위로 상기 스왑공간을 관리하는 것을 특징으로 하는 스왑공간 관리방법. When a flash memory is used as a swap storage device in a computer system, a swap space includes a plurality of segments, each of the segments includes a plurality of blocks, and each of the blocks includes a plurality of page slots. Swap space management method characterized in that for managing the swap space. 제1항에 있어서, 상기 세그먼트 각각은 특정영역을 세그먼트 헤더로 사용하고, 상기 세그먼트 헤더는 해당 세그먼트에 수행된 삭제연산 횟수, 세그먼트 사용상태와 같은 세그먼트 정보를 관리하는 것을 특징으로 하는 스왑공간 관리방법. The method of claim 1, wherein each segment uses a specific region as a segment header, and the segment header manages segment information such as the number of deletion operations performed on the segment and the segment usage status. . 컴퓨터 시스템에서 플래시 메모리를 스왑 저장장치로 사용하는 경우에 스왑공간을 복수개의 세그먼트로 구성하되, 상기 세그먼트 각각은 복수개의 블록으로 구성하고, 상기 블록 각각은 복수개의 페이지 슬롯으로 구성하여, 상기 컴퓨터 시스템의 종료 또는 기동 시에 상기 스왑공간의 세그먼트들 중에서 일부를 선별적으로 선택하여 그 선택된 세그먼트의 블록들을 삭제하여 초기화시키는 것을 특징으로 하는 스왑공간 관리방법. When a flash memory is used as a swap storage device in a computer system, the swap space is composed of a plurality of segments, each of the segments is composed of a plurality of blocks, and each of the blocks is composed of a plurality of page slots. And selectively deleting some of the segments of the swap space and deleting the blocks of the selected segments upon initialization or termination of the swap space. 제3항에 있어서, 상기 컴퓨터 시스템의 종료 또는 기동 시에 초기화되지 않은 세그먼트는 상기 컴퓨터 시스템의 기동 후 시스템의 사용 중에 백그라운드로 초 기화되는 것을 특징으로 하는 스왑공간 관리방법. 4. The method of claim 3, wherein an uninitialized segment upon termination or startup of the computer system is initialized in the background during use of the system after startup of the computer system. 제4항에 있어서, 상기 세그먼트 각각은 특정영역을 세그먼트 헤더로 사용하고, 상기 세그먼트 헤더에는 해당 세그먼트 사용상태값이 '가용(free)'과 '사용중(used)'으로 구분되어 기록되는 것을 특징으로 하는 스왑공간 관리방법. The method of claim 4, wherein each of the segments uses a specific area as a segment header, and the segment use state values are divided into 'free' and 'used'. How to manage swap space. 제5항에 있어서, 컴퓨터 시스템이 기동되면 램(RAM) 상의 데이터 구조체에 상기 세그먼트 헤더에 기록되는 세그먼트 사용상태값이 가용(free)이면 가용(free)으로, 사용중(used)이면 구사용중(old-used)으로 기록하고, 컴퓨터 시스템의 기동 이후에 스왑 시스템에서 세그먼트에 페이지를 스왑 아웃하는 경우에는 상기 램(RAM) 상의 데이터 구조체에 해당 세그먼트의 사용 상태값을 신사용중(new-used)으로 기록함으로써, 램(RAM) 상의 데이터 구조체에는 세그먼트 사용상태값이'가용(free)', '구사용중(old-used), '신사용중(new-used)의 세 개의 값으로 구분하여 기록되도록 하고, 컴퓨터 시스템의 종료 또는 기동 시에 상기 램(RAM) 상의 데이터 구조체에 세그먼트 사용상태값이 구사용중(old-used)으로 기록된 세그먼트를 우선적으로 초기화하는 것을 특징으로 하는 스왑공간 관리방법.6. The method of claim 5, wherein when the computer system is started, the segment usage state value recorded in the segment header is free in the data structure on RAM, and free if the segment is in use. -used), and if the swap system swaps out pages to a segment after the computer system starts up, it writes the usage status value of that segment to the data structure on the RAM as new-used. By doing so, the segment usage state values are recorded in the data structure on the RAM by being divided into three values of 'free', 'old-used' and 'new-used'. Swap space management, characterized by preferentially initializing segments whose segment usage status values are old-used in a data structure on the RAM upon shutdown or startup of a computer system. Way. 제1항 또는 제3항에 있어서, 상기 컴퓨터 시스템의 운영체제가 리눅스인 것을 특징으로 하는 스왑공간 관리방법. 4. The method of claim 1 or 3, wherein the operating system of the computer system is Linux.
KR1020080125722A 2008-12-11 2008-12-11 Method for managing swap space for flash memory based swap storage device KR100992079B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080125722A KR100992079B1 (en) 2008-12-11 2008-12-11 Method for managing swap space for flash memory based swap storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080125722A KR100992079B1 (en) 2008-12-11 2008-12-11 Method for managing swap space for flash memory based swap storage device

Publications (2)

Publication Number Publication Date
KR20100067248A true KR20100067248A (en) 2010-06-21
KR100992079B1 KR100992079B1 (en) 2010-11-04

Family

ID=42365961

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080125722A KR100992079B1 (en) 2008-12-11 2008-12-11 Method for managing swap space for flash memory based swap storage device

Country Status (1)

Country Link
KR (1) KR100992079B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015080478A1 (en) * 2013-11-27 2015-06-04 Samsung Electronics Co., Ltd. Electronic device and method of managing memory of electronic device
US9053019B2 (en) 2011-04-04 2015-06-09 Samsung Electronics Co., Ltd. Non-volatile memory device, a data processing device using the same, and a swapping method used by the data processing and non-volatile memory devices
US9195579B2 (en) 2012-04-03 2015-11-24 Samsung Electronics Co., Ltd. Page replacement method and memory system using the same

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9053019B2 (en) 2011-04-04 2015-06-09 Samsung Electronics Co., Ltd. Non-volatile memory device, a data processing device using the same, and a swapping method used by the data processing and non-volatile memory devices
US9195579B2 (en) 2012-04-03 2015-11-24 Samsung Electronics Co., Ltd. Page replacement method and memory system using the same
WO2015080478A1 (en) * 2013-11-27 2015-06-04 Samsung Electronics Co., Ltd. Electronic device and method of managing memory of electronic device
US9501238B2 (en) 2013-11-27 2016-11-22 Samsung Electronics Co., Ltd. Electronic device and method of managing memory of electronic device

Also Published As

Publication number Publication date
KR100992079B1 (en) 2010-11-04

Similar Documents

Publication Publication Date Title
US8489850B2 (en) Memory apparatus and memory control method
US7610434B2 (en) File recording apparatus
JP5295778B2 (en) Flash memory management method
US9183136B2 (en) Storage control apparatus and storage control method
JP5663060B2 (en) Method and system for facilitating fast startup of a flash memory system
US8060684B2 (en) Memory control apparatus, memory control method and program
US20150186224A1 (en) Data storage device and flash memory control method
KR101447188B1 (en) Method and apparatus for controlling I/O to optimize flash memory
KR101674335B1 (en) Memory device and host device
KR20060134170A (en) Nonvolatile storage system
CN109558335B (en) Nor Flash memory based file storage format of embedded system
CN101796495A (en) Memory device and file system
JP5874525B2 (en) Control device, storage device, and storage control method
KR100992079B1 (en) Method for managing swap space for flash memory based swap storage device
JP4988054B2 (en) Memory system
JP4130808B2 (en) Formatting method
KR20090119481A (en) A log file of file system and method for recovering file system
CN111949212B (en) File system and file management method based on self-defined open channel SSD
CN111813708B (en) Block mapping system and method for storage device
CN112433889B (en) Log generation method and device based on FTL table
KR100973496B1 (en) Read-ahead swap-in method considering flash memory erase block
JP7435470B2 (en) Information processing device, information processing method, and information processing program
JP2009104430A (en) Flash disk device
KR100844406B1 (en) Hybrid file system and method for data processing based on nand using nor flash memory
JP2011199377A (en) Recorder

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130820

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20141010

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20151002

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20181016

Year of fee payment: 9