KR20070115485A - Cache buffer control method and disk drive using the same - Google Patents
Cache buffer control method and disk drive using the same Download PDFInfo
- Publication number
- KR20070115485A KR20070115485A KR1020060049996A KR20060049996A KR20070115485A KR 20070115485 A KR20070115485 A KR 20070115485A KR 1020060049996 A KR1020060049996 A KR 1020060049996A KR 20060049996 A KR20060049996 A KR 20060049996A KR 20070115485 A KR20070115485 A KR 20070115485A
- Authority
- KR
- South Korea
- Prior art keywords
- data
- folder
- cache buffer
- priority
- disk
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/12—Replacement control
- G06F12/121—Replacement control using replacement algorithms
- G06F12/123—Replacement control using replacement algorithms with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
Abstract
Description
도 1은 본 발명이 적용되는 디스크 드라이브의 헤드 디스크 어셈블리의 평면도이다.1 is a plan view of a head disk assembly of a disk drive to which the present invention is applied.
도 2는 본 발명에 따른 캐쉬 버퍼 관리 방법이 적용되는 디스크 드라이브의 전기적인 회로 구성도이다.2 is an electrical circuit diagram of a disk drive to which the cache buffer management method according to the present invention is applied.
도 3은 본 발명에 따른 캐쉬 버퍼 관리 방법의 흐름도이다.3 is a flowchart of a cache buffer management method according to the present invention.
도 4는 본 발명에 적용되는 파일 시스템을 설명하기 위한 폴더 및 파일 연결 구조를 도시한 것이다.4 illustrates a folder and file association structure for explaining a file system applied to the present invention.
본 발명은 캐쉬 버퍼 관리 방법 및 장치에 관한 것으로, 특히 디스크 드라이브에 적용되는 파일 시스템을 특성을 고려하여 캐쉬 히트 비율을 높이기 위한 캐시 버퍼 관리 방법 및 장치에 관한 것이다.The present invention relates to a cache buffer management method and apparatus, and more particularly to a cache buffer management method and apparatus for increasing the cache hit ratio in consideration of the characteristics of the file system applied to the disk drive.
일반적으로 데이터 처리 시스템에서 중앙처리장치와 주 메모리(또는 기록매체)의 데이터 처리 속도의 차이는 약 100배 이상이며, 이 처리 속도 차이를 캐 쉬(Cache) 버퍼가 보완하게 된다. In general, the difference between the data processing speed of the central processing unit and the main memory (or recording medium) in the data processing system is about 100 times or more, and the difference in processing speed is compensated by the cache buffer.
캐쉬 버퍼는 중앙처리장치가 다음에 요구할 것으로 예상되는 일련의 데이터를 주 메모리로부터 먼저 읽어내어 저장해두는 장치로서 주 메모리에 비해 빠른 액세스 속도를 가진다.The cache buffer is a device that first reads from the main memory and stores a series of data that the CPU is expected to request next, and has a faster access speed than the main memory.
중앙처리장치는 주 메모리를 액세스하기 전에 캐쉬 버퍼를 먼저 액세스하여 원하는 데이터를 얻게 된다. 이 예상의 적중률이 높게 되면 시스템은 빠른 속도로 동작하게 된다.The central processing unit accesses the cache buffer first to get the desired data before accessing main memory. The higher the hit rate of this estimate, the faster the system will run.
일반적인 캐쉬 버퍼 관리 방법으로 LRU(Least Recently Used) 알고리즘을 이용한다. LRU 알고리즘은 캐쉬 버퍼에 저장된 정보 일부를 캐쉬 버퍼 밖으로 내보내야 할 경우가 발생되면, 캐쉬 버퍼에 저장된 정보 중에서 가장 최근에 사용되지 않은 정보를 우선적으로 선택하여 제거시키는 메모리 관리 알고리즘이다. 즉, LRU 알고리즘은 시간 집약성(temporal locality)에 기반을 두고 있다.As a general cache buffer management method, LRU (Least Recently Used) algorithm is used. The LRU algorithm is a memory management algorithm that preferentially selects and removes the most recently unused information from the information stored in the cache buffer when it is necessary to export some of the information stored in the cache buffer. That is, the LRU algorithm is based on temporal locality.
그런데, 단순히 시간 순서에 따른 LRU 알고리즘에만 근거하여 캐쉬 버퍼의 내부 메모리 블록 교환의 우선순위를 결정하는 경우에는 캐쉬 히트될 가능성이 낮거나 없는 데이터가 캐쉬 히트될 가능성이 높은 데이터의 자리를 대체하여 캐쉬 버퍼의 내부 메모리 블록을 점유하는 문제점이 발생되기도 한다.However, when determining the priority of the internal memory block exchange of the cache buffer based solely on the chronological LRU algorithm, it replaces the place of the data that is unlikely to be cache hit or the data that is likely to be cache hit. The problem of occupying an internal memory block of a buffer may occur.
본 발명이 이루고자 하는 기술적 과제는 상술한 문제점을 해결하기 위하여 파일 시스템의 폴더 계층 레벨에 근거하여 캐시 버퍼의 내부 메모리 블록 교환 우선순위를 결정하는 캐쉬 버퍼 관리 방법 및 이를 이용한 디스크 드라이브를 제공하 는데 있다.SUMMARY OF THE INVENTION The present invention provides a cache buffer management method for determining an internal memory block exchange priority of a cache buffer based on a folder hierarchy level of a file system and a disk drive using the same in order to solve the above problems. .
상기 기술적 과제를 달성하기 위하여 본 발명에 따른 캐쉬 버퍼 관리 방법은 캐쉬 버퍼에 저장된 정보를 새로운 정보로 교체하여야 하는 조건이 발생되는지를 판단하는 단계; 상기 캐쉬 버퍼에 저장된 정보를 교체하여야 하는 조건이 발생된 경우에, 파일 데이터를 폴더 데이터에 비하여 우선적으로 교체하도록 우선순위를 결정하고, 폴더 데이터 상호간에는 최상위 레벨의 폴더로부터 계층 거리를 산출하여 계층 거리가 먼 하위 폴더 데이터를 우선적으로 교체하도록 우선순위를 결정하는 단계; 및 상기 결정된 우선순위에 따라서 캐쉬 버퍼에 저장된 정보를 새로운 정보로 교체하는 단계를 포함함을 특징으로 한다.In order to achieve the above technical problem, a cache buffer management method according to the present invention includes determining whether a condition for replacing information stored in a cache buffer with new information occurs; In the case where a condition to replace the information stored in the cache buffer occurs, the priority is determined to replace the file data in preference to the folder data, and the hierarchical distance is calculated by calculating the hierarchical distance from the highest level folder among the folder data. Determining priority to preferentially replace remote subfolder data; And replacing the information stored in the cache buffer with new information according to the determined priority.
본 발명에서 상기 동일 레벨의 폴더 데이터 상호간 또는 파일 데이터 상호간에는 LRU(Least Recently Used) 알고리즘을 적용하여 우선순위를 결정하는 것이 바람직하다.In the present invention, it is preferable to determine the priority by applying the LRU (Least Recently Used) algorithm to the folder data or the file data of the same level.
상기의 다른 기술적 과제를 달성하기 위하여 본 발명에 따른 디스크 드라이브는 데이터를 저장하는 디스크; 상기 디스크에서 읽어낸 데이터를 일시적으로 저장하거나, 상기 디스크에 기록할 데이터를 일시적으로 저장하는 캐쉬 버퍼; 및 상기 캐쉬 버퍼에 저장된 데이터를 교체하여야 하는 조건이 발생되는 경우에, 파일 데이터를 폴더 데이터에 비하여 우선적으로 교체하도록 우선순위를 결정하고 폴더 데이터 상호간에는 최상위 레벨의 폴더로부터 먼 거리의 하위 레벨의 폴더 데이터를 우선적으로 교체하도록 우선순위를 결정하며, 상기 결정된 우선순위에 따라서 상기 캐쉬 버퍼에 저장된 데이터를 교체하도록 제어하는 컨트롤러를 포함함을 특징으로 한다.In accordance with another aspect of the present invention, a disk drive includes a disk for storing data; A cache buffer that temporarily stores data read from the disk or temporarily stores data to be written to the disk; And in the case where a condition to replace the data stored in the cache buffer occurs, the priority is determined to replace the file data in preference to the folder data, and the folder data is located at a lower level folder far from the top level folder. And a controller for determining priority to replace data first, and controlling to replace data stored in the cache buffer according to the determined priority.
이하 첨부된 도면을 참조하여 본 발명의 바람직한 실시 예에 대하여 상세히 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.
본 발명에 따른 캐쉬 버퍼 관리 방법이 적용되는 데이터 저장 장치인 하드 디스크 드라이브는 기구적인 부품들로 구성된 HDA(Head Disk Assembly)와 전기 회로의 결합으로 이루어진다.The hard disk drive, which is a data storage device to which the cache buffer management method according to the present invention is applied, is composed of a combination of an electrical circuit and a head disk assembly (HDA) composed of mechanical components.
도 1은 본 발명이 적용되는 하드 디스크 드라이브의 HDA(Head Disk Assembly; 10)의 구성을 보여준다. 1 shows a configuration of a head disk assembly (HDA) 10 of a hard disk drive to which the present invention is applied.
헤드 디스크 어셈블리(10)는 스핀들 모터(14)에 의하여 회전되는 적어도 하나의 자기 디스크(12)를 포함하고 있다. 디스크 드라이브(10)는 디스크(12) 표면에 인접되게 위치한 변환기(16)를 또한 포함하고 있다.The
변환기(16)는 각각의 디스크(12)의 자계를 감지하고 자화시킴으로써 회전하는 디스크(12)에서 정보를 읽거나 기록할 수 있다. 전형적으로 변환기(16)는 각 디스크(12) 표면에 결합되어 있다. 비록 단일의 변환기(16)로 도시되어 설명되어 있지만, 이는 디스크(12)를 자화시키기 위한 기록용 변환기와 디스크(12)의 자계를 감지하기 위한 분리된 읽기용 변환기로 이루어져 있다고 이해되어야 한다. 읽기용 변환기는 자기 저항(MR : Magneto-Resistive) 소자로부터 구성되어 진다. 변환기(16)는 통상적으로 헤드(Head)라 칭해지기도 한다.The
변환기(16)는 슬라이더(20)에 통합되어 질 수 있다. 슬라이더(20)는 변환 기(16)와 디스크(12) 표면사이에 공기 베어링(air bearing)을 생성시키는 구조로 되어 있다. 슬라이더(20)는 헤드 짐벌 어셈블리(22)에 결합되어 있다. 헤드 짐벌 어셈블리(22)는 보이스 코일(26)을 갖는 엑츄에이터 암(24)에 부착되어 있다. 보이스 코일(26)은 보이스 코일 모터(VCM : Voice Coil Motor 30)를 특정하는 마그네틱 어셈블리(28)에 인접되게 위치하고 있다. 보이스 코일(26)에 공급되는 전류는 베어링 어셈블리(32)에 대하여 엑츄에이터 암(24)을 회전시키는 토오크를 발생시킨다. 엑츄에이터 암(24)의 회전은 디스크(12) 표면을 가로질러 변환기(16)를 이동시킬 것이다.The
정보는 전형적으로 디스크(12)의 환상 트랙 내에 저장된다. 각 트랙(34)은 일반적으로 복수의 섹터를 포함하고 있다. 각 섹터는 데이터 필드(data field)와 식별 필드(identification field)를 포함하고 있다. 식별 필드는 섹터 및 트랙(실린더)을 식별하는 그레이 코드(Gray code)로 구성되어 있다. 변환기(16)는 다른 트랙에 있는 정보를 읽거나 기록하기 위하여 디스크(12) 표면을 가로질러 이동된다.The information is typically stored in an annular track of the
디스크(12)는 크게 디스크 드라이브에 관련된 정보를 저장하는 메인터넌스 실린더(Maintenance Cylinder; 일반적으로 MC라 칭함) 영역과 사용자 데이터 영역으로 나누어진다. 메인터넌스 실린더 영역에는 디펙 리스트(defect list) 정보와 리드/라이트 최적화 파라미터(parameter) 정보들을 포함하여 디스크 드라이브에 관련된 각종 정보들이 저장되며, 사용자가 임의로 액세스할 없는 영역이다. 그리고, 사용자 데이터 영역은 사용자가 데이터를 실질적으로 라이트하거나 리드할 수 있는 영역이다. 디스크(12)의 사용자 데이터 영역은 복수 개의 존(zone)으로 나누어지 며, 각 존에는 디펙 섹터를 대체하기 위한 스페어 실린더(spare cylinder)가 할당되어 있다. The
도 2는 하드 디스크 드라이브를 제어할 수 있는 전기 시스템을 보여준다. 전기 시스템은 프리 앰프(210), 기록/판독 채널(220), 캐쉬 버퍼(230), 컨트롤러(240), ROM(Read Only Memory; 250A), RAM(Random Access Memory; 250B), 호스트 인터페이스(260) 및 보이스 코일 모터(VCM) 구동부(270)를 포함하고 있다. 2 shows an electrical system capable of controlling a hard disk drive. The electrical system includes a
컨트롤러(240)는 디지털 신호 프로세서(DSP : Digital Signal Processor), 마이크로프로세서, 마이크로컨트롤러 등이 된다. 컨트롤러(240)는 호스트 인터페이스(260)를 통하여 호스트 기기(도면에 미도시)로부터 수신되는 코멘드(command)에 따라서 디스크(12)로부터 정보를 읽거나 또는 디스크(12)에 정보를 기록하기 위하여 기록/판독 채널(220)을 제어한다. The
그리고, 컨트롤러(240)는 보이스 코일(26)에 구동 전류를 공급하는 VCM 구동부(270)에 또한 결합되어 있다. 컨트롤러(240)는 보이스 코일 모터의 여기 및 변환기(16)의 움직임을 제어하기 위하여 VCM 구동부(270)로 제어신호를 공급한다. The
ROM(250A)에는 디스크 드라이브를 제어하는 펌웨어 및 각종 제어 데이터들이 저장되어 있다. 물론 도 3에 도시된 본 발명에 의한 캐쉬 버퍼 관리 방법을 실행시키기 위한 프로그램들도 저장되어 있다.The
RAM(250B)에는 디스크 드라이브에 전원이 공급되면 디스크(12)의 메인터넌스 실린더(Maintenance Cylinder) 위치에서 읽어낸 디스크 드라이브에 관련된 각종 정보들이 로딩된다.When the power supply to the disk drive is supplied to the
우선, 일반적인 디스크 드라이브의 동작을 설명하면 다음과 같다.First, the operation of a general disk drive will be described.
데이터 읽기(Read) 모드에서, 디스크 드라이브는 변환기(16)를 디스크(12)의 목표 위치로 이동시킨 후에 디스크(12)로부터 변환기(16)에 의하여 감지된 전기적인 신호를 프리 앰프(210)에서 신호 처리에 용이하도록 증폭시킨다. 그리고 나서, 리드/라이트 채널 회로(220)에서는 컨트롤러(240)에서 생성되는 섹터 펄스에 따라서 디스크(12)로부터 읽어낸 신호를 디지털 신호로 부호화시키고, 스트림 데이터로 변환하여 캐쉬 버퍼(230)에 일시적으로 저장한 후에 호스트 인터페이스(260)를 통하여 호스트 기기(도면에 미도시)로 전송한다. In the data read mode, the disc drive moves the
다음으로 쓰기(Write) 모드에서, 디스크 드라이브는 호스트 인터페이스(260)를 통하여 호스트 기기(도면에 미도시)로부터 기록할 데이터를 입력받아 캐쉬 버퍼(230)에 일시 저장시킨 후에, 캐쉬 버퍼(230)에서 읽어낸 데이터를 기록/판독 채널(220)에서 디스크(12)의 기록 채널에 적합한 바이너리 데이터 스트림으로 변환시킨 후에, 섹터 펄스가 발생되는 시점에 프리 앰프(210)에 의하여 증폭된 기록 전류로 변환기(16)를 통하여 디스크(12)에 기록시킨다.Next, in the write mode, the disk drive receives data to be written from the host device (not shown) through the
캐쉬 버퍼(230)는 복수개의 내부 메모리 블록으로 구성되며, 리드(READ) 모드에서 주 메모리 수단에 해당되는 디스크(12)에서 읽어내어 저장해두거나 라이트(WRITE) 모드에서 디스크(12)에 기록할 데이터를 저장해둔다.The
디스크 드라이브를 저장 장치로 사용하는 퍼스널 컴퓨터는 트리(Tree) 형태인 폴더 구조의 파일 시스템을 갖는다. 즉, 도 4에 도시된 바와 같이 최상위 레벨의 폴더인 루트 폴더(ROOT Folder) 아래에 루트 폴더에 연결된 하위 레벨의 폴더인 서브 폴더(SUB Folder)들이 존재하고, 각각의 서브 폴더 아래에는 또 다른 서브 폴더들이 존재하며, 서브 폴더에 파일들이 연결되어 저장된다.Personal computers using a disk drive as a storage device have a folder-type file system in the form of a tree. That is, as shown in FIG. 4, there are sub folders SUB Folders, which are lower level folders connected to the root folder, under a root folder, which is a top level folder, and another sub folder under each sub folder. Folders exist, and files are linked and stored in subfolders.
위에서, 폴더 역시 일반적인 파일처럼 데이터를 가지고 있으며, 폴더 데이터의 내용은 폴더에 포함된 파일 혹은 폴더의 생성시간, 크기, 실제 데이터 위치정보 등이 포함된다. In the above, the folder also has data like a normal file, the contents of the folder data includes the creation time, size, and actual data location information of the files or folders included in the folder.
도 4에 도시된 바와 같은 파일 시스템에서 파일 데이터에 접근하기 위해서는 최상위 폴더로부터 최하위 폴더까지의 정보들에 접근하여 최종 목적 파일의 데이터 위치를 찾아내는 과정이 필요하다. 즉, 목적 파일에 접근하기 위해서는 반드시 해당 경로에 있는 폴더들을 액세스하여야 한다.In order to access the file data in the file system as shown in FIG. 4, it is necessary to access the information from the top folder to the bottom folder to find the data location of the final destination file. That is, to access the object file, the folders in the path must be accessed.
따라서, 이와 같은 파일 시스템에서는 디스크 드라이브에 저장된 데이터 액세스 과정에서 파일 데이터보다는 폴더 데이터를 캐쉬 버퍼(230)에 오래 보관하는 것이 캐쉬 히트(Cache Hit) 비율을 높일 수 있다는 것을 알 수 있다. 또한, 최상위 폴더와 가까운 폴더가 그렇지 않은 폴더에 비하여 캐쉬 버퍼(230)에 오래 보관하는 것이 캐쉬 히트(Cache Hit) 비율을 높일 수 있다는 것을 알 수 있다.Accordingly, it can be seen that in such a file system, storing the folder data in the
본 발명에서는 캐쉬 버퍼(230)에 저장된 정보 일부를 교체하여야 할 경우가 발생되면, 이러한 파일 시스템 특성을 고려하여 캐쉬 버퍼(230)의 내부 메모리 블록의 교환을 실행한다.In the present invention, when a part of information stored in the
이러한 원리에 근거하여 컨트롤러(240)는 캐쉬 버퍼(230)에 저장된 데이터를 교체하여야 하는 조건이 발생되는 경우에, 파일 데이터를 폴더 데이터에 비하여 우선적으로 교체하도록 우선순위를 결정하고 폴더 데이터 상호간에는 최상위 레벨의 폴더로부터 먼 거리의 하위 레벨의 폴더 데이터를 우선적으로 교체하도록 우선순위를 결정하며, 이와 같이 결정된 우선순위에 따라서 캐쉬 버퍼(230)에 저장된 데이터를 교체하도록 제어한다. 특히, 파일 데이터 상호간 또는 동일 레벨의 폴더 데이터 상호간에는 LRU(Least Recently Used) 알고리즘을 적용하여 우선순위를 결정한다.Based on this principle, the
캐쉬 버퍼(230)에 저장된 데이터를 교체하여야 하는 조건은 일 예로서, 캐쉬 히트가 발생되지 않아 리드(READ) 명령에 따라 기록매체로부터 읽어낸 정보 용량의 크기가 캐쉬 버퍼(230)의 빈 저장 공간의 크기보다 큰 경우를 포함한다. 또한, 라이트 명령에 따라 기록매체에 기록할 데이터의 크기가 캐쉬 버퍼(230)의 빈 저장 공간의 크기보다 큰 경우에도 해당된다.For example, a condition in which data stored in the
그러면, 컨트롤러(240)에 의하여 실행되는 본 발명에 따른 캐쉬 버퍼 관리 방법을 도 3의 흐름도를 참조하여 상세히 설명하기로 한다.Then, the cache buffer management method according to the present invention executed by the
컨트롤러(240)는 호스트 인터페이스(260)를 통하여 호스트 기기로부터 리드(READ) 명령이 수신되는지를 판단한다(S310).The
리드 명령이 수신되면, 컨트롤러(240)는 읽어낼 폴더 또는 파일 데이터를 액세스하기 전에 디스크(12)로부터 읽어낼 폴더 및 파일에 대한 폴더/파일 레코드(Folder/File Record) 정보를 읽어낸다(S320). 폴더/파일 레코드 정보에는 폴더/파일 이름, 폴더/파일 생성 날짜, 폴더/파일 사이즈 등이 포함되어 있으며, 디스크(12) 상에서 폴더/파일 레코드 정보는 파일 데이터 정보와는 다른 영역에 저장되는 것이 일반적이다.When the read command is received, the
다음으로, 리드 명령에 따라서 폴더 또는 파일 데이터 읽기를 수행하며, 디스크(12)를 액세스하여 해당 파일의 데이터를 읽어내기 전에, 읽어낼 폴더 또는 파일 데이터가 캐쉬 버퍼(230)에 저장되어 있는지를 판단한다(S330). 즉, 캐쉬 히트(Cache Hit)가 발생되는지를 판단한다. Next, the folder or file data is read according to the read command, and before accessing the
단계330(S330)의 판단 결과 캐쉬 히트가 발생된 경우에는, 디스크(12)를 액세스하지 않고 바로 캐쉬 버퍼(230)로부터 해당 폴더 또는 파일 데이터를 읽어내어 호스트 인터페이스(260)를 통하여 호스트 기기로 전송한다(S340).If a cache hit occurs as a result of the determination in step 330 (S330), the corresponding folder or file data is read directly from the
만일 단계330(S330)의 판단 결과 캐쉬 히트가 발생되지 않은 경우에는, 디스크(12)를 액세스하여 해당 폴더 또는 파일의 데이터를 읽어낸다(S350).If the cache hit does not occur as a result of the determination in step 330 (S330), the
디스크(12)로부터 읽어낸 폴더 또는 파일 데이터의 사이즈가 캐쉬 버퍼(230)의 비어있는 저장 공간의 사이즈(잔여 사이즈)를 초과하는지 판단한다(S360). It is determined whether the size of the folder or file data read from the
단계360(S360)의 판단 결과 디스크(12)로부터 읽어낸 폴더 또는 파일 데이터의 사이즈가 캐쉬 버퍼(230)의 비어있는 저장 공간의 사이즈(잔여 사이즈)를 초과하지 않는 경우에는, 캐쉬 버퍼(230)의 잔여 메모리 공간에 디스크(12)로부터 읽어낸 폴더 또는 파일 데이터를 저장한다(S370).If the size of the folder or file data read from the
만일 단계360(S360)의 판단 결과 디스크(12)로부터 읽어낸 폴더 또는 파일 데이터의 사이즈가 캐쉬 버퍼(230)의 비어있는 저장 공간의 사이즈(잔여 사이즈)를 초과하는 경우에는, 파일 데이터를 폴더 데이터에 비하여 우선적으로 교체하도록 캐쉬 버퍼(230)의 내부 메모리 블록의 교체 우선순위를 결정하고, 폴더 데이터 상호간에는 최상위 레벨의 폴더로부터 계층 거리를 산출하여 계층 거리가 먼 하위 폴 더 데이터를 우선적으로 교체하도록 캐쉬 버퍼(230)의 내부 메모리 블록의 교체 우선순위를 결정한다(S380). 그리고, 파일 데이터 상호간 또는 동일 레벨의 폴더 데이터 상호간에는 LRU(Least Recently Used) 알고리즘을 적용하여 우선순위를 결정한다.If the size of the folder or file data read from the
일 예로서, 도 4와 같은 트리 구조 파일 시스템에서 캐쉬 버퍼(230)에 루트 폴더, 서브 폴더 1-2, 파일 #1, 서브 폴더 2-1, 서브 폴더2-2가 저장되어 있다고 가정하면, 캐쉬 버퍼(230)에서 교체 우선순위는 파일 #1, (서브 폴더 2-1, 서브 폴더 2-2), 서브 폴더 1-2, 루트 폴더 순으로 결정된다. 따라서 파일 #1이 최우선적으로 교체된다.As an example, assume that the root folder, subfolders 1-2,
만일, 위의 예에서 파일 #1이 캐쉬 버퍼(230)에 저장되어 있지 않다고 가정하면, 루트 폴더와의 거리를 고려할 때 (서브 폴더 2-1, 서브 폴더 2-2)가 교체 최우선 순위에 해당되며, 서브 폴더 2-1과 서브 폴더 2-2는 루트 폴더와의 계층 거리가 동일하기 때문에 이 두개의 폴더 데이터에 대해서는 LRU(Least Recently Used) 알고리즘을 적용하여 가장 최근에 사용하지 않은 데이터에 교체 우선순위를 부여한다.In the above example, assuming that
단계380(S380)에 따라 결정된 우선순위에 근거하여 캐쉬 버퍼(230)의 내부 메모리 블록을 교환한다(S390). 즉, 단계380(S380)에 따라 결정된 우선순위에 근거하여 최우선으로 교체할 캐쉬 버퍼(230)의 내부 메모리 블록에 저장되어 있는 데이터를 삭제하고, 데이터가 삭제된 내부 메모리 블록에 디스크(12)로부터 읽어낸 폴더 또는 파일 데이터를 저장한다. Internal memory blocks of the
이와 같이, 본 발명에서는 디스크 드라이브에 적용되는 파일 시스템의 특성을 고려하여 캐쉬 버퍼(230)의 메모리 블록 교환의 우선순위를 결정하여 캐쉬 히트율을 높일 수 있게 되었다.As described above, in the present invention, the priority of the memory block exchange of the
본 발명은 방법, 장치, 시스템 등으로서 실행될 수 있다. 소프트웨어로 실행될 때, 본 발명의 구성 수단들은 필연적으로 필요한 작업을 실행하는 코드 세그먼트들이다. 프로그램 또는 코드 세그먼트들은 프로세서 판독 가능 매체에 저장되어 질 수 있으며 또는 전송 매체 또는 통신망에서 반송파와 결합된 컴퓨터 데이터 신호에 의하여 전송될 수 있다. 프로세서 판독 가능 매체는 정보를 저장 또는 전송할 수 있는 어떠한 매체도 포함한다. 프로세서 판독 가능 매체의 예로는 전자 회로, 반도체 메모리 소자, ROM, 플레쉬 메모리, 이레이져블 ROM(EROM : Erasable ROM), 플로피 디스크, 광 디스크, 하드디스크, 광 섬유 매체, 무선 주파수(RF) 망, 등이 있다. 컴퓨터 데이터 신호는 전자 망 채널, 광 섬유, 공기, 전자계, RF 망, 등과 같은 전송 매체 위로 전파될 수 있는 어떠한 신호도 포함된다. The invention can be practiced as a method, apparatus, system, or the like. When implemented in software, the constituent means of the present invention are code segments that necessarily perform the necessary work. The program or code segments may be stored in a processor readable medium or transmitted by a computer data signal coupled with a carrier on a transmission medium or network. Processor readable media includes any medium that can store or transmit information. Examples of processor-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memory, erasable ROM (EROM), floppy disks, optical disks, hard disks, optical fiber media, radio frequency (RF) networks, Etc. Computer data signals include any signal that can propagate over transmission media such as electronic network channels, optical fibers, air, electromagnetic fields, RF networks, and the like.
첨부된 도면에 도시되어 설명된 특정의 실시 예들은 단지 본 발명의 예로서 이해되어 지고, 본 발명의 범위를 한정하는 것이 아니며, 본 발명이 속하는 기술 분야에서 본 발명에 기술된 기술적 사상의 범위에서도 다양한 다른 변경이 발생될 수 있으므로, 본 발명은 보여지거나 기술된 특정의 구성 및 배열로 제한되지 않는 것은 자명하다. 즉, 본 발명은 하드디스크 드라이브를 포함하는 각종 디스크 드라이브에 적용될 수 있을 뿐만 아니라, 다양한 종류의 데이터 저장 장치에 적용될 수 있음은 당연한 사실이다.Specific embodiments shown and described in the accompanying drawings are only to be understood as an example of the present invention, not to limit the scope of the invention, but also within the scope of the technical spirit described in the present invention in the technical field to which the present invention belongs As various other changes may occur, it is obvious that the invention is not limited to the specific constructions and arrangements shown or described. That is, it is a matter of course that the present invention can be applied not only to various disk drives including hard disk drives, but also to various kinds of data storage devices.
상술한 바와 같이, 본 발명에 의하면 디스크 드라이브에 적용되는 트리 구조의 파일 시스템의 특성을 고려하여 캐쉬 버퍼의 내부 메모리 블록 교환의 우선순위를 폴더 데이터보다 파일 데이터가 우선적으로 교체되고, 폴더 데이터 상호간에는 최상위 레벨의 폴더로부터 계층 거리에 근거하여 결정함으로써, 캐쉬 히트 율을 높여서 데이터 액세스 시간을 단축할 수 있는 효과가 발생된다.As described above, according to the present invention, in consideration of the characteristics of the file system of the tree structure applied to the disk drive, the priority of the exchange of the internal memory block of the cache buffer is replaced by the file data rather than the folder data. By determining based on the hierarchical distance from the folder at the top level, the effect of increasing the cache hit rate and shortening the data access time is generated.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020060049996A KR20070115485A (en) | 2006-06-02 | 2006-06-02 | Cache buffer control method and disk drive using the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020060049996A KR20070115485A (en) | 2006-06-02 | 2006-06-02 | Cache buffer control method and disk drive using the same |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20070115485A true KR20070115485A (en) | 2007-12-06 |
Family
ID=39141940
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020060049996A KR20070115485A (en) | 2006-06-02 | 2006-06-02 | Cache buffer control method and disk drive using the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20070115485A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20140100898A (en) * | 2013-02-07 | 2014-08-18 | 시게이트 테크놀로지 엘엘씨 | Data protection for unexpected power loss |
-
2006
- 2006-06-02 KR KR1020060049996A patent/KR20070115485A/en active IP Right Grant
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20140100898A (en) * | 2013-02-07 | 2014-08-18 | 시게이트 테크놀로지 엘엘씨 | Data protection for unexpected power loss |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5392788B2 (en) | Object-based storage device with storage medium having variable medium characteristics | |
KR101517761B1 (en) | Method for managing data storage position and data storage system using the same | |
US7337263B2 (en) | Method of varying recording density of data storage medium and disk drive using the method | |
JP2008071478A (en) | Disk drive with nonvolatile memory for storage of failure-related data | |
KR20100007258A (en) | Method for controlling cache flush and data storage system using the same | |
KR101674015B1 (en) | Data storage medium access method, data storage device and recording medium thereof | |
US20100070689A1 (en) | Hybrid hard disk drive to rapidly read files having specified conditions, method of controlling the hybrid hard disk drive, and recording medium for the hybrid hard disk drive | |
US10283149B2 (en) | Energy-assisted magnetic recording device capable of predicting the usable life of magnetic head | |
US20190303034A1 (en) | Wear mitigation through data promotion in a hierarchical memory | |
US9153290B1 (en) | Intra-zone wear leveling for heat-assisted magnetic recording—shingled magnetic recording (HAMR-SMR) type storage devices | |
US10318173B2 (en) | Multi-speed data storage device with media cache for high speed writes | |
US20120162809A1 (en) | Magnetic disk drive and method of accessing a disk in the drive | |
US20050138464A1 (en) | Scratch fill using scratch tracking table | |
US9658964B2 (en) | Tiered data storage system | |
KR100723512B1 (en) | Cache buffer control method and disk drive using the same | |
KR20070115485A (en) | Cache buffer control method and disk drive using the same | |
JP4919983B2 (en) | Data storage device and data management method in data storage device | |
JP2011076707A (en) | Method of setting zone layout of recording medium, data recording apparatus, disk drive, and recording medium | |
KR100699880B1 (en) | Method for managing track defect of maintenance cylinder in data storage system and disc drive using the same | |
US9111565B2 (en) | Data storage device with both bit patterned and continuous media | |
KR100699877B1 (en) | Method for preserving data of the defect sector and disc drive using the same | |
US11430471B1 (en) | Partial adjustment of disk drive areal density to compensate for head or surface degradation | |
KR100618835B1 (en) | Method for reassigning sector adaptively in data storage system and disc drive using the same | |
KR100899826B1 (en) | Storage apparatus, storage apparatus control method, and control apparatus | |
KR20070096081A (en) | Method for restoring the master boot record of storage medium and disk drive using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E701 | Decision to grant or registration of patent right | ||
NORF | Unpaid initial registration fee |