TWI839862B - Method and system for examining whether a system environment of a data storage device is abnormal - Google Patents
Method and system for examining whether a system environment of a data storage device is abnormal Download PDFInfo
- Publication number
- TWI839862B TWI839862B TW111136386A TW111136386A TWI839862B TW I839862 B TWI839862 B TW I839862B TW 111136386 A TW111136386 A TW 111136386A TW 111136386 A TW111136386 A TW 111136386A TW I839862 B TWI839862 B TW I839862B
- Authority
- TW
- Taiwan
- Prior art keywords
- abnormal
- system environment
- block
- data storage
- storage device
- Prior art date
Links
- 230000002159 abnormal effect Effects 0.000 title claims abstract description 180
- 238000013500 data storage Methods 0.000 title claims abstract description 79
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000005856 abnormality Effects 0.000 description 33
- 230000003321 amplification Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000003199 nucleic acid amplification method Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本發明關於一種檢查資料存儲裝置之系統環境是否異常的方法與系統,尤指一種在各種現有電子裝置中的控制單元如控制器或處理單元如CPU執行各種操作指令時,能同步檢查資料存儲裝置之系統環境或資料存儲區塊本身是否異常的方法與系統。 The present invention relates to a method and system for checking whether the system environment of a data storage device is abnormal, and in particular, to a method and system for synchronously checking whether the system environment of a data storage device or the data storage block itself is abnormal when a control unit such as a controller or a processing unit such as a CPU in various existing electronic devices executes various operation instructions.
各種現有電子裝置中於相關資料執行、處理與儲存的相關技術領域中,當系統環境本身異常造成操作狀態異常時,有可能使後續的硬體模組判斷錯誤,因為在現有技術中,後續的硬體模組並無法分辨真正造成操作狀態異常的原因為何,因而可能執行非正確的異常處理。 In the related technical fields of data execution, processing and storage in various existing electronic devices, when the system environment itself is abnormal and causes an abnormal operation state, it is possible that the subsequent hardware module will make an incorrect judgment. Because in the existing technology, the subsequent hardware module cannot distinguish the real cause of the abnormal operation state, and may therefore perform incorrect abnormal processing.
再,於習知技術中,於資料執行、處理與儲存時,發生讀取資料錯誤或寫資料錯誤時,會把該資料存儲區塊中其它正常的資料搬移到正常的資料存儲區塊。然而,若真正的問題是系統環境異常,而非資料存儲裝置真正異常,頻繁的區塊讀取、寫入或搬移會增加區塊壽命的消耗和寫入放大(Write Amplification)。Furthermore, in the prior art, when a read data error or a write data error occurs during data execution, processing, and storage, other normal data in the data storage block will be moved to a normal data storage block. However, if the real problem is an abnormal system environment rather than a real abnormality in the data storage device, frequent block reading, writing, or moving will increase the consumption of block life and write amplification.
此外,系統環境異常造成操作指令狀態發生錯誤,甚至會造成軟體誤判成無法再使用的資料存儲區塊。再,若使用外加硬體檢測電路去檢查區塊或系統環境,會增加整體營銷成本。In addition, abnormal system environment may cause errors in the operation command status, and even cause the software to mistakenly judge that the data storage block is no longer usable. Furthermore, if an external hardware detection circuit is used to check the block or system environment, it will increase the overall marketing cost.
因此,為克服前述問題,遂有本發明的產生。Therefore, in order to overcome the aforementioned problems, the present invention is developed.
為克服前述的硬體模組無法分辨真正造成操作狀態異常的原因為何而可能執行錯誤的異常處理、非資料存儲裝置真正異常而增加區塊壽命的消耗和寫入放大、以及操作指令狀態發生錯誤而造成軟體誤判成無法再使用區塊、以及外加硬體檢測電路去檢查區塊或系統環境會增加整體營銷成本的技術問題,本發明提供一種能檢查資料存儲裝置之系統環境是否異常的方法與系統。利用本發明之方法與系統,可以在現有的各種電子裝置中的資料存儲裝置增加偵測系統環境是否異常的系統或執行偵測系統環境是否異常的方法。在資料存儲裝置中預先配置一塊對照組區塊,當操作指令執行狀態,例如,以讀取狀態(Read Status)確認操作指令的狀態,回覆發生錯誤時,則讀取此對照組區塊,若資料讀取錯誤,即可知道是系統環境發生異常造成的錯誤,而非資料存儲裝置真正異常。本發明僅以軟(韌)體方式即可達成,無需增加額外硬體成本。在本發明的方法與系統能即時發現系統環境或區塊發生異常,並做出相應處理,以確保系統正常。In order to overcome the technical problems that the hardware module cannot distinguish the real cause of the abnormal operation state and may perform erroneous abnormal processing, increase the consumption of block life and write amplification due to non-real abnormality of the data storage device, and cause the software to misjudge that the block cannot be used again due to an error in the operation instruction state, and add a hardware detection circuit to check the block or system environment, which will increase the overall marketing cost, the present invention provides a method and system that can check whether the system environment of the data storage device is abnormal. Using the method and system of the present invention, a system for detecting whether the system environment is abnormal or a method for detecting whether the system environment is abnormal can be added to the data storage device in various existing electronic devices. A reference block is pre-configured in the data storage device. When the operation command is executed, for example, the status of the operation command is confirmed by reading the status (Read Status). When an error is reported, the reference block is read. If the data is read incorrectly, it can be known that the error is caused by an abnormality in the system environment, not the data storage device. The present invention can be achieved only in software (firmware) mode without adding additional hardware costs. The method and system of the present invention can immediately detect abnormalities in the system environment or blocks, and make corresponding processing to ensure that the system is normal.
為達到前述目的,本發明提供一種檢查資料存儲裝置之系統環境是否異常的方法,包括: 步驟A:接收操作指令,其中該操作指令包括將資料存儲裝置中的區塊進行讀取、寫入與抹除中至少一者的步驟; 步驟B:執行該操作指令,並確認對應於對該資料存儲裝置中區塊進行讀取、寫入、資料抹除中至少一者的步驟的指令執行狀態是否正確;如果該指令執行狀態正確,則結束整個步驟;如果該指令執行狀態不正確,則進行步驟C; 其中該步驟C包括檢查系統環境是否異常;若檢查結果為系統環境異常,則進行步驟D;若檢查結果為系統環境正常,則進行步驟d; 其中該步驟D包括:標示系統異常; 其中該步驟d包括:檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。 To achieve the aforementioned purpose, the present invention provides a method for checking whether the system environment of a data storage device is abnormal, comprising: Step A: receiving an operation instruction, wherein the operation instruction includes at least one of the steps of reading, writing and erasing a block in the data storage device; Step B: executing the operation instruction, and confirming whether the instruction execution status corresponding to at least one of the steps of reading, writing and erasing data in the block in the data storage device is correct; if the instruction execution status is correct, then the entire step is terminated; if the instruction execution status is incorrect, then step C is performed; Wherein the step C includes checking whether the system environment is abnormal; if the checking result is that the system environment is abnormal, then proceeding to step D; if the checking result is that the system environment is normal, then proceeding to step d; Wherein the step D includes: marking the system abnormality; Wherein the step d includes: checking whether the block itself of at least one of the read, written and erased is abnormal.
實施時,該步驟C更包括:讀取資料存儲裝置中的預設對照區塊;若讀取結果為指令執行狀態異常,則進行該步驟D;若讀取結果為指令執行狀態正常,則進行該步驟d。In practice, step C further includes: reading a preset comparison block in the data storage device; if the reading result is that the instruction execution status is abnormal, then performing step D; if the reading result is that the instruction execution status is normal, then performing step d.
實施時,於該步驟C更包括:檢查系統環境是否異常,若系統環境異常,則於一時間間隔後,再進行前述步驟C至少一次。In practice, step C further includes: checking whether the system environment is abnormal; if the system environment is abnormal, performing step C at least once again after a certain period of time.
實施時,於該步驟d中更包括:檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常,若區塊本身異常,則將該區塊設置異常標記。In practice, the step d further includes: checking whether the block of at least one of the blocks read, written and erased is abnormal. If the block is abnormal, an abnormal flag is set for the block.
本發明另提供一種檢查資料存儲裝置之系統環境是否異常的系統,其包括:資料存儲區塊、控制單元。該資料存儲區塊包括區塊;以及該控制單元包括:接收單元、處理單元與檢查單元。該接收單元供接收操作指令,其中該操作指令包括對該區塊進行讀取、寫入與抹除中至少一者的步驟。該處理單元供執行該操作指令,並確認對應於對該區塊進行讀取、寫入、資料抹除的步驟的指令執行狀態是否正確;如果該指令執行狀態正確,則結束整個步驟;如果該指令執行狀態不正確,則以該檢查單元檢查系統環境是否異常;若檢查結果為系統環境異常,則標示系統異常;若檢查結果為系統環境正常,則以該檢查單元檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。The present invention also provides a system for checking whether the system environment of a data storage device is abnormal, which includes: a data storage block and a control unit. The data storage block includes a block; and the control unit includes: a receiving unit, a processing unit and a checking unit. The receiving unit is used to receive an operation instruction, wherein the operation instruction includes at least one step of reading, writing and erasing the block. The processing unit is used to execute the operation instruction and confirm whether the instruction execution status corresponding to the steps of reading, writing, and erasing data on the block is correct; if the instruction execution status is correct, the entire step is terminated; if the instruction execution status is incorrect, the checking unit is used to check whether the system environment is abnormal; if the check result is that the system environment is abnormal, the system is marked as abnormal; if the check result is that the system environment is normal, the checking unit is used to check whether the block itself of at least one of the read, written, and erased is abnormal.
實施時,該檢查單元更供檢查系統環境是否異常,若系統環境異常,則於一時間間隔後,再檢查系統環境是否異常至少一次,若檢查結果為系統環境異常,則標示系統異常;若檢查結果為系統環境正常,則以該檢查單元檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。During implementation, the checking unit is further used to check whether the system environment is abnormal. If the system environment is abnormal, the system environment is checked again at least once after a time interval to determine whether the system environment is abnormal. If the checking result is that the system environment is abnormal, the system is marked as abnormal. If the checking result is that the system environment is normal, the checking unit is used to check whether at least one of the blocks being read, written, and erased is abnormal.
實施時,該資料存儲區塊更包括預設對照區塊;其中該處理單元更供讀取該預設對照區塊;若讀取結果為指令執行狀態異常,則標示系統異常;若讀取結果為指令執行狀態正常,則以該檢查單元檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。In implementation, the data storage block further includes a default comparison block; wherein the processing unit is further configured to read the default comparison block; if the reading result is that the instruction execution status is abnormal, the system is marked as abnormal; if the reading result is that the instruction execution status is normal, the checking unit is used to check whether at least one of the blocks read, written and erased is abnormal.
實施時,該處理單元供讀取該預設對照區塊至少一次,若讀取結果為指令執行狀態異常,則標示系統異常;若讀取結果為指令執行狀態正常,則以該檢查單元檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。During implementation, the processing unit is used to read the preset comparison block at least once. If the reading result is that the instruction execution status is abnormal, the system is marked as abnormal; if the reading result is that the instruction execution status is normal, the checking unit is used to check whether at least one of the blocks read, written and erased is abnormal.
實施時,該檢查單元更供檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常,若區塊本身異常,則將標示該區塊異常。During implementation, the checking unit is further used to check whether the block itself of at least one of the read, written and erased is abnormal. If the block itself is abnormal, the block will be marked as abnormal.
實施時,該處理單元更供執行標示該區塊異常之處理程序。During implementation, the processing unit is further configured to execute a processing procedure for marking the block as abnormal.
為進一步瞭解本發明,以下舉較佳之實施例,配合圖式、圖號,將本發明之具體構成內容及其所達成的功效詳細說明如下。In order to further understand the present invention, the following preferred embodiments are given, and the specific structure and effects of the present invention are described in detail with reference to the drawings and figure numbers.
請參考圖1,本發明提供一種檢查資料存儲裝置之系統環境是否異常的系統,其包括控制單元11與資料存儲區塊12,本發明的控制單元可為軟(韌)體、硬體或邏輯電路的架構,皆為本發明的範圍。再,該資料存儲區塊12包括區塊121。該控制單元11包括:接收單元111、處理單元112與檢查單元113。該接收單元111供接收操作指令,其中該操作指令包括將該區塊進行讀取、寫入與抹除中至少一者的步驟。該處理單元112供執行該操作指令,並確認對應於該讀取、寫入、資料抹除該區塊的指令執行狀態是否正確。如果該指令執行狀態正確,則結束整個步驟;如果該指令執行狀態不正確,則以該檢查單元113檢查系統環境是否異常;若檢查結果為系統環境異常,則標示系統異常;若檢查結果為系統環境正常,則以該檢查單元113檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。Please refer to FIG. 1. The present invention provides a system for checking whether the system environment of a data storage device is abnormal, which includes a
再,請繼續參考圖1,該檢查單元113更供檢查系統環境是否異常,若系統環境異常,則於一時間間隔後,再檢查系統環境是否異常至少一次,若檢查結果為系統環境異常,則標示系統異常;若檢查結果為指令執行狀態正常,則以該檢查單元檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。該資料存儲區塊12更包括預設對照區塊122;其中該處理單元112更供該讀取該預設對照區塊122;若讀取結果為指令執行狀態異常,則標示系統異常;若讀取結果為指令執行狀態正常,則以該檢查單元113檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。該處理單元112更供讀取該預設對照區塊至少一次,若讀取結果為指令執行狀態異常,則標示系統異常;若讀取結果為指令執行狀態正常,則以該檢查單元113檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。該處理單元112更供執行系統環境異常之處理程序。該檢查單元113更供檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常,若區塊本身異常,則將該區塊標示異常,例如,將該區塊設置異常標記。該處理單元112更供執行區塊異常之處理程序。Again, please continue to refer to FIG. 1 , the
本發明另提供一種檢查資料存儲裝置之系統環境是否異常的方法,包括: 步驟A:接收操作指令,其中該操作指令包括將資料存儲裝置中的區塊進行讀取、寫入與抹除中至少一者的步驟; 步驟B:執行該操作指令,並確認對應於對該資料存儲裝置中區塊進行讀取、寫入、資料抹除的步驟的指令執行狀態是否正確;如果該指令執行狀態正確,則結束整個步驟;如果該指令執行狀態不正確,則進行步驟C; 其中該步驟C包括檢查系統環境是否異常;若檢查結果為系統環境異常,則進行步驟D;若檢查結果為系統環境正常,則進行步驟d; 其中該步驟D包括:標示系統異常; 其中該步驟d包括:檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。 The present invention also provides a method for checking whether the system environment of a data storage device is abnormal, comprising: Step A: receiving an operation instruction, wherein the operation instruction includes at least one of the steps of reading, writing and erasing a block in the data storage device; Step B: executing the operation instruction, and confirming whether the instruction execution status corresponding to the steps of reading, writing and erasing data in the block in the data storage device is correct; if the instruction execution status is correct, then the entire step is terminated; if the instruction execution status is incorrect, then step C is performed; Wherein the step C includes checking whether the system environment is abnormal; if the checking result is that the system environment is abnormal, then proceeding to step D; if the checking result is that the system environment is normal, then proceeding to step d; Wherein the step D includes: marking the system abnormality; Wherein the step d includes: checking whether the block itself of at least one of the read, written and erased is abnormal.
以下將詳述本發明的方法與系統。首先,請參考圖2,於該步驟A中,接收操作指令,其中該操作指令包括將資料存儲裝置中的區塊進行讀取、寫入與抹除中至少一者的步驟。該操作指令可為,例如,列出所有檔案和路徑、列出隱藏的目錄、移動檔案、新增資料夾資料匯入、資料匯出等,且該操作指令包括將資料存儲裝置中的區塊進行讀取、寫入與抹除中至少一者的步驟。本發明的資料存儲裝置可為現今各種工業用、個人用的各種機台中所建置的資料存儲裝置。再,於步驟B中,執行該操作指令,執行前述程序,例如,列出所有檔案和路徑、列出隱藏的目錄、移動檔案、新增資料夾資料匯入、資料匯出等,並確認對應於該讀取、寫入、資料抹除該資料存儲裝置中區塊的步驟的指令執行狀態是否正確;如果回傳該指令執行狀態正確,則結束整個步驟,其表示資料存儲裝置的指令執行運作正常。如果該指令執行狀態不正確,意即,系統回傳指令執行狀態中有至少一程序無法正常執行,則進行步驟C。當系統環境本身異常造成讀取狀態指令回傳異常時,本發明的系統會使後續的軟體模組判斷錯誤的來源,因為,如前所述,在現有技術中,後續的硬體模組並無法分辨真正造成讀取狀態異常的原因為何,因而可能執行錯誤的異常處理。因此,本發明於該步驟C中,先檢查系統環境是否異常,檢查系統環境是否異常的步驟包括:例如,以模擬器預判有無讀寫速度變得緩慢情形發生;機器學習訓練中集群訓練之系統環境符合臨界值條件;偵測在作業系統環境中運作的應用程式;偵測網路系統環境如接線入口和接線出口的溫度;偵測系統的RTC電池的電力輸出、存取某些不允許存取的記憶體位置或以不允許的方式存取某些記憶體位置;當檢測到存取不存在的區塊無存取權限的記憶體區段中時發生存儲區段錯誤等情況。若檢查結果為系統環境異常,則進行步驟D;若檢查結果為指令執行狀態正常,則進行步驟d。意即,若檢查結果為指令執行狀態正常,則檢查是否為區塊本身有異常造成指令執行狀態異常。再,於該步驟D中包括標示系統異常,讓整個系統針對此異常旗標所對應的程序進行後續檢查。於該步驟d中包括檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常。The method and system of the present invention will be described in detail below. First, please refer to Figure 2. In step A, an operation instruction is received, wherein the operation instruction includes at least one of the steps of reading, writing and erasing a block in a data storage device. The operation instruction may be, for example, listing all files and paths, listing hidden directories, moving files, adding folder data import, data export, etc., and the operation instruction includes at least one of the steps of reading, writing and erasing a block in a data storage device. The data storage device of the present invention can be a data storage device built in various machines for various industrial and personal use today. Then, in step B, the operation command is executed to execute the aforementioned procedures, such as listing all files and paths, listing hidden directories, moving files, adding folders, data importing, data exporting, etc., and confirming whether the command execution status corresponding to the steps of reading, writing, and erasing the blocks in the data storage device is correct; if the command execution status is returned to be correct, the entire step is terminated, which indicates that the command execution of the data storage device is operating normally. If the command execution status is incorrect, that is, at least one program in the command execution status returned by the system cannot be executed normally, then step C is performed. When the system environment itself is abnormal and causes the read status instruction to return an abnormality, the system of the present invention will enable the subsequent software module to determine the source of the error. Because, as mentioned above, in the prior art, the subsequent hardware module cannot distinguish the actual cause of the read status abnormality, and may therefore perform incorrect exception processing. Therefore, in step C of the present invention, the system environment is first checked to see if it is abnormal. The steps of checking whether the system environment is abnormal include: for example, using a simulator to predict whether the reading and writing speeds have slowed down; the system environment of cluster training in machine learning training meets the critical value conditions; detecting applications running in the operating system environment; detecting the network system environment such as the temperature of the wiring entry and wiring exit; detecting the power output of the system's RTC battery, accessing certain memory locations that are not allowed to be accessed, or accessing certain memory locations in an unauthorized manner; and detecting a storage segment error when it is detected that a non-existent block is accessed and a memory segment with no access permission is accessed. If the check result is that the system environment is abnormal, then proceed to step D; if the check result is that the instruction execution status is normal, then proceed to step d. That is, if the check result is that the instruction execution status is normal, then check whether the block itself is abnormal and causes the instruction execution status to be abnormal. In addition, the step D includes marking the system abnormality so that the entire system performs subsequent checks on the program corresponding to the abnormal flag. The step d includes checking whether the block itself of at least one of the read, written and erased is abnormal.
再,於另一實施例中,請參考圖3,該步驟C中檢查系統環境是否異常的步驟包括:讀取資料存儲裝置中的預設對照區塊122;若讀取結果為指令執行狀態異常,則進行前述步驟D,標示系統異常,讓整個系統針對此標示系統異常的情況,例如,設置異常旗標進行後續處理。若讀取結果為指令執行狀態正常,則進行前述步驟d,檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常,藉以確認區塊本身是否異常。於另一實施例中,於前述步驟C更包括:讀取資料存儲裝置中的預設對照區塊122;若讀取結果為指令執行狀態異常,則於一時間間隔後,再次進行前述步驟C至少一次,即,讀取資料存儲裝置中的預設對照區塊122,若讀取結果為指令執行狀態異常,則進行前述步驟D,標示系統異常,讓整個系統針對此異常旗標進行後續檢查;若讀取結果為指令執行狀態正常,則進行前述步驟d,檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常,藉以確認區塊本身是否異常。因此,本發明的方法與系統在資料存儲裝置中預先配置對照組區塊,當操作指令執行狀態回覆發生錯誤時,則讀取此對照組區塊,藉由資料讀取相關指令執行狀態異常與否,即可分辨是如前所述系統環境發生異常造成的錯誤,還是資料存儲裝置的區塊本身真正異常。在另一實施例中,例如,於步驟C中檢查讀取資料存儲裝置中的預設對照區塊122是否異常時,若讀取結果為指令執行狀態異常,則於一時間間隔後,再進行前述步驟C,例如,8次,若讀取結果為指令執行狀態有出現一次異常,則判斷為指令執行狀態有異常;或者,在另一實施例中,若讀取結果為指令執行狀態有出現異常次數大於正常次數,例如,8次中5次異常、3次正常,則判斷為指令執行狀態有異常。或者,在另一實施例中,若讀取結果為指令執行狀態有出現異常次數過高,例如,每次讀取結果的指令執行狀態均有異常時,則需檢查該預設對照區塊122本身是否異常。Furthermore, in another embodiment, please refer to FIG. 3 , the step of checking whether the system environment is abnormal in step C includes: reading the
再,於另一實施例中,請參考圖4,該步驟C更包括:檢查系統環境是否異常,若系統環境異常,則於一時間間隔後,再進行前述步驟C至少一次,若讀取結果為系統環境異常,則進行該步驟D;若讀取結果為系統環境正常,則進行該步驟d。此程序是為了確保系統環境是確實有異常,而非是執行指令本身因為有缺陷而導致回傳執行錯誤訊息或因為其他因素導致回傳錯誤執行的訊息。於此實施例中,可以於步驟C中檢查系統環境是否異常時,若系統環境異常,則於一時間間隔後,再進行前述步驟C至少一次,例如,1至3次、4至6次或8至10次等,皆在本發明的範圍內,若讀取結果為系統環境異常,則進行該步驟D;若讀取結果為系統環境正常,則進行該步驟d。在此實施例中,例如,於步驟C中檢查系統環境是否異常時,若系統環境異常,則於一時間間隔後,再進行前述步驟C例如,8次,若讀取結果為指令執行狀態有出現一次異常,則進行該步驟D;若讀取結果為系統環境正常,則進行該步驟d。Furthermore, in another embodiment, please refer to FIG. 4 , step C further includes: checking whether the system environment is abnormal. If the system environment is abnormal, then after a time interval, the aforementioned step C is performed at least once again. If the reading result is that the system environment is abnormal, then the step D is performed; if the reading result is that the system environment is normal, then the step d is performed. This procedure is to ensure that the system environment is indeed abnormal, rather than the execution error message returned due to a defect in the execution instruction itself or due to other factors. In this embodiment, when checking whether the system environment is abnormal in step C, if the system environment is abnormal, then after a time interval, the aforementioned step C is performed at least once, for example, 1 to 3 times, 4 to 6 times or 8 to 10 times, etc., all within the scope of the present invention. If the reading result is that the system environment is abnormal, then the step D is performed; if the reading result is that the system environment is normal, then the step d is performed. In this embodiment, for example, when checking whether the system environment is abnormal in step C, if the system environment is abnormal, then after a time interval, the aforementioned step C is performed again, for example, 8 times. If the reading result is that the instruction execution status has an abnormality, then the step D is performed; if the reading result is that the system environment is normal, then the step d is performed.
再,於另一實施例中,請參考圖2至圖4,於該步驟D之後更包括步驟E。於該步驟E中,執行系統環境異常之處理程序。依照前述的實例,若以模擬器預判有無特定軟硬體讀寫速度變得緩慢情形發生,執行系統環境異常之處理程序為將讀寫速度變得緩慢的軟硬體程序作調整。若機器學習訓練中集群訓練之系統環境不符合臨界值條件,則執行系統環境異常之處理程序為暫緩集群訓練中的一部分。若偵測在作業系統環境中運作的應用程式發生異常,則執行系統環境異常之處理程序為關閉或重新啟動異常的應用程式。若偵測網路系統環境如接線入口和接線出口的溫度異常,則執行系統環境異常之處理程序為使接線入口和接線出口降溫或暫緩傳輸資料。若偵測系統的RTC電池的電力輸出異常時,則執行系統環境異常之處理程序為重啟偵測RTC電池的電力輸出確認異常情況。若嘗試讀取程式位址空間之外的資料或寫入至唯讀記憶體區段導致存儲器區塊讀取錯誤時,則執行系統環境異常之處理程序為跳過此唯讀記憶體區段等。Furthermore, in another embodiment, please refer to FIG. 2 to FIG. 4, after step D, step E is further included. In step E, a system environment abnormality processing procedure is executed. According to the aforementioned example, if the simulator predicts whether the read and write speed of specific software and hardware has become slow, the system environment abnormality processing procedure is executed to adjust the software and hardware program that slows down the read and write speed. If the system environment of cluster training in machine learning training does not meet the critical value condition, the system environment abnormality processing procedure is executed as part of suspending cluster training. If an application running in the operating system environment is detected to be abnormal, the system environment abnormality processing procedure is to close or restart the abnormal application. If the network system environment such as the temperature of the wiring inlet and wiring outlet is detected to be abnormal, the system environment abnormality processing procedure is to cool down the wiring inlet and wiring outlet or suspend data transmission. If the power output of the RTC battery of the system is detected to be abnormal, the system environment abnormality processing procedure is to restart the power output of the RTC battery to confirm the abnormal situation. If an attempt is made to read data outside the program address space or write to a read-only memory segment, resulting in a memory block read error, the system environment exception handling procedure is executed to skip the read-only memory segment, etc.
再,於另一實施例中,請繼續參考圖2至圖4,於該步驟d中更包括:檢查該所讀取、寫入與抹除中至少一者的區塊本身是否異常,若區塊本身異常,則將該區塊設置異常標記。以快閃記憶卡、固態硬碟機(SSD)、嵌入式快閃記憶存儲裝置為例,區塊本身異常會導致異常記憶體頁面(Page)錯誤而使得存儲區塊錯誤。區塊本身異常也可能發生在記憶體頁面中,如處於相同記憶體頁面內但非以正常程序覆蓋記憶體的溢位。此外,上下文交換、硬體分頁錯誤、中斷也會導致區塊異常。若發現區塊本身異常,則將該區塊設置異常標記,使得後續步驟中不會再將此異常區塊進行讀取、寫入與抹除中至少一者。Furthermore, in another embodiment, please continue to refer to FIG. 2 to FIG. 4, in step d, it further includes: checking whether the block itself of at least one of the read, written and erased is abnormal, and if the block itself is abnormal, setting an abnormal mark for the block. Taking a flash memory card, a solid state hard drive (SSD), and an embedded flash memory storage device as an example, the abnormality of the block itself will cause an abnormal memory page error and a storage block error. The abnormality of the block itself may also occur in the memory page, such as an overflow in the same memory page but not overwritten by a normal process. In addition, context switching, hardware paging errors, and interrupts can also cause block exceptions. If a block is found to be abnormal, an abnormal flag is set for the block so that the abnormal block will not be read, written, or erased in subsequent steps.
再,於另一實施例中,請繼續參考圖2至圖4,於該步驟d之後更包括步驟e。於步驟e中,執行區塊異常之處理程序。如前所述,若區塊異常為區塊本身異常會導致異常記憶體頁面錯誤而使得存儲區段錯誤、區塊本身異常發生在記憶體頁面中如處於相同記憶體頁面內但非以正常程序覆蓋記憶體的溢位、上下文交換、硬體分頁錯誤或中斷等情況,則針對前述情況分別執行區塊異常之處理程序。Furthermore, in another embodiment, please continue to refer to FIG. 2 to FIG. 4 , after step d, step e is further included. In step e, a block abnormality processing procedure is executed. As mentioned above, if the block abnormality is a block abnormality that will cause an abnormal memory page error and a storage segment error, a block abnormality that occurs in a memory page such as overflow, context switching, hardware paging error or interruption in the same memory page but not overwritten by a normal program, etc., then the block abnormality processing procedure is executed for the above-mentioned situations respectively.
因此,本發明具有以下優點: 1. 本發明之方法與系統可以設於現有的各種電子裝置中,僅以軟(韌)體方式即可達成,無需增加額外硬體成本,能即時發現系統環境或區塊發生異常,並做出相應處理,以確保各種電子系統正常運作。 2. 本發明之方法與系統在資料存儲裝置中預先配置對照組區塊,當操作指令執行狀態回覆發生錯誤時,則讀取此對照組區塊,若資料讀取仍錯誤,即可知道是系統環境發生異常造成的錯誤,而非資料存儲裝置真正異常。 3. 在本發明方法與系統的保護下,能即時發現現有的各種電子裝置之系統環境異常,並有效避免頻繁的區塊讀取、寫入或搬移,而使得資料存儲裝置的壽命大幅提高。 Therefore, the present invention has the following advantages: 1. The method and system of the present invention can be set in various existing electronic devices, and can be achieved only by software (firmware) mode, without adding additional hardware costs, and can immediately detect abnormalities in the system environment or blocks, and make corresponding processing to ensure the normal operation of various electronic systems. 2. The method and system of the present invention pre-configures a reference group block in the data storage device. When an error occurs in the response of the execution status of the operation command, the reference group block is read. If the data reading is still wrong, it can be known that the error is caused by the abnormality of the system environment, not the real abnormality of the data storage device. 3. Under the protection of the method and system of the present invention, the system environment anomalies of various existing electronic devices can be discovered in real time, and frequent block reading, writing or moving can be effectively avoided, thereby greatly improving the life of the data storage device.
以上所述乃是本發明之具體實施例及所運用之技術手段,根據本文的揭露或教導可衍生推導出許多的變更與修正,仍可視為本發明之構想所作之等效改變,其所產生之作用仍未超出說明書及圖式所涵蓋之實質精神,均應視為在本發明之技術範疇之內,合先陳明。The above are specific embodiments of the present invention and the technical means used. Many changes and modifications can be derived based on the disclosure or teaching of this article, which can still be regarded as equivalent changes made to the concept of the present invention. The effects produced still do not exceed the essential spirit covered by the description and drawings, and should be regarded as within the technical scope of the present invention.
綜上所述,依上文所揭示之內容,本發明確可達到發明之預期目的,提供一種檢查資料存儲裝置之系統環境是否異常的方法與系統,當操作指令的狀態回覆發生錯誤時,則讀取對照組區塊,若資料讀取錯誤,即可知道是系統環境發生異常造成的錯誤,而非資料存儲裝置真正異常,極具產業上利用之價植,爰依法提出發明專利申請。In summary, according to the contents disclosed above, the present invention can achieve the expected purpose of the invention, and provide a method and system for checking whether the system environment of a data storage device is abnormal. When an error occurs in the status reply of an operation command, the reference group block is read. If the data is read incorrectly, it can be known that the error is caused by the abnormality of the system environment, rather than the real abnormality of the data storage device. The invention has great value for industrial use, and a patent application for the invention is filed in accordance with the law.
檢查資料存儲裝置之系統環境是否異常的系統1
控制單元11
資料存儲區塊12
區塊121
預設對照區塊122
接收單元111
處理單元112
檢查單元113
步驟A、B、C、D、E、d、e
System for checking whether the system environment of a data storage device is abnormal 1
圖1為本發明之檢查資料存儲裝置之系統環境是否異常的系統之實施例的示意圖。FIG. 1 is a schematic diagram of an embodiment of a system for checking whether the system environment of a data storage device is abnormal according to the present invention.
圖2為本發明之檢查資料存儲裝置之系統環境是否異常的方法之實施例的流程圖。FIG. 2 is a flow chart of an embodiment of a method for checking whether the system environment of a data storage device is abnormal according to the present invention.
圖3為本發明之檢查資料存儲裝置之系統環境是否異常的方法之另一實施例的流程圖。FIG. 3 is a flow chart of another embodiment of the method for checking whether the system environment of a data storage device is abnormal according to the present invention.
圖4為本發明之檢查資料存儲裝置之系統環境是否異常的方法之另一實施例的流程圖。FIG. 4 is a flow chart of another embodiment of the method for checking whether the system environment of a data storage device is abnormal according to the present invention.
1:檢查資料存儲裝置之系統環境是否異常的系統 1: Check whether the system environment of the data storage device is abnormal.
11:控制單元 11: Control unit
12:資料存儲區塊 12: Data storage block
121:區塊 121: Block
122:預設對照區塊 122: Default reference block
111:接收單元 111: Receiving unit
112:處理單元 112: Processing unit
113:檢查單元 113: Inspection unit
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111136386A TWI839862B (en) | 2022-09-26 | 2022-09-26 | Method and system for examining whether a system environment of a data storage device is abnormal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111136386A TWI839862B (en) | 2022-09-26 | 2022-09-26 | Method and system for examining whether a system environment of a data storage device is abnormal |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202414425A TW202414425A (en) | 2024-04-01 |
TWI839862B true TWI839862B (en) | 2024-04-21 |
Family
ID=91618718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW111136386A TWI839862B (en) | 2022-09-26 | 2022-09-26 | Method and system for examining whether a system environment of a data storage device is abnormal |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI839862B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200710731A (en) * | 2005-04-20 | 2007-03-16 | Transitive Ltd | Method and apparatus for precise handling of exceptions during program code conversion |
US20120110423A1 (en) * | 2010-11-02 | 2012-05-03 | Choung-Ki Song | Command control circuit, integrated circuit having the same, and command control method |
TW201921244A (en) * | 2017-09-13 | 2019-06-01 | 日商東芝記憶體股份有限公司 | Centralized error handling in application specific integrated circuits |
TW202008173A (en) * | 2018-07-31 | 2020-02-16 | 英商Arm股份有限公司 | Handling guard tag loss |
TW202040582A (en) * | 2019-01-18 | 2020-11-01 | 美商半導體組件工業公司 | Systems and methods for replacing data retrieved from memory |
-
2022
- 2022-09-26 TW TW111136386A patent/TWI839862B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200710731A (en) * | 2005-04-20 | 2007-03-16 | Transitive Ltd | Method and apparatus for precise handling of exceptions during program code conversion |
US20120110423A1 (en) * | 2010-11-02 | 2012-05-03 | Choung-Ki Song | Command control circuit, integrated circuit having the same, and command control method |
TW201921244A (en) * | 2017-09-13 | 2019-06-01 | 日商東芝記憶體股份有限公司 | Centralized error handling in application specific integrated circuits |
TW202008173A (en) * | 2018-07-31 | 2020-02-16 | 英商Arm股份有限公司 | Handling guard tag loss |
TW202040582A (en) * | 2019-01-18 | 2020-11-01 | 美商半導體組件工業公司 | Systems and methods for replacing data retrieved from memory |
Also Published As
Publication number | Publication date |
---|---|
TW202414425A (en) | 2024-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI473117B (en) | Flash storage device with data correction function | |
CN102388368B (en) | Method and device for monitoring memory | |
CN100458693C (en) | BIOS read-write memory SPD based computer system information conservation and read method | |
CN102591736B (en) | For the method identifying mistake in the enforcement of real time operating system | |
KR920005163A (en) | Semiconductor memory device | |
CN102214125B (en) | Method for testing error checking and correcting (ECC) function of memory | |
JP4373615B2 (en) | Initial bad block marking method | |
TWI839862B (en) | Method and system for examining whether a system environment of a data storage device is abnormal | |
CN112486723B (en) | Data verification method and device, processor and electronic equipment | |
CN104781790A (en) | Signaling software recoverable errors | |
TWI845062B (en) | Method for testing flash memory module and associated flash memory controller and memory device | |
CN103744752B (en) | A kind of online fault detection method of internal memory and device | |
CN100432955C (en) | Detecting method for illegal memory reading and writing | |
CN102193556A (en) | System and method for detecting potential interruption safety hazard of automobile electron device | |
TWI601011B (en) | Data storage device and data storage method for detecting currently-used logical pages | |
CN119003225B (en) | A fault location method and device, storage medium and computer program product | |
US20070179635A1 (en) | Method and article of manufacure to persistently deconfigure connected elements | |
CN110187658B (en) | Chip processing method and device, chip and elevator outbound board | |
CN111324543B (en) | A method and device based on IE information testing in Dual BIOS | |
CN101615420B (en) | Flash memory storage device with data correction function | |
JP2008234358A (en) | Storage device, information processor, and unauthorized writing detection method | |
JP7074291B2 (en) | Information processing equipment, information processing methods and programs | |
CN116820849A (en) | Memory SPD read and write test methods, devices, electronic equipment and storage media | |
CN106601303B (en) | A kind of bad block management method of flash memory, device and a kind of storage device | |
CN119917339A (en) | Swap mechanism repair method, device, equipment, medium and product |