Disk device and command management method

By introducing a tree-like database into the disk device and using logical physical conversion table management commands, the problem of low command management efficiency in the disk device is solved, and efficient processing and management of commands is achieved.

CN119576891APending Publication Date: 2025-03-07KK TOSHIBA +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311758119.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-05
Filing Date
2023-12-20
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In a disk device that can be connected to the host, how to efficiently manage the received commands to improve the command processing efficiency.

Method used

By introducing a database into the disk device, the database is arranged in a tree structure, and using logical physical conversion table management commands, the controller generates or updates the database based on the received commands to achieve efficient management of the commands.

Benefits of technology

Efficient management of received commands is realized, and the repetition and merging of commands can be effectively handled, thereby improving the overall performance of the disk device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576891A_ABST
    Figure CN119576891A_ABST
Patent Text Reader

Abstract

Provided are a disk device and a command management method capable of efficiently managing commands. A disk device according to the present embodiment is provided with a disk medium, a memory, and a controller. The disk medium records data in accordance with the address. The controller constructs or updates a database and stores the database in a memory in response to receiving a command including an address. The database contains a tree-like arrangement associated with the address range of the command and corresponding to the address and time series of the command. The controller manages commands using a database.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of Japanese Patent Application No. 2023-143619 (filing date: September 5, 2023) as a basic application. The present application incorporates the entire contents of the basic application by reference. Technical Field

[0002] The present embodiment relates to a disk device and a command management method. Background Art

[0003] In a disk device that can be connected to a host, a command may be received from the host. In the disk device, it is desired to efficiently manage the received commands. Summary of the invention

[0004] Embodiments of the present invention provide a disk device and a command management method capable of efficiently managing commands.

[0005] According to an embodiment, a disk device having a disk medium, a memory, and a controller is provided. The disk medium records data according to an address. The controller generates or updates a database in response to receiving a command including an address, and stores it in the memory. The database includes a tree-like arrangement that is associated (establishes an association) with the address range of the command and corresponds to the address and time sequence of the command. The controller manages the command using the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Figure 1 It is a diagram showing the hardware configuration of the disk device according to the embodiment.

[0007] Figure 2 It is a diagram showing the functional structure of the disk device according to the embodiment.

[0008] Figure 3 It is a diagram showing the data structure of a database in the embodiment.

[0009] Figure 4 (a) and (b) are diagrams showing the data structures of a parent node and a leaf node in the embodiment.

[0010] Figure 5 This is a flowchart showing the operation when a command is received in the embodiment.

[0011] Figure 6 (a) and (b) are diagrams showing the operation of the database when a command is received in the implementation method.

[0012] Figure 7 (a) and (b) are diagrams showing the operation of the database when a command is received in the implementation method.

[0013] Figure 8 This is a flowchart showing the operation when commands are merged in the embodiment.

[0014] Fig. 9 (a) and (b) are diagrams showing the operation of the database when commands are merged in the implementation method.

[0015] Fig.10 This is a flowchart showing the operation when the command is executed in the embodiment.

[0016] Fig.11 (a) and (b) are diagrams showing the operation of the database when the command in the implementation method is executed.

[0017] Fig.12 (a) and (b) are diagrams showing the operation of the database when the command in the implementation method is executed.

[0018] Fig.13 This is a flowchart showing the operation when a command is received in the first variant of the implementation method.

[0019] Fig.14 (a) and (b) are diagrams showing the operation of the database when a command is received in the second variant of the implementation method.

[0020] Fig.15 (a) and (b) are diagrams showing the operation of the database when a command is received in the second variant of the implementation method.

[0021] Fig.16 This is a diagram showing the operation of the database when receiving a command in the second variant of the implementation method.

[0022] Fig.17 (a) and (b) are diagrams showing the operation of the database when a command is received in the third variant of the implementation method.

[0023] Fig.18 (a) and (b) are diagrams showing the operation of the database when a command is received in the third variant of the implementation method.

[0024] Fig.19 (a) and (b) are diagrams showing the operation of the database when a command is received in the third variant of the implementation method.

[0025] Fig. 20 This is a diagram showing the operation of the database when a command is received in the third variant of the implementation method.

[0026] Description of Reference Numerals

[0027] 10 disk device, 11 disk medium, 15 volatile memory, 19 controller, 151 database. DETAILED DESCRIPTION

[0028] Hereinafter, a disk device according to an embodiment will be described in detail with reference to the drawings. However, the present invention is not limited to this embodiment.

[0029] (Implementation Method)

[0030] The disk device according to the embodiment has an interface that can be connected to a host, and sometimes receives commands from the host through the interface. In order to efficiently manage the received commands, a study has been conducted.

[0031] like Figure 1 As shown, the disk device 10 has a disk medium 11, a spindle motor 12, an HSA (Head Stack Assembly) 13, a head amplifier 14, a volatile memory 15, an RWC (Read / Write Channel) 16, an HDC (Hard Disk Controller) 17, a CPU (Central Processing Unit) 18, a motor driver 20, and a non-volatile memory 21. Figure 1 It is a diagram showing the structure of the disk device 10.

[0032] The disk medium 11 has a recording surface S on which data is recorded on the front and back sides respectively. The disk medium 11 is driven to rotate by a spindle motor 12. A plurality of disk media 11 are provided in the disk device 10. In addition, a physical address as position information indicating a physical position on the recording surface S is set for all the recording surfaces S used in the disk device 10. The spindle motor 12 is driven by a current (or voltage) supplied from a motor driver 20.

[0033] The HSA 13 includes a head H, a head suspension 131, and a VCM (Voice Coil Motor) 132. The head H is provided for each recording surface S of the disk medium 11. The head H includes a write head WH and a read head RH. The write head WH is used to write data to the disk medium 11. The read head RH is used to read data from the disk medium 11.

[0034] The head suspension 131 supports the head H and is provided for each head H. The VCM 132 is driven by the current (or voltage) supplied from the motor driver 20. The head suspension 131 and the VCM 132 constitute an actuator. The actuator controls the head H supported by the head suspension 131 to move to a predetermined position on the recording surface S of the disk medium 11 through the driving of the VCM 132. With such a configuration of the HSA 13, the head H can move in the radial direction of the recording surface S of the disk medium 11.

[0035] The motor driver 20 supplies current or voltage to the spindle motor 12 to drive the spindle motor 12 at a predetermined rotation speed. In addition, the motor driver 20 supplies current or voltage specified by the CPU 18 to the VCM 132 to drive the actuator.

[0036] The head amplifier 14 supplies a write signal (current) corresponding to write data input from the RWC 16 to the head H. The head amplifier 14 also amplifies a read signal output from the head H (read data read from the disk medium 11 by the head H) and supplies the amplified signal to the RWC 16.

[0037] The RWC 16 is a signal processing circuit. The RWC 16 encodes (code modulates) the write data input from the HDC 17 and outputs it to the head amplifier 14. In addition, the RWC 16 decodes (code demodulates) the read data based on the read signal transmitted from the head amplifier 14 and outputs it to the HDC 17.

[0038] The HDC 17 performs control of data transmission and reception between the HDC 17 and the host device HC via the I / F bus, etc. The HDC 17 includes a host interface (host I / F) circuit (not shown).

[0039] The CPU 18 controls the entire disk device 10 based on the firmware stored in the nonvolatile memory 21 or the disk medium 11. For example, the CPU 18 performs various control processes such as a control process based on reading or writing of the head H and a servo control process for controlling the position of the head on the recording surface S of the disk medium 11. The firmware includes initial firmware that is first executed when the disk device 10 is started and control firmware used in the normal operation of the disk device 10.

[0040] In addition, the hardware structure including the RWC 16, the HDC 17, and the CPU 18 can also be regarded as the controller 19. The controller 19 can be configured as an integrated circuit (system on chip) of one chip. The package of the controller 19 can be arranged on a printed circuit board outside the housing (not shown) that accommodates the disk medium 11, the spindle motor 12, and the HSA 13.

[0041] The nonvolatile memory 21 is connected to the CPU 18 of the controller 19 and is configured to be rewritable by the CPU 18 .

[0042] The volatile memory 15 is composed of a volatile memory such as a DRAM (Dynamic RAM) or an SRAM (Static RAM). The volatile memory 15 includes a command queue 154, a buffer 152, and a work area 153. The work area 153 is used to temporarily save data through the controller 19. For example, the CPU 18 reads the database 151 and the logical-physical conversion table 155 through the head H, the head amplifier 14, the RWC 16, and the HDC 17, and saves them in the work area 153.

[0043] The command queue 154 queues the plurality of commands received by the HDC 17 in the order in which they are received. Each of the plurality of commands includes a logical address for accessing the disk medium 11. The command queue 154 is a waiting queue buffer, and each command is dequeued (removed from the head of the queue) in the order in which it is enqueued (inserted to the end of the queue). That is, the command queue 154 has a FIFO structure.

[0044] The buffer 152 includes a write buffer 152a and a read buffer 152b. The write buffer 152a temporarily stores data written to the disk medium 11 in accordance with a command (e.g., a write command) instructing to write write data to the disk medium 11. The read buffer 152b temporarily stores data read from the disk medium 11 in accordance with a command (e.g., a read command) instructing to read read data from the disk medium 11.

[0045] The write command includes the beginning LBA (Logical Block Address) of the logical sector of the write destination of the write data and the write data length in the logical sector managed by the disk device 10. In addition, the read command includes the beginning LBA of the logical sector storing the read data to be read and the read data length in the logical sector managed by the disk device 10. LBA is also called a logical address.

[0046] The logical-physical conversion table 155 in the work area 153 is information that associates logical addresses with physical addresses, and can be used fixedly without being rewritten in a normal state. Therefore, in the disk device 10, if the logical addresses of multiple commands are continuous, it can be inferred that the physical addresses accessed by the multiple commands are also continuous. Here, the physical address includes, for example, a combination of a cylinder number and a sector number. The cylinder number is a number that identifies the cylinder. The cylinder is a unit of storage area that spans multiple tracks corresponding to each other in the upper and lower parts of multiple disk media 11. The sector number is a number that identifies the position of a sector in one track. That is, for the physical address, part of its information is continuously allocated in each track and in each of the multiple adjacent tracks in the disk medium 11. In addition, the physical address may include a head number (recording surface number), which is also continuously allocated for multiple tracks adjacent to each other in the upper and lower parts of the cylinder.

[0047] When executing a command, the controller 19 performs a logical-physical conversion process of converting the logical address included in the command into a physical address by referring to the logical-physical conversion table 155. The controller 19 executes the command using the physical address to access the disk medium 11. In addition, the following mainly focuses on the process before the logical-physical conversion process, so for simplicity, the LBA included in the command is simply referred to as an address.

[0048] The controller 19 may generate a database 151 in response to receiving a command including an address, and store the database 151 in the working area 153 of the volatile memory 15 .

[0049] The database 151 in the work area 153 is management information of a plurality of commands received by the HDC 17. The database 151 is generated by functionally forming a data structure in the work area 153 including a tree-like arrangement of a plurality of commands associated with address ranges of the commands and corresponding to addresses and time series of the commands.

[0050] The controller 19 manages commands using the database 151. The controller 19 changes the command queued in the command queue 154 (for example, inserts it to the end of the queue) in response to the received command, and updates the database 151 accordingly. The controller 19 may also append the information of the received command to the database 151. The controller 19 changes the command queued in the command queue 154 (for example, removes it from the head of the queue) in response to the command to be executed, and selects a command from the database 151 to execute and updates the database 151 accordingly. The controller 19 may also delete the information of the command to be executed from the database 151. In the following, for simplicity, the description of the operation of the command queue 154 is omitted.

[0051] The controller 19 may be built into the disk device 10. Figure 2 The functional composition shown. Figure 2 1 is a diagram showing the functional structure of the disk device 10 .

[0052] The disk device 10 functionally includes a control unit 10a and a command management unit 10b. The command management unit 10b includes a database 151, an operation unit 10b2, and a selection unit 10b3. The control unit 10a and the command management unit 10b can be functionally configured by executing firmware by the controller 19 and being developed in the volatile memory 15 at the same time when compiling or sequentially according to the progress of processing.

[0053] The control unit 10 a functions as an interface with the host device HC and controls the command management unit 10 b 2 .

[0054] The control unit 10a can receive commands from the host device HC. When receiving a command from the host device HC, the control unit 10a provides the command as an input command to the command management unit 10b2, and issues a request to add the command and provides the request to the command management unit 10b2.

[0055] When the condition for executing a command is satisfied, the control unit 10a issues a request for selecting a command to be executed and provides the request to the command management unit 10b2.

[0056] When the control unit 10a receives the selected command as an output command from the command management unit 10b2, the control unit 10a sets the command to a state in which the command can be executed. The control unit 10a executes the command at a predetermined timing.

[0057] When the execution of the command is completed, the control unit 10a returns a response to the command to the host device HC.

[0058] The database 151 is management information of a plurality of commands received from the host device HC in the control unit 10a. In the database 151, a plurality of commands are associated with the address range of the command and are arranged in a tree form according to the address and time sequence of the command.

[0059] The operation unit 10b2 receives input commands and requests from the control unit 10a. The input commands are commands received from the host device HC in the control unit 10a. The requests are requests related to the operation of the database 151 and are issued by the control unit 10a according to the commands.

[0060] The operation unit 10b2 operates the database 151 in accordance with the input command and request. The operation unit 10b2 can add a command to the database 151 and update the database 151 in accordance with the input command and request.

[0061] The selection unit 10b3 receives a request from the control unit 10a. The request is a request related to the selection of a command from the database 151, and is issued by the control unit 10a in response to the establishment of a condition for executing the command.

[0062] The selection unit 10b3 searches the database 151 in accordance with the request. The selection unit 10b3 can select a command from the database 151 in accordance with the request. The selection unit 10b3 provides the selected command to the control unit 10a as an output command. In response, the control unit 10a executes the command.

[0063] The selection unit 10b3 notifies the control unit 10a of the information of the selected command. The control unit 10a issues a request to delete the command based on the information of the selected command and provides it to the operation unit 10b2. The operation unit 10b2 can delete the command from the database 151 and update the database 151 according to the request.

[0064] Next, use Figure 3 The data structure of the database 151 will be described. Figure 3 It is a diagram showing the data structure of the database 151.

[0065] The database 151 has a hierarchical tree-like arrangement. The database 151 is based on the data structure of the B+ tree, and has a data structure that includes functions for processing the range of keys and functions for processing the time series of nodes. The database 151 has at least one leaf node LN. The database 151 may also have multiple leaf nodes LN. The database 151 may also have more than one parent node PN. Multiple leaf nodes LN may also be subordinate to more than one parent node PN. Figure 3 In the example, the number of parent nodes PN above the leaf node LN is 1, but the number of parent nodes PN above the leaf node LN may be 2 or more. The database 151 may also have a hierarchical tree arrangement of multiple parent nodes PN above the leaf node LN. The database 151 can hierarchically add an extension node EN and a leaf node LN subordinate to any one of the multiple leaf nodes LN. The extension node EN connects the leaf node LN of the subordinate source and the leaf node LN of the subordinate destination.

[0066] In the database 151, the parent node PN may have a maximum secret key SK number of i (i≥2) and a branch BR number of i+1, and the leaf node LN may have a maximum secret key SK number of i, a maximum secret key EK number of i, and a branch BR number of i.

[0067] exist Figure 4 In (a), a parent node PN with a maximum secret key SK number of 2 and a branch BR number of 3 is illustrated. Figure 4 The parent node PN shown in (a) is associated with two secret keys SK and three branches BR. The two secret keys SK are respectively the starting secret keys, for example, corresponding to the beginning address in the address range of the command. The three branches BR respectively store pointers to the subordinate leaf nodes LN. The branch BR on the left side of the figure stores a pointer to the leaf node LN with a secret key smaller than the secret key SK. The branch BR on the right side of the figure stores a pointer to the leaf node LN with a secret key greater than the secret key SK.

[0068] exist Figure 4 In (b), a leaf node LN with a maximum number of secret keys SK of 2, a maximum number of secret keys EK of 2, and a branch BR of 2 is illustrated. Figure 4The leaf node LN shown in (b) is associated with 2 keys SK, 2 keys EK and 2 branches BR. The 2 keys SK are respectively the starting keys, for example, corresponding to the beginning address in the address range of the command. The 2 keys EK are respectively the ending keys, for example, corresponding to the last address in the address range of the command. The keys SK and EK arranged vertically are paired. Through the 2 pairs of keys SK and EK, the functions of processing the range of keys can be realized respectively. The 2 branches BR store pointers to the 2 commands CM corresponding to the 2 pairs of keys SK and EK, or pointers to the extension node EN.

[0069] Figure 3 The illustrated extension node EN stores a pointer to a subordinate leaf node LN. In the case where other extension nodes EN are subordinate to the extension node EN, the extension node EN also stores a pointer to other extension nodes EN.

[0070] The database 151 has a multi-level hierarchical structure. Figure 3 After the third level shown, the lower the level, the newer it is. Figure 3 As shown by the middle hatched line, in the case of an extended node, the subordinate commands CM are newer as they are lower in level. Thus, in the database 151, a function of processing the time series of nodes can be realized. Figure 3 , a database 151 having a four-level data structure is illustrated.

[0071] At level 1, there is a parent node PN with SK=10,27.

[0072] At the second level, there are leaf nodes LN with SK = 0, EK = 9, leaf nodes LN with SK = 10, EK = 10, and leaf nodes LN with SK = 27, EK = 28. The extension node EN at the third level is associated with the leaf node LN with SK = 0, EK = 9, and the command CM is associated with the leaf node LN with SK = 10, EK = 10 and the leaf node LN with SK = 27, EK = 28, respectively.

[0073] At level 3, there are extension nodes EN, leaf nodes LN of SK=0, EK=3, leaf nodes LN of SK=5, EK=7, and leaf nodes LN of SK=8, EK=9. The leaf nodes LN of SK=0, EK=3 and the leaf nodes LN of SK=5, EK=7, and SK=8, EK=9 are respectively subordinate to the leaf nodes LN of SK=0, EK=9 via extension nodes EN. Commands CM are respectively associated with the leaf nodes LN of SK=0, EK=3 and the leaf nodes LN of SK=5, EK=7, and SK=8, EK=9.

[0074] At level 4, there are an extension node EN and a leaf node LN of SK=4, EK=5. The leaf node LN of SK=4, EK=5 is subordinate to the leaf node LN of SK=0, EK=9 via two extension nodes EN. The command CM is associated with the leaf node LN of SK=4, EK=5.

[0075] In the database 151, each leaf node LN is associated with a pair of keys SK and EK representing the address range of the command, so that the duplication of the address range of the command CM can be managed. In the database 151, the leaf nodes LN corresponding to the repeated address range are connected to multiple levels. Figure 3 In the example, the key range (address range of command CM) of the leaf node LN of the third level with SK=5, EK=7 and the leaf node LN of the fourth level with SK=4, EK=5 overlap, and they are connected to each other via two extension nodes EN. The leaf node LN of the fourth level with SK=4, EK=5 is newer in time than the leaf node LN of the third level with SK=5, EK=7. Thus, the overlap of the address range of command CM can be managed in time series.

[0076] In this specification, the second level in the database 151 is sometimes referred to as an upper level, and the third level and below are sometimes referred to as a lower level. In addition, since the keys in the database 151 correspond to the addresses of the commands on a one-to-one basis, the keys are sometimes referred to as addresses.

[0077] Figure 2 The illustrated operation unit 10 b 2 can perform addition and deletion of commands CM to the database 151 , and the accompanying addition and deletion of extension nodes EN and / or leaf nodes LN.

[0078] The operation unit 10b2 can add a command CM to the extension node EN. When the key range (address range) overlaps for the leaf nodes LN having the extension node EN, the operation unit 10b2 adds a command CM to the leaf node LN of the lowest extension node EN among the extension nodes EN managed by the leaf node LN.

[0079] The operation unit 10b2 can delete the command CM of the expansion node EN. When deleting the command CM under the management of the expansion node EN, the operation unit 10b2 deletes the expansion node EN when there is no command CM managed by any expansion node EN. Interpolation is performed with the expansion node EN connected to the lower level of the expansion node EN.

[0080] Figure 2 The selection unit 10b3 shown searches for the command CM managed in the database 151 using the key range (address range), and sends the search result to the control unit 10a as an output command.

[0081] The search method of the command CM is not limited to the method of designating a specific key range (address range) and searching from the uppermost parent node PN toward the lower levels.

[0082] When the control unit 10a wants to determine the required command CM from multiple commands CM received by the selection unit 10b3, the selection unit 10b3 searches for the command and sends it to the control unit 10a by performing a bidirectional linear search based on a leaf node LN with an arbitrary key range (address range).

[0083] The operation unit 10b2 can create an extended node EN. For example, it is assumed that the address range of the input command CM overlaps the key range (address range) of the leaf node LN that holds the command CM. In this case, a branch BR of the leaf node LN is created, and the command CM is moved to the branch BR. Furthermore, before the extended node EN and the leaf node LN, the extended node EN and the leaf node LN are created, and the command CM is managed there.

[0084] The operation unit 10b2 can move the command CM to the extension node EN. In the case where there is duplication of multiple commands CM, the operation unit 10b2 moves all the commands CM to the extension node EN. In the case where the key range (address range) of the new command CM overlaps with the key range (address range) of the leaf node LN having the extension node EN, it also overlaps with the key range (address range) of the leaf node LN having the extension node EN connected to the leaf node LN.

[0085] The operation unit 10b2 can integrate the extension nodes EN.

[0086] Next, use Figure 5 The operation when receiving a command is described. Figure 5 This is a flowchart showing the operation when a command is received.

[0087] In the disk device 10, the control unit 10a waits until receiving the command CM (No in S1).

[0088] When the control unit 10a receives the command CM ("Yes" in S1), it provides the received command CM and a request for adding the command CM to the operation unit 10b2. The operation unit 10b2 determines the address range based on the address and data size included in the command CM or the designation thereof. The operation unit 10b2 accesses the database 151 according to the request and determines whether the determined address range overlaps with the address range of the command CM in the database 151 (S2).

[0089] If the determined address range does not overlap with the address range of the command CM in the database 151 (No in S2), the operating unit 10b2 creates and / or adds a leaf node LN subordinate to the parent node PN (S3) and associates the command CM with the leaf node LN (S4).

[0090] When the identified address range overlaps with the address range of the command CM in the database 151 (Yes in S2), the operation unit 10b2 determines whether there is an extension node EN subordinate to the leaf node LN corresponding to the overlapping address range (S5).

[0091] For example, Figure 6 In the database 151 shown in (a), three leaf nodes LN1 to LN3 are subordinate to the parent node PN1. Figure 6 1 is a diagram showing the operation of the database 151 when receiving a command. Three leaf nodes LN1 to LN3 are associated with three commands CM1 to CM3. The address range of the received command CM4 is 3 to 5, which overlaps with the address range 4 to 9 of the command CM1 of the leaf node LN1. In this case, the extended node EN does not belong to the leaf node LN1. The operating unit 10b2 determines that there is no extended node EN belonging to the leaf node LN1 corresponding to the overlapping address range.

[0092] or, Figure 7 In the database 151 shown in (a), three leaf nodes LN1 to LN3 are subordinate to the parent node PN1, and three leaf nodes LN6 to LN8 are subordinate to one leaf node LN1 via the extended node EN3. Figure 7 This is a diagram showing the operation of the database 151 when receiving a command. One leaf node LN1 is associated with commands CM5 to CM7 via an extension node EN3. Two leaf nodes LN2 to LN3 are associated with two commands CM2 to CM3. Two leaf nodes LN6 to LN7 are associated with three commands CM5 to CM7. The address range of the received command CM8 is 6 to 10, which overlaps with the address range 0 to 9 of the command CM1 of the leaf node LN1 and overlaps with the address range 10 of the command CM2 of the leaf node LN2. In this case, the extension node EN3 is subordinate to the leaf node LN1. The operating unit 10b2 determines that there is an extension node EN subordinate to the leaf node LN1 corresponding to the overlapping address range.

[0093] If there is no extension node EN (No in S5), the operation unit 10b2 creates and adds an extension node EN (S6), creates and adds a leaf node LN connected to the extension node EN (S7), and associates the movement command CM with the leaf node LN (S8).

[0094] For example, in Figure 6In the database 151 shown in (a), an extended node EN1 is created and added under the leaf node LN1. Figure 6 As shown in (b), a leaf node LN4 connected to the extension node EN1 is created and added, and the command CM1 is moved from the leaf node LN1 and associated with the leaf node LN4.

[0095] After S8 or when there is an extension node EN (Yes in S5), the operation unit 10b2 determines whether the address range of the command CM in S1 overlaps with that of the command CM corresponding to a plurality of leaf nodes LN (S9).

[0096] For example, in Figure 7 In the database 151 shown in (a), the address range 6 to 10 of the command CM8 overlaps with the address range 0 to 9 of the commands CM5 to CM7 of the leaf node LN1 and the address range 10 of the command CM2 of the leaf node LN2. The operation unit 10b2 determines that the command CM corresponding to multiple leaf nodes LN has an address range that overlaps with the command CM of S1.

[0097] If the address range of the command CM of S1 overlaps with the command CM corresponding to a plurality of leaf nodes LN ("Yes" in S9), the operation unit 10b2 creates and adds a leaf node LN connected to the extension node EN (S10). The operation unit 10b2 moves the command CM and associates it with the leaf node LN (S11), and integrates the plurality of leaf nodes LN corresponding to the overlapped address range (S12).

[0098] exist Figure 7 In the database 151 shown in (a), a leaf node LN9 connected to the extended node EN3 is created and added. The operation unit 10b2 moves the command CM2 and associates it with the leaf node LN9, and integrates the plurality of leaf nodes LN1 and LN2 corresponding to the overlapping address range to set it as a leaf node LN1b. Accordingly, the address range of the leaf node LN1b is changed to 0 to 10.

[0099] The operation unit 10b2 creates and adds an extension node EN subordinate to the extension node EN (S13), creates and adds a leaf node LN connected to the extension node EN (S14), and associates the command CM received in S1 with the leaf node LN (S15).

[0100] For example, the operation unit 10b2 is Figure 6 In the database 151 shown in (b), the extended node EN2 subordinate to the extended node EN1 is created and added. The operation unit 10b2 creates and adds the leaf node LN5 connected to the extended node EN2, and associates the received command CM4 with the leaf node LN5. Accordingly, the address range of the upper leaf node LN1a is changed to 3 to 9.

[0101] Alternatively, the operation unit 10b2 is Figure 7 In the database 151 shown in (b), the extended node EN4 subordinate to the extended node EN3 is created and added. The operation unit 10b2 creates and adds the leaf node LN10 connected to the extended node EN4, and associates the received command CM8 with the leaf node LN10.

[0102] Next, use Figure 8 The following describes the operation when commands are combined. Figure 8 This is a flowchart showing the operation when commands are merged.

[0103] The control unit 10a waits until the timing at which the commands should be merged is reached ("No" in S21). The control unit 10a may also determine that the timing at which the commands CM should be merged has arrived in accordance with the passage of a predetermined period. The control unit 10a may also determine that the timing at which the commands CM should be merged has arrived in accordance with an idle period in which the processing load of the disk device 10 is below a threshold value for more than a predetermined time.

[0104] When it is time to merge the commands CM (Yes in S21), the control unit 10a provides a request for merging the commands CM to the operation unit 10b2. The operation unit 10b2 accesses the database 151 and performs a linear search on the leaf node LN of the upper layer (S22). The operation unit 10b2 may also perform a bidirectional linear search using the central leaf node LN of the upper layer as a reference.

[0105] For example, in Fig. 9 In the database 151 shown in (a), the leaf node LN2 of the upper leaf nodes LN1 to LN3 is located in the center in address order. The operation unit 10b2 can perform a linear search for leaf nodes LN subordinate to multiple extension nodes EN in both ascending and descending directions in address order based on leaf node LN2.

[0106] As a result of the linear search, if there are no multiple extended nodes EN subordinate to any leaf node LN (No in S23), the operation unit 10b2 determines that there are no commands CM with overlapping address ranges in the database 151 and ends the processing.

[0107] If there are multiple extension nodes EN subordinate to the leaf node LN (Yes in S23), the operation unit 10b2 sequentially performs linear search on the leaf nodes LN connected to the multiple extension nodes EN (S24). The operation unit 10b2 determines the type and address range of the command CM associated with the leaf node LN for each of the leaf nodes LN connected to the multiple extension nodes EN.

[0108] For example, in Fig. 9 In the database 151 shown in (a), multiple extension nodes EN3, EN5, and EN6 are subordinate to the leaf node LN1. The operation unit 10b2 performs a linear search on the leaf nodes LN6 and LN7 connected to the extension node EN3, and determines that the types of commands CM5, CM6, and CM7 associated with the leaf nodes LN6 and LN7 are all write commands, and the address ranges of commands CM5, CM6, and CM7 are 0 to 3, 5 to 7, and 8 to 9. The operation unit 10b2 performs a linear search on the leaf node LN11 connected to the extension node EN5, and determines that the type of command CM9 associated with the leaf node LN11 is a write command, and the address range of command CM9 is 4 to 5. The operation unit 10b2 performs a linear search on the leaf node LN12 connected to the extension node EN6, and determines that the type of command CM10 associated with the leaf node LN12 is a write command, and the address range of command CM10 is 4 to 5.

[0109] As a result of S24, if there is no duplication of address ranges in the same type of commands CM (No in S25), the operation unit 10b2 ends the processing.

[0110] If there is duplication of address ranges in commands CM of the same type (Yes in S25 ), the operation unit 10 b 2 merges a plurality of commands CM of the same type whose address ranges overlap ( S26 ).

[0111] For example, in Fig. 9 In the database 151 shown in (a), the operation unit 10b2 combines a plurality of commands CM5, CM6, CM7, CM9, and CM10 of the same type whose address ranges overlap, and sets them as command CM11. Accordingly, the operation unit 10b2 integrates the extension nodes EN3, EN5, and EN6 into the extension node EN3a, and integrates the leaf nodes LN6, LN7, LN11, and LN12 into the leaf node LN6a and connects them to the extension node EN3a. The operation unit 10b2 associates the command CM11 with the leaf node LN6a, and changes the address range of the leaf node LN6a to 0 to 9.

[0112] Next, use Fig.10 Describes the actions that occur when the command is executed. Fig.10 This is a flowchart showing the actions when the command is executed.

[0113] In the disk device 10, the control unit 10a waits until the timing to execute the command CM comes (No in S31).

[0114] When the timing for executing the command CM is reached (Yes in S31), the control unit 10a provides the selection unit 10b3 with a request to select from the database 151 of the command CM to be executed. In response to the request, the selection unit 10b3 accesses the database 151 and performs a linear search on the leaf node LN of the upper layer to determine whether the requested command CM is stored. The selection unit 10b3 may also perform a bidirectional linear search based on the central leaf node LN of the upper layer.

[0115] For example, in Fig.11 In the database 151 shown in (a), the selection unit 10b3 can perform a linear search in both ascending and descending directions according to the address order, with the central leaf node LN2 among the upper leaf nodes LN1 to LN3 as a reference. As a result of the linear search, the selection unit 10b3 determines that none of the upper leaf nodes LN1 to LN3 holds the requested command CM5. The address range of the command CM5 is 0 to 3.

[0116] Or, in Fig.12 In the database 151 shown in (a), the selection unit 10b3 can perform a linear search in both ascending and descending directions according to the address order, with the central leaf node LN2 among the upper leaf nodes LN1c to LN3 as a reference. As a result of the linear search, the selection unit 10b3 determines that none of the upper leaf nodes LN1c to LN3 holds the requested command CM12. The address range of the command CM12 is 3 to 9.

[0117] If the leaf node LN of the upper layer holds the requested command CM ("Yes" in S32), the selection unit 10b3 selects the command CM from the leaf node LN of the upper layer and provides it to the control unit 10a as an output command. The control unit 10a executes the provided command CM. At the same time, the control unit 10a issues a request for deletion based on the information of the selected command CM and provides it to the operation unit 10b2. The operation unit 10b2 deletes the selected command CM from the leaf node LN of the upper layer (S33).

[0118] If the leaf node LN of the upper layer does not hold the requested command CM (No in S32), the selection unit 10b3 performs a linear search on the leaf nodes LN of the lower layer. The selection unit 10b3 selects a command CM from the leaf node LN of the lower layer and provides it to the control unit 10a as an output command. The control unit 10a executes the provided command CM.

[0119] At the same time, the control unit 10a issues a request for deletion based on the information of the selected command CM and provides it to the operation unit 10b2. The operation unit 10b2 deletes the selected command CM from the leaf node LN of the lower layer (S33).

[0120] For example, in Fig.11In the database 151 shown in (a), the selection unit 10b3 performs a linear search on the leaf node LN6 of the second level. As a result of the linear search, the selection unit 10b3 determines that the leaf node LN6 of the second level holds the requested command CM5. The selection unit 10b3 selects the command CM5 from the leaf node LN6 of the second level and provides it to the control unit 10a as an output command. The control unit 10a executes the provided command CM5. At the same time, the control unit 10a issues a request for deletion based on the information of the selected command CM5 and provides it to the operation unit 10b2. The operation unit 10b2 deletes the command CM5 from the leaf node LN6 of the lower layer.

[0121] Or, in Fig.12 In the database 151 shown in (a), the selection unit 10b3 performs a linear search on the leaf node LN13 of the second level. As a result of the linear search, the selection unit 10b3 determines that the leaf node LN13 of the second level holds the requested command CM12. The selection unit 10b3 selects the command CM12 from the leaf node LN13 of the second level and provides it to the control unit 10a as an output command. The control unit 10a executes the provided command CM12. At the same time, the control unit 10a issues a request for deletion based on the information of the selected command CM12 and provides it to the operation unit 10b2. The operation unit 10b2 deletes the command CM12 from the leaf node LN13 of the lower layer.

[0122] The operation unit 10b2 deletes the leaf node LN from which all the commands CM have been deleted (S35), and as a result of the deletion, determines whether there is no leaf node LN connected to the extension node EN (S36).

[0123] If there is a leaf node LN connected to the extension node EN (No in S36), the operation unit 10b2 ends the processing.

[0124] If there is no leaf node LN connected to the extension node EN (Yes in S36), the operation unit 10b2 deletes the extension node EN (S37), and as a result of the deletion, determines whether there is no extension node EN subordinate to the upper leaf node LN (S38).

[0125] If there is an extension node EN subordinate to the leaf node LN in the upper layer (No in S38), the operation unit 10b2 ends the processing.

[0126] For example, in Fig.11 In the database 151 shown in (a), the operation unit 10b2 deletes the leaf node LN6 in which the command CM5 has been deleted. The operation unit 10b2 determines that the deletion result is that there is no leaf node LN connected to the expansion node EN3, and deletes the expansion node EN3. As a result, the database 151 becomes Fig.11The operation unit 10b2 determines that there is an extended node EN7 subordinate to the upper leaf node LN1c as a result of deletion. The operation unit 10b2 changes the address range of the upper leaf node LN1c to 3 to 9 and ends the processing.

[0127] If there is no extended node EN subordinate to the leaf node LN in the upper layer (Yes in S38), the operation unit 10b2 deletes the leaf node in the upper layer (S39).

[0128] For example, in Fig.12 In the database 151 shown in (a), the operation unit 10b2 deletes the leaf node LN13 from which the command CM12 has been deleted. The operation unit 10b2 determines that the result of the deletion is that there is no leaf node LN connected to the extension node EN7, and deletes the extension node EN7. The operation unit 10b2 determines that the result of the deletion is that there is no extension node EN subordinate to the leaf node LN1c of the upper layer, and deletes the leaf node LN1c of the upper layer. As a result, the database 151 becomes Fig.12 The state shown in (b).

[0129] As described above, in the present embodiment, in the disk device 10, the controller 19 manages commands using the database 151. The database 151 is associated with the address range of the command CM and is arranged in a tree shape according to the address and time series of the command CM. For example, as the data structure of the database 151, a structure equivalent to the function of managing the address range of the command and the function of managing the time series of the command is added to the data structure of the B+ tree. Thus, it is possible to manage the duplication of the address range of the command CM in a time series. As a result, in the database 151, a linear search for investigating the command CM with a duplicate or close address range can be efficiently performed, and for example, the command CM can be efficiently merged.

[0130] In addition, in the present embodiment, in the disk device 10, in the database 151, each leaf node LN is associated with a pair of secret keys SK and EK representing the address range of the command, so that the duplication of the address range of the command CM can be managed. In the database 151, the leaf nodes LN corresponding to the repeated address range are connected in multiple levels. In the multiple levels, below the third level from the top, the lower level is newer than the upper level in terms of time. As a result, as the data structure of the database 151, a structure equivalent to the function of managing the address range of the command and the function of managing the time series of the command can be added to the data structure of the B+ tree. As a result, for the database 151, the advantages of the B+ tree data structure can be retained unchanged, and it can be improved to be able to manage the duplication of the address range of the command CM in a time series.

[0131] For example, in command selection of the disk device 10, when the oldest command among commands whose address ranges overlap is of interest, they are managed in the database 151 in a state in which they can be easily selected.

[0132] In addition, in the database 151, functions such as expansion nodes EN are added according to the duplication of the address range. Therefore, in the database 151, the function is not expanded in the state where there is no duplication of the address range, and the data structure is not affected by the time information. Thus, in the database 151, the size of the data structure and the redundancy of its update processing are suppressed.

[0133] In addition, the database 151 may also be a structure in which the expansion node EN is omitted. In this case, the leaf node LN at the beginning of each level can have a function equivalent to the expansion node EN. The branch BR of the leaf node LN at the upper level stores a pointer to the leaf node LN at the beginning of the lower level. For the leaf node LN at the beginning of each level, when connecting to other leaf nodes LN, a pointer to the leaf node LN of the connection destination is stored in its branch BR. For the leaf node LN at the beginning of each level, when the leaf node LN at the beginning of the lower level is further subordinate, a pointer to the leaf node LN of the subordinate destination is stored.

[0134] As a first variation of the embodiment, the controller 19 may be configured as follows: Fig.13 As shown, when a command is received, the extended nodes EN in the database 151 are integrated. Fig.13 This is a flowchart showing the operation when a command is received.

[0135] In the disk device 10, the control unit 10a waits until receiving a command (No in S41).

[0136] When the control unit 10a receives the command CM ("Yes" in S41), it provides the received command CM and a request for addition to the operation unit 10b2. The operation unit 10b2 determines the address range from the address and data size included in the command. According to the request, the operation unit 10b2 accesses the database 151 and determines whether the branch BR with the smallest address among the leaf nodes LN whose address range overlaps with the command CM has an expansion node EN (S42).

[0137] If the branch BR with the smallest address does not have an extension node EN (No in S42), the operation unit 10b2 creates an extension node EN for the branch BR with the smallest address (S43), and advances the process to S44.

[0138] If the branch BR with the smallest address has an extended node EN (Yes in S42), the operation unit 10b2 determines whether an address larger than the address of the branch BR selected in S42 and with an overlapping address range exists in the leaf node LN selected in S42 or a leaf node LN adjacent thereto (S44).

[0139] When an address larger than the address of the branch BR selected in S42 and having an overlapping address range exists in the leaf node LN selected in S42 or the leaf node LN adjacent thereto ("Yes" in S44), the operation unit 10b2 determines whether a branch BRn (initial value: n=2) having an address larger than the branch BR selected in S42 in the leaf node LN selected in S42 or the leaf node LN adjacent thereto has a command CM (S45).

[0140] When a branch BRn having a larger address than the branch BR selected in S42 among the leaf node LN selected in S42 or the leaf node LN adjacent thereto has a command CM ("Yes" in S45), the operation unit 10b2 moves the command CM of the branch BRn to the extension node EN of the branch BR selected in S42 (S46). The operation unit 10b2 increments n and returns the process to S44.

[0141] When the branch BRn having an address larger than the branch BR selected in S42 in the leaf node LN selected in S42 or the leaf node LN adjacent thereto does not have the command CM ("No" in S45), the operation unit 10b2 sets the initial value 1 for k and determines whether the branch BRn having an address larger than the branch BR selected in S42 has an extended node EN (S47).

[0142] When the branch BRn having an address larger than the branch BR selected in S42 has an extension node EN ("Yes" in S47), the operation unit 10b2 moves and connects the leaf node LN possessed by the earliest extension node EN among the extension nodes EN managed by the branch BRn together with the command CM to the kth earliest extension node EN among the extension nodes EN managed by the branch BR selected in S42, and deletes the extension node EN that no longer has the leaf node LN after the move (S48).

[0143] Thereafter, the operation unit 10b2 determines whether or not there is an expansion node EN that is (k+1)th earlier than the expansion node EN of the branch BR selected in S42 (S49).

[0144] When there is an extension node EN that is (k+1th) earlier (Yes in S49), the operation unit 10b2 increments k and returns the process to S47.

[0145] When there is no (k+1th) earliest extension node EN (No in S49), the operation unit 10b2 determines whether there is an extension node EN included in the branch BRn (S50).

[0146] When there is an expansion node EN of the branch BRn (Yes in S50), the operation unit 10b2 connects all the expansion nodes EN of the branch BRn after the k+1th one (S51) while maintaining the connection of the expansion node EN of the branch BRn, and enters the processing into S52.

[0147] When the expansion node EN of the branch BRn does not exist (No in S50), the operation unit 10b2 deletes the branch BRn (S52) because the branch BRn has neither the command CM nor the expansion node EN, and returns the process to S44.

[0148] When an address that is larger than the address of the branch BR selected in S42 and has an overlapping address range does not exist in the leaf node LN selected in S42 or the leaf node LN adjacent to it ("No" in S44), the operating unit 10b2 newly connects the latest extension node EN among the extension nodes EN managed by the branch BR selected in S42 on a new side of the time series and inserts the command CM of S41 (S53).

[0149] In this way, in the disk device 10 , when receiving a command, the controller 19 can integrate and organize the extended nodes EN in the database 151 and add the received command CM to the database 151 .

[0150] As a second variation of the implementation method, the database 151 may also be connected to Fig.13 The operation of the disk device 10 shown is accordingly as follows. Figure 14 to Figure 16 Operate as shown. Fig.14 (a) Fig.14 (b) Fig.15 (a) Fig.15 (b) Fig.16 Each of these is a diagram showing the operation of the database when a command is received.

[0151] exist Fig.14 In the database 151 shown in (a), three leaf nodes LN14, LN15, and LN16 are subordinate to the parent node PN3, and accordingly, there are four branches BR1, BR2, BR3, and BR4.

[0152] When command CM28 is received ("Yes" in S41), it is requested to add. The address range of command CM28 is 3 to 13. Among the leaf nodes LN14, LN15, and LN16 whose address ranges overlap, the branch BR with the smallest address is branch BR1. Extension node EN8 is subordinate to branch BR1. Operation unit 10b2 determines that branch BR1 with the smallest address has extension node EN8 ("Yes" in S42).

[0153] The address range of branch BR1 is 0 to 5. The address range 6 to 7, which is larger than the address range 0 to 5 and overlaps with the address range, exists in leaf node LN 15. The operation unit 10b2 determines that an address larger than the address of the branch BR selected in S42 and overlapping with the address range exists in the leaf node LN selected in S42 or a leaf node LN adjacent thereto ("Yes" in S44).

[0154] The command CM22 is associated with the branch BR2 of the leaf node LN15. The operation unit 10b2 determines that the branch BRn (=BR2) having a larger address than the branch BR selected in S42 in the leaf node LN selected in S42 or the adjacent leaf node LN has the command CM (Yes in S45).

[0155] Correspondingly, if Fig.14 As shown in (b), the operation unit 10b2 moves the command CM22 of the branch BR2 together with the leaf node LN15 to the expansion node EN8 of the branch BR1 (S46). The operation unit 10b2 adds the leaf node LN15 to the expansion node EN8. The command CM22 is associated with the leaf node LN15. Accordingly, the operation unit 10b2 changes the address range of the leaf node LN14 to 0 to 7.

[0156] The operation unit 10b2 increments n to set n=3.

[0157] The address range of branch BR1 is 0 to 5. The address range 12 to 13, which is larger than the address range 0 to 5 and has an overlapping address range, exists in leaf node LN 19. The operation unit 10b2 determines that an address larger than the address of the branch BR selected in S42 and having an overlapping address range exists in the leaf node LN selected in S42 or a leaf node LN adjacent thereto ("Yes" in S44).

[0158] exist Fig.14 In the database 151 shown in (b), the command CM does not belong to the branch BR3. The operation unit 10b2 determines that the branch BRn (= BR3) with a larger address than the branch BR selected in S42 in the leaf node LN selected in S42 or the leaf node LN adjacent thereto does not have the command CM ("No" in S45). The operation unit 10b2 sets the initial value 1 for k.

[0159] exist Fig.14 In the database 151 shown in (b), the expansion nodes EN9, EN10, EN11 belong to the branch BR3. The operation unit 10b2 determines that the branch BRn (= BR3) having a larger address than the branch BR selected in S42 has the expansion nodes EN9, EN10, EN11 (Yes in S47).

[0160] The operation unit 10b2 moves and connects the leaf nodes LN19 and LN20 of the earliest expansion node EN9 among the expansion nodes EN9, EN10, and EN11 managed by the branch BRn (= BR3) together with the commands CM24 and CM25 to the kth (= 1st) earliest expansion node EN8 among the expansion nodes EN8 managed by the branch BR1 selected in S42, and deletes the expansion node EN9 that no longer has the leaf nodes LN19 and LN20 after the move (S48). Accordingly, the operation unit 10b2 changes the address range of the leaf node LN14 to 0 to 15. The database 151 becomes Fig.15 The state shown in (a).

[0161] exist Fig.15 In the database 151 shown in (a), there is no expansion node EN that is the second earliest than the expansion node EN8 in the branch BR1. The operation unit 10b determines that there is no expansion node EN that is the k+1th (= second)th earliest in the branch BR1 selected in S42 (No in S49).

[0162] exist Fig.15 In the database 151 shown in (a), the extension nodes EN10 and EN11 belong to the branch BR3. The operation unit 10b2 determines that the extension nodes EN10 and EN11 included in the branch BRn (= BR3) exist (Yes in S50).

[0163] The operation unit 10b2 connects all the extension nodes EN10 and EN11 of the branch BRn (= BR3) to the k+1th (= 2nd) extension node EN8 of the branch BR1 while maintaining the connection (S51). Accordingly, the operation unit 10b2 changes the address range of the leaf node LN14 to 0-18.

[0164] Since the branch BRn (= BR3) has neither the command CM nor the expansion node EN, the operation unit 10b2 deletes the branch BRn (= BR3) (S52). As a result, the database 151 becomes Fig.15 The state shown in (b).

[0165] The operation unit 10b2 increments n to set n=4.

[0166] exist Fig.15 In the database 151 shown in (b), the address range of branch BR1 is 0 to 18. The address range of the received command CM28 is 3 to 13. The operation unit 10b2 determines that there is no address range larger than the address range 0 to 18 and the address range overlaps with the command CM28. The operation unit 10b2 determines that an address larger than the address of branch BR1 selected in S42 and the address range overlaps does not exist in the leaf node LN selected in S42 or the leaf node LN adjacent thereto ("No" in S44).

[0167] The operation unit 10b2 connects the newest expansion node EN11 among the expansion nodes EN8, EN10, and EN11 managed by the branch BR1 selected in S42 to the new side of the time series, and inserts the command CM28 of S41 (S53). The operation unit 10b2 connects the expansion node EN12 so as to be subordinate to the expansion node EN11, and connects the leaf node LN23 to the expansion node EN12. The operation unit 10b2 associates the command CM28 with the leaf node LN23, and sets the address range of the leaf node LN23 to 3 to 13.

[0168] In this way, in the disk device 10 , when receiving a command, the controller 19 can integrate and organize the extended nodes in the database 151 and add the received command CM to the database 151 .

[0169] As a third variation of the implementation method, the database 151 may also be connected to Fig.13 The operation of the disk device 10 shown is accordingly as follows. Figures 17 to 20 Operate as shown. Fig.17 (a) Fig.17 (b) Fig.18 (a) Fig.18 (b) Fig.19 (a) Fig.19 (b) Fig. 20 Each of these is a diagram showing the operation of the database when a command is received.

[0170] exist Fig.17 In the database 151 shown in (a), three leaf nodes LN14, LN15, and LN16 are subordinate to the parent node PN3, and correspondingly, there are four branches BR1, BR2, BR3, and BR4.

[0171] When command CM38 is received ("Yes" in S41), it is requested to add. The address range of command CM38 is 3 to 13, and the branch BR with the smallest address among the leaf nodes LN14, LN15, and LN16 with overlapping address ranges is branch BR1. Extension nodes EN13 and EN14 are subordinate to branch BR1. Operation unit 10b2 determines that branch BR1 with the smallest address has extension nodes EN13 and EN14 ("Yes" in S42).

[0172] The address range of branch BR1 is 0 to 5. The address range 6 to 7, which is larger than the address range 0 to 5 and has an overlapping address range, exists in leaf node LN 26. The operation unit 10b2 determines that an address larger than the address of the branch BR selected in S42 and having an overlapping address range exists in the leaf node LN selected in S42 or a leaf node LN adjacent thereto ("Yes" in S44).

[0173] exist Fig.17 In the database 151 shown in (a), the command CM does not belong to the branch BR2. The operation unit 10b2 determines that the branch BRn (= BR2) having a larger address than the branch BR selected in S42 among the leaf node LN selected in S42 or the leaf node LN adjacent thereto does not have the command CM ("No" in S45).

[0174] The operation unit 10b2 sets an initial value 1 for k.

[0175] exist Fig.17 In the database 151 shown in (a), the extension node EN15 is subordinate to the branch BR2. The operation unit 10b2 determines that the branch BRn (= BR2) having a larger address than the branch BR selected in S42 has the extension node EN15 (Yes in S47).

[0176] The operation unit 10b2 moves and connects the leaf node LN26 of the earliest expansion node EN15 among the expansion nodes EN15 managed by the branch BRn (= BR2) to the kth (= 1st) earliest expansion node EN13 among the expansion nodes EN13 and EN14 managed by the branch BR1 selected in S42, and deletes the expansion node EN15 that no longer has the leaf node LN26 after the move (S48). Accordingly, the operation unit 10b2 changes the address range of the leaf node LN14 to 0 to 7. The database 151 becomes Fig.17 The state shown in (b).

[0177] exist Fig.17In the database 151 shown in (b), the second earliest expansion node EN14 exists in the branch BR1. The operation unit 10b2 determines that the k+1th (= second) earliest expansion node EN14 exists in the expansion node EN of the branch BR1 selected in S42 ("Yes" in S49).

[0178] The operation unit 10b2 increments k and sets k=2.

[0179] exist Fig.17 In the database 151 shown in (b), the extension node EN does not belong to the branch BR2. The operation unit 10b2 determines that the branch BRn (= BR2) having a larger address than the branch BR selected in S42 does not have the extension node EN (No in S47).

[0180] Since the branch BRn (= BR2) has neither the command CM nor the expansion node EN, the operation unit 10b2 deletes the branch BRn (= BR2) (S52). As a result, the database 151 becomes Fig.18 The state shown in (a).

[0181] The operation unit 10b2 increments n to set n=3.

[0182] The address range of branch BR1 is 0 to 7. The address range 10 to 18, which is larger than the address range 0 to 7 and has an overlapping address range, exists in leaf node LN21. The operation unit 10b2 determines that an address larger than the address of the branch BR selected in S42 and having an overlapping address range exists in the leaf node LN selected in S42 or a leaf node LN adjacent thereto ("Yes" in S44).

[0183] exist Fig.18 In the database 151 shown in (a), the command CM does not belong to the branch BR3. The operation unit 10b2 determines that the branch BRn (= BR3) with a larger address than the branch BR selected in S42 in the leaf node LN selected in S42 or the leaf node LN adjacent thereto does not have the command CM ("No" in S45). The operation unit 10b2 sets the initial value 1 for k.

[0184] exist Fig.18 In the database 151 shown in (a), the extension nodes EN9 and EN10 are subordinate to the branch BR3. The operation unit 10b2 determines that the branch BRn (= BR3) having a larger address than the branch BR selected in S42 has the extension nodes EN9 and EN10 (Yes in S47).

[0185] The operation unit 10b2 moves and connects the leaf nodes LN19 and LN20 of the earliest expansion node EN9 among the expansion nodes EN9 and EN10 managed by the branch BRn (= BR3) to the kth (= 1st) earliest expansion node EN13 among the expansion nodes EN13 and EN14 managed by the branch BR1 selected in S42, and deletes the expansion node EN9 that no longer has the leaf nodes LN19 and LN20 after the move (S48). Accordingly, the operation unit 10b2 changes the address range of the leaf node LN14 to 0 to 15. The database 151 becomes Fig.18 The state shown in (b).

[0186] exist Fig.18 In the database 151 shown in (b), the second earliest expansion node EN14 exists in the branch BR1. The operation unit 10b2 determines that the k+1th (= second) earliest expansion node EN14 exists in the expansion node EN of the branch BR1 selected in S42 ("Yes" in S49).

[0187] The operation unit 10b2 increments k and sets k=2.

[0188] exist Fig.18 In the database 151 shown in (b), the extension node EN10 is subordinate to the branch BR3. The operation unit 10b2 determines that the branch BRn (= BR3) having a larger address than the branch BR selected in S42 has the extension node EN10 (Yes in S47).

[0189] The operation unit 10b2 moves and connects the leaf node LN21 of the earliest expansion node EN10 among the expansion nodes EN10 managed by the branch BRn (= BR3) to the kth (= 2nd) earliest expansion node EN14 among the expansion nodes EN13 and EN14 managed by the branch BR1 selected in S42, and deletes the expansion node EN10 that no longer has the leaf node LN21 after the move (S48). Accordingly, the operation unit 10b2 changes the address range of the leaf node LN14 to 0 to 18. The database 151 becomes Fig.19 The state shown in (a).

[0190] exist Fig.19 In the database 151 shown in (a) of FIG. 1 , the extension node EN does not belong to the branch BR3. The operation unit 10b2 determines that there is no extension node EN in the branch BRn (= BR3) (No in S50).

[0191] Since the branch BRn (= BR3) has neither the command CM nor the expansion node EN, the operation unit 10b2 deletes the branch BRn (= BR3) (S52). As a result, the database 151 becomes Fig.19 The state shown in (b).

[0192] The operation unit 10b2 increments n to set n=4.

[0193] exist Fig.19 In the database 151 shown in (b), the address range of the branch BR1 is 0 to 18. The address range of the received command CM38 is 3 to 13. The operation unit 10b2 determines that there is no address range larger than the address range 0 to 18 and the address range overlaps with the command CM38. The operation unit 10b2 determines that the address larger than the address of the branch BR1 selected in S42 and the address range overlaps does not exist in the leaf node LN selected in S42 or the leaf node LN adjacent thereto ("No" in S44).

[0194] The operation unit 10b2 connects the newest expansion node EN14 among the expansion nodes EN13 and EN14 managed by the branch BR1 selected in S42 to the new side of the time series, and inserts the command CM38 of S41 (S53). The operation unit 10b2 connects the expansion node EN16 so as to be subordinate to the expansion node EN14, and connects the leaf node LN27 to the expansion node EN16. The operation unit 10b2 associates the command CM38 with the leaf node LN27, and sets the address range of the leaf node LN27 to 3 to 13. Thus, the database 151 becomes Fig. 20 Status shown.

[0195] In this way, in the disk device 10 , the controller 19 can add the received command CM to the database 151 while integrating and organizing the extended nodes in the database 151 when receiving a command.

[0196] Several embodiments of the present invention are described above, but these embodiments are presented as examples and are not intended to limit the scope of the invention. These new embodiments can be implemented in various other ways, and various omissions, substitutions, and changes can be made without departing from the gist of the invention. These embodiments and / or their modifications are included in the scope and gist of the invention, and are included in the invention described in the claims and their equivalents.

Claims

1. A disk device comprising: Disk media, recording data according to addresses; Memory; and The controller generates or updates a database and stores it in the memory in response to receiving a command including the address. The database includes a tree-like arrangement associated with the address range of the command and corresponding to the address and time sequence of the command, The controller manages commands using the database.

2. The disk device according to claim 1, The database includes: The first leaf node is associated with two keys representing the address range of the command; as well as The second leaf node is subordinate to the first leaf node and is associated with two keys representing the address range of the command.

3. The disk device according to claim 2, The database also includes a parent node associated with a secret key, The first leaf node is subordinate to the parent node.

4. The disk device according to claim 3, The database also includes a third leaf node, which is subordinate to the second leaf node and is associated with two keys representing the address range of the command.

5. The disk device according to claim 2, The command included in the second leaf node is newer in time than the command included in the first leaf node, The address range represented by the two keys of the first leaf node and the address range represented by the two keys of the second leaf node subordinate to the first leaf node at least partially overlap.

6. The disk device according to claim 3, The database also includes: A first extension node connecting the parent node to the first leaf node; and A second extension node connecting the first leaf node and the second leaf node.

7. The disk device according to claim 4, The database also includes: A first extension node connecting the parent node to the first leaf node; A second extension node connecting the first leaf node and the second leaf node; as well as A third extension node connecting the second leaf node and the third leaf node.

8. A command management method, comprising: In a disk device having a disk medium and a memory for recording data according to an address, receiving a command including an address; In response to the received command, a database including a tree-like arrangement associated with an address range of the command and corresponding to the address and time sequence of the command is constructed or updated and stored in the memory; as well as The commands are managed using the database.

9. The command management method according to claim 8, The database includes: Parent node, associated with 1 secret key; The first leaf node is subordinate to the parent node and is associated with two keys representing the address range of the command; as well as The second leaf node is subordinate to the first leaf node and is associated with two keys representing the address range of the command.

Citation Information

Patent Citations

  • HOT-DIP Al-Zn ALLOY-PLATED STEEL SHEET AND MANUFACTURING METHOD FOR THE SAME

    JP2023143619A