CN101221465A - Data buffer zone implementing method for reducing hard disk power consumption - Google Patents

Data buffer zone implementing method for reducing hard disk power consumption Download PDF

Info

Publication number
CN101221465A
CN101221465A CNA2008100193437A CN200810019343A CN101221465A CN 101221465 A CN101221465 A CN 101221465A CN A2008100193437 A CNA2008100193437 A CN A2008100193437A CN 200810019343 A CN200810019343 A CN 200810019343A CN 101221465 A CN101221465 A CN 101221465A
Authority
CN
China
Prior art keywords
buffer
data
buffer blocks
hard disk
blocks
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CNA2008100193437A
Other languages
Chinese (zh)
Inventor
黄少珉
戚隆宁
胡晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
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 Southeast University filed Critical Southeast University
Priority to CNA2008100193437A priority Critical patent/CN101221465A/en
Publication of CN101221465A publication Critical patent/CN101221465A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present invention relates to a data buffer realization method for reducing hard disk power dissipation, which is suitable for a computer storage system. A data buffer is utilized to cache hard disk data, and the average power dissipation of a hard disk is reduced through the innovative design of the buffer structure in multitask environment. The buffer comprises a partitioned data buffer and a buffer management module, wherein, the partitioned data buffer transfers data to the buffer management module; the buffer management module transfers state control and data access commands to the hard disk through a hardware driving module; then the hard disk transfers data to the partitioned data buffer, realizing the buffer for reducing hard disk power dissipation. On the one hand, a determination method of grouping size of the buffer bringing about the optimal power dissipation is put forward according to multitask data access rate; on the other hand, a block data replacement algorithm considering task data access situation is put forward, so as to further prolong the idle time of hard disk access.

Description

Be used to reduce the data buffer implementation method of hard disk power consumption
Technical field
The present invention is applicable in the computer memory system, utilizes the data buffer that hard disc data is carried out buffer memory, and the innovative design by the buffer zone structure under multitask environment reduces the hard disk average power consumption.
Background technology
In computer system, buffer zone (Buffer) is one and uses technological means very widely.Buffer zone refers to be used for the zone of transmission data between the different equipment of the nonsynchronous equipment of storage speed or priority.Therefore, traditional buffer zone is to design for improving performance.
In computer system, the power consumption of hard disc apparatus is higher.For the consideration of conserve energy, in general, hard disk all has multiple power consumption state.When hard disk is idle, then can enter low power consumpting state with conserve energy.Hard disk can produce power lose when the turnover low power consumpting state, therefore has only to enter the real conserve energy of low power consumpting state ability when the free time of hard disk is longer.
Utilize buffer zone to carry out data pre-head (Prefetch), promptly mass data is read to buffer zone from hard disk at every turn hard disk.Therefore, hard disk all can produce long free time at every turn between reading in advance, even consider the power consumption of buffer zone itself, makes hard disk enter low power consumpting state at this section in the long period and also can save appreciable energy.So, buffer technology just can be used to reduce the average power consumption of hard disk.
The prerequisite of utilizing this technology to reduce hard disk power consumption is that data are carried out sequential access.Yet in multitask environment, the data access of real system also can not carry out with simple sequential system: 1. owing to the influence of task scheduling, the visit of multitask is staggered to be carried out; 2. for individual task, task might be carried out random access to the hard disc data section: visit at every turn that certain position at random begins from data segment, and the one piece of data after the connected reference.Because existing buffer technology does not keep the content that each task is read in advance, therefore the existence of above-mentioned factor makes that the content of buffer zone will frequently be substituted, and causes a large amount of hard disk visits, thereby has shortened free time greatly, and the power consumption of hard disk can't be reduced.
Summary of the invention
Technical matters: the purpose of this invention is to provide a kind of data buffer method for designing that is used to reduce hard disk power consumption.Under multitask environment by buffer zone is carried out piecemeal, make each task can in the different grouping of forming by buffer blocks, keep the data content that each is read in advance since hard disk, the pre-read data that reads from hard disk can frequently not swapped out owing to the switching of task, have and prolong hard disk free time, thus the effect that cuts down the consumption of energy.
Technical scheme: in order to reduce the power consumption of hard disk by buffer zone under multitask environment, the data that each task is read in advance can be reused, to avoid the frequent access to hard disk.The present invention is divided into piece with buffer zone, in when operation buffer blocks is divided into groups, make each task in different groupings, keep separately read content in advance.Situation according to data access is carried out status indication to buffer blocks, replaces algorithm and selects suitable piece to replace according to this mark.
The buffer zone implementation method that the present invention is used to reduce hard disk power consumption is specially: buffer zone comprises data buffer, the buffer management module of piecemeal, the data buffer of piecemeal sends data to the buffer management module, the buffer management module sends State Control and data access command to hard disk by the hardware device drivers module, hard disk sends data to the data buffer of piecemeal again, realizes being used to reduce the buffer zone of hard disk power consumption.
The data buffer of described piecemeal is: the zone of opening up fixed size in storer is as the data buffer, and size is the D byte; Data buffering is divided into fixing piece count N, every equal and opposite in direction is S byte, D=S * N; No datat in each piece when initial, L1 links to each other by chained list (publishing house of Tsing-Hua University " c program design ", Tan Haoqiang work), has two members in each structure of chained list L1, first deposits buffer blocks numbering 1~N, deposits the first address of next buffer blocks in internal memory for second.
The buffer management module is: be provided with M task, task is obtained desired data by the interface function FD that calls hard drive and provide; The buffer management module provides with hard disk drive interface function F D to be had of the same name, same parameter and with the function F M of rreturn value, in task code hard-disk interface function F D is replaced with the function F M that the buffer management module provides; Function F M is achieved as follows: from the request first address of task to the hard disc data visit, reading length in advance from hard disk is S * N/M byte data, and selects to be used to deposit the buffer blocks of these data from all buffer blocks by replacement algorithm R; These buffer blocks are connected by chained list L2, and the buffer blocks after the connection is called grouping, and the buffer blocks that is about to belong to different task connects by chained list L2 separately; When task call function F M carried out data read to hard disk, if data have been present in the buffer blocks, the buffer management module was searched data and is sent to the initiation tasks requested by chained list L2 in each buffer blocks; When run through in advance at every turn finish after the buffer management module give an order to hard disk and make it enter low-power consumption mode.
Described replacement algorithm R is:
For buffer blocks 1~N determines different states, these states comprise: the buffer blocks free time (BLK_IDLE), buffer blocks is being used (BLK_INUSE), and buffer blocks is used (BLK_USED), and buffer blocks is not used (BLK_UNUSE); Do not read in any data as yet in the idle expression of the buffer blocks buffer blocks; Buffer blocks represents that in usefulness the data in the buffer blocks are read; Buffer blocks is with representing that the data of last byte are read in the buffer blocks; Buffer blocks is with representing that buffer blocks has been present in the grouping but is not read as yet; Replace the state of algorithm,, then data are read in this piece if existence is the buffer blocks of buffer blocks free time by buffer blocks in each grouping of chained list L2 sequential query; If existence is not the buffer blocks of buffer blocks free time, inquire about then whether existence is the buffer blocks buffer blocks of usefulness, then data are read in this buffer blocks as existing; If state be buffer blocks the buffer blocks of usefulness do not exist yet, inquire about then whether existence is the not buffer blocks of usefulness of buffer blocks, then data are read in this buffer blocks as existing; If the buffer blocks free time, buffer blocks is usefulness, and buffer blocks does not exist with the buffer blocks of three kinds of states, then data is read in the buffer blocks of buffer blocks in usefulness.If in query script, find to have the same a plurality of buffer blocks of state, then select first to inquire.
Beneficial effect: the present invention carries out logic groups to buffer zone, so that the task of each access hard disk can have data buffer separately.The present invention need not to increase any hardware circuit, calculate with the expense of storage resources minimum, under multitask environment, significantly reduced the data access request that hard disk is produced, and prolonged the free time of hard disk, made hard disk in the longer time, enter low power consumpting state with conserve energy.Experimental result shows that under the multimedia applied environment, the power consumption of hard disc data visit has obtained significantly reducing.
Description of drawings
Fig. 1 is the basic block diagram that the present invention is based on the hard disk low-power consumption conceptual design framework of buffer zone Dynamic Packet.Solid arrow is represented request of data and control command among the figure, and dotted arrow is represented data.The buffer management module receives the data access request that task produces hard disk, drives by hard disc apparatus and from hard disk data pre-head is advanced buffer zone, and the required by task data are submitted to the initiation tasks requested; After reading end in advance, the buffer management module is upgraded data buffer zone packet data structure and by the hard disc apparatus driving hard disk is placed low power consumpting state at every turn.
Fig. 2 is the structure of chained list L1 that is used to connect the buffer blocks of no datat.Have two members in each structure of chained list L1, first deposits buffer blocks numbering 1~N, deposits the first address of next buffer blocks in internal memory for second.This chained list is sought next buffer blocks by the first address of next buffer zone.
Fig. 3 has illustrated the chained list L2 that is used to connect the buffer zone grouping.Solid box is represented buffer blocks (Block), and numeral wherein is the Block numbering; Frame of broken lines is represented buffer set (Group), and wherein each Block is storing the continuous hard disc data in address, and the data of each group belong to same task.Buffer blocks in each group links to each other by the list structure identical with chained list L1, links to each other by chained list L2 between each group.Have two members in each structure of chained list L2, first deposits group #, second first address of depositing first buffer blocks in next group.
Fig. 4 is the realization flow figure of buffer management module.The buffer management module is a nucleus module of the present invention, and Fig. 4 has described the detailed operation flow process of this module.
Embodiment
This buffer zone comprises data buffer, the buffer management module of piecemeal, the data buffer of piecemeal sends data to the buffer management module, the buffer management module sends State Control and data access command to hard disk by the hardware device drivers module, hard disk sends data to the data buffer of piecemeal again, realizes being used to reduce the buffer zone of hard disk power consumption.
Buffer zone is organized according to structure shown in Figure 3.The block size of buffer zone can determine that total block data M reads piece in advance for each task at every turn and counts sum (each task is read the piece number in advance and can be determined according to the task situation) according to system's actual conditions.As shown in Figure 3, solid arrow represents that the group structure of buffer zone realizes by chained list, and this chained list is the secondary chained list.The first address of first piece links to each other by first order chained list in each buffer set, and each the piece first address in each group links to each other by second level chained list.
The buffer management module realizes between application layer and Drive Layer.The interface function that this module provides hard disc data to visit to task, lower floor realizes with shielding.By this interface, task informs that the buffer management module wants the start address and the length of visit data, and task is called data access interface at every turn and promptly produced request of data.At this moment, the buffer management module is according to the process flow operation of Fig. 4.This module is finished data manipulation and State Control by the interface function that calls the hard disc apparatus driving.This module is finished searching by traveling through secondary chained list shown in Figure 3 of data block.
The data buffer of described piecemeal is: the zone of opening up fixed size in storer is as the data buffer, and size is the D byte; Data buffering is divided into fixing piece count N, every equal and opposite in direction is S byte, D=S * N; No datat in each piece links to each other by chained list L1 when initial, has two members in each structure of chained list L1, and first deposits buffer blocks numbering 1~N, deposits the first address of next buffer blocks in internal memory for second.
Described buffer management module is: be provided with M task, task is obtained desired data by the interface function FD that calls hard drive and provide; The buffer management module provides with hard disk drive interface function F D to be had of the same name, same parameter and with the function F M of rreturn value, in task code hard-disk interface function F D is replaced with the function F M that the buffer management module provides; Function F M is achieved as follows: from the request first address of task to the hard disc data visit, reading length in advance from hard disk is S * N/M byte data, and selects to be used to deposit the buffer blocks of these data from all buffer blocks by replacement algorithm R; These buffer blocks are connected by chained list L2, and the buffer blocks after the connection is called grouping, and the buffer blocks that is about to belong to different task connects by chained list L2 separately; When task call function F M carried out data read to hard disk, if data have been present in the buffer blocks, the buffer management module was searched data and is sent to the initiation tasks requested by chained list L2 in each buffer blocks; When run through in advance at every turn finish after the buffer management module give an order to hard disk and make it enter low-power consumption mode.
In replacing algorithm, Block is divided into different states, these states comprise: BLK_IDLE, BLK_INUSE, BLK_USED, BLK_UNUSE.BLK_IDLE represents not read in as yet among the Block any data; BLK_INUSE represents that the data among the Block are used, BLK_USED represents the data of last byte among the Block accessed (characterize this Block visit is finished), the relationship of the two is close: the task of any visit Block all can be made as this Block state BLK_INUSE and the SHARE_NUM value is added 1 that (SHARE_NUM represents to visit the number of tasks of this Block, initial value is 0), when this task has been visited last data among the Block, the SHARE_NUM value subtracted 1 and check this value, (show and still have task at this Block of visit) then to keep the BLK_INUSE state constant if be not 0, be 0 (task of visiting this Block before showing has all been visited and has been finished) the Block state then is set is BLK_USED; BLK_UNUSE represents that Block has been present among the Group but is not visited by task as yet.Replace the attribute of algorithm by Block among each Group of secondary list structure sequential query among Fig. 3, according to BLK_IDLE, BLK_USED, BLK_UNUSE, the priority of BLK_INUSE (from high to low) selects Block to be used for replacing, and then selects first to search if a plurality of Block states are the same.By to the analysis of state implication as can be known, state is BLK_USED, BLK_UNUSE, and the probability that the Block of BLK_INUSE is used in the future raises successively, and therefore this replacement algorithm can bring less Block update times.

Claims (4)

1. buffer zone implementation method that is used to reduce hard disk power consumption, it is characterized in that this buffer zone comprises data buffer, the buffer management module of piecemeal, the data buffer of piecemeal sends data to the buffer management module, the buffer management module sends State Control and data access command to hard disk by the hardware device drivers module, hard disk sends data to the data buffer of piecemeal again, realizes being used to reduce the buffer zone of hard disk power consumption.
2. the buffer zone implementation method that is used to reduce hard disk power consumption according to claim 1, the data buffer that it is characterized by described piecemeal is: the zone of opening up fixed size in storer is as the data buffer, and size is the D byte; Data buffering is divided into fixing piece count N, every equal and opposite in direction is S byte, D=S * N; No datat in each piece links to each other by chained list L1 when initial, has two members in each structure of chained list L1, and first deposits buffer blocks numbering 1~N, deposits the first address of next buffer blocks in internal memory for second.
3. the buffer zone implementation method that is used to reduce hard disk power consumption according to claim 1 is characterized by described buffer management module and is: be provided with M task, task is obtained desired data by the interface function FD that calls hard drive and provide; The buffer management module provides with hard disk drive interface function F D to be had of the same name, same parameter and with the function F M of rreturn value, in task code hard-disk interface function F D is replaced with the function F M that the buffer management module provides; Function F M is achieved as follows: from the request first address of task to the hard disc data visit, reading length in advance from hard disk is S * N/M byte data, and selects to be used to deposit the buffer blocks of these data from all buffer blocks by replacement algorithm R; These buffer blocks are connected by chained list L2, and the buffer blocks after the connection is called grouping, and the buffer blocks that is about to belong to different task connects by chained list L2 separately; When task call function F M carried out data read to hard disk, if data have been present in the buffer blocks, the buffer management module was searched data and is sent to the initiation tasks requested by chained list L2 in each buffer blocks; When run through in advance at every turn finish after the buffer management module give an order to hard disk and make it enter low-power consumption mode.
4. the buffer zone implementation method that is used to reduce hard disk power consumption according to claim 1 is characterized by described replacement algorithm R and is:
For buffer blocks 1~N determines different states, these states comprise: the buffer blocks free time, buffer blocks is in usefulness, and buffer blocks is usefulness, and buffer blocks is not used; Do not read in any data as yet in the idle expression of the buffer blocks buffer blocks; Buffer blocks represents that in usefulness the data in the buffer blocks are read; Buffer blocks is with representing that the data of last byte are read in the buffer blocks; Buffer blocks is with representing that buffer blocks has been present in the grouping but is not read as yet; Replace the state of algorithm,, then data are read in this piece if existence is the buffer blocks of buffer blocks free time by buffer blocks in each grouping of chained list L2 sequential query; If existence is not the buffer blocks of buffer blocks free time, inquire about then whether existence is the buffer blocks buffer blocks of usefulness, then data are read in this buffer blocks as existing; If state be buffer blocks the buffer blocks of usefulness do not exist yet, inquire about then whether existence is the not buffer blocks of usefulness of buffer blocks, then data are read in this buffer blocks as existing; If the buffer blocks free time, buffer blocks is usefulness, and buffer blocks does not exist with the buffer blocks of three kinds of states, then data is read in the buffer blocks of buffer blocks in usefulness.If in query script, find to have the same a plurality of buffer blocks of state, then select first to inquire.
CNA2008100193437A 2008-01-04 2008-01-04 Data buffer zone implementing method for reducing hard disk power consumption Pending CN101221465A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008100193437A CN101221465A (en) 2008-01-04 2008-01-04 Data buffer zone implementing method for reducing hard disk power consumption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008100193437A CN101221465A (en) 2008-01-04 2008-01-04 Data buffer zone implementing method for reducing hard disk power consumption

Publications (1)

Publication Number Publication Date
CN101221465A true CN101221465A (en) 2008-07-16

Family

ID=39631338

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008100193437A Pending CN101221465A (en) 2008-01-04 2008-01-04 Data buffer zone implementing method for reducing hard disk power consumption

Country Status (1)

Country Link
CN (1) CN101221465A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101925160A (en) * 2009-06-11 2010-12-22 上海易狄欧电子科技有限公司 Wireless data transceiving method and system
CN102156529A (en) * 2010-02-11 2011-08-17 仁宝电脑工业股份有限公司 Power-saving method and power-saving device for hard disk
CN101714099B (en) * 2009-12-16 2012-12-05 金蝶软件(中国)有限公司 Processing method, device and data processing system of rowset data
CN103577158A (en) * 2012-07-18 2014-02-12 阿里巴巴集团控股有限公司 Data processing method and device
CN109614349A (en) * 2018-12-11 2019-04-12 杭州阿姆科技有限公司 A kind of buffer memory management method based on binding mechanism
CN111813326A (en) * 2019-04-12 2020-10-23 建兴储存科技(广州)有限公司 Solid-state memory device with multiple data stream writing and related writing method thereof
CN112379833A (en) * 2020-11-12 2021-02-19 阿米华晟数据科技(江苏)有限公司 File caching device, file caching method, idle space recycling method and fault recovery method
WO2023060943A1 (en) * 2021-10-14 2023-04-20 华为技术有限公司 Traffic control method and apparatus
CN111813326B (en) * 2019-04-12 2024-04-19 建兴储存科技(广州)有限公司 Solid-state storage device with multi-data stream writing function and related writing method thereof

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101925160A (en) * 2009-06-11 2010-12-22 上海易狄欧电子科技有限公司 Wireless data transceiving method and system
CN101714099B (en) * 2009-12-16 2012-12-05 金蝶软件(中国)有限公司 Processing method, device and data processing system of rowset data
CN102156529A (en) * 2010-02-11 2011-08-17 仁宝电脑工业股份有限公司 Power-saving method and power-saving device for hard disk
CN103577158A (en) * 2012-07-18 2014-02-12 阿里巴巴集团控股有限公司 Data processing method and device
CN103577158B (en) * 2012-07-18 2017-03-01 阿里巴巴集团控股有限公司 Data processing method and device
CN109614349A (en) * 2018-12-11 2019-04-12 杭州阿姆科技有限公司 A kind of buffer memory management method based on binding mechanism
CN109614349B (en) * 2018-12-11 2023-04-11 杭州阿姆科技有限公司 Cache management method based on binding mechanism
CN111813326A (en) * 2019-04-12 2020-10-23 建兴储存科技(广州)有限公司 Solid-state memory device with multiple data stream writing and related writing method thereof
CN111813326B (en) * 2019-04-12 2024-04-19 建兴储存科技(广州)有限公司 Solid-state storage device with multi-data stream writing function and related writing method thereof
CN112379833A (en) * 2020-11-12 2021-02-19 阿米华晟数据科技(江苏)有限公司 File caching device, file caching method, idle space recycling method and fault recovery method
WO2023060943A1 (en) * 2021-10-14 2023-04-20 华为技术有限公司 Traffic control method and apparatus

Similar Documents

Publication Publication Date Title
CN101221465A (en) Data buffer zone implementing method for reducing hard disk power consumption
CN103885728B (en) A kind of disk buffering system based on solid-state disk
CN103777905B (en) Software-defined fusion storage method for solid-state disc
CN103246613B (en) Buffer storage and the data cached acquisition methods for buffer storage
CN103678172B (en) Local data cache management method and device
US9244980B1 (en) Strategies for pushing out database blocks from cache
CN102629941A (en) Caching method of a virtual machine mirror image in cloud computing system
CN103345451B (en) Data buffering method in multi-core processor
CN103246696A (en) High-concurrency database access method and method applied to multi-server system
CN104809076A (en) Management method and device of cache
CN111427844A (en) Data migration system and method for file hierarchical storage
CN102687112A (en) Apparatus and method for managing a file in a distributed storage system
CN111143243A (en) Cache prefetching method and system based on NVM (non-volatile memory) hybrid memory
CN102262512A (en) System, device and method for realizing disk array cache partition management
CN103902260A (en) Pre-fetch method of object file system
CN103136205A (en) Web picture service system and method
CN106055274A (en) Data storage method, data reading method and electronic device
CN103049393B (en) Memory headroom management method and device
CN101373445A (en) Method and apparatus for scheduling memory
CN110059024B (en) Memory space data caching method and device
CN101853218B (en) Method and system for reading redundant array of inexpensive disks (RAID)
CN104965674A (en) Low-energy-consumption disk scheduling method and system based on block association
CN102521161B (en) Data caching method, device and server
Appuswamy et al. Cache, cache everywhere, flushing all hits down the sink: On exclusivity in multilevel, hybrid caches
CN103744624B (en) A kind of system architecture for realizing the data cached selectivity upgradings of storage system SSD

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20080716