Apparatus and method for preventing queue overflow for hard disk drive protection in computer system

A queue overflow prevention method and apparatus for Hard Disk Drive (HDD) protection in a computer system is provided. The queue overflow prevention method includes measuring acceleration information of the system, determining if the system is in a stable status or an unstable status using the acceleration information, and, while the system is in the unstable status, restricting the generation of a disk Input/Output (I/O) request.

CLAIM OF PRIORITY

This application claims, under 35 U.S.C. §119(a), priority to and the benefit of the earlier filing date of the Korean Patent Application entitled, Apparatus and Method for Preventing Queue Overflow for Hard Disk Drive Protection in Computer System,” filed in the Korean Intellectual Property Office on Apr. 28, 2009 and assigned Serial No. 10-2009-0037014, the contents of which are herein incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates in the field of a computer system hard disk drives. More particularly, the present invention relates to an apparatus and method for restricting the generation of a disk Input/Output (I/O) request to prevent a queue overflow.

2. Description of the Related Art

In recent years, products mounting computer systems have quickly changed from a fixed form, such as desktop computers, to a mobile form such as laptop computers. Since the mobile equipments are often used during movement, the mobile equipments are highly possible to experience external impact such as vibration, falling, etc. Thus, technologies for protecting data within the mobile equipments from the external impact are needed. Particularly, among storage media constituting the computer system, the hard disk drive (HDD) is particularly vulnerable to the external impact. Thus, there is a need for a technology for protecting the HDD from the external impact.

As is known in the art, an HDD is an auxiliary memory device for storing and reading data while rotating a disk type aluminum substrate coated with magnetic substance, i.e., a platter. A magnetic head for reading data stored in a magnetic form is installed at a minute distance around the platter. The magnetic head moves left and right. If the magnetic head experiences high impact in any position on the platter, the magnetic head may come into direct contact with the platter and do damage to the platter surface. Thus, the magnetic head cannot physically read and write data onto the platter. Thus, the conventional art provides a technology for preventing damages by sensing the generation of vibration or impact through an accelerometer sensor and, before the impact is forwarded to HDD, moving the magnetic head to a safe zone.

FIG. 1is a block diagram illustrating an apparatus configuration for protecting HDD in a computer system according to the conventional art.

Referring toFIG. 1, an HDD protection manager100receives an acceleration value periodically measured by an accelerometer sensor104via a sensor driver102, and determines if a current system is in a stable status or an unstable status. If it is determined that the current system is in the unstable status, the HDD protection manager100requests an HDD filter driver116to move a magnetic head to a safe zone. If the system is changed from the unstable status to the stable status, the HDD protection manager100requests the HDD filter driver116to restore the magnetic head to the original position.

If the HDD filter driver116is requested to move the magnetic head to the safe zone, the HDD filter driver116sends a physical hard disk driver124a signal requesting movement of the magnetic head to the safe zone and allows time for the magnetic head to move to the safe zone. At this time, the HDD filter driver116prevents all I/O requests forwarded from an HDD driver114from being forwarded to an I/O control driver122, using an I/O request flow controller118. Thereby preventing the magnetic head of the physical hard disk driver124from going back onto a platter surface and being exposed to danger. That is, the HDD filter driver116stores all I/O requests forwarded from the HDD driver114in an internal I/O queue120so as not to forward the I/O request to the I/O control driver122while the unstable status is maintained, thereby protecting the physical hard disk driver124. On the other hand, if the HDD protection manager100requests the HDD filter driver116restore the magnetic head to the original position, the HDD filter driver116can forward all I/O requests, which have been stored in the internal I/O queue120, to the physical hard disk driver124via the I/O control driver122, thereby allowing the magnetic head of the physical hard disk driver124to move onto the platter surface out of the safe zone and perform physical I/O.

The aforementioned conventional HDD protection technique has no problem in cases where a vibration or impact time is short and, during this time, a limited number disk I/O requests is generated. But, there is a problem that a queue overflow is generated in case where the vibration or impact time is very long or a large number disk I/O requests is generated within a short time and the number exceeds a capacity of the internal I/O queue120. If the queue overflow is generated, the computer system enters a fatal state such as a hang up, a halt, or a Blue Screen Of Death (BSOD). Also, because a post process is impossible for the disk I/O request exceeding the capacity of the internal I/O queue120, a user data loss is unavoidable.

To prevent the above problems, a queue may be increased in size, but there is generally a limit to a size of a memory assignable to the queue. Thus, there is a need for a different way to solve the above problems.

SUMMARY OF THE INVENTION

Accordingly, one aspect of the present invention is to provide a queue overflow prevention apparatus and method for Hard Disk Drive (HDD) protection in a computer system.

Another aspect of the present invention is to provide an apparatus and method for restricting the generation of a disk Input/Output (I/O) request to prevent a queue overflow in a computer system.

A further aspect of the present invention is to provide an apparatus and method for restricting the generation of a disk I/O request in the computer system, in case where a computer system is in an unstable status.

A yet another aspect of the present invention is to provide an apparatus and method for reducing a processing speed of the whole system at a hardware side to restrict the generation of a disk I/O request in the computer system, while a computer system is in an unstable status.

A still another aspect of the present invention is to provide an apparatus and method for freezing an operation of each process or controlling priority to restrict the generation of a disk I/O request in the computer system, while a computer system is in an unstable status.

A still another aspect of the present invention is to provide an apparatus and method for controlling a network throughput to restrict the generation of a disk I/O request in the computer system, while a computer system is in an unstable status.

According to one aspect of the present invention, a buffer overflow prevention method for HDD protection in a computer system is provided. The method includes measuring acceleration information of the system, determining if the system is in a stable status or an unstable status using the acceleration information, and, while the system is in the unstable status, restricting the generation of a disk I/O request.

According to another aspect of the present invention, a buffer overflow prevention method for HDD protection in a computer system is provided. The method includes a protection manager and an I/O request controller. The protection manager determines if the system is in a stable status or an unstable status using an acceleration value of the system. The I/O request controller restricts the generation of a disk I/O request while the system is in the unstable status.

DETAILED DESCRIPTION OF THE INVENTION

An apparatus and method for restricting the generation of a disk Input/Output (I/O) request in the computer system, while a computer system is in an unstable status, according to an exemplary embodiment of the present invention are described below.

FIG. 2is a block diagram illustrating a configuration for protecting Hard Disk Drive (HDD) in a computer system according to the present invention.

Referring toFIG. 2, a computer system includes an HDD protection manager200, a sensor driver202an accelerometer sensor204, applications using disk I/O210, a file system212, an HDD driver214, an HDD filter driver216, an I/O control driver222, a physical hard disk driver224, and an I/O request controller230. Here, the HDD filter driver216includes an I/O request flow controller218and an internal I/O queue220. The I/O request controller230includes a platform Hardware (H/W) performance controller232, a process controller234, and a network throughput controller236.

The HDD protection manager200receives an acceleration value periodically measured by the accelerometer sensor204via the sensor driver202. On the basis of the acceleration value, the HDD protection manager200determines if the current system is in a stable status or an unstable status. Here, the accelerometer sensor204may measure accelerations of an X axis, a Y axis, and a Z axis, and may measure the accelerations of only the X axis and Y axis.

If it is determined that the current system is in the unstable status, the HDD protection manager200outputs a signal requesting the movement of a magnetic head to a safe zone, to the HDD filter driver216and, according to the present invention, the HDD protection manager200outputs a signal indicating that the system is in an unstable status, to the I/O request flow controller230. On the other hand, if it is determined that the system is changed from the unstable status to a stable status, the HDD protection manager200outputs a signal requesting restoration of the magnetic head to the original position, to the HDD filter driver216and, according to the present invention, the HDD protection manager200outputs a signal indicating that the system is in the stable status, to the I/O request flow controller230.

If the signal requesting movement of the magnetic head to the safe zone is input from the HDD protection manager200, the HDD filter driver216provides the signal requesting movement to the safe zone to the physical hard disk driver224via the I/O control driver222. Here, the HDD filter driver216prevents all I/O requests forwarded from the HDD driver214(i.e., an upper driver) from being forwarded to the I/O control driver222, using an I/O request flow controller218. That is, the HDD filter driver216stores, in an internal I/O queue220, all I/O requests forwarded from the HDD driver214such that the I/O requests are not forwarded to the I/O control driver222while the unstable status is kept. Here, the I/O request is generated in the applications using disk I/O210, and is forwarded to the HDD filter driver216via the file system212and the HDD driver214.

Furthermore, according to the present invention, the HDD filter driver216determines status information of the internal I/O queue220and provides the status information to the I/O request controller230. Here, the status information of the internal I/O queue220includes a size and a present usage of the internal I/O queue220. This is for the I/O request controller230to select and use a technique suitable to restricting the I/O request generation depending on the status information of the internal I/O queue220.

On the other hand, if a signal requesting restoration of the magnetic head to the original position is input from the HDD protection manager200, the HDD filter driver216forwards all I/O requests having been stored in the internal I/O queue220, to the physical hard disk driver224via the I/O control driver222.

If the signal requesting movement of the magnetic head to the safe zone is input through the I/O control driver222, the physical hard disk driver224moves the magnetic head to the safe zone. If I/O requests are input through the I/O control driver222, the physical hard disk driver224moves the magnetic head into position near the platter surface and then, performs physical I/O corresponding to the inputted I/O requests.

The I/O request controller230restricts the generation of an I/O request while the system is in the unstable status according to the present invention. That is, the I/O request controller230receives information on whether the system is in the stable status or the unstable status from the HDD protection manager200and, while the system is in the unstable status, the I/O request controller230restricts the generation of an I/O request within the system through a platform H/W performance control, a process control, or a network throughput control. Here, the I/O request controller230monitors and stores status information of the system before restricting the generation of the I/O request and, if the system is changed from the unstable status to the stable status, the I/O request controller230restores the system in the order of the status information stored. Here, the status information of the system monitored by the I/O request controller230is information on a status or value that the I/O request controller230controls or changes restriction of the generation of a disk I/O request as described below.

While the system is in the unstable status, the I/O request controller230restricts the generation of an I/O request using the platform H/W performance controller232, the process controller234, and the network throughput controller236.

If the system is changed to the unstable status, the platform H/W performance controller232acquires and stores H/W status information of the current system through monitoring and change setting of platform H/W. By doing so, the platform H/W performance controller232reduces the whole hardware performance of the system and restricts the generation of an I/O request. Here, the platform H/W refers to a processor and a platform chipset (or a South Bridge Chipset). That is, the platform H/W performance controller232changes settings of the platform H/W using a technique of changing Performance States (P-States) of all processors (e.g., a single processor, a multi-processor, and a multi-core processor) within a system, a technique of changing on-demand clock modulation duty-cycles of processors, or a technique of performing platform chipset thermal throttling. By doing so, the platform HAN performance controller232restricts the generation of an I/O request. Here, the P-State of the processor is described in the Advanced Configuration and Power Interface (ACPI) standard, which is well-known in the art and need not be discussed in detail herein.

The P-State is marked in a form of ‘Px’. In case where there are ‘P0’ to ‘Pn’, the ‘P0’ means maximum performance capability, and the ‘Pn’ means minimum performance capability. That is, the ‘Px’ means low performance as an ‘x’ value increases.

As illustrated inFIG. 3, in order to change the setting of the platform H/W, the platform H/W performance controller300interfaces with a Basic Input/Output System (BIOS)330, processor(s)340, a platform chipset350using a System Management Interrupt (SMI#)312, an ACPI driver314, a processor driver316, a chipset driver318, and a separate customized driver320. After that, if the system is changed from the unstable status to the stable status, the platform H/W performance controller300restores system H/W values on the basis of the stored status information.

However, while the system is in the unstable status, the platform H/W performance controller300uses each of the three techniques according to the queue status information or, according to a preset scenario, the platform H/W performance controller232independently uses one technique or uses a combination of one or more techniques.

If the system is changed to the unstable status, the process controller234acquires and stores a disk I/O request usage for all processes of a current system through monitoring and change states of execution of the processes. By doing so, while the system is in the unstable status, the process controller234restricts the generation of disk I/O requests from the respective processes. That is, while the system is in the unstable status, the process controller234restricts the generation of a disk I/O request using a technique of changing each process into a software-frozen state or a technique of lowering Operating System (OS) scheduling priority of each process. Here, the frozen state means a state in which a process is suspended to perform no further operations or commands. In the process of the frozen state, the disk I/O usage is reduced to zero (‘0’). Also, if the scheduling priority of the process is lowered, the disk I/O usage is decreased. This is because an OS gives a process of lower scheduling priority a chance to use a processor of a system while simultaneously executing several processes. Here, as illustrated inFIG. 4, by interfacing with a process manager416using Application Programming Interfaces (APIs)410provided by the system, the process controller400can acquire disk I/O information of all processes422, which are in execution in the current system, and can freeze one or more of the processes422or change their priority. Here, the APIs410can be system calls, native APIs provided by the kernel, Wincap, or WinSock Kernel (WSK). If the system is changed from the unstable status to the stable status, the process controller400shall restore frozen processes and restore the priority of the processes to their original level

Here, while the system is in the unstable status, the process controller400can use all or only one of the techniques of freezing the process and the technique of changing the priority depending on queue status information. Also, the process controller400may use a method alternately using the two techniques depending on queue status information, an expected impact amount, and an expected impact sustain time.

The network throughput controller236(FIG. 2) monitors a network usage of the current system, information on a window size for a send/receive buffer of a Transmission Control Protocol/Internet Protocol (TCP/IP) protocol, network adapter information, and a correlation between the network usage and a disk I/O request. If the system is changed to the unstable status, the network throughput controller236stores the monitored information, controls a network throughput, and restricts the generation of a disk I/O request caused by network use. The network throughput controller236can control a network throughput using a technique of controlling a window size for a send/receive buffer of a TCP/IP protocol, a technique of changing a Maximum Transfer Unit (MTU), and a technique of changing a link speed of a network adapter H/W. At this time, as illustrated inFIG. 4, the network throughput controller402can interface with the TCP/IP protocol426using the APIs410provided by the system and change a window size of a send/receive buffer and an MTU size, and can interface with the network adapter driver418and change the link speed of the network adapter H/W420. Here, the APIs410can be system calls, native APIs provided by a kernel, Wincap, or WinSock Kernel (WSK). If the system is changed from the unstable status to the stable status, the network throughput controller402restores the network state of the current system to its original level according to the stored monitoring information.

Here, while the system is in the unstable status, depending on queue status information, the network throughput controller402may use at least one of the window size changing technique, the MTU changing technique, and the link speed changing technique, independently or a combination of one or more the aforementioned techniques.

The I/O request controller230(FIG. 2) may restrict the generation of the I/O request using all of techniques each used in the platform H/W performance controller232, the process controller234, and the network throughput controller236, and may restrict the generation of the I/O request using one or more techniques. At this time, the I/O request controller230can select a suitable technique depending on status information of a queue provided from the HDD filter driver216. For example, if a usage of the queue is higher than a threshold value as a result of identifying the status information of the queue, the I/O request controller230can increase a strength restricting the generation of an I/O request using several techniques. If the usage of the queue is lower than the threshold value, the I/O request controller230can decrease a strength restricting the generation of an I/O request using one or two techniques.

The above description is made for a configuration having a separate I/O request controller230controlling the generation of an I/O request and operating with an HDD protection manager200through an interface. Although the I/O controller is shown separately, it would be understood by those skilled in the art that the I/O request controller230can be included within the HDD protection manager200.

FIG. 5is a flow diagram illustrating an procedure for restricting a disk I/O request in a computer system according to an exemplary embodiment of the present invention.

Referring toFIG. 5, in step501, a computer system monitors information of the system. For example, the system monitors status information of a platform H/W, status information on a process, and status information on a network.

At step503, the system determines if the current system is in a stable status or an unstable status. Here, the system determines if the current system is in the stable status or the unstable status capable of experiencing impact, using an acceleration value periodically measured through an accelerometer sensor. If the current system is in the stable status, the system returns to step501and continuously monitor the status information of the system.

On the other hand, if the current system is in the unstable status, in step505, the system stores the monitored status information of the system and in step507, restricts the generation of a disk I/O request within the system through a platform H/W performance control, a process control, or a network throughput control.

In step509, the system determines if the current system is in the stable status or the unstable status. When the system is still in the unstable status, the system returns to step507and continuously restricts the generation of the disk I/O request.

On the other hand, if the current system is in the stable status, the system restores the system to the original on the basis of the stored status information of the system. The system returns to step501to monitor system information.

FIG. 6illustrates disk I/O throughputs in computer systems according to the present invention and the conventional art. Here, horizontal axis represents time, the vertical axis represents disk I/O throughput per second, ‘G1’ represents a disk I/O throughput of a conventional computer system, and ‘G2’, ‘G3’, and ‘G4’ represent disk I/O throughputs of a computer system according to the present invention.

Referring toFIG. 6, the conventional computer system may continuously generate a disk I/O request even in an unstable status, thus causing a phenomenon in which a queue within an HDD filter driver is overflowed. Unlike this, the computer system according to the present invention waits or restricts the generation of a disk I/O request between an impact start time point (600) and an impact end time point (602) to generate no disk I/O requests or disk I/O requests of a low rate during the unstable status. By doing so, the computer system can prevent the phenomenon in which the queue within the HDD filter driver overflows.

As described above, in an exemplary embodiment of the present invention, there is an advantage in which simple application to a conventional system can be made at less cost and, even in case of a malfunction, restoration is easy and danger is low because it is set to restore a system to the original state on system booting without a permanent change of system setting.

An exemplary embodiment of the present invention has an effect of restricting the generation of a disk I/O request while a computer system is in an unstable status, thereby being able to prevent an overflow of a queue storing disk I/O requests during the unstable status and, through this, being able to maintain system stability and prevent a loss or damage of user data.

The above-described methods operable in one or more of the illustrated controllers according to the present invention can be realized in hardware or as software or computer code that can be stored in a recording medium such as a CD ROM, an RAM, a floppy disk, a hard disk, or a magneto-optical disk or downloaded over a network (i.e., The computer program can be provided from an external source which is electronically downloaded over a network, e.g., Internet, POTS, so that the methods described herein can be rendered in such software using a general purpose computer, or a special processor or in programmable or dedicated hardware, such as an ASIC or FPGA. As would be understood in the art, the computer, the processor or the programmable hardware include memory components, e.g., RAM, ROM, Flash, etc. that may store or receive software or computer code that when accessed and executed by the computer, processor or hardware implement the processing methods described herein. The code when loaded into a general purpose computer transformed the general purpose computer into a special purpose computer that may in part be dedicated to the processing shown herein. In addition, the computer, processor or dedicated hardware may be composed of at least one of a single processor, a multi-processor, and a multi-core processor.