TWI651646B - Data storage device and task ordering method thereof - Google Patents

Data storage device and task ordering method thereof Download PDF

Info

Publication number
TWI651646B
TWI651646B TW106114698A TW106114698A TWI651646B TW I651646 B TWI651646 B TW I651646B TW 106114698 A TW106114698 A TW 106114698A TW 106114698 A TW106114698 A TW 106114698A TW I651646 B TWI651646 B TW I651646B
Authority
TW
Taiwan
Prior art keywords
task
tasks
data storage
executed
storage device
Prior art date
Application number
TW106114698A
Other languages
Chinese (zh)
Other versions
TW201738730A (en
Inventor
謝兆魁
Original Assignee
慧榮科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 慧榮科技股份有限公司 filed Critical 慧榮科技股份有限公司
Priority to TW106114698A priority Critical patent/TWI651646B/en
Publication of TW201738730A publication Critical patent/TW201738730A/en
Application granted granted Critical
Publication of TWI651646B publication Critical patent/TWI651646B/en

Links

Abstract

一種資料儲存裝置及其任務排序方法。所述資料儲存裝置包括資料儲存媒體及控制單元。控制單元用以電性連接及控制資料儲存媒體,並可切換至指令佇列模式以接收主機所發送的包括至少一個任務的佇列指令,並判斷佇列指令所包括的任務是否為待執行的任務,且將待執行的任務排序,並選擇性地回覆佇列狀態資訊給主機,佇列狀態資訊包含對應至待執行的任務的任務數量以及對應至排序後的待執行的任務的任務編號。 A data storage device and a task sorting method thereof. The data storage device includes a data storage medium and a control unit. The control unit is configured to electrically connect and control the data storage medium, and switch to the command queue mode to receive the queue instruction including the at least one task sent by the host, and determine whether the task included in the queue instruction is to be executed. The task sorts the tasks to be executed and selectively responds to the queue status information to the host. The queue status information includes the number of tasks corresponding to the task to be executed and the task number corresponding to the sorted task to be executed.

Description

資料儲存裝置及其任務排序方法 Data storage device and task scheduling method thereof

本發明是有關於一種資料結構的相關技術,尤其是有關於一種資料儲存裝置、控制此資料儲存裝置的控制單元及任務排序方法。 The present invention relates to a related art structure, and more particularly to a data storage device, a control unit for controlling the data storage device, and a task sequencing method.

在習知技術中,主機(例如電腦、手機)會依照工業規格而發送一個特定的命令給與其電性連接的資料儲存裝置(例如快閃記憶體等),而資料儲存裝置會因應此命令而回覆主機有哪些任務(task)已準備好要被執行,然後主機才會接著發送一個存取命令以通知資料儲存裝置是要進行讀或寫的操作。 In the prior art, a host (such as a computer or a mobile phone) sends a specific command to a data storage device (such as a flash memory or the like) electrically connected thereto according to an industrial specification, and the data storage device responds to the command. The reply host has which tasks are ready to be executed, and then the host will then send an access command to notify the data storage device that it is going to read or write.

然而,現有技術的資料儲存裝置雖然可以回覆複數個待執行的任務給主機,但是主機並不能判斷這些待執行任務的執行順序。例如,資料儲存裝置可以有效率地執行某一任務,但是主機實際上卻是要求資料儲存裝置去執行另一個任務,進而使得資料儲存裝置必須重新安排適當的系統資源以便完成此任務之執行。因此,如何讓主機與資料儲存裝置能夠更有效率地溝通並安排執行任務的執行,便成為本領域技術人員所亟欲探討的課題。 However, although the prior art data storage device can reply to a plurality of tasks to be executed to the host, the host cannot judge the execution order of the tasks to be executed. For example, a data storage device can perform a certain task efficiently, but the host actually requires the data storage device to perform another task, so that the data storage device must rearrange the appropriate system resources to perform the task. Therefore, how to enable the host and the data storage device to communicate more efficiently and arrange the execution of the task is a subject that those skilled in the art would like to explore.

本發明提供一種資料儲存裝置,其能夠更有效率地與主機進行溝通。 The present invention provides a data storage device that can communicate with a host more efficiently.

本發明又提供一種控制單元,其能夠使主機更有效率地存取上述的資料儲存裝置所儲存的資料。 The present invention further provides a control unit that enables the host to more efficiently access data stored by the data storage device.

本發明另提供一種適用於上述資料儲存裝置的任務排序方法。 The present invention further provides a task ordering method suitable for the above data storage device.

本發明提出的一種資料儲存裝置包括了資料儲存媒體及控制單元。控制單元用以電性連接及控制資料儲存媒體,並可切換至指令佇列模式以接收主機所發送的包括至少一個任務的佇列指令,並判斷佇列指令所包括的任務是否為待執行的任務,且將待執行的任務排序,並選擇性地回覆佇列狀態資訊給主機,佇列狀態資訊包含對應至待執行的任務的任務數量以及對應至排序後的待執行的任務的任務編號。 A data storage device provided by the present invention includes a data storage medium and a control unit. The control unit is configured to electrically connect and control the data storage medium, and switch to the command queue mode to receive the queue instruction including the at least one task sent by the host, and determine whether the task included in the queue instruction is to be executed. The task sorts the tasks to be executed and selectively responds to the queue status information to the host. The queue status information includes the number of tasks corresponding to the task to be executed and the task number corresponding to the sorted task to be executed.

本發明又提出的一種控制單元包括了控制邏輯、介面邏輯以及微處理器。微處理器電性連接控制邏輯與介面邏輯,並用以透過控制邏輯存取資料儲存媒體中的資料,還用以透過介面邏輯接收主機所發送的佇列指令,佇列指令包括至少一個任務,並判斷佇列指令所包括的任務是否為待執行的任務,並排序待執行的任務,並選擇性地回覆佇列狀態資訊給主機,佇列狀態資訊包含對應至待執行的任務的任務數量以及對應至排序後的待執行的任務的任務編號。 A control unit further proposed by the present invention includes control logic, interface logic, and a microprocessor. The microprocessor is electrically connected to the control logic and the interface logic, and is configured to access the data in the data storage medium through the control logic, and is further configured to receive, by the interface logic, the queue instruction sent by the host, the queue instruction includes at least one task, and Determining whether the task included in the queue instruction is a task to be executed, and sorting the task to be executed, and selectively replying the queue status information to the host, and the queue status information includes the number of tasks corresponding to the task to be executed and corresponding The task number to the task to be executed after sorting.

本發明另提出適用於資料儲存裝置的一種任務排序方法,其包括下列步驟:切換至指令佇列模式;接收來自於主機的佇列指令,佇列指令包含至少一個任務;佇列上述佇列指令所包含的任務;判斷所佇列的任務是否為待執行的任務;將待執行的任務排列;以及選擇性地回覆佇列狀態 資訊至主機,佇列狀態資訊包括對應至所述待執行的任務的任務數量以及對應至排序後的待執行的任務的任務編號。 The invention further provides a task sorting method suitable for a data storage device, comprising the steps of: switching to an instruction queue mode; receiving a queue instruction from a host, the queue instruction comprising at least one task; The tasks included; determine whether the tasks listed are tasks to be executed; rank the tasks to be executed; and selectively reply to the queue status The information to the host, the queue status information includes the number of tasks corresponding to the task to be executed and the task number corresponding to the sorted task to be executed.

本發明的資料儲存裝置能夠因應主機的佇列指令而回覆包含已排序的待執行任務的任務數量以及任務編號的佇列狀態資訊給主機,因此主機能夠藉此判斷有多少個待執行的任務,並且依據排序的先後來依序執行這些待執行的任務,藉此提高任務執行的效率。 The data storage device of the present invention can respond to the host's queue command to reply to the host including the number of tasks to be executed and the queue status information of the task number, so that the host can determine how many tasks to be executed. And the tasks to be executed are sequentially executed according to the order of sorting, thereby improving the efficiency of task execution.

100‧‧‧主機 100‧‧‧Host

200‧‧‧資料儲存裝置 200‧‧‧ data storage device

210‧‧‧控制單元 210‧‧‧Control unit

220‧‧‧資料儲存媒體 220‧‧‧Data storage media

212‧‧‧介面邏輯 212‧‧‧Interface logic

214‧‧‧微處理器 214‧‧‧Microprocessor

216‧‧‧控制邏輯 216‧‧‧Control logic

230‧‧‧佇列狀態資訊 230‧‧‧ Status information

CMD44、CMD45、CMD13、CMD46、CMD47‧‧‧指令 CMD44, CMD45, CMD13, CMD46, CMD47‧‧‧ instructions

S501、S502、S503、S504、S505、S506、S507‧‧‧步驟 Steps S501, S502, S503, S504, S505, S506, S507‧‧

圖1為本發明一實施例之資料儲存裝置以及與其電性連接的主機的示意圖。 1 is a schematic diagram of a data storage device and a host electrically connected thereto according to an embodiment of the present invention.

圖2為一般的指令佇列流程的示意圖。 Figure 2 is a schematic diagram of a general instruction queue process.

圖3為本發明一實施例的佇列狀態資訊的資料結構示意圖。 FIG. 3 is a schematic structural diagram of data of queue status information according to an embodiment of the present invention.

圖4為傳統的佇列狀態資訊的資料結構示意圖。 FIG. 4 is a schematic diagram of a data structure of a conventional queue state information.

圖5為本發明一實施例的任務排序方法的流程圖。 FIG. 5 is a flowchart of a task scheduling method according to an embodiment of the present invention.

圖1為本發明一實施例之資料儲存裝置以及與其電性連接的主機的示意圖。如圖1所示,主機100電性連接於資料儲存裝置200,主機100例如是以電腦、手機、平板、相機或是其他具運算功能的手持式電子裝置來實現。資料儲存裝置200包括控制單元210及資料儲存媒體220。控制單元210包括介面邏輯212、微處理器214及控制邏輯216。微處理器214電性連接介面邏輯212與控制邏輯216。微處理器214用以透過控制邏輯216存取資料儲存媒體220中的資料。微處理器214用以透過介面邏輯212接收主機100所發送的佇列指令,並因應所接收的佇列指令而回覆本發明佇列狀態資訊給主 機100,以通知主機100根據本發明佇列狀態資訊中所指定的任務排序來存取資料儲存媒體220所儲存的資料。資料儲存媒體220包括以非揮發性記憶體來實現,例如是以快閃記憶體(Flash memory)、磁阻式隨機存取記憶體(Magnetoresistive RAM)、鐵電隨機存取記憶體(Ferroelectric RAM)等具有長時間資料保存之記憶體裝置來實現。介面邏輯212為符合SATA介面(Serial Advanced Technology Attachment)、通用序列匯流排(Universal Serial Bus,USB)、快捷外設互聯標準(PCI Express,Peripheral Component Interconnect Express)、非揮發性記憶體儲存裝置(NVMe,Non-Volatile Memory Express)、通用快閃記憶體儲存裝置(UFS,Universal Flash Storage)、嵌入式多媒體記憶卡(eMMC,embeded MultiMedia Card)或SDIO介面(Secure Digital Input/Output)標準之介面邏輯。 1 is a schematic diagram of a data storage device and a host electrically connected thereto according to an embodiment of the present invention. As shown in FIG. 1 , the host 100 is electrically connected to the data storage device 200 . The host 100 is implemented, for example, by a computer, a mobile phone, a tablet, a camera, or other handheld electronic device with computing functions. The data storage device 200 includes a control unit 210 and a data storage medium 220. Control unit 210 includes interface logic 212, microprocessor 214, and control logic 216. The microprocessor 214 is electrically coupled to the interface logic 212 and the control logic 216. The microprocessor 214 is configured to access the data in the data storage medium 220 through the control logic 216. The microprocessor 214 is configured to receive the queue command sent by the host 100 through the interface logic 212, and respond to the queue status information of the present invention to the master according to the received queue command. The machine 100 notifies the host 100 to access the data stored in the data storage medium 220 according to the task order specified in the queue status information of the present invention. The data storage medium 220 is implemented by non-volatile memory, such as flash memory, magnetoresistive RAM, and ferroelectric RAM. Such as a memory device with long-term data storage to achieve. The interface logic 212 is a SATA interface (Serial Advanced Technology Attachment), a Universal Serial Bus (USB), a Peripheral Component Interconnect Express (PCI Express), and a non-volatile memory storage device (NVMe). , Non-Volatile Memory Express), Universal Flash Storage (UFS, Universal Flash Storage), Embedded Multimedia Memory Card (eMMC), or SDIO interface (Secure Digital Input/Output) standard interface logic.

下列將以eMMC版本5.1,發行日期為2015年2月,進行本發明之說明,但不以此為限。eMMC可支援最多32個資料傳輸任務的佇列,其中,資料傳輸任務(或簡稱為任務)可對應至資料讀取指令或資料寫入指令。圖2為一般的指令佇列流程的示意圖。當致能或切換至指令佇列(command queue)模式後,主機100發送佇列指令以傳送複數個任務至資料儲存裝置200進行佇列。佇列指令包括第44類指令(Command 44)及第45類指令(Command 45),其中,第44類指令為佇列指令參數,其內容包括:資料區塊(Block)數目、任務編號、資料傳輸方向、優先權等,其中,任務編號互不重複;第45類指令為佇列指令位址,其內容為任務所對應之邏輯資料區塊位址(LBA,Logical Block Address)。當佇列任務後,主機100發送第13類指令(Command 13)以查詢任務佇列的狀態,接著資料儲存裝置200會回覆佇列狀態資訊230至主機100。可選地,佇列狀態資訊230較佳為本發明佇列狀態資訊,亦可為傳統的佇列狀態資訊,資料儲存裝置200乃依據第13 類指令的要求以決定佇列狀態資訊230的內容。本發明佇列狀態資訊除了提供哪些佇列中的任務是待執行的(ready for execution)任務之外,更提供了待執行的任務的較佳(或建議的)執行順序,資料儲存裝置200依此順序來執行待執行的任務將具有較佳的效率。當收到佇列狀態資訊230後,主機100可發送第46類指令(Command 46)或第47類指令(Command 47)至資料儲存裝置200以執行佇列中的待執行的任務。 The following description of the present invention will be made with eMMC version 5.1 and issue date of February 2015, but is not limited thereto. The eMMC can support a queue of up to 32 data transfer tasks, wherein the data transfer task (or simply a task) can correspond to a data read command or a data write command. Figure 2 is a schematic diagram of a general instruction queue process. After enabling or switching to the command queue mode, the host 100 sends a queue command to transmit a plurality of tasks to the data storage device 200 for queue. The queue instruction includes a 44th type instruction (Command 44) and a 45th type instruction (Command 45), wherein the 44th type instruction is a queued instruction parameter, and the content includes: a number of data blocks (blocks), a task number, and a data. Transmission direction, priority, etc., wherein the task numbers are not repeated; the 45th type of instruction is a queued instruction address, and the content thereof is a logical data block address (LBA, Logical Block Address) corresponding to the task. After the task is queued, the host 100 sends a Type 13 command (Command 13) to query the status of the task queue, and then the data storage device 200 replies to the queue status information 230 to the host 100. Optionally, the queue status information 230 is preferably the status information of the present invention, and may also be the traditional status information. The data storage device 200 is based on the 13th. The requirements of the class instructions determine the contents of the queue status information 230. The queue status information of the present invention provides a better (or suggested) execution order of the tasks to be executed in addition to providing which tasks in the queue are ready for execution tasks, and the data storage device 200 This order to perform the tasks to be performed will be more efficient. Upon receipt of the queue status information 230, the host 100 may send a 46th type of command (Command 46) or a 47th type of command (Command 47) to the data storage device 200 to perform the task to be executed in the queue.

圖3為本發明一實施例的佇列狀態資訊的資料結構示意圖。如圖3所示,本發明佇列狀態資訊包含位元0到位元31所依序排列的32個位元。主機100發送第13類指令以獲取資料儲存裝置200所回覆的本發明佇列狀態資訊。如圖4所示,傳統的佇列狀態資訊的資料結構是以1個位元來表示對應的任務是否為待執行的任務,舉例來說,如果任務0、任務6、任務15及任務21是待執行的,在傳統的資料結構當中,位元0、位元6、位元15及位元21便會以二進制的1來表示,主機100方能夠藉此得知這些是待執行的任務。至於其他的任務,其對應的位元則是以二進制的0來表示。 FIG. 3 is a schematic structural diagram of data of queue status information according to an embodiment of the present invention. As shown in FIG. 3, the queue state information of the present invention includes 32 bits arranged in order from bit 0 to bit 31. The host 100 sends a Type 13 command to obtain the queue status information of the present invention that is replied to by the data storage device 200. As shown in FIG. 4, the data structure of the traditional queue state information is one bit to indicate whether the corresponding task is a task to be executed, for example, if task 0, task 6, task 15, and task 21 are To be executed, in the traditional data structure, bit 0, bit 6, bit 15, and bit 21 are represented by a binary one, and the host 100 can know that these are tasks to be executed. For other tasks, the corresponding bit is represented by a binary zero.

然而,傳統的佇列狀態資訊無法表示這些待執行的任務的執行順序,而執行順序的失當會導致資料儲存裝置200花費更長的時間及更多的系統資源以完成任務之執行,這將導致系統效能的低落。與傳統的佇列狀態資訊不同的是,本發明佇列狀態資訊包含待執行的任務的任務數量以及依據較佳任務執行排序來排列的複數個待執行的任務的任務編號,而待執行的任務數量以及待執行的任務的任務編號各自以複數個位元來分別表示。請參照圖3,在本實施例中,待執行的任務的任務數量是用32個位元中的位元0~2等3個位元來表示,本實施例的任務數量其最小數值為0,最大數值為7。例如,用位元0~2等3個位元來表示待執行任務數量為4,而每一個待執行任務的任務編號係各自以5個位元來表示並自位元4開始依序排列。例 如,若資料儲存裝置200欲告知主機100較佳任務執行排序依序為任務21、6、15、0等4個待執行任務,則位元4~8等5個位元會被用來表示第1個待執行任務是任務21,位元9~13等5個位元會被用來表示第2個待執行任務是任務6,位元14~18等5個位元會被用來表示第3個待執行任務是任務15,位元19~23等5個位元會被用來表示第4個待執行任務是任務0。 However, the traditional queue state information cannot indicate the execution order of the tasks to be executed, and the execution sequence may cause the data storage device 200 to take longer and more system resources to complete the task execution, which will result in System performance is low. Different from the traditional queue state information, the queue state information of the present invention includes the number of tasks of the task to be executed and the task numbers of the plurality of tasks to be executed arranged according to the preferred task execution order, and the task to be executed The number and the task number of the task to be executed are each represented by a plurality of bits. Referring to FIG. 3, in this embodiment, the number of tasks of the task to be executed is represented by 3 bits, such as bits 0~2 of 32 bits, and the minimum number of tasks in this embodiment is 0. The maximum value is 7. For example, three bits, such as bit 0~2, are used to indicate that the number of tasks to be executed is four, and the task numbers of each task to be executed are each represented by 5 bits and are sequentially arranged from bit 4. example For example, if the data storage device 200 is to inform the host 100 that the preferred task execution order is four tasks to be executed, such as tasks 21, 6, 15, 0, etc., 5 bits such as bits 4-8 are used to represent The first task to be executed is task 21, and 5 bits such as bits 9~13 are used to indicate that the second task to be executed is task 6, and five bits such as bits 14~18 are used to represent The third task to be executed is task 15, and 5 bits such as bits 19~23 are used to indicate that the fourth task to be executed is task 0.

特別說明的是,按照上述的資料結構所設計的本發明佇列狀態資訊,最多可以提供5個待執行的任務的任務編號,此乃受限於佇列狀態資訊230的長度為32位元。假設資料儲存裝置200可回覆多個本發明佇列狀態資訊至主機100,則所有待執行的任務可依其較佳的執行順序依序提供給主機100。假設佇列狀態資訊230的長度可延長為64位元或128位元時,依據本發明之精神,本發明佇列狀態資訊將可提供超過5個待執行的任務的任務編號。同理可證,如果保留4個位元,而非3個位元,以表示待執行的任務的任務數量其數值最高可為15。待執行的任務的任務數量以及依照任務排序所排列的待執行的任務的任務編號並不限於以上述實施例所舉例的位元數來表示,可視設計時的需求而供技術人員自行改變。此外,在本實施例中,位元3、位元29~31為保留位元(狀態為0),保留位元的位置及數量並不限於上述所提及,可視設計時的需求而供技術人員自行改變,至於保留位元的功能可以由技術人員自行定義因此不於此贅述。 Specifically, the queue status information of the present invention designed according to the above data structure can provide up to five task numbers of tasks to be executed, which is limited by the length of the queue status information 230 being 32 bits. Assuming that the data storage device 200 can reply to the plurality of queue status information of the present invention to the host 100, all tasks to be executed can be sequentially provided to the host 100 according to their preferred execution order. Assuming that the length of the queue status information 230 can be extended to 64 bits or 128 bits, in accordance with the spirit of the present invention, the queue status information of the present invention will provide task numbers for more than five tasks to be executed. Similarly, if 4 bits are reserved instead of 3 bits, the number of tasks representing the task to be executed can be up to 15. The number of tasks of the task to be executed and the task number of the task to be executed arranged according to the task order are not limited to the number of bits exemplified in the above embodiment, and can be changed by the technician in view of the needs of the visual design. In addition, in this embodiment, the bit 3 and the bits 29 to 31 are reserved bits (the state is 0), and the position and number of the reserved bits are not limited to those mentioned above, and the technology is required for visual design. The personnel change their own functions. The function of retaining the bits can be defined by the technicians and therefore will not be described here.

另外,主機100所發送的第13類指令的長度為16個位元,假設位元14-15是以二進制的”01”來表示,那麼資料儲存裝置200便會回覆傳統的佇列狀態資訊給主機100;假設位元14-15是以二進制的”11”來表示,那麼資料儲存裝置200便會回覆本發明佇列狀態資訊給主機100,換句話說,資料儲存裝置200可依據第13類指令的內容而選擇並回覆適當的佇列狀態資訊給主機100。 In addition, the length of the 13th type instruction sent by the host 100 is 16 bits. If the bit 14-15 is represented by a binary "01", the data storage device 200 will reply to the traditional queue status information. Host 100; assuming that the bit 14-15 is represented by a binary "11", the data storage device 200 will reply to the host state information of the present invention. In other words, the data storage device 200 can be based on the thirteenth class. The contents of the instruction are selected and the appropriate queue status information is returned to the host 100.

圖5為本發明一實施例的任務排序方法的流程圖,其包含步驟S501~S507。步驟S501,資料儲存裝置200切換至指令佇列模式。步驟S502,資料儲存裝置200接收來自於主機100的佇列指令,其中,佇列指令包含複數個任務。步驟S503,資料儲存裝置200佇列其所接收的複數個任務。步驟S504,資料儲存裝置200判斷複數個佇列任務是否為複數個待執行的任務,由於判斷佇列任務是否為待執行的任務為習知技藝,故不多作說明。步驟S505,資料儲存裝置200排序複數個待執行的任務,其中,資料儲存裝置200可依據任務編號的大小、優先權與否、同一邏輯資料區塊位址的讀取或寫入、邏輯資料區塊位址的連續性等條件來決定複數個待執行的任務的執行順序。步驟S506,資料儲存裝置200接收來自主機100的查詢指令,例如,第13類指令。步驟S507,資料儲存裝置200依據查詢指令回覆佇列狀態資訊,其中,資料儲存裝置200可依據查詢指令的要求,選擇性地回覆本發明佇列狀態資訊或傳統的佇列狀態資訊給主機100。 FIG. 5 is a flowchart of a task scheduling method according to an embodiment of the present invention, which includes steps S501 to S507. In step S501, the data storage device 200 switches to the command queue mode. In step S502, the data storage device 200 receives the queue command from the host 100, wherein the queue command includes a plurality of tasks. In step S503, the data storage device 200 lists the plurality of tasks it receives. In step S504, the data storage device 200 determines whether the plurality of queue tasks are a plurality of tasks to be executed. Since it is a known skill to determine whether the queue task is a task to be executed, no description is made. Step S505, the data storage device 200 sorts a plurality of tasks to be executed, wherein the data storage device 200 can according to the size of the task number, the priority or not, the reading or writing of the same logical data block address, and the logical data area. Conditions such as continuity of block addresses determine the execution order of a plurality of tasks to be executed. In step S506, the data storage device 200 receives a query command from the host 100, for example, a thirteenth type of command. In step S507, the data storage device 200 replies to the queue status information according to the query command. The data storage device 200 can selectively reply the queue status information or the traditional queue status information to the host 100 according to the request of the query instruction.

綜上所述,本發明提供較佳任務執行順序的佇列狀態資訊,藉此提供主機100已排程的任務資訊,以使主機100根據佇列狀態資訊當中待執行的任務的任務數量以及待執行的任務的任務編號來依序執行任務,進而提高任務執行的效率。 In summary, the present invention provides the queue status information of the preferred task execution sequence, thereby providing the task information that the host 100 has scheduled, so that the host 100 can determine the number of tasks to be executed according to the queue status information. The task number of the executed task is used to execute the task sequentially, thereby improving the efficiency of task execution.

雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何熟習此技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the present invention has been described in its preferred embodiments, the present invention is not intended to limit the invention, and the present invention may be modified and modified without departing from the spirit and scope of the invention. The scope of protection is subject to the definition of the scope of the patent application.

Claims (12)

一種資料儲存裝置,包括:一非揮發性記憶體,用以儲存資料;以及一控制單元,用以控制該非揮發性記憶體的運作,該控制單元佇列來自於一主機的複數任務且決定該些任務是否為複數待執行的任務,並選擇性地回覆一佇列狀態資訊給該主機,其中,該佇列狀態資訊包含一任務數量以及複數任務編號。 A data storage device comprising: a non-volatile memory for storing data; and a control unit for controlling the operation of the non-volatile memory, the control unit arranging a plurality of tasks from a host and determining the Whether the tasks are plural tasks to be executed, and selectively replying to a list of status information to the host, wherein the queue status information includes a number of tasks and a plurality of task numbers. 如申請專利範圍第1項所述的資料儲存裝置,其中,該些任務編號依據該些待執行的任務的執行先後順序進行排列。 The data storage device of claim 1, wherein the task numbers are arranged according to a sequence of execution of the tasks to be executed. 如申請專利範圍第1項所述的資料儲存裝置,其中,該任務數量為該些待執行的任務的數量。 The data storage device of claim 1, wherein the number of tasks is the number of tasks to be executed. 如申請專利範圍第1項所述的資料儲存裝置,其中,該控制單元可選擇性地回覆另一佇列狀態資訊給該主機,該另一佇列狀態資訊顯示每一該些佇列中的任務是否為待執行的。 The data storage device of claim 1, wherein the control unit selectively replies to another queue status information to the host, and the other queue status information displays each of the arrays Whether the task is pending. 如申請專利範圍第1項所述的資料儲存裝置,其中,該佇列狀態資訊用以回應來自於該主機的一查詢指令。 The data storage device of claim 1, wherein the queue status information is used to respond to a query command from the host. 如申請專利範圍第2項所述的資料儲存裝置,其中,先後順序仍依據一邏輯資料區塊位址所決定。 For example, the data storage device described in claim 2, wherein the sequence is still determined according to a logical data block address. 一種任務排序方法,包括:傳送一佇列指令至一遠端,該佇列指令包含複數任務;傳送一查詢指令至該遠端;以及接收一佇列狀態資訊自該遠端,其中,該佇列狀態資訊包括一任務數量以及複數任務編號。 A task sequencing method includes: transmitting a queue instruction to a remote end, the queue instruction includes a plurality of tasks; transmitting a query instruction to the remote end; and receiving a queue status information from the remote end, wherein the Column status information includes a number of tasks and a plurality of task numbers. 如申請專利範圍第7項所述的任務排序方法,其中,該些任務編號依據複數待執行的任務的執行先後順序進行排列。 The task sorting method described in claim 7, wherein the task numbers are arranged according to a sequence of execution of the plurality of tasks to be executed. 如申請專利範圍第7項所述的任務排序方法,其中,該任務數量為複數待執行的任務的數量。 The task sorting method described in claim 7, wherein the number of tasks is a plurality of tasks to be executed. 如申請專利範圍第9項所述的任務排序方法,其中,該些待執行的任務選自於該些任務。 The task sorting method according to claim 9, wherein the tasks to be executed are selected from the tasks. 如申請專利範圍第8項所述的任務排序方法,其中,先後順序仍依據一邏輯資料區塊位址所決定。 For example, the task sorting method described in claim 8 of the patent scope, wherein the order is still determined according to a logical data block address. 如申請專利範圍第7項所述的任務排序方法,更包括:傳送另一查詢指令至該遠端;以及接收另一佇列狀態資訊自該遠端,其中,該另一佇列狀態資訊顯示每一該些佇列中的任務是否為待執行的。 The task sorting method of claim 7, further comprising: transmitting another query command to the remote end; and receiving another queue state information from the remote end, wherein the another queue state information is displayed Whether the tasks in each of these queues are pending.
TW106114698A 2016-04-21 2016-04-21 Data storage device and task ordering method thereof TWI651646B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106114698A TWI651646B (en) 2016-04-21 2016-04-21 Data storage device and task ordering method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106114698A TWI651646B (en) 2016-04-21 2016-04-21 Data storage device and task ordering method thereof

Publications (2)

Publication Number Publication Date
TW201738730A TW201738730A (en) 2017-11-01
TWI651646B true TWI651646B (en) 2019-02-21

Family

ID=61022795

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106114698A TWI651646B (en) 2016-04-21 2016-04-21 Data storage device and task ordering method thereof

Country Status (1)

Country Link
TW (1) TWI651646B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958950A (en) * 2018-05-29 2018-12-07 联发科技(新加坡)私人有限公司 Task management method, host and the storage device of electronic storage device
CN110908717B (en) * 2018-09-14 2023-11-24 深圳大心电子科技有限公司 Instruction processing method and memory controller using the same

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040049628A1 (en) * 2002-09-10 2004-03-11 Fong-Long Lin Multi-tasking non-volatile memory subsystem
US20080195833A1 (en) * 2007-02-13 2008-08-14 Samsung Electronics Co., Ltd. Systems, methods and computer program products for operating a data processing system in which a file system's unit of memory allocation is coordinated with a storage system's read/write operation unit
US20100262979A1 (en) * 2009-04-08 2010-10-14 Google Inc. Circular command queues for communication between a host and a data storage device
US20120311197A1 (en) * 2011-05-31 2012-12-06 Micron Technology, Inc. Apparatus including memory system controllers and related methods

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040049628A1 (en) * 2002-09-10 2004-03-11 Fong-Long Lin Multi-tasking non-volatile memory subsystem
US20080195833A1 (en) * 2007-02-13 2008-08-14 Samsung Electronics Co., Ltd. Systems, methods and computer program products for operating a data processing system in which a file system's unit of memory allocation is coordinated with a storage system's read/write operation unit
US20100262979A1 (en) * 2009-04-08 2010-10-14 Google Inc. Circular command queues for communication between a host and a data storage device
US20120311197A1 (en) * 2011-05-31 2012-12-06 Micron Technology, Inc. Apparatus including memory system controllers and related methods

Also Published As

Publication number Publication date
TW201738730A (en) 2017-11-01

Similar Documents

Publication Publication Date Title
TWI587214B (en) Data storage device, control unit and task ordering method thereof
US11023167B2 (en) Methods and apparatuses for executing a plurality of queued tasks in a memory
EP2849077B1 (en) Method for writing data into storage device and storage device
TWI436217B (en) Methods for controlling host memory access with memory devices and systems
CN114443529B (en) Direct memory access architecture, system, method, electronic device and medium
CN105549898A (en) Method for operating data storage device, host, and mobile computing device
US11630766B2 (en) Memory system and operating method thereof
CN111796759B (en) Computer readable storage medium and method for fragment data reading on multiple planes
CN107870866B (en) IO command scheduling method and NVM interface controller
KR20200056533A (en) Storage device for performing map scheduling and electronic device including the same
TWI651646B (en) Data storage device and task ordering method thereof
CN109213687A (en) Data storage device, memory operation method and operation instruction execution method
TWI710905B (en) Data storage device and method for loading logical-to-physical mapping table
US20180364946A1 (en) Data storage device
US11307798B2 (en) Storage device and method for performing macro command
CN108241468B (en) IO command processing method and solid-state storage device
US10042648B2 (en) Memory system, electric device, and information processing device
TWI582684B (en) Storage device and task execution method thereof, corresponding host and task execution method thereof, and control unit applied therein
CN108984108A (en) For dispatching the method and solid storage device of I/O command
JP2012128627A (en) Data transfer system
US20180336147A1 (en) Application processor including command controller and integrated circuit including the same
TWI452471B (en) Full-duplex controller in an universal serial bus device and method thereof
TWI822516B (en) Method and computer program product and apparatus for executing host write commands
US20230305711A1 (en) Memory controller and data processing method for processing disordered read-out data
CN109144907B (en) Method for realizing quick reading and medium interface controller