Partitioned file system bandwidth control management method for flash memory device

By using bandwidth control management and shadow memory technology, combined with partitioned file system security access control, the problem of premature exhaustion of the lifespan of NOR flash devices due to frequent interactions has been solved, thus extending the lifespan of the devices.

CN117873389BActive Publication Date: 2026-07-14XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN AVIATION COMPUTING TECH RES INST OF AVIATION IND CORP OF CHINA
Filing Date
2023-12-28
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In the civil aviation industry, NOR flash devices suffer from premature lifespan issues due to frequent interactions with the file system.

Method used

A combination of bandwidth control management, shadow memory, and partition file system security access control is adopted to prevent excessive erasure and write by limiting the file system write rate, using shadow memory to synchronize data, and writing data to NOR flash in the event of power failure.

Benefits of technology

It extends the lifespan of NOR flash devices and avoids premature wear and tear caused by frequent I/O interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117873389B_ABST
    Figure CN117873389B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computer system software, and particularly relates to a partition file system bandwidth control management method of a flash memory device. The application limits the writing speed and the maximum single read / write amount in the file system interface, designs a shadow memory as an interactive bridge of the file system and the nor flash memory device, reduces the direct interaction times of the file system and the nor flash memory device, designs a partition file system security access control, avoids illegal access and use of data by other partitions, and prevents intentional and inadvertent operation of unauthorized users from damaging the system. After the bandwidth control management, the shadow memory and the partition file system security access control method designed by the application are implemented, the I / O times of the nor flash memory device can be reduced, and the underlying nor flash memory device can be protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer system software technology, and specifically relates to a method for bandwidth control and management of a partitioned file system for flash memory devices. Background Technology

[0002] In the civil aviation field, factors such as the weight, size, and power consumption of avionics systems must be considered. NOR flash memory devices, with their small size and low power consumption, have become a mainstream non-volatile memory chip in civil aviation. A file system is a common method for managing data storage, requiring continuous I / O interaction with the underlying devices. However, NOR flash devices have a physical limit to the number of erase / write cycles; frequent interaction between the file system and the device can lead to premature device lifespan exhaustion. Since airborne equipment records important flight data, effectively extending device lifespan is a key research issue. Summary of the Invention

[0003] In view of this, the present invention provides a partition file system bandwidth control management method for flash memory devices, which solves the problem of premature exhaustion of the lifespan of the NOR flash device due to frequent interaction between the file system and the NOR flash device. The method combines bandwidth control management, shadow memory and partition file system security access control to protect the NOR flash device and thus extend its lifespan to a certain extent.

[0004] To achieve the above-mentioned technical objectives, the specific technical solution adopted by the present invention is as follows:

[0005] A method for bandwidth control and management of a partitioned file system in a flash memory device, wherein the method is implemented based on a control and management system, the control and management system comprising the following units:

[0006] The bandwidth control management unit communicates with the application layer at its input end to limit the write rate of the application layer's file system.

[0007] The shadow memory unit, whose input terminal communicates with the bandwidth control management unit, is used to manage the data of the application layer user under the rate limit.

[0008] The flash device management layer communicates with the shadow memory unit to synchronize selected data in the shadow memory unit to the NOR flash under user control, and writes all data in the shadow memory unit to the NOR flash in the event of power failure.

[0009] Furthermore, when the selected data is synchronized to the NOR flash, the amount written in a single operation does not exceed 25% of the NOR flash's configured volume.

[0010] Furthermore, in the event of a power outage, when data in the shadow memory unit is written to the NOR flash, there is no limit to the amount written in a single operation.

[0011] Furthermore, the data storage capacity of the shadow memory unit is the same as that of the norflash.

[0012] Furthermore, the data storage capacity of the shadow memory unit is the same as the organization structure of the norflash.

[0013] Furthermore, the shadow memory unit resides on the flash device management layer and interfaces upwards with the file system EFMS; the application layer accesses the shadow memory unit through the file system EFMS and reads data from the shadow memory unit; the shadow memory unit interacts with the flash device management layer at the lower level and accesses the underlying NOR flash by calling the interface of the flash device management layer.

[0014] Furthermore, the interaction scenarios between the shadow memory unit and the flash device management layer include: 1) manually invoking synchronization or closing file operations; 2) abnormal power failure; 3) manually invoking rollback operations to the previous state.

[0015] Furthermore, the control and management system also includes a partition security access control unit; the partition security access control unit is used to enable the application layer to perform write data operations or read data operations through the embedded file management system; under the control of the partition security access control unit, a file can be read by multiple partitions of the application layer but can only be written to one partition.

[0016] The application layer partitions are configured with access permissions to logical volumes based on the partition security access control unit.

[0017] Furthermore, the process of the application layer writing data into the NOR flash is as follows:

[0018] Initialize the bandwidth control management unit, specifically including the bandwidth control size and the read / write volume;

[0019] Initialize the shadow memory unit, specifically including the total size of the shadow memory, the size of the shadow memory sector, the size of the shadow memory block, and the shadow memory block number;

[0020] Initialize the NORFlash, specifically including the total size of the NORFlash, the block size of the NORFlash, the sector size of the NORFlash, and the block number of the NORFlash; the first time the NORFlash is used, it needs to be formatted; initialize the EFMS file system, specifically including the total size of the EFMS file system, the block size, the sector size, the number of sectors, the formatting of the core file system, the volume type configuration, and the volume mounting;

[0021] In normal mode, when performing synchronization or shutdown operations under user control, the operation status bit is set to determine whether to write the content to the underlying NOR flash. During the process, other write operations are not allowed. After the operation is completed, the status bit is reset, and then the application layer is notified that other write operations can be performed.

[0022] In normal mode, when a rollback operation is performed under user control, the operation status bit is set to determine whether the data in the shadow memory unit should be rolled back to the previous state. Other write operations are not allowed during this process. After the rollback is completed, the status bit is reset, and then the application layer is notified that write operations are allowed.

[0023] The advantages and effects of this invention are as follows: After implementing the method described in this invention, the problem of premature exhaustion of the lifespan caused by frequent I / O of the file system and the NOR flash device due to the physical limitation of the number of erase and write cycles of the NOR flash device can be solved, and the lifespan of the NOR flash device can be extended to a certain extent. Attached Figure Description

[0024] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 For file system bandwidth control system architecture;

[0026] Figure 2 Flowchart for synchronization / closing operation;

[0027] Figure 3 This is a flowchart of an abnormal power failure.

[0028] Figure 4 This is a flowchart of the rollback operation;

[0029] Figure 5 This is a segmented secure access model. Detailed Implementation

[0030] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0031] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0032] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using other structures and / or functionalities besides one or more of the aspects set forth herein.

[0033] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0034] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.

[0035] In one embodiment of the present invention, a partition file system bandwidth control management method for flash memory devices is proposed. The control management method is implemented based on a control management system, which includes the following units:

[0036] The bandwidth control management unit communicates with the application layer at its input end to limit the write rate of the application layer's file system.

[0037] The shadow memory unit, whose input terminal communicates with the bandwidth control management unit, is used to manage the data of the application layer user under the rate limit.

[0038] The flash device management layer communicates with the shadow memory unit to synchronize selected data in the shadow memory unit to the NOR flash under user control, and writes all data in the shadow memory unit to the NOR flash in the event of power failure.

[0039] In this embodiment, when the selected data is synchronized to the NOR flash, the amount of data written in a single operation does not exceed 25% of the NOR flash's configuration volume.

[0040] In this embodiment, when data in the shadow memory unit is written to the NOR flash in the event of a power failure, the amount of data written in a single operation is unlimited.

[0041] In this embodiment, the data storage capacity of the shadow memory unit is the same as that of the norflash.

[0042] In this embodiment, the data storage capacity of the shadow memory unit is the same as the organization structure of the norflash.

[0043] In this embodiment, the shadow memory unit resides on the flash device management layer and interfaces upwards with the file system EFMS; the application layer accesses the shadow memory unit through the file system EFMS and reads data from the shadow memory unit; the shadow memory unit interacts with the flash device management layer at the lower level and accesses the underlying NOR flash by calling the interface of the flash device management layer.

[0044] In this embodiment, the interaction scenarios between the shadow memory unit and the flash device management layer include: 1) manually calling the synchronization or closing file operation; 2) abnormal power failure; 3) manually calling the rollback operation to the previous state.

[0045] In this embodiment, the control and management system further includes a partition security access control unit; the partition security access control unit is used to enable the application layer to perform write data operations or read data operations through the embedded file management system; under the control of the partition security access control unit, a file can be read by multiple partitions of the application layer but can only be written to one partition.

[0046] The application layer partitions are configured with access permissions to logical volumes based on the partition security access control unit.

[0047] In this embodiment, the process of the application layer writing data to the NOR flash is as follows:

[0048] Initialize the bandwidth control management unit, specifically including the bandwidth control size and the read / write volume;

[0049] Initialize the shadow memory unit, specifically including the total size of the shadow memory, the size of the shadow memory sector, the size of the shadow memory block, and the shadow memory block number;

[0050] Initialize the NORFlash, specifically including the total size of the NORFlash, the block size of the NORFlash, the sector size of the NORFlash, and the block number of the NORFlash; the first time the NORFlash is used, it needs to be formatted; initialize the EFMS file system, specifically including the total size of the EFMS file system, the block size, the sector size, the number of sectors, the formatting of the core file system, the volume type configuration, and the volume mounting;

[0051] In normal mode, when performing synchronization or shutdown operations under user control, the operation status bit is set to determine whether to write the content to the underlying NOR flash. During the process, other write operations are not allowed. After the operation is completed, the status bit is reset, and then the application layer is notified that other write operations can be performed.

[0052] In normal mode, when a rollback operation is performed under user control, the operation status bit is set to determine whether the data in the shadow memory unit should be rolled back to the previous state. Other write operations are not allowed during this process. After the rollback is completed, the status bit is reset, and then the application layer is notified that write operations are allowed.

[0053] 1. Bandwidth control management in this embodiment

[0054] To prevent the file system from prematurely exhausting the lifespan of the underlying NOR flash memory, the file system needs a mechanism to limit the file write rate to an acceptable value in normal operating mode, with each partition having this limiting function. Since the underlying device driver speed is fixed, the file system speed on each partition needs to be rationally allocated based on the number of partitions and the driver speed. Bandwidth control is achieved by adding write speed monitoring to the APEX partition's standard write interface. If the current write speed exceeds the partition's configured speed, a delay is added to control bandwidth, ensuring the write speed remains within an allowable range for a given window. This method limits the write rate in normal mode; in abnormal power-down mode, the limit is lifted, requiring data to be updated to the NOR flash device as quickly as possible within the power-down window. To ensure each partition can access file system resources at any given time, the maximum single read / write size of the file system needs to be limited. By obtaining the volume size for reading and writing, the size of a single read / write operation is guaranteed not to exceed 25% of the volume. For file systems, this size is also the maximum amount of data that is out of sync between shadow memory and NOR flash devices. In other words, writing is prohibited when the sum of the size of this write and the length of the data previously written to shadow memory exceeds the maximum single write size.

[0055] 2. Shadow memory in this embodiment

[0056] To reduce file system and I / O interactions and improve performance, shadow memory is designed. Shadow memory acts as a mirror of the NOR flash, residing above the flash device management layer and interfacing with the file system. Users access shadow memory through the file system and read data from it. Shadow memory interacts with the flash management layer at its core, accessing the underlying NOR flash device by calling the flash management layer's interface. The interaction is triggered by: 1) Synchronizing data and flushing it to the NOR flash. Manually invoking synchronization or closing file operations flushes the contents of shadow memory to the NOR flash. The specific process is as follows... Figure 2 As shown; 2) In the event of an abnormal power outage, in order to prevent data loss in memory, the contents of the shadow memory need to be synchronized to the NOR flash device as quickly as possible within the power outage window. The specific process is as follows: Figure 3 As shown; 3) When manually calling the rollback file operation, if there is a data error or a need to revert to the previous state, the content in the shadow memory needs to be reverted to the state before it was written. The specific process is as follows: Figure 4 As shown.

[0057] Shadow memory is implemented using block management, requiring that each shadow memory write be performed within the current partition window. When a refresh is needed, only the block number of the inconsistent content needs to be recorded, and the content at that block number in the shadow memory is copied and refreshed to the NOR flash device sector-by-sector. When rolling back, the content in the NOR flash needs to be restored to the shadow memory block by block to synchronize the two contents. Write operations are not allowed during the aforementioned synchronization / shutdown operations and in the event of a power outage. The difference is that the former requires notifying the application that normal write operations can continue after synchronization is complete, while the latter does not.

[0058] 3. Partition file system security access control in this embodiment

[0059] The partitioned file system uses the embedded file management system EFMS. Partition security access control requires space partitioning. Space partitioning considers preventing changes to file data that does not belong to a partition. Partition applications can use the file system to write and read data. A file can be read by multiple partitions but can only be written to by one partition. The file system uses an authentication mechanism to ensure that access is only granted to authorized file owners in the configuration table. Data between partitions is isolated from each other, and partition owners have a need to prevent other partitions from accessing or tampering with their own data. Partition security access control technology is designed to prevent unauthorized access and use of data by other partitions and to prevent intentional or careless operations by unauthorized users from damaging the system.

[0060] The file system interface definition controls access permissions at the logical volume level; access permissions assigned to a logical volume apply to files and directories on all volumes. If there are no restrictions on permissions for application partitions to operate on volumes, different application partitions can perform overwrite operations on the same volume, leading to inconsistencies in the file system data. If each application partition is required to have its own independent volume, and can only perform read and write operations on that volume, the need for partition data sharing cannot be met. Therefore, the following constraints are needed for secure file system access between partitions:

[0061] (1) Different partitions are assigned different owner volumes. Application partitions have read and write permissions to their owner volumes. These permissions can provide all capabilities such as creating, deleting, reading and writing files / directories. The physical areas corresponding to the owner volumes of each application partition do not overlap with each other.

[0062] (2) For partitions that have data sharing needs with other partitions, the owner volume of other partitions can be used as the share volume of this partition. Only read permissions are allowed for the share volume, and no modifications can be made.

[0063] Owner volumes and shared volumes are configured by the user at the application partitioning level according to their needs. For example... Figure 3As shown, the owner physical volume of application partition 1 is configured as physical volume 1 of device 1, and the owner volume of application partition 2 is configured as physical volume 2 of device 1. Partition 1 needs to share file data with partition 2, so physical volume 2 is configured as a shared volume. The left side of the diagram indicates the write permissions available, but not the shared volume; the right side indicates the read permissions available, meaning application partition 1 has read permissions on both the owner volume (physical volume 1) and the shared volume (physical volume 2).

[0064] This method provides two layers of secure access control: between application partitions and within partitions. Secure access to data across partitions is achieved through the access constraints defined above, ensuring that application partitions only have read-write access to the owner volume configured for their respective partitions, and read-only access to the configured share volumes. Application partitions cannot arbitrarily access or tamper with data in other application partitions.

[0065] like Figure 1-5 As shown, the implementation of this invention in a typical scenario of an embedded partitioned multi-core operating system is as follows:

[0066] 1) Configure the embedded file management system EFMS in the operating system OS, and perform NOR flash device initialization and file system initialization, including configuring parameters such as device capacity and sectors, device registration, device opening, configuring parameters such as file system capacity, creating file system partitions, and formatting file system.

[0067] 2) Configure the bandwidth control management module parameters in the partition OS by setting the configuration data, including the partition bandwidth control size and the maximum single read / write size;

[0068] 3) Configure the corresponding volume name and permissions on partition p1, i.e., whether the partition is a read-write owner volume or a read-only share volume, and the device name that the partition can access. At the same time, the file system needs to be mounted on the partition to ensure that the partition can access the underlying NOR flash device through the file system.

[0069] 4) Shadow memory initialization: Based on the NOR flash capacity configured in step 1), obtain the sector size / number and total size information in the flash device management layer, allocate space for the shadow memory, and ensure that the total size, number of sectors, sector size and data are consistent with those in the flash device management layer. This setting is to facilitate sector-level copying during data synchronization / rollback.

[0070] 5) The WRITE_FILE interface is called on partition p1 to perform a write operation on the configured shared volume. Since p1 only has read-only permissions on the shared volume, it returns no permission.

[0071] 6) Call the WRITE_FILE interface on partition p1 to perform a write operation on the configured owner volume. If the write length exceeds the configured maximum single write size, it will return failure; if the write length does not exceed the maximum single write size, the write rate will be controlled within the configured bandwidth range.

[0072] 7) On partition p1, call the READ_FILE interface to perform a read operation on the configured owner volume. If the read length exceeds the configured maximum single read size, return failure; if the read length does not exceed the maximum single read size, read the contents of the shadow memory and return.

[0073] 8) On partition p1, call the SYNC_FILE interface to perform a synchronization operation on the configured owner volume. The synchronization operation status bit is enabled to TRUE to ensure that the process is not interrupted by other write operations. The shadow memory writes the data in it to the underlying NOR flash device, and after the write is completed, the synchronization operation status bit is reset to FALSE.

[0074] 9) Call the CLOSE_FILE interface on partition p1 to close the configured owner volume. Enable the close operation status bit to TRUE to ensure that the process is not interrupted by other write operations. The file system will flush the content to the shadow memory, the shadow memory will flush the data to the underlying NOR flash device, and after the write is completed, reset the close operation status bit to FALSE.

[0075] 10) Call the REVERT_FILE interface on partition p1 to perform a rollback operation on the configured owner volume pair. The rollback operation status bit is enabled to TRUE to ensure that the process is not interrupted by other write operations. The file system notifies the shadow memory to roll back the contents to the data on the NOR flash device. After the rollback is complete, the rollback operation status bit is reset to FALSE.

[0076] 11) At some point, the system suddenly experiences an abnormal power outage. The power outage interrupt triggers an internal synchronization operation, executing step 7). It does not require the use of status bits for protection and disables bandwidth control restrictions. It needs to synchronize all content to the NOR flash device as quickly as possible, allowing resident applications to save more data for the file system before the platform shuts down.

[0077] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A method for bandwidth control and management of a partitioned file system in a flash memory device, characterized in that, The control management method is implemented based on a control management system, which includes the following units: The bandwidth control management unit communicates with the application layer at its input end to limit the write rate of the application layer's file system. The shadow memory unit, whose input terminal communicates with the bandwidth control management unit, is used to manage the data of the application layer user under the rate limit. The flash device management layer communicates with the shadow memory unit to synchronize selected data in the shadow memory unit to the NOR flash under user control, and writes all data in the shadow memory unit to the NOR flash in the event of power failure. The shadow memory unit resides on the flash device management layer and interfaces with the file system EFMS. The application layer accesses the shadow memory unit through the file system EFMS and reads data from the shadow memory unit. The shadow memory unit interacts with the flash device management layer at the underlying level, and accesses the underlying NOR flash by calling the interface of the flash device management layer; The interaction scenarios between the shadow memory unit and the flash device management layer include: 1) manually invoking file synchronization or closing operations; 2) abnormal power failure; 3) manually invoking rollback operations to return to the previous state; The control and management system also includes a partition security access control unit; the partition security access control unit is used to enable the application layer to perform write data operations or read data operations through the embedded file management system; under the control of the partition security access control unit, a file can be read by multiple partitions of the application layer but can only be written to one partition. The application layer partitions are configured with access permissions to logical volumes based on the partition security access control unit.

2. The method for bandwidth control and management of a partitioned file system for a flash memory device according to claim 1, characterized in that, When the selected data is synchronized to the NOR flash, the amount of data written in a single operation shall not exceed 25% of the configured volume of the NOR flash.

3. The method for bandwidth control and management of a partitioned file system for a flash memory device according to claim 2, characterized in that, In the event of a power outage, there is no limit to the amount of data that can be written from the shadow memory unit to the NOR flash in a single write operation.

4. The method for bandwidth control and management of a partitioned file system for a flash memory device according to claim 3, characterized in that, The data storage capacity of the shadow memory unit is the same as that of the norflash.

5. The method for bandwidth control and management of a partitioned file system for a flash memory device according to claim 4, characterized in that, The data storage capacity of the shadow memory unit is the same as the organization structure of the norflash.

6. The method for bandwidth control management of a partitioned file system in a flash memory device according to claim 1, characterized in that, The process of the application layer writing data into the NOR flash is as follows: Initialize the bandwidth control management unit, specifically including the bandwidth control size and the read / write volume; Initialize the shadow memory unit, specifically including the total size of the shadow memory, the size of the shadow memory sector, the size of the shadow memory block, and the shadow memory block number; Initialize the NOR flash, specifically including the total size of the NOR flash, the block size of the NOR flash, the sector size of the NOR flash, and the block number of the NOR flash; The first time norflash is used, it needs to be formatted; the file system EFMS is initialized, which includes the total size of the file system EFMS, block size, sector size, number of sectors, core file system formatting, volume type configuration, and volume mounting; In normal mode, when performing synchronization or shutdown operations under user control, the operation status bit is set to determine whether to write the content to the underlying NOR flash. During the process, other write operations are not allowed. After the operation is completed, the status bit is reset, and then the application layer is notified that other write operations can be performed. In normal mode, when a rollback operation is performed under user control, the operation status bit is set to determine whether the data in the shadow memory unit should be rolled back to the previous state. Other write operations are not allowed during this process. After the rollback is completed, the status bit is reset, and then the application layer is notified that write operations are allowed.