KR19990032182A - Buffer management device for variable length files and its method - Google Patents

Buffer management device for variable length files and its method Download PDF

Info

Publication number
KR19990032182A
KR19990032182A KR1019970053157A KR19970053157A KR19990032182A KR 19990032182 A KR19990032182 A KR 19990032182A KR 1019970053157 A KR1019970053157 A KR 1019970053157A KR 19970053157 A KR19970053157 A KR 19970053157A KR 19990032182 A KR19990032182 A KR 19990032182A
Authority
KR
South Korea
Prior art keywords
file
buffer
client
shared memory
contents
Prior art date
Application number
KR1019970053157A
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 KR1019970053157A priority Critical patent/KR19990032182A/en
Publication of KR19990032182A publication Critical patent/KR19990032182A/en

Links

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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0813Multiuser, multiprocessor or multiprocessing cache systems with a network or matrix configuration
    • 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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • 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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0862Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with prefetch
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 가변 길이 파일의 버퍼 관리 장치 및 그 방법에 관한 것으로서, 클라이언트/서버로 구성된 네트워크에서 서버로부터 제공되는 파일들을 클라이언트에게 제공하기 위한 버퍼 관리 장치에 있어서, 서버에서 제공되는 파일들을 저장 관리하는 하드 디스크와, 상기 하드 디스크에 저장된 내용을 데이터의 크기에 따라 두 종류로 분류하여 저장하는 공유 메모리 버퍼와, 클라이언트가 서버의 파일을 요구할 경우 그 파일이 상기 공유 메모리 버퍼에 저장되어 있는지를 확인하여 저장되어 있으면 공유 메모리 버퍼의 내용을 클라이언트에게 전달하고, 저장되어 있지 않으면 상기 하드 디스크를 검색하여 하드 디스크에 저장된 내용을 클라이언트에게 전달하는 버퍼 관리기로 구성되는 장치를 제공하여, 컴퓨터 시스템의 메인 메모리 자원을 낭비하지 않고 효과적으로 관리할 수 있다는 장점이 있다.The present invention relates to a buffer management apparatus for a variable length file and a method thereof. The present invention relates to a buffer management apparatus for providing files provided from a server to a client in a network configured as a client / server. A hard disk, a shared memory buffer that classifies and stores the contents stored in the hard disk into two types according to the size of the data, and checks whether the file is stored in the shared memory buffer when the client requests a file from the server. A main memory resource of the computer system by providing a device configured as a buffer manager which delivers the contents of the shared memory buffer to the client if stored, and searches the hard disk and delivers the stored contents to the client if not stored. Not waste The advantage is that it can be managed effectively.

Description

가변길이 파일의 버퍼 관리 장치 및 그 방법Buffer management device for variable length files and its method

본 발명은 가변 길이 파일의 버퍼 관리 장치 및 그 방법에 관한 것으로서, 특히, 다양한 크기의 분포를 보이는 파일에 대한 버퍼관리 방법에 있어서, 공유 메모리버퍼를 2단계의 데이터 페이지와 메타 데이터 페이지로 구성하여 하드디스크에 저장되어 있는 파일에 대한 읽기 요청이 발생한 경우 컴퓨터 시스템의 메인 메모리 자원을 낭비하지 않고 효과적으로 관리할 수 있도록 하는 가변 길이 파일의 버퍼 관리 장치 및 그 방법에 관한 것이다.The present invention relates to a buffer management apparatus for a variable length file and a method thereof, and more particularly, to a buffer management method for a file having a variable size distribution, wherein a shared memory buffer includes two data pages and a metadata page. The present invention relates to a buffer management apparatus and a method for controlling a variable length file that can be efficiently managed without wasting main memory resources of a computer system when a read request for a file stored in a hard disk occurs.

현대의 컴퓨팅 환경은 인터넷의 급속적인 발달, 클라이언트/서버 기술의 대중화, 그리고 멀티미디어 기술등으로 인해 크기와 내용의 측면에서 다양한 자료에 대한 집중적인 검색 요청을 효과적이고 신속하게 처리할 수 있는 방법이 절실히 요구되고 있으며, 이러한 요구를 충족하기 위한 방법으로 하드디스크에 저장되어 있는 파일 자료를 메인 메모리에 적재(load)하여 놓고 처리하는 버퍼 관리 기법이 사용되고 있다.The modern computing environment has become an urgent need for effective and rapid processing of intensive search requests for various materials in terms of size and content due to the rapid development of the Internet, popularization of client / server technologies, and multimedia technologies. In order to satisfy these demands, a buffer management technique for loading and processing file data stored in a hard disk into main memory is used.

이때, 상기와 같은 기능을 수행하기 위해 버퍼 관리 장치는 임의의 파일에 대한 요청이 발생하기 이전의 시점에 메인 메모리 버퍼에 파일의 내용을 적재하거나, 모든 파일을 버퍼에 적재해 놓는 방법을 고려할 수 있다. 그러나, 전자의 경우 요청의 내용을 미리 인지할 수 없으므로, 요청될 임의의 파일을 사전에 예측하여 버퍼에 적재하는 것은 현실적인 측면에서 불가능하며, 후자의 경우도 하드디스크의 크기(전체 파일의 크기)가 컴퓨터 시스템의 메인 메모리 크기보다 클 수 없고, 또한 메인 메모리의 가격이 디스크의 가격보다 매우 비싸기 때문에 불가능하다.In this case, in order to perform the above function, the buffer management apparatus may consider loading the contents of the file into the main memory buffer or loading all the files into the buffer before the request for any file occurs. have. However, in the former case, since the contents of the request cannot be recognized in advance, it is impossible to predict in advance the arbitrary file to be requested and load it into the buffer. In the latter case, the size of the hard disk (the size of the entire file) Cannot be larger than the main memory size of the computer system, and also because the price of the main memory is much higher than the price of the disk.

따라서, 기존의 대부분의 시스템에서는 한정된 메인 메모리 버퍼에 요청될 확률이 높은 자료를 적재하는 방법을 사용한다. 그리고 이러한 방법에서는 고정된 크기를 가지는 페이지 혹은 블록의 단위로 버퍼 교체 방법을 적용하여 각각의 요청에 대한 적중률을 높이는 효과로 성능의 향상을 얻고 있다.Therefore, most existing systems use a method of loading data that is likely to be requested in a limited main memory buffer. In this method, the performance is improved by applying a buffer replacement method to a unit of a page or block having a fixed size to increase the hit rate for each request.

그러나, 이와 같이 균일한 크기의 페이지나 블록을 사용하여 다양한 크기의 파일 자료에 대한 버퍼관리를 할 경우 단편화 현상이 크게 발생하여 컴퓨터 자원의 효율성 측면에서 부적합하며, 적중률이 심각하게 저하되는 단점이 있다.However, in the case of buffer management for file data of various sizes using uniformly sized pages or blocks, fragmentation occurs largely, which is unsuitable in terms of efficiency of computer resources, and the hit ratio is severely degraded. .

따라서, 본 발명에서는 상기와 같은 단점을 보완하기 위해 다양한 크기의 분포를 보이는 파일에 대한 버퍼관리 방법에 있어서, 공유 메모리버퍼를 2단계의 데이터 페이지와 메타 데이터 페이지로 구성하여 하드디스크에 저장되어 있는 파일에 대한 읽기 요청이 발생할 경우 컴퓨터 시스템의 메인 메모리 자원을 낭비하지 않고 효과적으로 관리할 수 있도록 하는 가변 길이 파일의 버퍼 관리 장치 및 그 방법을 제공하고자 한다.Accordingly, in the present invention, in the buffer management method for a file having various size distributions to compensate for the above disadvantages, the shared memory buffer is composed of two data pages and a metadata page, which are stored on a hard disk. An object of the present invention is to provide a buffer management apparatus and method for a variable-length file that can be efficiently managed without wasting main memory resources of a computer system when a read request for a file occurs.

본 발명에서는 클라이언트/서버로 구성된 네트워크에서 서버로부터 제공되는 파일들을 클라이언트에게 제공하기 위한 버퍼 관리 장치에 있어서, 서버에서 제공되는 파일들을 저장 관리하는 하드 디스크와, 상기 하드 디스크에 저장된 내용을 데이터의 크기에 따라 두 종류로 분류하여 저장하는 공유 메모리 버퍼와, 클라이언트가 서버의 파일을 요구할 경우 그 파일이 상기 공유 메모리 버퍼에 저장되어 있는지를 확인하여 저장되어 있으면 공유 메모리 버퍼의 내용을 클라이언트에게 전달하고, 저장되어 있지 않으면 상기 하드 디스크를 검색하여 하드 디스크에 저장된 내용을 클라이언트에게 전달하는 버퍼 관리기로 구성되는 장치를 제공한다.The present invention provides a buffer management apparatus for providing files provided from a server to a client in a network configured as a client / server, comprising: a hard disk storing and managing files provided by a server, and a size of data stored in the hard disk; The shared memory buffer, which is classified into two types according to the storage, and when the client requests a file from the server, checks whether the file is stored in the shared memory buffer, and if so, delivers the contents of the shared memory buffer to the client. If it is not stored provides a device configured as a buffer manager for searching the hard disk and delivers the contents stored on the hard disk to the client.

그리고, 상기와 같이 구성된 장치에 있어서, 상기 공유 메모리 버퍼를 크기가 큰 페이지와 작은 페이지의 2종류에 의해 구성하여 그 구성에 따라 파일들을 저장하고 클라이언트로부터 파일 요청을 수신하면, 상기 공유 메모리 버퍼에 클라이언트가 원하는 파일이 있는지를 확인하는 제 1 단계와, 상기 제 1 단계의 확인 결과 상기 공유 메모리 버퍼에 클라이언트가 원하는 파일이 있으면 그 공유 메모리 버퍼의 내용을 읽어 클라이언트에게 전달하고, 그렇지 않으면 하드 디스크에서 클라이언트가 원하는 파일을 읽는 제 2 단계와, 상기 제 2 단계에서 하드 디스크로부터 읽은 파일의 크기를 확인하여 상기 파일의 크기가 너무 크지 않은 경우 버퍼에 저장하고 그렇지 않은 경우 버퍼를 우회하여 파일의 내용을 클라이언트에게 전달하는 제 3 단계로 구성되는 가변 길이 파일의 버퍼 관리 방법을 제공한다.In the above-configured apparatus, the shared memory buffer is configured by two types of large pages and small pages, stores files according to the configuration, and receives a file request from a client. A first step of checking whether a file is desired by the client, and if the file desired by the client is found in the shared memory buffer, the contents of the shared memory buffer are read and delivered to the client, The second step of reading a file desired by the client and the size of the file read from the hard disk in the second step is checked and stored in the buffer if the file size is not too large. Otherwise, the contents of the file are bypassed. Consisting of a third step of delivering to the client Provides a buffer management method for variable length files.

도 1은 본 발명에 의한 가변 길이 파일의 버퍼 관리 장치에 대한 블록도,1 is a block diagram of a buffer management apparatus for a variable length file according to the present invention;

도 2는 본 발명의 버퍼 관리기에 대한 블록도,2 is a block diagram of a buffer manager of the present invention;

도 3은 본 발명에 의한 가변 길이 파일의 버퍼 관리 방법에 대한 처리 흐름도.3 is a flowchart illustrating a buffer management method of a variable length file according to the present invention.

〈도면의 주요부분에 대한 부호의 설명〉<Explanation of symbols for main parts of drawing>

10 : 버퍼 관리기 11 : 경로 제어 모듈10: buffer manager 11: path control module

12 : 파일 관리 모듈 13 : 인덱스 관리 모듈12: File Management Module 13: Index Management Module

14 : 페이지 관리 모듈 15 : 동시성 제어 모듈14: page management module 15: concurrency control module

20 : 공유 메모리 버퍼 21 : 메타 데이터 페이지20: shared memory buffer 21: metadata page

22 : 큰 데이터 페이지 23 : 작은 데이터 페이지22: Big Data Pages 23: Small Data Pages

30 : 하드 디스크30: hard disk

이하, 첨부된 도면을 참조하여 본 발명을 더욱 상세히 설명하고자 한다.Hereinafter, with reference to the accompanying drawings will be described in more detail the present invention.

도 1은 본 발명에 의한 가변 길이 파일의 버퍼 관리 장치에 대한 블록도이고, 도 2는 본 발명의 버퍼 관리기에 대한 블록도이고, 도 3은 본 발명에 의한 가변 길이 파일의 버퍼 관리 방법에 대한 처리 흐름도이다.1 is a block diagram of a buffer management apparatus of a variable length file according to the present invention, FIG. 2 is a block diagram of a buffer manager of the present invention, and FIG. 3 is a buffer management method of a variable length file according to the present invention. Processing flow chart.

도 1을 참조하면, 클라이언트/서버로 구성된 네트워크에서 서버로부터 제공되는 파일들을 클라이언트에게 효율적으로 제공하기 위해 본 발명에서 제공하는 버퍼 관리 장치는 서버에서 제공되는 파일들을 저장 관리하는 하드 디스크(30)와, 상기 하드 디스크(30)에 저장된 내용을 데이터의 크기에 따라 두 종류로 분류하여 저장하는 공유 메모리 버퍼(20)와, 클라이언트가 서버의 파일을 요구할 경우 그 파일이 상기 공유 메모리 버퍼(20)에 저장되어 있는지를 확인하여 저장되어 있으면 공유 메모리 버퍼(20)의 내용을 클라이언트에게 전달하고, 저장되어 있지 않으면 상기 하드 디스크(30)를 검색하여 하드 디스크(30)에 저장된 내용을 클라이언트에게 전달하는 버퍼 관리기(10)로 구성된다.Referring to FIG. 1, in order to efficiently provide files provided from a server to a client in a network configured as a client / server, a buffer management apparatus provided by the present invention includes a hard disk 30 storing and managing files provided from a server. The shared memory buffer 20 classifies and stores the contents stored in the hard disk 30 into two types according to the size of the data, and when the client requests a file of the server, the file is stored in the shared memory buffer 20. Check whether it is stored, and if so, deliver the contents of the shared memory buffer 20 to the client. If not, the buffer searches for the hard disk 30 and delivers the contents stored in the hard disk 30 to the client. It consists of a manager 10.

상기와 같은 구성을 갖는 버퍼 관리 장치는 다수의 클라이언트가 서버에 저장되어 있는 파일 자료를 요청할 경우, 상기 버퍼 관리기(10)에서 상기 공유 메모리 버퍼(20)를 검색하여 그 공유 메모리 버퍼(20)에 적재된 해당 파일의 복제본을 상기 클라이언트에게 전달한다.When a plurality of clients request file data stored in a server, the buffer management apparatus having the above configuration searches for the shared memory buffer 20 in the buffer manager 10 and transmits the shared memory buffer 20 to the shared memory buffer 20. Deliver a copy of the loaded file to the client.

이 때, 상기 공유 메모리 버퍼(20)는 가변 크기의 파일 자료를 위하여 다단계 버퍼를 사용하는데, 상기 다단계 버퍼란 버퍼를 구성하는 연산 단위인 페이지를 크기가 큰 페이지와 크기가 작은 페이지의 2종류의 집단으로 구성한 것을 의미한다. 도 1에서 보면 상기 하드 디스크(30)에 저장된 파일을 버퍼에 적재하는 과정에서 큰 데이터 페이지(22)와 작은 데이터 페이지(23)를 동시에 사용하여 버퍼에 적재하며, 자료의 내용에 대한 무결성을 보장하고 또한 신속한 자료의 검색을 위한 메타 데이터를 관리하는 메타 데이터 페이지(21)로 구성된다.In this case, the shared memory buffer 20 uses a multi-stage buffer for file data of variable size. The multi-stage buffer includes two types of pages, that is, a page which is an operation unit constituting the buffer, a large page and a small page. Means a group. In FIG. 1, in the process of loading a file stored in the hard disk 30 into a buffer, a large data page 22 and a small data page 23 are simultaneously loaded into a buffer, thereby ensuring the integrity of the contents of the data. And it also consists of a metadata page 21 for managing the metadata for quick retrieval of data.

이와 같이 상기 공유 메모리 버퍼(20)를 두 종류의 크기를 갖는 페이지로 구성하는 이유는 자료의 내부 단편화를 최소화 하기 위한 것으로서, 디스크에 저장되어 있는 파일의 크기가 매우 다양하기 때문에 기존의 방법에서와 같이 공유 메모리 버퍼를 균일한 크기의 페이지로만 구성하면 내부 단편화가 크게 발생한다. 그러나, 본 발명에서와 같이 큰 페이지와 작은 페이지를 조합하여 파일의 내용을 유지하면 단편화를 최소로 할 수 있는 장점이 있다.As such, the reason why the shared memory buffer 20 is composed of pages having two kinds of sizes is to minimize internal fragmentation of data, and the size of files stored on the disk is very diverse. Likewise, if the shared memory buffer is composed of uniformly sized pages, internal fragmentation may occur largely. However, as in the present invention, maintaining the contents of a file by combining a large page and a small page has an advantage of minimizing fragmentation.

예를 들어 큰 데이터 페이지의 크기를 10바이트로, 작은 데이터 페이지의 크기를 3바이트로 설정한 경우, 15바이트의 파일을 버퍼에 적재한다면 이 파일을 위하여 큰 데이터 페이지 1개와 작은 데이터 페이지 2개를 사용할 수 있다. 만약 기존의 방법과 같이 버퍼의 구성이 균일하게 구성되어 있었다면(균일한 각각의 페이지는 10바이트라는 가정에서) 15바이트 파일에 20바이트의 버퍼를 할당하기 때문에 5바이트의 낭비가 발생한다. 만약 종래의 균일한 페이지 시스템에서 각각의 페이지의 크기를 최소화 한다면 낭비의 비율이 적어 지지만 각각의 페이지에 대한 메타데이타의 크기가 증가하는 역효과가 발생하는 문제점이 있다. 따라서 버퍼의 구성을 다단계로 하면 메모리 낭비의 문제와 메타데이타의 증가에 대한 문제를 동시에 해결할 수 있다.For example, if you set the size of a large data page to 10 bytes and the size of a small data page to 3 bytes, if you load a 15-byte file into the buffer, you will have 1 large data page and 2 small data pages for that file. Can be used. If the buffer configuration is uniformly organized (assuming that each page is 10 bytes in size) as in the conventional method, 5 bytes are wasted because a 20-byte buffer is allocated to a 15-byte file. If the size of each page is minimized in the conventional uniform page system, the waste ratio decreases, but there is a problem in that the size of the metadata for each page increases. Therefore, if the buffer configuration is multi-stage, the problem of memory waste and metadata increase can be solved at the same time.

또한, 사용자의 요청이 동시 다발적으로 발생하는 환경에서 상기와 같은 자료의 내용에 대한 무결성을 보장하고 또한 신속한 자료의 검색을 위해서는 메타데이타를 관리해야 하며, 상기 메타데이타는 각각의 요청마다 반드시 참조하는 내용이므로 가장 중요하게 관리 되어야 하는데, 이러한 메타 데이타의 내용은 인덱스 데이터, 교체 정보 데이터(LRU-chain), 페이지 상태 데이터가 있으며 이들에 대한 처리는 버퍼관리기(10)에서 이루어진다.In addition, in order to guarantee the integrity of the contents of the data and to search for the data quickly in an environment where user requests occur simultaneously, the metadata must be referred to each request. The contents of the meta data are index data, replacement information data (LRU-chain), and page state data, and the processing of these metadata is performed in the buffer manager 10.

도 2는 이러한 버퍼 관리기(10)에 대한 블록도로서, 도 2를 참조하면, 상기 버퍼 관리기(10)는 경로 제어 모듈(11), 파일 관리 모듈(12), 인덱스 관리 모듈(13), 페이지 관리 모듈(14), 동시성 제어 모듈(15)로 구성된다.FIG. 2 is a block diagram of the buffer manager 10. Referring to FIG. 2, the buffer manager 10 includes a path control module 11, a file management module 12, an index management module 13, and a page. It consists of a management module 14 and the concurrency control module 15.

상기 경로 제어 모듈(11)은 클라이언트로부터 요구된 파일이 상기 공유 메모리 버퍼(22, 23)에 저장되어 있지 않아 하드 디스크의 내용을 참조한 경우 그 내용을 상기 공유 메모리 버퍼에 저장할 것인지 아닌지의 여부를 결정하는 기능을 담당하며, 상기 경로 제어 모듈(11)에서 요청된 파일에 대한 경로 제어는 우선 요청된 파일의 크기를 연산한 결과와 경로 제어 상수를 비교하여 요청된 파일에 대한 경로 제어를 수행한다. 이 때, 경로 제어 상수는 0보다 크고 1보다 작은 값으로, 본 발명이 적용되는 임의의 환경에 최적화 될 수 있도록 설정한다.The path control module 11 determines whether or not a file requested from a client is stored in the shared memory buffers 22 and 23 so that the contents of the hard disk are stored in the shared memory buffer. The path control for the file requested by the path control module 11 first performs a path control on the requested file by comparing the result of calculating the size of the requested file with a path control constant. At this time, the path control constant is set to be greater than 0 and less than 1 so as to be optimized in any environment to which the present invention is applied.

또한, 상기 파일 관리 모듈(12)은 상기 경로 제어 모듈(11)로부터 경로가 결정된 파일에 대한 요청에 대하여 인덱스 관리 모듈(13)과 페이지 관리 모듈(14)을 이용하여 파일의 내용을 버퍼(22, 23)에 기록하거나 클라이언트로 전달하는 역할을 수행한다. 상기 파일 관리 모듈(12)이 요청된 파일을 버퍼(22, 23)에 기록할 경우 파일의 크기에 따른 페이지의 할당을 결정하며, 또한 버퍼(22, 23)의 여분이 없는 경우 교체될 페이지에 대한 결정을 수행한다.In addition, the file management module 12 buffers the contents of the file using the index management module 13 and the page management module 14 in response to a request for a file whose path is determined from the path control module 11. , 23) or deliver to the client. When the file management module 12 writes the requested file to the buffers 22 and 23, the file management module 12 determines the page allocation according to the size of the file, and if there is no spare of the buffers 22 and 23, the page to be replaced. Make a decision.

상기 인덱스 관리 모듈(13)은 버퍼(22, 23)에 저장된 파일을 검색할 수 있는 기능과 해당 파일이 할당된 페이지를 검색할 수 있는 기능을 수행한다. 파일의 검색을 위하여 파일 이름을 기본키로하는 해쉬(hash)를 적용하며, 해쉬(hash) 구조의 인덱스를 파일 이름으로 검색한 결과는 해당 파일의 시작 페이지 주소이다. 이때 검색결과가 음수이면 검색하는 파일이 버퍼(22, 23)에 존재하지 않는 것을 의미한다.The index management module 13 performs a function of searching a file stored in the buffers 22 and 23 and a function of searching a page to which the corresponding file is assigned. To search for a file, we apply a hash with the file name as the primary key. The result of retrieving the index of the hash structure as the file name is the start page address of the file. If the search result is negative, the searched file does not exist in the buffers 22 and 23.

상기 페이지 관리 모듈(14)은 상기 파일 관리 모듈(12)의 제어에 의해 임의의 파일 중 버퍼에 적재(load)할 해당 파일의 내용을 페이지에 복사하고 각각의 복사된 페이지들을 링크로 연결하는 기능을 담당한다. 또한, 버퍼에 저장된 임의의 파일이 해제될 경우 해제되는 파일에 속한 페이지들을 메타데이타 페이지에 반납하는 기능을 수행한다.The page management module 14 functions to copy the contents of a corresponding file to be loaded into a buffer among arbitrary files to a page under the control of the file management module 12 and to link the respective copied pages by a link. In charge of. In addition, when any file stored in the buffer is released, the pages belonging to the released file are returned to the metadata page.

한편, 상기 동시성 제어 모듈(15)은 버퍼에 적재된 파일의 내용에 대한 무결성을 보장하기 위하여 동시성 제어 기능을 수행하는데, 다수의 클라이언트로부터 파일에 대한 요청이 동시 다발적으로 발생할 경우 버퍼에 적재된 임의의 파일을 적재하고 해제하는 연산에 대한 직열성이 보장되지 않으면 버퍼의 내용에 결함이 발생한다. 이 때, 직열성이 보장되는 파일을 적재하고 해제하는 연산이란 각 연산의 시작과 종료 사이에 아무런 방해나 중단이 발생하지 않는 것을 보장하는 연산을 의미한다. 따라서, 이러한 직열성 보장의 연산을 위하여 유닉스(UNIX)의 오퍼레이팅 시스템에서 제공하는 세마포어(semaphore)를 사용하여 동시성 제어를 수행한다.On the other hand, the concurrency control module 15 performs a concurrency control function to ensure the integrity of the contents of the file loaded in the buffer, when a plurality of requests for the file from multiple clients occur at the same time If the seriality of the operation of loading and unloading an arbitrary file is not guaranteed, the contents of the buffer will be defective. In this case, the operation of loading and unloading a file that guarantees seriality refers to an operation that ensures that no interruption or interruption occurs between the start and end of each operation. Therefore, concurrency control is performed by using semaphores provided by the operating system of UNIX.

도 3은 본 발명에 의한 가변 길이 파일의 버퍼 관리 방법에 대한 처리 흐름도로서, 도 1 및 도 3을 참조하면, 먼저, 클라이언트로부터 임의의 파일 요청을 수신(s101)하고, 상기 공유 메모리 버퍼(20)에 클라이언트가 원하는 파일이 있는지를 확인(s102)하여, 원하는 파일이 존재하면, 상기 공유 메모리 버퍼(20)에서 파일을 읽어(s110) 그 파일의 내용을 클라이언트에게 전달(s109)하고 다음 요청을 대기한다.3 is a flowchart illustrating a method for managing a buffer of a variable length file according to the present invention. Referring to FIGS. 1 and 3, first, an arbitrary file request is received from a client (s101), and the shared memory buffer 20 is processed. Check whether the desired file exists (s102), and if the desired file exists, the file is read from the shared memory buffer 20 (s110) and the contents of the file are transmitted to the client (s109) and the next request is made. Wait

그러나, 클라이언트가 요청한 파일이 공유 메모리 버퍼(20)에 존재하지 않으면, 상기 하드 디스크(30)에서 클라이언트가 원하는 파일을 읽은(s103) 후, 상기 파일의 크기를 확인(s104)하여 상기 파일의 크기가 너무 크지 않은 경우 버퍼에 저장하고 그렇지 않은 경우 버퍼를 우회하여 파일의 내용을 클라이언트에게 전달하는 경로 제어(s105, s106, s107, s108)를 수행한다.However, if the file requested by the client does not exist in the shared memory buffer 20, after reading the desired file from the hard disk 30 (s103), the size of the file is checked (s104) by checking the size of the file (s104). If is not too large, it stores in the buffer, otherwise it performs the path control (s105, s106, s107, s108) bypassing the buffer and passing the contents of the file to the client.

이 때, 경로 제어란 요청된 파일을 버퍼에 적재하여 유지할 것인지에 대한 판단을 하는 것으로서, 버퍼에 저장하는 것으로 결정된 파일은 버퍼에 대하여 LRU방법을 적용하여 페이지 교체를 수행하고, 버퍼 저장을 하지 않는 것으로 결정된 파일은 곧바로 사용자에게 전달하는 과정을 거치게 된다.At this time, the path control is to determine whether to load and maintain the requested file in the buffer, and the file determined to be stored in the buffer performs page replacement by applying the LRU method to the buffer and does not store the buffer. The determined file is immediately passed on to the user.

상기 경로 제어에 대한 구체적인 방법은 먼저, 상기와 같이 상기 하드 디스크(30)에서 읽어온(s103) 파일의 크기를 구하고(s104), 시스템 관리자가 정한 판단상수와 전체 버퍼의 크기를 곱한 값에서 파일의 크기를 감한 결과값을 판단 변수로 설정(s105)한다. 그리고, 상기 판단 변수가 0보다 큰지 작은지를 판단(s106)하여, 0 보다 큰 경우는 읽어온 파일을 버퍼에 저장(s108)하고, 그렇지 않은 경우는 버퍼 우회처리(s107)하여 사용자에게 파일 내용을 전달(s109)한다.As a specific method for the path control, first, the size of the file read from the hard disk 30 as described above (s103) is obtained (s104), and the file is determined by multiplying the size of the entire buffer by the determination constant determined by the system administrator. The result of subtracting the size of is set as a determination variable (s105). Then, it is determined whether the determination variable is greater than or less than zero (s106). If the determination variable is larger than zero, the read file is stored in the buffer (s108). Otherwise, the buffer is bypassed (s107), and the file contents are transmitted to the user. Deliver (s109).

이 때, 상기 경로 제어가 본 발명에서 가지는 의미는 너무 큰 파일을 버퍼에 적재할 경우 발생하는 역효과를 감소 시키는 것으로서, 고정크기의 데이터에 대하여 버퍼 교체를 수행 하는 경우는 발생하지 않는 특징이 가변 크기 자료에 대한 페이지 교체에서는 발생하는데, 이것은 바로 한번의 페이지 교체에서 발생하는 버퍼 변화율이다.In this case, the meaning of the path control in the present invention is to reduce the adverse effects caused by loading a file that is too large in the buffer, and the feature that does not occur when performing buffer replacement for data of fixed size is variable size. This happens in page replacements for data, which is the rate of buffer change that occurs in a single page replacement.

이러한 버퍼 변화율이 고정크기에서는 항상 일정한 값을 유지하므로 버퍼교체와 적중률에 아무런 영향을 주지 못하지만, 가변 크기에서 큰 파일이 버퍼에 적재 될 경우 버퍼 변화율이 커지며 따라서 다음 요청에 대한 적중률에 영향을 주게 된다. 즉, 한정된 버퍼에 10개의 파일이 존재한다는 가정에서 새로운 요청에 의하여 버퍼에 존재하는 5개의 파일이 교체되면 버퍼에는 6개의 파일이 남게 된다. 따라서, 전체 파일이 20개인 경우 이러한 요청에 의한 버퍼 적중률은 10/20에서 6/20으로 감소하게 된다. 이러한 경우는 경로제어의 원칙에 의하여 버퍼에 저장하지 않는 방법을 사용하는 것이다.Since the buffer change rate is always constant at a fixed size, it has no effect on the buffer replacement and hit rate. However, when a large file is loaded into the buffer at a variable size, the buffer change rate is increased, thus affecting the hit rate for the next request. . That is, if five files in the buffer are replaced by a new request on the assumption that 10 files exist in the limited buffer, six files remain in the buffer. Therefore, if the total number of files is 20, the buffer hit rate due to this request is reduced from 10/20 to 6/20. In this case, the path control principle uses a method that does not store in the buffer.

상기와 같은 본 발명의 장치 및 방법은 파일 자료를 읽기 위해 매번 하드디스크를 접근하는 방법보다 매우 빠른 속도 향상을 얻을 수 있으며, 큰 페이지와 작은 페이지를 조합하여 파일의 내용을 유지하면 단편화를 최소로 할 수 있으므로, 컴퓨터 시스템의 메인 메모리 자원을 낭비하지 않고 효과적으로 관리할 수 있다는 장점이 있다.The apparatus and method of the present invention as described above can achieve a much faster speed improvement than the method of accessing the hard disk every time to read the file data, and keep the contents of the file by combining the big page and the small page to minimize the fragmentation. As a result, it can be effectively managed without wasting the main memory resources of the computer system.

Claims (5)

클라이언트/서버로 구성된 네트워크에서 서버로부터 제공되는 파일들을 클라이언트에게 제공하기 위한 버퍼 관리 장치에 있어서,A buffer management apparatus for providing a client with files provided from a server in a network configured as a client / server, 서버에서 제공되는 파일들을 저장 관리하는 하드 디스크와,A hard disk that stores and manages files provided by the server, 상기 하드 디스크에 저장된 내용을 데이터의 크기에 따라 두 종류로 분류하여 저장하는 공유 메모리 버퍼와,A shared memory buffer for classifying and storing the contents stored in the hard disk into two types according to the size of data; 클라이언트가 서버의 파일을 요구할 경우 그 파일이 상기 공유 메모리 버퍼에 저장되어 있는지를 확인하여 저장되어 있으면 공유 메모리 버퍼의 내용을 클라이언트에게 전달하고, 저장되어 있지 않으면 상기 하드 디스크를 검색하여 하드 디스크에 저장된 내용을 클라이언트에게 전달하는 버퍼 관리기로 구성된 것을 특징으로 하는 가변길이 파일의 버퍼 관리 장치.When the client requests a file from the server, the client checks whether the file is stored in the shared memory buffer, and if the file is stored, delivers the contents of the shared memory buffer to the client. Buffer management device for a variable length file, characterized in that the buffer manager for delivering the contents to the client. 제 1 항에 있어서,The method of claim 1, 상기 공유 메모리 버퍼는The shared memory buffer 가변 크기의 파일 자료를 위하여 버퍼를 구성하는 연산 단위인 페이지를 크기가 큰 페이지와 크기가 작은 페이지의 2종류의 집단으로 구성하는 다단계 버퍼를 사용하며,For variable sized file data, multi-stage buffer is used, which consists of two groups of pages, which are the unit of operation that constitutes the buffer, of large page and small page. 자료의 내용에 대한 무결성을 보장하고 또한 신속한 자료의 검색을 위한 메타 데이터를 관리하는 메타 데이터 페이지를 포함하는 것을 특징으로 하는 가변길이 파일의 버퍼 관리 장치.And a metadata page for ensuring the integrity of the contents of the data and for managing the metadata for rapid data retrieval. 제 1 항 또는 제 2 항에 있어서,The method according to claim 1 or 2, 상기 버퍼 관리기는The buffer manager 클라이언트로부터 요구된 파일이 상기 공유 메모리 버퍼에 저장되어 있지 않아 하드 디스크의 내용을 참조한 경우 그 내용을 상기 공유 메모리 버퍼에 저장할 것인지 아닌지의 여부를 결정하는 경로 제어 모듈과,A path control module for determining whether to store the contents in the shared memory buffer when a file requested from a client is not stored in the shared memory buffer and the contents of the hard disk are referred to; 상기 경로 제어 모듈로부터 경로가 결정된 파일에 대하여 그 파일의 내용을 상기 공유 메모리 버퍼에 저장하거나 클라이언트로 전달하는 파일 관리 모듈과,A file management module for storing the contents of the file in the shared memory buffer or transferring the file to the client with respect to the file whose path is determined from the path control module; 상기 공유 메모리 버퍼에 저장된 파일을 검색하고, 해당 파일이 할당된 페이지를 검색하는 기능을 하는 인덱스 관리 모듈과,An index management module for searching a file stored in the shared memory buffer and searching for a page to which the file is allocated; 상기 파일 관리 모듈의 제어에 의해 임의의 파일 중 상기 공유 메모리 버퍼에 적재할 해당 파일의 내용을 페이지에 복사하고 각각 복사된 페이지들을 링크로 연결하는 페이지 관리 모듈과,A page management module for copying the contents of a corresponding file to be loaded into the shared memory buffer among arbitrary files to a page and linking the copied pages to each other by a control of the file management module; 상기 공유 메모리 버퍼에 적재된 파일의 내용에 대한 무결성을 보장하기 위해 동시성 제어 기능을 수행하는 동시성 제어 모듈로 구성된 것을 특징으로 하는 가변 길이 파일의 버퍼 관리 장치.And a concurrency control module configured to perform a concurrency control function to ensure the integrity of the contents of the file loaded in the shared memory buffer. 클라이언트/서버로 구성된 네트워크에서 서버로부터 제공되는 파일들을 공유 메모리 버퍼에 미리 적재해 놓고, 클라이언트로 부터의 요구가 있을 경우 클라이언트에게 제공하기 위한 버퍼 관리 방법에 있어서,In the buffer management method for pre-loading files provided from the server in a network configured as a client / server in a shared memory buffer, and to provide to the client when a request from the client, 상기 공유 메모리 버퍼를 크기가 큰 페이지와 작은 페이지의 2종류에 의해 구성하여 그 구성에 따라 파일들을 저장하고 클라이언트로부터 파일 요청을 수신하면, 상기 공유 메모리 버퍼에 클라이언트가 원하는 파일이 있는지를 확인하는 제 1 단계와,The shared memory buffer is configured by two types of a large page and a small page to store files according to the configuration, and upon receipt of a file request from a client, a method for checking whether the shared memory buffer includes a desired file. With step one, 상기 제 1 단계의 확인 결과 상기 공유 메모리 버퍼에 클라이언트가 원하는 파일이 있으면 그 공유 메모리 버퍼의 내용을 읽어 클라이언트에게 전달하고, 그렇지 않으면 하드 디스크에서 클라이언트가 원하는 파일을 읽는 제 2 단계와,A second step of reading the contents of the shared memory buffer to the client if the file desired by the client exists in the shared memory buffer as a result of the checking of the first step; 상기 제 2 단계에서 하드 디스크로부터 읽은 파일의 크기를 확인하여 상기 파일의 크기가 너무 크지 않은 경우 버퍼에 저장하고 그렇지 않은 경우 버퍼를 우회하여 파일의 내용을 클라이언트에게 전달하는 제 3 단계로 구성된 것을 특징으로 하는 가변길이 파일의 버퍼 관리 방법.And a third step of checking the size of the file read from the hard disk in the second step and storing the file in a buffer if the size of the file is not too large, otherwise transferring the contents of the file to the client by bypassing the buffer. How to manage buffers of variable length files. 제 4 항에 있어서,The method of claim 4, wherein 상기 제 3 단계는The third step is 상기 하드 디스크로부터 읽은 파일의 크기가 버퍼에 저장할 수 있는 크기인지를 확인하기 위해 전체 버퍼 크기에 시스템 관리자가 정한 판단 상수를 곱한 값에서 상기 파일의 크기를 감한 값을 판단 변수로 하여, 상기 판단 변수가 0보다 크지 않으면, 상기 파일의 내용을 버퍼에 저장하고, 0보다 크면 버퍼에 저장하지 않는 것을 특징으로 하는 가변길이 파일의 버퍼 관리 방법.To determine whether the size of the file read from the hard disk is a size that can be stored in the buffer, the determination variable is a value obtained by subtracting the size of the file from a value obtained by multiplying the total buffer size by a determination constant determined by a system administrator. If is not greater than 0, the contents of the file is stored in a buffer, and if greater than 0 is not stored in the buffer.
KR1019970053157A 1997-10-16 1997-10-16 Buffer management device for variable length files and its method KR19990032182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970053157A KR19990032182A (en) 1997-10-16 1997-10-16 Buffer management device for variable length files and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970053157A KR19990032182A (en) 1997-10-16 1997-10-16 Buffer management device for variable length files and its method

Publications (1)

Publication Number Publication Date
KR19990032182A true KR19990032182A (en) 1999-05-06

Family

ID=66042193

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970053157A KR19990032182A (en) 1997-10-16 1997-10-16 Buffer management device for variable length files and its method

Country Status (1)

Country Link
KR (1) KR19990032182A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100474357B1 (en) * 2001-12-26 2005-03-08 한국전자통신연구원 A method for memory allocation using multi-level partition
KR100507782B1 (en) * 2003-12-04 2005-08-17 한국전자통신연구원 Database management system and the method of controlling consistency of system table in DBMS
KR100676432B1 (en) * 2004-04-30 2007-02-01 가부시끼가이샤 도시바 Meta data for moving picture
KR100753831B1 (en) * 2005-12-08 2007-08-31 한국전자통신연구원 Object data storage system and method to enhance IO performance in object storage system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100474357B1 (en) * 2001-12-26 2005-03-08 한국전자통신연구원 A method for memory allocation using multi-level partition
US6931507B2 (en) 2001-12-26 2005-08-16 Electronics & Telecommunications Research Institute Memory allocation method using multi-level partition
KR100507782B1 (en) * 2003-12-04 2005-08-17 한국전자통신연구원 Database management system and the method of controlling consistency of system table in DBMS
KR100676432B1 (en) * 2004-04-30 2007-02-01 가부시끼가이샤 도시바 Meta data for moving picture
KR100753831B1 (en) * 2005-12-08 2007-08-31 한국전자통신연구원 Object data storage system and method to enhance IO performance in object storage system

Similar Documents

Publication Publication Date Title
US5333315A (en) System of device independent file directories using a tag between the directories and file descriptors that migrate with the files
US6269382B1 (en) Systems and methods for migration and recall of data from local and remote storage
US7539818B2 (en) Network object cache engine
US11392544B2 (en) System and method for leveraging key-value storage to efficiently store data and metadata in a distributed file system
JP2910985B2 (en) Cache management method
US7694103B1 (en) Efficient use of memory and accessing of stored records
KR100446339B1 (en) Real time data migration system and method employing sparse files
US7467282B2 (en) Migrating a traditional volume to a virtual volume in a storage system
US8176233B1 (en) Using non-volatile memory resources to enable a virtual buffer pool for a database application
US20120203910A1 (en) Method and apparatus for buffering and obtaining resources, resource buffering system
US20050234867A1 (en) Method and apparatus for managing file, computer product, and file system
US20020032691A1 (en) High performance efficient subsystem for data object storage
US11093143B2 (en) Methods and systems for managing key-value solid state drives (KV SSDS)
US20020178176A1 (en) File prefetch contorol method for computer system
US20190129623A1 (en) Tagging write requests to avoid data-log bypass and promote inline deduplication during copies
US6434553B1 (en) File prefetch control method for computer system
US5678024A (en) Method and system for dynamic performance resource management within a computer based system
CN107181773A (en) Data storage and data managing method, the equipment of distributed memory system
KR19990032182A (en) Buffer management device for variable length files and its method
JPH07182220A (en) Distributed file system and its file caching method
US6742019B1 (en) Sieved caching for increasing data rate capacity of a heterogeneous striping group
CN111796767B (en) Distributed file system and data management method
CN113835613B (en) File reading method and device, electronic equipment and storage medium
US20100318564A1 (en) Implementing an ephemeral file system backed by a nfs server
US20140115246A1 (en) Apparatus, system and method for managing empty blocks in a cache

Legal Events

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