KR20060099193A - Method for processing flash file system using memory database - Google Patents

Method for processing flash file system using memory database Download PDF

Info

Publication number
KR20060099193A
KR20060099193A KR1020050020264A KR20050020264A KR20060099193A KR 20060099193 A KR20060099193 A KR 20060099193A KR 1020050020264 A KR1020050020264 A KR 1020050020264A KR 20050020264 A KR20050020264 A KR 20050020264A KR 20060099193 A KR20060099193 A KR 20060099193A
Authority
KR
South Korea
Prior art keywords
database
file
memory
flash memory
file system
Prior art date
Application number
KR1020050020264A
Other languages
Korean (ko)
Other versions
KR100756135B1 (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 KR1020050020264A priority Critical patent/KR100756135B1/en
Publication of KR20060099193A publication Critical patent/KR20060099193A/en
Application granted granted Critical
Publication of KR100756135B1 publication Critical patent/KR100756135B1/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/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • 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

Abstract

본 발명은 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법에 관한 것으로서, 특히 램(RAM)에 상주된 메모리 데이터베이스 시스템이 파일 시스템의 역할을 수행하도록 하고, 메모리 데이터베이스 시스템은 파일 시스템의 메타 정보들을 램에 생성된 데이터베이스 파일을 통해 관리한다. 이에 따라 플래시 메모리에 대한 접근 횟수를 줄여 플래시 메모리의 수명을 최대화할 수 있으며, PDA나 휴대폰 등 사용자의 서비스 요청을 실시간으로 빠르게 처리해야 하는 장치의 성능을 향상시킬 수 있게 된다.The present invention relates to a method for processing a flash file system using a memory database. In particular, the memory database system residing in RAM serves as a file system, and the memory database system generates meta information of the file system in RAM. Managed through a database file. As a result, the number of accesses to the flash memory can be reduced to maximize the life of the flash memory, and the performance of a device that needs to rapidly process a user's service request such as a PDA or a mobile phone in real time can be improved.

플래시 메모리, 파일 시스템, 메모리 데이터베이스 Flash memory, file system, memory database

Description

메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법{ Method for processing flash file system using memory database }Method for processing flash file system using memory database}

도 1은 본 발명에 따른 바람직한 실시예의 흐름도,1 is a flow chart of a preferred embodiment according to the present invention,

도 2는 메모리 데이터베이스를 구성하는 일 실시예,2 is an embodiment of configuring a memory database;

도 3은 플래시 메모리의 가비지를 회수하는 실시예의 개요,3 is an overview of an embodiment of recovering garbage of a flash memory;

도 4는 inode 기반의 파일 시스템에 관한 일 실시예,4 is an embodiment of an inode based file system,

도 5는 FAT 기반의 파일 시스템에 관한 일 실시예이다.5 is an embodiment of a FAT-based file system.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

21: 프로세스 22: 플래시 메모리21: Process 22: Flash Memory

30: 메모리 데이터베이스 시스템 31: 메모리 데이터베이스30: Memory Database System 31: Memory Database

31-1: 인터페이스 모듈 31-2: 데이터베이스 관리자 모듈31-1: Interface Module 31-2: Database Manager Module

31-3: 트랜잭션 관리자 모듈 31-4: 회복 관리자 모듈31-3: Transaction Manager Module 31-4: Recovery Manager Module

31-5: 저장 관리자 모듈 31-6: 시스템 관리자 모듈31-5: Storage Manager Module 31-6: System Manager Module

31-7: 가비지 회수 관리자 모듈 32: 데이터베이스 파일31-7: Garbage Recall Manager Module 32: Database Files

본 발명은 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법에 관한 것으로서, 특히 플래시 메모리를 사용하는 각종 장치의 램(RAM)에 상주하여 동작하는 메모리 데이터베이스 시스템을 통해 파일 시스템을 처리하도록 하여 플래시 메모리에 대한 접근을 최소화시킬 수 있는 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a flash file system processing method using a memory database, and more particularly, accesses to a flash memory by processing the file system through a memory database system that resides and operates in RAM of various devices using the flash memory. It is about how to minimize the.

근래에 가전기기, 통신기기, 휴대폰이나 개인휴대단말(PDA) 등의 휴대용 전자기기, 가정용 셋탑박스와 같은 각종 장치에 사용되는 비휘발성 저장 매체로 플래시 메모리의 사용이 증가하고 있다. 플래시 메모리의 사용이 증가하는 것은 플래시 메모리가 하드 디스크 드라이브(HDD)와 같은 기존의 회전식 저장 매체에 비하여 외부 충격에 강하고, 데이터의 기록 및 삭제가 자유로우며, 전원 공급이 차단된 상태에서도 데이터를 보존할 수 있는 비휘발성 저장매체의 성질을 갖고 있기 때문이다. 또한 플래시 메모리는 접근 속도가 빠르고, 저전력 구동이 가능하며 크기가 작은 장점을 가지고 있다.Recently, the use of flash memory is increasing as a non-volatile storage medium used in various devices such as home appliances, communication devices, portable electronic devices such as mobile phones and personal digital assistants (PDAs), and home set-top boxes. Increasing use of flash memory means that flash memory is more resistant to external shocks than conventional rotating storage media such as hard disk drives (HDDs), free to write and delete data, and preserves data even when power is cut off. This is because of the nature of nonvolatile storage media. Flash memory also offers fast access, low power operation and small size.

그러나, 저장매체로 플래시 메모리를 사용할 때는 다음과 같은 문제점을 고려해야 한다.However, when using flash memory as a storage medium, the following problems should be considered.

첫째, 일반 저장매체와는 달리 한 번 데이터를 기록한 영역에 바로 다시 쓸 수 없다는 점이다. 즉, 새로운 데이터를 기록하기 전에는 플래시 메모리를 지워야 하며, 지우기 작업 역시 다른 저장매체와 달리 일정 단위(EU: Erase Unit)로 지워야 하는 제한이 있다.First, unlike general storage media, data cannot be rewritten directly to the area where data was once recorded. In other words, before writing new data, the flash memory must be erased, and unlike other storage media, the erase operation has a limitation of erasing by Erase Unit (EU).

둘째, 플래시 메모리는 지울 수 있는 횟수가 제한되어 있으므로, 플래시 메모리의 특정 영역에만 데이터가 집중적으로 쓰여지면 플래시 메모리의 수명이 단축된다. 즉, 데이터 저장을 위한 공간이 부족할 때는 무효화된 공간을 회수하기 위해 가비지 회수 작업을 수행해야 하지만, 이 작업은 플래시 메모리의 수명과 직결되므로 플래시 메모리 영역 전반에 걸쳐 골고루 이루어지도록 해야 한다.Second, since the number of times that the flash memory can be erased is limited, if the data is written intensively to a specific area of the flash memory, the life of the flash memory is shortened. In other words, when there is not enough space for data storage, garbage collection should be performed to recover the invalidated space. However, since this operation is directly related to the life of the flash memory, it should be evenly distributed throughout the flash memory area.

한편, 플래시 메모리를 사용하는 각종 장치에는 타 장치에서와 마찬가지로 플래시 메모리에 기록되는 각종 파일을 관리하는 파일 시스템이 사용되는데, 파일 시스템은 저장매체상에 파일을 구성하는 방식을 의미하며 다양한 형태로 이루어질 수 있다. 이러한 파일 시스템은 플래시 메모리에 기록되는 파일의 메타 정보들을 각종 테이블을 통해 관리하며, 실제 플래시 메모리의 파일에 기록될 데이터 이외에도 각종 메타 정보들을 처리하기 위하여 플래시 메모리를 액세스하고 변경시키게 된다. 그러나, 위에서 설명한 바와 같이 플래시 메모리는 일반 저장매체와 다른 특성을 갖고 있으므로, 플래시 메모리에 대한 파일 시스템을 운용할 때도 될 수 있는 한 플래시 메모리의 접근을 줄이는 것이 바람직하다.On the other hand, as in other devices, a file system that manages various files recorded in the flash memory is used for various devices that use the flash memory. The file system refers to a method of organizing files on a storage medium and has various forms. Can be. Such a file system manages meta information of a file recorded in the flash memory through various tables, and accesses and modifies the flash memory to process various meta information in addition to data to be recorded in a file of the actual flash memory. However, as described above, since the flash memory has a different characteristic from a general storage medium, it is desirable to reduce the access of the flash memory as much as possible when operating a file system for the flash memory.

이에 본 발명은 상기와 같은 필요성에 부응하기 위하여 안출된 것으로서, 플래시 메모리를 사용하는 각종 장치의 램(RAM)에 상주하여 동작하는 메모리 데이터베이스 시스템을 통해 해당 장치의 파일 시스템을 처리하도록 하여, 플래시 메모리에 대한 접근을 최소화시킬 수 있도록 해 주는데 그 목적이 있다.Accordingly, the present invention has been made in order to meet the necessity as described above, the flash memory to process the file system of the device through a memory database system operating in the RAM (RAM) of the various devices using the flash memory, The goal is to minimize access to

상기와 같은 목적을 달성하기 위하여, 본 발명에 따른 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법은, 플래시 메모리를 사용하는 장치가 부팅되는 단계; 파일 시스템의 역할을 수행하는 메모리 데이터베이스 시스템을 상기 장치의 램(RAM)에 상주시키는 단계; 및 상기 메모리 데이터베이스 시스템은 상기 파일 시스템의 메타 정보들을 상기 램에 생성된 데이터베이스 파일을 통해 관리하면서 상기 플래시 메모리의 파일을 관리하는 단계를 포함하여 이루어진다.In order to achieve the above object, a flash file system processing method using a memory database according to the present invention, the step of booting the device using the flash memory; Residing in a memory (RAM) of the device, a memory database system serving as a file system; And managing the file of the flash memory while managing the meta information of the file system through a database file created in the RAM.

상기 메모리 데이터베이스 시스템은, 유저 프로세스로부터 질의를 받아 이를 해석하는 인터페이스 모듈; 상기 인터페이스 모듈의 해석에 따라 트랜잭션 관리, 상기 데이터베이스 파일의 회복, 데이터의 읽기와 쓰기를 수행하기 위하여 상기 데이터베이스 파일을 총괄적으로 제어하는 데이터베이스 관리자 모듈; 상기 트랜잭션(transaction)을 유지하고 관리하는 트랜잭션 관리자 모듈; 상기 데이터베이스 파일의 회복 기능을 수행하는 회복 관리자 모듈; 및 상기 데이터베이스 파일과 상기 플래시 메모리에 대한 데이터의 읽기와 쓰기를 실행하는 저장 관리자 모듈을 포함하여 구성될 수 있다.The memory database system includes an interface module that receives a query from a user process and interprets the query; A database manager module which collectively controls the database file to perform transaction management, recovery of the database file, reading and writing data in accordance with the interpretation of the interface module; A transaction manager module for maintaining and managing the transaction; A recovery manager module for performing a recovery function of the database file; And a storage manager module configured to read and write data to the database file and the flash memory.

상기 유저 프로세스는 SQL을 통해 상기 인터페이스 모듈과 서로 인터페이스하도록 구성될 수 있고, 상기 회복 관리자 모듈은 로깅 방법을 이용하여 상기 데이터베이스 파일의 회복 기능을 수행하도록 구성될 수 있다.The user process may be configured to interface with the interface module through SQL, and the recovery manager module may be configured to perform a recovery function of the database file using a logging method.

상기 메모리 데이터베이스 시스템은 새로운 파일 시스템에 대한 스크립트를 받아서 해당 메모리 데이터베이스 시스템을 생성하는 시스템 관리자 모듈을 더 포함하여 구성될 수 있다.The memory database system may further include a system manager module for receiving a script for a new file system and generating a corresponding memory database system.

상기 메모리 데이터베이스 시스템은 상기 플래시 메모리의 무효화된 공간을 회수하는 가비지 회수 관리자 모듈을 더 포함하여 구성될 수 있다.The memory database system may further include a garbage recovery manager module for recovering invalidated space of the flash memory.

상기 가비지 회수 관리자 모듈은 상기 플래시 메모리를 복수의 블록으로 나누고 상기 복수의 블록을 원형으로 관리하되, 상기 플래시 메모리에 데이터를 쓰는 위치가 n번째 블록일 때는 n-1번째 불록의 가비지를 회수하도록 구성될 수 있다.The garbage recovery manager module divides the flash memory into a plurality of blocks and manages the plurality of blocks in a circle, and recovers garbage of the n-1 block when the location of writing data to the flash memory is an n-th block. Can be.

또한, 상기 가비지 회수 관리자 모듈은 상기 플래시 메모리의 가용 공간이 일정 비율 이하일 때 가비지 회수를 수행하도록 구성될 수 있다.The garbage collection manager module may be configured to perform garbage collection when the available space of the flash memory is equal to or less than a predetermined ratio.

위에서 설명한 각 실시예의 메모리 데이터베이스 시스템은 FAT 기반의 파일 시스템 또는 inode 기반의 파일 시스템의 역할을 수행하도록 구성할 수 있다.The memory database system of each embodiment described above may be configured to perform a role of a FAT-based file system or an inode-based file system.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1을 참조하자면, 플래시 메모리를 사용하는 장치가 부팅되면(S11), 파일 시스템의 역할을 수행하는 메모리 데이터베이스 시스템을 해당 장치의 램(RAM: Random Access Memory)에 상주시킨다(S12). 그리고, 램에 상주한 메모리 데이터베이스 시스템은 파일 시스템의 메타 정보들을 램에 생성된 데이터베이스 파일을 통해 관리하면서 플래시 메모리에 대한 파일 시스템으로서의 역할을 수행한다(S13,S14). 여기서, 데이터베이스 파일이란 도 4와 도 5에 도시한 예에서와 같이 파일 시스템을 구성하는 각종 테이블 정보를 기록하는 파일을 의미한다.Referring to FIG. 1, when a device using a flash memory is booted (S11), a memory database system serving as a file system resides in a random access memory (RAM) of the corresponding device (S12). In addition, the memory database system residing in RAM manages meta information of the file system through a database file generated in RAM, and serves as a file system for flash memory (S13 and S14). Here, the database file means a file that records various table information constituting the file system as in the examples shown in FIGS. 4 and 5.

이와 같이 본 발명에 따른 파일 시스템은 메모리 데이터베이스 시스템을 이용하여 구성되므로, 실제 파일 시스템의 동작은 데이터베이스를 관리하는 형태를 가지게 된다.As described above, since the file system according to the present invention is configured using the memory database system, the operation of the actual file system has a form of managing a database.

즉, 유저 프로세스가 램에 상주하는 메모리 데이터베이스 시스템에 파일 접근을 요청하면, 메모리 데이터베이스 시스템은 이 요청에 응답하여 유저 프로세스가 플래시 메모리에 접근할 수 있도록 한다. 이 때, 메모리 데이터베이스 시스템은 메타 정보들을 램에 생성되는 데이터베이스 파일을 통해 관리한다.In other words, when a user process requests a file access to a memory database system residing in RAM, the memory database system allows the user process to access the flash memory in response to the request. At this time, the memory database system manages meta information through a database file created in RAM.

파일 시스템의 메타 정보들을 램의 데이터베이스 파일을 통해 관리하기 때문에 플래시 메모리에 대한 접근을 최소화할 수 있게 된다. 또한, 파일 시스템의 역할을 수행하는 메모리 데이터베이스 시스템은 램에 상주하므로 데이터를 빠르고 효율적으로 처리하거나 저장할 수 있게 되고, 원하는 데이터를 신속하게 검색할 수 있게 된다. 다시 설명하자면, 모든 지원 가능한 파일 시스템의 정보, 오픈 파일 테이블, 파일 기술자 테이블 등을 램의 데이터베이스 파일로 만들어서 관리하도록 함으로써 파일 시스템을 구현할 수 있는 것이며, 메모리 데이터베이스 시스템은 가상 파일 시스템으로서의 역할을 수행하는 것으로 이해될 수도 있다.File system meta-information is managed through RAM's database files, minimizing access to flash memory. In addition, the memory database system, which acts as a file system, resides in RAM, so that data can be processed or stored quickly and efficiently, and the desired data can be quickly retrieved. In other words, a file system can be implemented by managing all supported file system information, open file tables, file descriptor tables, and so forth into RAM database files, and the memory database system functions as a virtual file system. It may be understood that.

또한, 현재 어떤 종류의 파일 시스템을 사용하는지에 관계없이 항상 메모리 데이터베이스 시스템이 제공하는 동일한 인터페이스를 사용함으로써 다양한 파일 시스템을 지원할 수 있다. 즉, 가능한 파일 시스템들의 상태 정보들과 모든 파일들을 메모리 데이터베이스화 하고, 시스템 콜이 발생하면 그에 맞는 데이터베이스와 연결 시켜 줌으로써 다양한 파일 시스템을 지원할 수 있게 된다.In addition, regardless of what kind of file system you are currently using, you can always support the various file systems by using the same interface provided by the memory database system. In other words, it can support various file systems by making state database of all possible file systems and all files into a memory database, and when a system call is made, it is connected to a database.

뿐만아니라 파일 시스템의 교환은 현재 연결된 데이터베이스 파일을 교체함으로써 간단히 이루어질 수 있다. 어떠한 종류의 파일 시스템을 이용할 것인지에 관한 설정은 데이터베이스 파일을 수정하여 이루어질 수 있고, 파일의 생성과 삭제, 파일의 열고 닫기, 파일의 읽고 쓰기 등의 파일 연산은 데이터베이스 파일의 생성과 삭제 또는 데이터베이스 파일의 수정 등 메모리 데이터베이스 시스템이 제공하는 기본 연산을 이용하여 간단히 구현할 수 있다.In addition, the file system exchange can be accomplished simply by replacing the currently connected database file. The setting of what kind of file system to use can be made by modifying the database file, and file operations such as creating and deleting files, opening and closing files, reading and writing files, and creating or deleting database files or It can be easily implemented using the basic operations provided by the memory database system, such as modifications.

도 2를 참조하여 파일 시스템의 역할을 수행하는 메모리 데이터베이스 시스템의 일 실시예를 설명하기로 한다.An embodiment of a memory database system serving as a file system will be described with reference to FIG. 2.

메모리 데이터베이스 시스템(30)은 유저 프로세스(21)가 파일 시스템에 접근할 수 있도록 해주는 메모리 데이터베이스(31), 및 데이터베이스 파일(32)로 이루어질 수 있다.The memory database system 30 may consist of a memory database 31, and a database file 32, which allow the user process 21 to access the file system.

데이터베이스 파일(32)은 램에 위치하여 파일 시스템의 동작에 필요한 각종 테이블 정보를 저장하는데, 이러한 각종 테이블을 통해 파일 시스템의 메타 정보를 저장한다.The database file 32 is located in the RAM and stores various table information necessary for the operation of the file system. The database file 32 stores meta information of the file system through the various tables.

인터페이스 모듈(31-1)은 유저 프로세스(21)로부터 질의를 받아 이를 해석하여 데이터베이스 관리자 모듈(31-2)에게 해당 서비스를 요청하는 역할을 수행한다. 유저 프로세스(21)와 인터페이스 모듈(31-1)은 SQL(Structured Query Language)을 통해 인터페이스하도록 구성할 수 있다. 이러한 실시예에서 인터페이스 모듈(31-1)은 SQL문과 같이 데이터베이스 연산을 위한 기본 함수 등을 제공한다.The interface module 31-1 receives a query from the user process 21, interprets the query, and requests a corresponding service from the database manager module 31-2. The user process 21 and the interface module 31-1 may be configured to interface with SQL (Structured Query Language). In this embodiment, the interface module 31-1 provides a basic function for a database operation, such as an SQL statement.

데이터베이스 관리자 모듈(31-2)은 인터페이스 모듈(31-1)로부터의 서비스 요청을 받아 트랜잭션 관리자 모듈(31-3), 회복 관리자 모듈(31-4), 저장 관리자 모듈(31-5) 등과 연계하여 작업을 처리하기 위해 데이터베이스 파일(32)에 기록되어 있는 메타 정보를 총괄적으로 관리하는 역할을 수행한다. 즉, 데이터베이스 관리자 모듈(31-2)은 데이터베이스 파일(32)에 기록되어 있는 각종 레코드, 인덱스, 버퍼 등을 관리하며, 실제 데이터베이스에 대한 연산은 데이터베이스 관리자 모듈(31-2)이 수행한다.The database manager module 31-2 receives a service request from the interface module 31-1 and associates it with the transaction manager module 31-3, the recovery manager module 31-4, the storage manager module 31-5, and the like. To manage the meta information recorded in the database file 32 in order to process the work. That is, the database manager module 31-2 manages various records, indexes, buffers, and the like recorded in the database file 32, and the database manager module 31-2 performs operations on the actual database.

트랜잭션 관리자 모듈(31-3)은 데이터베이스 관리자 모듈(31-2)의 제어에 따라 트랜잭션(transaction)을 유지하고 관리하면서 이와 관련된 인터페이스를 지원하는 역할을 수행한다. 이 때, 파일의 락킹(locking)을 담당한다. The transaction manager module 31-3 maintains and manages a transaction under the control of the database manager module 31-2 and supports an interface thereof. At this time, the file is locked.

회복 관리자 모듈(31-4)은 데이터베이스 관리자 모듈(31-2)의 제어에 따라 데이터베이스 파일(32)의 회복 기능을 수행한다. 즉, 플래시 파일 시스템에 파손이 발생하면 이를 감지하고 파손이 발생하기 이전의 일관성 있는 상태(consistent state)로 데이터베이스 파일(32)을 복구시킨다.The recovery manager module 31-4 performs a recovery function of the database file 32 under the control of the database manager module 31-2. In other words, if a crash occurs in the flash file system, it detects the crash and restores the database file 32 to a consistent state before the crash occurs.

이 때, 파일 시스템의 회복 기법 중 하나인 로깅기법을 사용하도록 구성할 수 있다. 즉, 데이터베이스 파일(32)에 변경이 발생하면 로그 파일에 기록하고, 이를 다시 주기적으로 플래시 메모리(22)에 저장한다. 그리고, 파일 시스템이 다시 부팅될 때는 기존의 데이터베이스 파일과 로그 파일을 바탕으로 수정된 파일 시스템을 램에 로딩한다. 이후, 이전의 로그 파일은 삭제하고 다시 새로운 로그 파일에 이후 변경된 것을 기록한다. At this time, it can be configured to use a logging technique, one of the file system recovery techniques. That is, when a change occurs in the database file 32, it is recorded in a log file and periodically stored in the flash memory 22 again. When the file system is rebooted, the modified file system is loaded into RAM based on the existing database and log files. After that, the old log file is deleted and again written to the new log file.

저장 관리자 모듈(31-5)은 데이터베이스 관리자 모듈(31-2)의 제어에 따라 데이터베이스 파일(32)로부터 메타 정보를 읽거나 데이터베이스 파일(32)에 메타 정보를 쓴다. 또한 플래시 메모리(22)에 기록되어 있는 파일 정보를 읽거나, 데이터베이스 파일(32)에 기록되어 있는 메타 정보를 플래시 메모리(22)에 쓰는 역할을 수행하는 등 데이터베이스 파일(32)과 플래시 메모리(22)에 대한 실제 접근은 저장 관리자 모듈(31-5)을 통해 이루어진다.The storage manager module 31-5 reads meta information from or writes meta information to the database file 32 under the control of the database manager module 31-2. In addition, the database file 32 and the flash memory 22 may be read, for example, to read file information recorded in the flash memory 22 or to write meta information recorded in the database file 32 to the flash memory 22. Is actually accessed via the storage manager module 31-5.

시스템 관리자 모듈(31-6)은 새로운 파일 시스템을 생성하는 역할을 수행한다. 즉, 사용자로부터 새로운 파일 시스템에 대한 정보들을 작성한 스크립트를 받아서 이를 바탕으로 새로운 파일 시스템을 위한 데이터베이스 파일을 생성한다.The system manager module 31-6 plays a role of creating a new file system. In other words, it receives a script that writes information about the new file system from the user and creates a database file for the new file system.

한편, 가비지 회수 관리자 모듈(31-7)은 플래시 메모리(22)의 무효화된 공간을 회수하는 역할을 수행한다. On the other hand, the garbage recovery manager module 31-7 recovers the invalidated space of the flash memory 22.

도 3을 참조하여 가비지를 회수하는 일 실시예를 설명하자면, 플래시 메모리(22)를 복수의 블록(B1~Bk)으로 나누고 복수의 블록(B1~Bk)을 원형으로 관리하되, 플래시 메모리(22)에 데이터를 쓰는 위치가 n번째 블록 Bn일 때는 n-1번째 불록 Bn-1의 가비지를 회수하도록 구성할 수 있다. 이 때, 지우는 위치가 플래시 메모리(22)의 마지막 블록이면 다시 플래시 메모리의 처음 블록부터 쓰면 된다.Referring to Figure 3 To illustrate one embodiment for collecting the garbage, but manages the flash memory 22, a plurality of blocks (B 1 ~ B k) divided into a plurality of blocks (B 1 ~ B k) in a circle, When the position at which data is written to the flash memory 22 is in the n-th block B n , the garbage of the n- th block B n-1 may be recovered. At this time, if the erasing position is the last block of the flash memory 22, the first block of the flash memory may be written again.

이러한 실시예를 이용하면, 부팅될 때 읽고 전원이 차단될 때 쓰는 과정이 플래시 메모리(22) 상에서 순차적으로 이루어질 수 있으므로 마모 평준화는 자동으로 이루어질 수 있다.With this embodiment, wear leveling can be done automatically because the process of reading at boot time and writing at power down can be done sequentially on flash memory 22.

즉, 플래시 메모리(22)는 지울 수 있는 횟수가 제한되어 있어서 플래시 메모리(22)의 특정 영역에만 데이터가 집중적으로 쓰여지면 플래시 메모리(22)의 수명이 단축되므로 플래시 메모리(22) 전반에 걸쳐 골고루 삭제되도록 해야 한다. 도 3에 도시한 바와 같은 실시예를 통해 플래시 메모리(22)의 가비지를 회수하게 되면 파일 시스템이 부팅될 때 읽어오고, 전원이 차단될 때는 플래시 메모리(22)에 순차적으로 데이터를 쓰기 때문에 마모 평준화가 자동으로 이루어진다.That is, the flash memory 22 is limited in the number of times that it can be erased, so if the data is written intensively in a specific area of the flash memory 22, the life of the flash memory 22 is shortened, so that the flash memory 22 is evenly distributed throughout the flash memory 22. It should be deleted. When the garbage of the flash memory 22 is recovered through the embodiment as shown in FIG. 3, the file system is read when the file system is booted, and data is sequentially written to the flash memory 22 when the power is cut off. Is done automatically.

또한, 가비지 회수 관리자 모듈(31-7)은 플래시 메모리(22)의 가용공간이 일정 비율(예: 50%) 이하가 되면 가비지 회수 작업을 수행하도록 구성할 수도 있다.In addition, the garbage collection manager module 31-7 may be configured to perform a garbage collection operation when the available space of the flash memory 22 becomes less than a predetermined ratio (eg, 50%).

위에서 설명한 각 실시예에서 메모리 데이터베이스 시스템(30)은 inode 기반의 파일 시스템의 역할을 수행하도록 구성할 수 있다.In each embodiment described above, the memory database system 30 may be configured to perform the role of an inode-based file system.

도 4를 참조하자면, inode 기반의 파일 시스템을 위한 데이터베이스 파일은 다음과 같은 테이블을 가진다. 즉, 첫번째 블록 번호, 블록 크기, 그룹당 필드 수, 파일 시스템 상태, 플래시 상의 inode 크기, 플래시 메모리에의 저장 시간과 같이 파일 시스템 자체에 관한 정보를 갖는 슈퍼블록 테이블, 파일 이름과 파일 테이블 인덱스 등의 정보를 관리하는 파일 디스크립터 테이블, 디렉토리 엔트리 테이블 인덱스를 관리하는 파일 테이블, inode 테이블의 인덱스를 관리하는 디렉토리 테이블을 포함한다. 또한 데이터 블록 인덱스 등 해당 파일의 모든 정보를 관리하는 inode 테이블, 실제 데이터를 저장하거나 간접 또는 이중 간접으로 데이터 블록의 포인터를 저장하는 블록 테이블 등을 포함할 수 있다.Referring to FIG. 4, a database file for an inode-based file system has a table as follows. That is, a superblock table with information about the file system itself, such as the first block number, block size, number of fields per group, file system state, inode size on flash, and storage time in flash memory, file name and file table index, etc. Includes a file descriptor table for managing information, a directory entry table, a file table for managing an index, and a directory table for managing an index of an inode table. In addition, it may include an inode table that manages all information of a corresponding file such as a data block index, and a block table that stores actual data or a pointer of a data block indirectly or indirectly.

위에서 설명한 각 실시예에서 메모리 데이터베이스 시스템(30)은 FAT 기반의 파일 시스템의 역할을 수행하도록 구성할 수도 있다.In each embodiment described above, the memory database system 30 may be configured to perform a role of a FAT-based file system.

도 5를 참조하자면, 클러스터 기반의 파일 시스템인 FAT 파일 시스템을 위한 데이터베이스 파일은 다음과 같은 테이블을 포함할 수 있다. 즉, 파일 시스템 타입 및 파티션(partition)의 시작과 끝 등의 정보를 포함하는 MBR(Master Boot Record) 테이블, 볼륨 이름, 볼륨 라벨, 파티션 크기, 클러스터 크기 등의 정보를 포함하는 BPB(BIOS Parameter block) 테이블이 필요하다.Referring to FIG. 5, a database file for a FAT file system, which is a cluster-based file system, may include the following table. That is, a BIOS parameter block (BPB) that contains information such as the MBR (Master Boot Record) table that contains information such as file system type and the start and end of partition, volume name, volume label, partition size, cluster size, etc. ) You need a table.

또한, 파일 이름 및 속성, 루트 디렉토리 인지 서브 디렉토리 인지를 나타내는 플래그, 클러스터 시작 위치 등의 정보를 포함하는 디렉토리 테이블, 클러스터 할당에 관한 정보를 저장하는 FAT(File allocation table) 테이블 등이 포함될 수 있다.In addition, a directory table including information on file names and attributes, a flag indicating whether a root directory or a subdirectory is present, a cluster starting position, and the like, and a FAT (File allocation table) table for storing cluster allocation information may be included.

이상에서 설명한 바와 같이, 플래시 파일 시스템의 역할을 수행하는 메모리 데이터베이스 시스템은 메모리(RAM)에 상주하므로, 실시간으로 데이터를 저장하고 인덱스를 사용해서 원하는 데이터에 대한 검색을 빨리 할 수 있게 된다. 또한, 프로세스가 연 파일 정보나 파일 시스템 자체에 관한 각종 정보들을 데이터베이스 테이블을 이용해서 관리하므로, 플래시 메모리에 대한 접근을 줄이고 서비스에 대한 요청을 빨리 처리할 수 있다.As described above, since a memory database system serving as a flash file system resides in a memory (RAM), data can be stored in real time and an index can be used to quickly search for desired data. It also manages file information opened by the process or information about the file system itself using database tables, reducing access to flash memory and handling requests for services quickly.

본 발명은 상술한 각 실시예에 한정되지 않고 본 발명의 기술적 사상을 벗어나지 않는 범위내에서 당업자에 의해 다양하게 변형하여 실시할 수 있는 것이다.The present invention is not limited to the above embodiments and can be variously modified and implemented by those skilled in the art without departing from the technical spirit of the present invention.

본 발명에 따르면, 플래시 파일 시스템을 메모리 데이터베이스 시스템을 이용하여 설계함으로써 플래시 메모리의 제한점을 최소화할 수 있다.According to the present invention, the limitation of the flash memory can be minimized by designing the flash file system using the memory database system.

즉, 플래시 메모리에 대한 접근 횟수를 줄여 플래시 메모리의 수명을 최대화할 수 있으며, PDA나 휴대폰과 같이 사용자의 서비스 요청을 실시간으로 빠르게 처리해야 하는 장치의 성능을 크게 향상시킬 수 있다. 또한, 하나의 데이터베이스 시스템으로 다양한 종류의 파일 시스템을 제공할 수 있으며, 필요에 따라 파일 시스템 설정을 변경할 수도 있다. 뿐만아니라 데이터베이스 시스템은 전원차단이나 사용자의 실수로 인해 데이터의 파손이 발생했을 때 회복 기능을 지원하는데, 이는 파일 시스템의 저널링 기능을 대신할 수 있다.That is, the number of accesses to the flash memory can be reduced to maximize the life of the flash memory, and the performance of devices such as PDAs or mobile phones that need to process user service requests in real time can be greatly improved. In addition, a single database system may provide various types of file systems, and file system settings may be changed as necessary. In addition, the database system supports a recovery function when data corruption occurs due to a power failure or user error, which can replace the file system journaling function.

Claims (10)

플래시 메모리를 사용하는 장치가 부팅되는 단계;Booting the device using the flash memory; 파일 시스템의 역할을 수행하는 메모리 데이터베이스 시스템을 상기 장치의 램(RAM)에 상주시키는 단계; 및Residing in a memory (RAM) of the device, a memory database system serving as a file system; And 상기 메모리 데이터베이스 시스템은 상기 파일 시스템의 메타 정보들을 상기 램에 생성된 데이터베이스 파일을 통해 관리하면서 상기 플래시 메모리의 파일을 관리하는 단계를 포함하여 이루어지는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.And managing the file of the flash memory while managing the meta data of the file system through a database file created in the RAM. 제 1 항에 있어서, 상기 메모리 데이터베이스 시스템은The system of claim 1, wherein the memory database system is 유저 프로세스로부터 질의를 받아 이를 해석하는 인터페이스 모듈;An interface module for receiving a query from a user process and interpreting the query; 상기 인터페이스 모듈의 해석에 따라 트랜잭션 관리, 상기 데이터베이스 파일의 회복, 데이터의 읽기와 쓰기를 수행하기 위하여 상기 데이터베이스 파일을 총괄적으로 제어하는 데이터베이스 관리자 모듈;A database manager module which collectively controls the database file to perform transaction management, recovery of the database file, reading and writing data in accordance with the interpretation of the interface module; 상기 트랜잭션(transaction)을 유지하고 관리하는 트랜잭션 관리자 모듈;A transaction manager module for maintaining and managing the transaction; 상기 데이터베이스 파일의 회복 기능을 수행하는 회복 관리자 모듈; 및A recovery manager module for performing a recovery function of the database file; And 상기 데이터베이스 파일과 상기 플래시 메모리에 대한 데이터의 읽기와 쓰기를 실행하는 저장 관리자 모듈을 포함하여 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.And a storage manager module configured to read and write data to and from the database file and the flash memory. 제 2 항에 있어서,The method of claim 2, 상기 유저 프로세스와 인터페이스 모듈은 SQL(Structured Query Language)을 통해 서로 인터페이스되도록 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.And the user process and the interface module are configured to interface with each other through a structured query language (SQL). 제 2 항에 있어서,The method of claim 2, 상기 회복 관리자 모듈은 로깅 방법을 이용하여 상기 데이터베이스 파일의 회복 기능을 수행하도록 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.The recovery manager module is configured to perform a recovery function of the database file using a logging method. 제 2 항에 있어서,The method of claim 2, 새로운 파일 시스템에 대한 스크립트를 받아서 해당 메모리 데이터베이스 시스템을 생성하는 시스템 관리자 모듈을 더 포함하여 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.And a system manager module for receiving a script for a new file system and creating a corresponding memory database system. 제 2 항에 있어서,The method of claim 2, 상기 플래시 메모리의 무효화된 공간을 회수하는 가비지 회수 관리자 모듈을 더 포함하여 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.And a garbage recovery manager module for recovering the invalidated space of the flash memory. 제 6 항에 있어서,The method of claim 6, 상기 가비지 회수 관리자 모듈은 상기 플래시 메모리를 복수의 블록으로 나누고 상기 복수의 블록을 원형으로 관리하되, 상기 플래시 메모리에 데이터를 쓰는 위치가 n번째 블록일 때는 n-1번째 불록의 가비지를 회수하도록 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.The garbage recovery manager module divides the flash memory into a plurality of blocks and manages the plurality of blocks in a circle, and recovers garbage of the n-1 block when the location of writing data to the flash memory is an n-th block. Flash file system processing method using a memory database, characterized in that. 제 7 항에 있어서,The method of claim 7, wherein 상기 가비지 회수 관리자 모듈은 상기 플래시 메모리의 가용 공간이 일정 비율 이하일 때 가비지 회수를 수행하도록 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.And the garbage recovery manager module is configured to perform garbage recovery when the available space of the flash memory is below a predetermined ratio. 제 1 항 내지 제 8 항 중 어느 하나의 항에 있어서,The method according to any one of claims 1 to 8, 상기 메모리 데이터베이스 시스템은 FAT 기반의 파일 시스템의 역할을 수행하도록 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.The memory database system is a flash file system processing method using a memory database, characterized in that configured to perform the role of a FAT-based file system. 제 1 항 내지 제 8 항 중 어느 하나의 항에 있어서,The method according to any one of claims 1 to 8, 상기 메모리 데이터베이스 시스템은 inode 기반의 파일 시스템의 역할을 수행하도록 구성되는 것을 특징으로 하는 메모리 데이터베이스를 이용한 플래시 파일 시스템 처리 방법.And the memory database system is configured to perform a role of an inode-based file system.
KR1020050020264A 2005-03-10 2005-03-10 Method for processing flash file system using memory database KR100756135B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050020264A KR100756135B1 (en) 2005-03-10 2005-03-10 Method for processing flash file system using memory database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050020264A KR100756135B1 (en) 2005-03-10 2005-03-10 Method for processing flash file system using memory database

Publications (2)

Publication Number Publication Date
KR20060099193A true KR20060099193A (en) 2006-09-19
KR100756135B1 KR100756135B1 (en) 2007-09-05

Family

ID=37630495

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050020264A KR100756135B1 (en) 2005-03-10 2005-03-10 Method for processing flash file system using memory database

Country Status (1)

Country Link
KR (1) KR100756135B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100978533B1 (en) 2008-11-18 2010-08-27 최승일 System for protecting data in data storage for computer using RAM, and protection method using the system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3797649B2 (en) 1999-05-31 2006-07-19 シャープ株式会社 Nonvolatile semiconductor memory device

Also Published As

Publication number Publication date
KR100756135B1 (en) 2007-09-05

Similar Documents

Publication Publication Date Title
EP2780796B1 (en) Method of and system for merging, storing and retrieving incremental backup data
US8024507B2 (en) Transaction-safe FAT file system improvements
US8037112B2 (en) Efficient access of flash databases
CN101187901B (en) High speed cache system and method for implementing file access
US8296264B1 (en) Method and system for file-level continuous data protection
CN101743546B (en) Hierarchical storage management for a file system providing snapshots
US8627029B2 (en) Methods for managing files according to application
US20150318046A1 (en) Maintaining versions of data in solid state memory
US6691136B2 (en) Fast data retrieval based upon contiguous consolidation of records according to frequency of access
US7836105B2 (en) Converting file-systems that organize and store data for computing systems
US7970804B2 (en) Journaling FAT file system and accessing method thereof
US20100332446A1 (en) Storage pool scrubbing with concurrent snapshots
US20070061540A1 (en) Data storage system using segmentable virtual volumes
US20110167049A1 (en) File system management techniques for computing environments and systems
EP3874373A1 (en) Optimized placement of data contained in a garbage collected storage system
CN102955787A (en) Using method for file directory table, file writing method and main circuit board, CPU (central processing unit) and external storage applying same
US8595426B2 (en) Handling commands within a write-once read-many storage device configuration
US7725507B1 (en) Dynamic directories
KR100954603B1 (en) A log file of file system and method for recovering file system
KR100756135B1 (en) Method for processing flash file system using memory database
KR100987320B1 (en) Data processing apparatus and Data procssing method, using FAT file system capable of fast file recovery
US7693883B2 (en) Online data volume deletion
US20090287752A1 (en) Recording/reproducing apparatus and information processing method
CN105630692A (en) File storage system storing file directory by using MRAM
US8103623B2 (en) Method for accessing data stored in storage medium of electronic device

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
G170 Publication of correction
LAPS Lapse due to unpaid annual fee