Patent Description:
An electronic device may have a separate storage to store a large amount of data. The storage may include a flash memory. The flash memory may perform a delete operation before performing a write operation due to physical characteristics of the flash memory. For example, since valid pages and invalid pages are distributed in a plurality of blocks due to characteristics of the flash memory, a garbage collection operation may be performed to delete the previous block after copying the valid pages to a new block. <CIT> relates to an interface for enabling a computer device to utilize data property-based data placement inside a nonvolatile memory device that comprises: executing a software component at an operating system level in the computer device that monitors update statistics of all data item modifications into the nonvolatile memory device, including one or more of update frequencies for each data item, accumulated update and delete frequencies specific to each file type, and an origin of the data item; storing the update statistics of each of the data items and each of the data item types in a database; and intercepting all operations, including create, write, and update, of performed by applications to all the data items, and automatically assigning a data property identifier to each of the data items based on current update statistics in the database, such that the data items and assigned data property identifiers are transmitted over a memory channel to the non-volatile memory device. <CIT> relates to a cold and hot attribute identification and separation method and device based on a log type file system and flash memory equipment and a related product. The method comprises the steps that a log type file system determines cold and hot attributes of a file block according to a preset mode, cold and hot labels are added to the file block according to the cold and hot attributes of the file block, wherein the file block at least comprises one piece of data; the device driver sends the file blocks and the cold and hot labels to a flash memory device from the log type file system through an extension protocol; and the flash memory device determines to send the file block to a cold physical data segment or a hot physical data segment according to the cold-hot label, wherein the cold physical data segment is a physical data segment specially used for placing cold data, and the hot physical data segment is a physical data segment specially used for placing hot data. <CIT> relates to a semiconductor package apparatus that may include technology to determine a stream classification for an access request to a persistent storage media, and assign the access request to a stream based on the stream classification. <CIT> relates to a multi-streaming memory system includes a memory, and a processor coupled to the memory, the processor executing a software component that is configured to identify multiple attributes that are each related to logical block addresses (LBAs), and that each correspond to each of a plurality of streams of data writes, evaluate an importance factor for each of the attributes for each of the streams, and clustering two or more of the LBAs by assigning a stream ID to each of the LBAs based on all of the importance factors for each of the LBAs and the assigned stream.

In general, when a file write request is generated in a file system, an electronic device may transmit the file write request to the storage by tagging predefined hotness information to the extension of a file. However, as the hotness information is configured in consideration of only the extension of the file, the accuracy of the hotness information for the extension of the file may decrease.

An electronic device according to various embodiments of the disclosure may acquire use attribute information about a file requested to be deleted from a storage, and may dynamically manage attribute of the extension of the file requested to be deleted based on the use attribute information of the file requested to be deleted and a hotness condition.

In accordance with an aspect of the disclosure, an electronic device may include a memory configured to include a storage, and a processor configured to be operatively connected to the memory, wherein the processor is configured to, in case that a file delete request is generated, identify use attribute information about a file requested to be deleted, in case that the information related to the extension of the file requested to be deleted is stored in the memory, update information related to the extension of the file requested to be deleted, based on the use attribute information, and configure the attribute of the extension of the file requested to be deleted, based on the updated information related to the extension and a hotness condition of the storage.

In accordance with another aspect of the disclosure, an application processor may include a memory configured to include a storage, and a processor configured to be operatively connected to the memory, wherein the processor is configured to, in case that a file delete request is generated by a file input/output processing module, identify use attribute information about a file requested to be deleted, in case that the information related to the extension of the file requested to be deleted is stored in the memory, update, through a stream management module, information related to the extension of the file requested to be deleted, based on the use attribute information, and configure the attribute of the extension of the file requested to be deleted, based on the updated information related to the extension and a hotness condition of the storage through the stream management module.

In accordance with another aspect of the disclosure, a storage management method of an electronic device may include, in case that a file delete request is generated, identifying use attribute information about a file requested to be deleted, in case that the information related to the extension of the file requested to be deleted is stored in the memory, updating information related to the extension of the file requested to be deleted, based on the use attribute information, and configuring the attribute of the extension of the file requested to be deleted, based on the updated information related to the extension and a hotness condition of the storage.

An electronic device according to various embodiments of the disclosure may dynamically manage attribute of the extension of a file requested to be deleted based on use attribute information of the file requested to be deleted and a hotness condition thereof, thereby storing a file having the attribute of the same extension in the same block of the storage. By storing the file having the attribute of the same extension in the same block of storage, the number of valid pages included in the block can decrease during garbage collection. As the number of valid pages included in the block decreases during garbage collection, the efficiency of the garbage collection may increase.

An electronic device according to various embodiments of the disclosure may store a file having the attribute of the same extension in the same block of the storage, so that it is possible to reduce the number of executions of garbage collection, thereby extending the useful life of the storage.

Referring to <FIG>, an electronic device <NUM> in a network environment <NUM> may communicate with an electronic device <NUM> via a first network <NUM> (e.g., a short-range wireless communication network), or at least one of an electronic device <NUM> or a server <NUM> via a second network <NUM> (e.g., a long-range wireless communication network). According to an embodiment, the electronic device <NUM> may include a processor <NUM>, memory <NUM>, an input module <NUM>, a sound output module <NUM>, a display module <NUM>, an audio module <NUM>, a sensor module <NUM>, an interface <NUM>, a connection terminal <NUM>, a haptic module <NUM>, a camera module <NUM>, a power management module <NUM>, a battery <NUM>, a communication module <NUM>, a subscriber identification module (SIM) <NUM>, or an antenna module <NUM>. In some embodiments, at least one of the components (e.g., the connection terminal <NUM>) may be omitted from the electronic device <NUM>, or one or more other components may be added in the electronic device <NUM>. In some embodiments, some of the components (e.g., the sensor module <NUM>, the camera module <NUM>, or the antenna module <NUM>) may be implemented as a single component (e.g., the display module <NUM>).

The non-volatile memory <NUM> may include an internal memory <NUM> and/or an external memory <NUM>.

According to an embodiment, the audio module <NUM> may obtain the sound via the input module <NUM>, or output the sound via the sound output module <NUM> or a headphone of an external electronic device (e.g., an electronic device <NUM>) (e.g., speaker or headphone) directly (e.g., wiredly) or wirelessly coupled with the electronic device <NUM>.

The interface <NUM> may support one or more specified protocols to be used for the electronic device <NUM> to be coupled with the external electronic device (e.g., the electronic device <NUM>) directly (e.g., through wires) or wirelessly. According to an embodiment, the interface <NUM> may include, for example, a high-definition multimedia interface (HDMI), a universal serial bus (USB) interface, a secure digital (SD) card interface, or an audio interface.

The connection terminal <NUM> may include a connector via which the electronic device <NUM> may be physically connected with the external electronic device (e.g., the electronic device <NUM>). According to an embodiment, the connection terminal <NUM> may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

The communication module <NUM> may include one or more communication processors that are operable independently from the processor <NUM> (e.g., an application processor (AP)) and supports a direct (e.g., wired) communication or a wireless communication. A corresponding one of these communication modules may communicate with the external electronic device via the first network <NUM> (e.g., a short-range communication network, such as Bluetooth™, Wi-Fi direct, or infrared data association (IrDA)) or the second network <NUM> (e.g., a long-range communication network, such as a legacy cellular network, a fifth generation (<NUM>) network, a next-generation communication network, the Internet, or a computer network (e.g., LAN or wide area network (WAN))).

The NR access technology may support enhanced mobile broadband (eMBB), massive machine type communications (mMTC), or ultrareliable and low-latency communications (URLLC). The wireless communication module <NUM> may support various technologies for securing performance on a high-frequency band, such as, e.g., beamforming, massive multiple-input and multiple-output (massive MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large-scale antenna.

According to various embodiments, the antenna module <NUM> may form mmWave antenna module. According to an embodiment, the mmWave antenna module may include a printed circuit board, a RFIC disposed on a first surface (e.g., the bottom surface) of the printed circuit board, or adjacent to the first surface and capable of supporting a designated high-frequency band (e.g., an mmwave band), and a plurality of antennas (e.g., array antennas) disposed on a second surface (e.g., the top or a side surface) of the printed circuit board, or adjacent to the second surface and capable of transmitting or receiving signals of the designated high-frequency band.

At least some of the above-described components may be coupled mutually and communicate signals (e.g., commands or data) therebetween via an interperipheral communication scheme (e.g., a bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)).

<FIG> is a block diagram <NUM> illustrating an electronic device <NUM> according to various embodiments.

Referring to <FIG>, the electronic device <NUM> (e.g., the electronic device <NUM> of <FIG>) may include an application processor (AP) <NUM> and a memory <NUM>. Although not shown, the electronic device <NUM> according to various embodiments may further include a communication circuit (e.g., the communication module <NUM> of <FIG>) and/or a display (e.g., the display module <NUM> of <FIG>).

According to various embodiments, the memory <NUM> may include a volatile memory (e.g., the volatile memory <NUM> of <FIG>) and a storage <NUM> (e.g., the nonvolatile memory <NUM> of <FIG>).

According to various embodiments, a component controlling the storage <NUM> through the AP <NUM> may be referred to as a host. According to various embodiments, the host may include an environment in which software including the AP <NUM> and an operating system (e.g., the operating system <NUM> of <FIG>) operates. For example, the host may include a system on chip (SoC) including the function of a chipset responsible for operation of various applications of the electronic device <NUM> and graphic processing.

According to various embodiments, the processor <NUM> may perform operations or data processing related to control and/or communication of each component of the electronic device <NUM>. For example, the processor <NUM> may be operatively connected to the components of the electronic device <NUM>.

According to various embodiments, the processor <NUM> may execute a variety of software (e.g., the program <NUM>). The memory <NUM> may include a file system <NUM>, a block layer <NUM>, and a storage <NUM>. For example, the file system <NUM> and the block layer <NUM> are program modules stored in the memory <NUM> and may be operated by the processor <NUM>. For example, the file system <NUM> and the block layer <NUM> may be program modules stored in a nonvolatile memory (e.g., the nonvolatile memory <NUM> in <FIG>), and/or the storage <NUM>, and may be loaded into a volatile memory (e.g., the volatile memory <NUM> of <FIG>) and operated by the processor <NUM> when the file system <NUM> and the block layer <NUM> are executed.

According to various embodiments, the processor <NUM> may store file-type data in the storage <NUM> through the file system <NUM>. For example, the file system <NUM> may refer to a data structure managed by the processor <NUM> to store data in the storage <NUM>. The electronic device <NUM> may utilize the file system <NUM> to efficiently write data to the storage <NUM> or read data stored in the storage <NUM>. For example, the file system <NUM> may include file allocation table <NUM> (FAT16), file allocation table <NUM> (FAT32), new technology file system (NTFS), second extended file system (ext2), ext3, ext4, flash friendly file system (F2FS), or reiserFS.

In various embodiments of the disclosure, description will be made assuming that the file system <NUM> is a flash friendly file system (F2FS). For example, the F2FS may refer to a file system optimized for a NAND flash memory (e.g., the flash memory <NUM>) based on a log-based storage.

In various embodiments of the disclosure, the file system <NUM> may include a stream management module <NUM>, a file extension database <NUM>, and/or a file input/output processing module <NUM>.

In an embodiment, the stream management module <NUM> may request a hotness condition from the storage <NUM> when mounting (e.g., activating) the file system <NUM>. Upon receiving the hotness condition from the storage <NUM>, the stream management module <NUM> may configure the file extension database <NUM> based on the received hotness condition. For example, the hotness condition may include a capacity-based hotness condition and/or a time-based hotness condition. For example, the capacity-based hotness condition may include the sum of write capacities of other data blocks performed after a data block of a specific file is stored in the storage <NUM> and before being deleted. The time-based hotness condition may include a time (e.g., <NUM> hour, <NUM> hours, or <NUM> day) at which the specific file written to the data block of the specific file is deleted.

In another embodiment, when the file extension database exists in the storage <NUM>, the stream management module <NUM> may load the file extension database stored in the storage <NUM> into a volatile memory (e.g., the volatile memory <NUM> of <FIG>) and may mount (e.g., activate) the file system <NUM>.

According to various embodiments, the file extension database <NUM> may include an extension field, an average deletion time field indicating an average time deleted from the flash memory <NUM> of the storage <NUM> for each extension, an input sample number field indicating an access frequency for an input/output request for each extension, and/or an attribute field of the extension.

In an embodiment, the attribute of the extension may include a hot file and a cold file, but are not limited thereto. The attribute of the extension may include a none-file. For example, the none-file may include a file that does not belong to the hot file or the cold file.

As to an operation of determining attribute of the extension of a file based on a time-based hotness condition among hotness conditions according to various embodiments, the hot file may include files that are invalidated by being deleted or overwritten from the flash memory <NUM> within a designated period of time (e.g., <NUM> hour, <NUM> hours, or <NUM> day). The cold file may include files that are not deleted or overwritten from the flash memory <NUM> at a time exceeding the designated time (e.g., <NUM> hour, <NUM> hours, or <NUM> day).

As to an operation of determining attribute of the extension of the file based on the capacity-based hotness condition among the hotness conditions, after a specific file is stored, when the specific file it is not deleted while additional write of a designated capacity (e.g., about <NUM> mb) is performed in the storage <NUM>, the stream management module <NUM> may configure the specific file as the cold file. After the specific file is stored, when the specific file is deleted while additional write of the designated capacity (e.g., about <NUM> mb) is performed in the storage <NUM>, the stream management module <NUM> may configure the specific file as the hot file.

In an embodiment, the file extension database <NUM> may be updated by the stream management module <NUM> when the file is deleted. In an embodiment, the stream management module <NUM> may identify use attribute information of a file requested to be deleted when the file is deleted. For example, the stream management module <NUM> may obtain a deletion time of the file based on a time when the file is generated (or changed) and a time when the file is deleted, and based on this, may update information related to the extension of the file stored in the file extension database <NUM>.

In an embodiment, the attribute of the extension in the file extension database <NUM> may be updated based on the updated information related to the extension and the hotness condition received from the storage <NUM>. The stream management module <NUM> is not limited thereto, and the stream management module <NUM> may update the attribute of the extension based on the hotness condition for the capacity of the file requested to be deleted, stored in an arbitrary data block of the flash memory <NUM>.

According to various embodiments, the file extension database <NUM> may be separately stored in preparation for power off.

According to various embodiments, the file input/output processing module <NUM> may process file input/output. For example, when a file input/output request is generated, the file input/output processing module <NUM> may provide attribute of the extension of the file using ioctl (input/output control). The file input/output processing module <NUM> may call a hooking function registered by the stream management module <NUM> when the file input/output request, for example, a file delete request is generated. When the file input/output request, for example, a file write request is generated, the file input/output processing module <NUM> may configure the attribute of the extension of the file with reference to the file extension database <NUM>. For example, the file input/output processing module <NUM> may identify the attribute of the extension of the file requested to be written with reference to the file extension database <NUM>, and may configure the attribute (e.g., a hot file or a cold file) of the extension of the file requested to be written based on the attribute configured in the extension. When the file write request is generated, the file input/output processing module <NUM> may make the file write request to the block layer <NUM> by tagging the attribute of the extension to the file requested to be written.

According to various embodiments, the block layer <NUM> may store data of a file in the storage <NUM> and may input and output data. The block layer <NUM> may transmit the attribute of the extension of the file tagged to the block input/output to the storage <NUM> during block write processing.

According to various embodiments, the storage <NUM> may include an interface <NUM>, a controller <NUM>, and/or a flash memory <NUM>. The storage <NUM> may store a variety of data used by at least one component (e.g., the processor <NUM>) of the electronic device <NUM>. For example, data may include input data or output data for software (e.g., the program <NUM>) and commands related thereto.

In an embodiment, the storage <NUM> may receive the attribute of the extension of the file from the file system <NUM> when performing a file write operation, and may store data based on the received attribute. For example, the storage <NUM> may store files having the same attribute of the extension in the same erase block.

In an embodiment, the interface <NUM> may receive and process an input/output command to be executed in the storage <NUM> from the block layer <NUM>. For example, in response to reception of the file write request from the block layer <NUM>, the interface <NUM> may process data the of the file based on the attribute of the extension of the file. For example, when the storage <NUM> supports a small computer systems interface (SCSI), the interface <NUM> may designate the attribute of the extension of a file requested to be written as a hot file or a cold file using a separate command such as "WRITESTREAM" to transmit the designated result to the controller <NUM>. For another example, the interface <NUM> may transmit the attribute of the extension to the controller <NUM> by using a group number defined in a "WRITE command" field.

In an embodiment, the controller <NUM> may drive a program that manages storage and access of the data of the file and in the flash memory <NUM>. For example, the file requested to be written may be expressed as data in the flash memory <NUM>. When the data is stored, the controller <NUM> may store data having the same attribute of the extension in the same erase block in the flash memory <NUM> with reference to the attribute of the extension. As the data having the same attribute of the extension is stored in the same erase block, garbage collection efficiency may be increased.

According to various embodiments, the flash memory <NUM> of the storage <NUM> may include a nonvolatile memory (e.g., the nonvolatile memory <NUM> of <FIG>). The flash memory <NUM> may include a NAND flash memory that meets a universal flash storage (UFS) standard.

In an embodiment, the flash memory <NUM> may include a plurality of flash chips. Each of the plurality of flash chips may include a plurality of erase blocks. When storing data, the storage <NUM> may initialize the data in units of an erase block and then write the erase block in units of pages.

According to various embodiments, the storage <NUM> may extract a logical address corresponding to a corresponding file based on a delete request received from the processor <NUM> (e.g., the block layer <NUM>). The storage <NUM> may delete a physical page corresponding to the extracted logical address. In another embodiment, the flash memory <NUM> may store a mapping table representing a relationship (a mapping relationship) between a logical address and a physical address for the stored data. For example, the mapping table may refer to a mapping table (a logical to physical address mapping information, L2P table) that maps the logical address and the physical address of the flash memory <NUM> to each other. The storage <NUM> may delete data of the logical address and the physical address extracted from the mapping table.

According to various embodiments, the stream management module <NUM>, the file extension database <NUM>, the file input/output processing module <NUM>, and/or the block layer <NUM> may be stored in the storage <NUM>. For example, the stream management module <NUM>, the file input/output processing module <NUM>, and/or the block layer <NUM> may be stored in the flash memory <NUM> and may be loaded, when executed, into the memory <NUM> (e.g., the volatile memory <NUM> of <FIG>) to be executed by the processor <NUM>.

<FIG> is a block diagram <NUM> illustrating signal flows among the file system <NUM>, the block layer <NUM>, and the storage <NUM> according to various embodiments.

Referring to <FIG>, the stream management module <NUM> may request, in <NUM>, a hotness condition from the storage <NUM>. The storage <NUM> may transmit, in <NUM>, the hotness condition to the stream management module <NUM>. For example, the hotness condition may be configured based on the attribute of the storage <NUM> (e.g., the number of erase blocks and the size of the erase block). The hotness condition may include a condition for determining attribute of the extension of an input/output requested file as a hot file or a cold file.

In an embodiment, when a file input/output request (e.g., a write/delete request) is generated, the file input/output processing module <NUM> may transmit, in <NUM>, information related to the file input/output request to the stream management module <NUM>. The file input/output processing module <NUM> may receive, in <NUM>, a response signal from the stream management module <NUM> in response to transmitting, in <NUM>, information related to the file input/output request to the stream management module <NUM>.

In an embodiment, when a file write request is generated, the file input/output processing module <NUM> may identify attribute of the extension of the file with reference to, in <NUM>, the file extension database <NUM>. The attribute of the extension may include a hot file and a cold file.

In an embodiment, the file input/output processing module <NUM> may tag the attribute of the extension to the file requested to be written to make a file write request <NUM> to the block layer <NUM>.

In an embodiment, the block layer <NUM> may transmit, in <NUM>, the attribute of the extension of the file tagged to the block input/output to the storage <NUM> during block write processing. The block layer <NUM> may receive, in <NUM>, a response signal from the storage <NUM> in response to transmitting, in <NUM>, the attribute of the extension of the file tagged to the block input/output to the storage <NUM>.

In an embodiment, the storage <NUM> may perform a write operation of the file to the flash memory (e.g., the flash memory <NUM> of <FIG>) based on the attribute of the extension received from the block layer <NUM>. For example, the storage <NUM> may store files having the same attribute of the extension in the same erase block.

In an embodiment, when a file delete request is generated, the stream management module <NUM> may obtain a deletion time of the file requested to be deleted based on a time when the file requested to be deleted is generated in the storage <NUM> and a time requested to be deleted, and based on this, may update information related to the extension of the file requested to be deleted, stored in the file extension database <NUM>.

<FIG> is a flowchart <NUM> illustrating a method of configuring a hotness condition by activating the file system <NUM> according to various embodiments.

Referring to <FIG>, in operation <NUM>, a processor (e.g., the processor <NUM> of <FIG>) may mount (e.g., activate) the file system <NUM>.

In an embodiment, in operation <NUM>, the processor <NUM> may activate a stream management module (e.g., the stream management module <NUM> of <FIG>), a file input/output processing module (e.g., the file input/output processing module <NUM> of <FIG>), and a block layer (e.g., block layer <NUM> of <FIG>).

In an embodiment, in operation <NUM>, the processor <NUM> (e.g., the stream management module <NUM>) may register a hooking function to be called when a file is generated/deleted in the file input/output processing module <NUM>. For example, by registering the hooking function to be called when the file is generated/deleted, the processor <NUM> (e.g., the stream management module <NUM>) may receive information on generation/deletion of a file with an extension from the file input/output processing module <NUM>.

In an embodiment, in operation <NUM>, the processor <NUM> may acquire a hotness condition from the storage <NUM>. For example, the processor <NUM> may request a hotness condition from the storage <NUM>, and in response to the request, may receive the hotness condition from the storage <NUM>. For example, the hotness condition is a reference value for determining the attribute of the extension of the file, and may include, for example, a capacity-based hotness condition and/or a time-based hotness condition. The capacity-based hotness condition may include the sum of write capacities of other data blocks performed after a data block of a specific file is stored in the storage <NUM> and before being deleted. The time-based hotness condition may include a time at which the specific file written to the data block of the specific file is deleted.

In an embodiment, in operation <NUM>, the processor <NUM> may initialize a file extension database (e.g., the file extension database <NUM> of <FIG>) based on the hotness condition. For example, the file extension database <NUM> may include an extension field, an average deletion time field indicating an average time deleted from the flash memory <NUM> of the storage <NUM> for each extension, an input sample number field indicating an access frequency for an input/output request for each extension, and/or an attribute field of the extension. The hotness condition may be used to determine the attribute (e.g., a hot file or a cold file) of the extension stored in the file extension database <NUM>.

In various embodiments, although not shown, in a case in which the file system <NUM> is mounted, when the hotness condition is not acquired from the storage <NUM>, the processor <NUM> may initialize the file extension database <NUM> based on a predetermined hotness condition. The processor <NUM> may classify the attribute of the extension of the file into the hot file or the cold file based on the predetermined hotness condition.

In various embodiments, when there is the file extension database stored in the storage <NUM>, the file extension database may be loaded into a volatile memory (e.g., the volatile memory <NUM> of <FIG>) of a host terminal managed by the processor <NUM>, and may then initialize the file extension database <NUM>.

<FIG> is a flowchart <NUM> illustrating a method of transmitting a file write request to a storage when the file write request is generated according to various embodiments.

Referring to <FIG>, when a file write request is generated, in operation <NUM>, a processor (e.g., the processor <NUM> of <FIG>) (e.g., the file input/output processing module <NUM> of <FIG>) may identify attribute of the extension of a file requested to be written determined based on a hotness condition. For example, the processor <NUM> may identify the attribute of the extension of the file with reference to a file extension database (e.g., the file extension database <NUM> of <FIG>). The attribute of the extension may include a hot file and a cold file.

In an embodiment, in operation <NUM>, the processor <NUM> (e.g., the block layer <NUM>) may tag the attribute of the extension to the file requested to be written to transmit the tagged result to a storage (e.g., the storage <NUM> of <FIG>). For example, the processor <NUM> (e.g., the file input/output processing module <NUM>) may identify the attribute of the extension of the file with reference to the file extension database <NUM> when a block input/output is generated. The file input/output processing module <NUM> may tag the identified attribute of the extension to the file requested to be written and may transmit the tagged result to the block layer <NUM>. For example, when the attribute of the extension of the file requested to be written is the cold file, the file input/output processing module <NUM> may tag the cold file to the file requested to be written with reference to the file extension database <NUM>, and may transmit the tagged result to a storage (e.g., the storage <NUM> of <FIG>). The block layer <NUM> may transmit the attribute of the extension of the file tagged to the block input/output to the storage <NUM> during block write processing.

In an embodiment, the storage <NUM> may perform a write operation of the file on a flash memory (e.g., the flash memory <NUM> of <FIG>) based on the attribute of the extension received from the block layer <NUM>. For example, the storage <NUM> may store a file having the same attribute of the extension in the same erase block. As the file having the same attribute of the extension is stored in the same erase block, the number of valid pages included in the erase block may decrease during garbage collection. As the number of valid pages included in the erase block decreases during garbage collection, the efficiency of the garbage collection may increase.

<FIG> is a flowchart <NUM> illustrating a method of updating the file extension database <NUM> according to various embodiments.

Referring to <FIG>, when a file delete request is generated, in operation <NUM>, a processor (e.g., the processor <NUM> of <FIG>) may call a hooking function registered by a stream management module (e.g., the stream management module <NUM> of <FIG>). For example, as the file delete request is generated, the processor <NUM> may receive information on deletion of a file with an extension from a file input/output processing module (e.g., the file input/output processing module <NUM> of <FIG>).

In an embodiment, in operation <NUM>, the processor <NUM> (e.g., the stream management module <NUM>) may obtain a deletion time of a file requested to be deleted based on a time when the file requested to be deleted is generated in a storage (e.g., the storage <NUM> of <FIG>) and a time requested to be deleted. For example, the processor <NUM> (e.g., the stream management module <NUM>) may compare the generation time of the file (or modification {change} time) with the time of the file requested to be deleted, and based on this, may obtain the deletion time of the file.

In an embodiment, in operation <NUM>, the processor <NUM> may determine whether the extension of the file requested to be deleted exists in a file extension database (e.g., the file extension database <NUM> of <FIG>). When the extension of the file requested to be deleted exists in the file extension database <NUM> (e.g., YES in operation <NUM>), in operation <NUM>, the processor <NUM> may update information related to the extension of the file requested to be deleted based on the obtained deletion time of the file requested to be deleted.

In an embodiment, the file extension database <NUM> may include an extension field, an average deletion time field indicating an average time deleted from the flash memory <NUM> of the storage <NUM> for each extension, an input sample number field indicating an access frequency for an input/output request for each extension, and/or an attribute field of the extension.

In an embodiment, when the extension of the file requested to be deleted exists in the file extension database <NUM>, in operation <NUM>, the processor <NUM> (e.g., the stream management module <NUM>) may update the information related to the extension of the file requested to be deleted, stored in the file extension database <NUM> based on the obtained deletion time of the file requested to be deleted. For example, the information related to the extension of the file requested to be deleted may be stored previously, and the processor <NUM> (e.g., the stream management module <NUM>) may update the previously stored information related to the extension based on the deletion time of the file requested to be deleted. For example, the processor <NUM> (e.g., the stream management module <NUM>) may update an average deletion time field and/or an input sample number field of the corresponding extension in the file extension database <NUM>.

In an embodiment, in operation <NUM>, the processor <NUM> (e.g., the stream management module <NUM>) may identify the write capacity of the storage <NUM> of the file requested to be deleted. For example, the processor <NUM> (e.g., the stream management module <NUM>) may identify the sum of write capacities of the data block performed after the file is stored in an arbitrary data block and before being deleted.

In an embodiment, in operation <NUM>, the processor <NUM> may update the attribute of the extension of the file requested to be deleted based on a hotness condition. For example, the processor <NUM> may determine the attribute of the extension based on the average deletion time and hotness condition of the file. The attribute of the extension stored in the file extension database <NUM> may be predetermined, and the predetermined attribute of the extension may be maintained based on the determined attribute of the extension, or may be changed to the determined attribute of the extension.

In an embodiment, the hotness condition may include a capacity-based hotness condition and/or a time-based hotness condition. For example, the capacity-based hotness condition may include the sum of write capacities of other data blocks performed after a data block of a specific file is stored in the storage <NUM> and before being deleted. The time-based hotness condition may include a time when the specific file written to the data block of the specific file is deleted.

In an embodiment, although not shown, the processor <NUM> may update the attribute of the extension of the file in the above-described operation <NUM> based on the input sample number field in the file extension database <NUM>. For example, in order to increase the accuracy of determining the attribute of the extension, when the number of input samples exceeds a designated number of times, the processor <NUM> may perform the above-described operation <NUM>.

In an embodiment, when the extension of the file requested to be deleted does not exist in the file extension database <NUM> (e.g., NO in operation <NUM>), in operation <NUM>, the processor <NUM> may add information related to the extension of the file requested to be deleted. For example, the processor <NUM> may generate the information related to the extension to include the extension, deletion time of the file having the extension, the number of input samples, and/or attribute of the extension.

In an embodiment, in operation <NUM>, the processor <NUM> may configure the attribute of the extension of the file requested to be deleted based on the hotness condition.

<FIG> is a flowchart <NUM> illustrating a storage management method according to various embodiments.

Referring to <FIG>, when a file delete request is generated, in operation <NUM>, a processor (the processor <NUM> of <FIG>) may identify use attribute information of a file requested to be deleted. For example, the use attribute information of the file requested to be deleted may include a deletion time of the file requested to be deleted, obtained based on a time when the file requested to be deleted is generated in a storage (e.g., the storage <NUM> of <FIG>) and a time requested to be deleted, and/or write capacity of the file requested to be deleted within the storage <NUM>.

In an embodiment, in operation <NUM>, when information related to the extension of the file requested to be deleted is stored in a memory (e.g., the volatile memory <NUM> of <FIG>), the processor <NUM> may update the information related to the extension of the file requested to be deleted based on the use attribute information.

In an embodiment, the processor <NUM> may update the information related to the extension of the file requested to be deleted, stored in a file extension database (e.g., the file extension database <NUM> of <FIG>). The file extension database <NUM> may include an extension field, an average deletion time field indicating an average time deleted from the flash memory <NUM> of the storage <NUM> for each extension, an input sample number field indicating an access frequency for an input/output request for each extension, and/or an attribute field of the extension. The processor <NUM> (e.g., the stream management module <NUM>) may update the average deletion time field and/or input sample number field of the corresponding extension within the file extension database <NUM>.

In the present invention, in operation <NUM>, the processor <NUM> configures the attribute of the extension of the file requested to be deleted based on the updated information related to the extension and a hotness condition of the storage (e.g., the storage <NUM> of <FIG>). In the present invention, the hotness condition includes a capacity-based hotness condition and/or a time-based hotness condition. Based on whether the updated information related to the extension satisfies the hotness condition, the attribute (e.g., a hot file or a cold file) of the extension of the file requested to be deleted is updated.

It is to be understood that if an element (e.g., a first element) is referred to, with or without the term "operatively" or "communicatively," as "coupled with," "coupled to," "connected with," or "connected to" another element (e.g., a second element), it means that the element may be coupled with the other element directly (e.g., through wires), wirelessly, or via a third element.

As used in connection with various embodiments of the disclosure, the term "module" may include a unit implemented in hardware, software, or firmware, and may interchangeably be used with other terms, for example, "logic," "logic block," "part," or "circuitry. " A module may be a single integral component, or a minimum unit or part thereof, adapted to perform one or more functions.

Claim 1:
An electronic device (<NUM>) comprising:
a memory (<NUM>) comprising a storage (<NUM>); and
a processor (<NUM>) operatively connected to the memory (<NUM>),
wherein the processor (<NUM>) is configured to:
based on a request to delete a file, identify (<NUM>) use attribute information about the file requested to be deleted;
in case that information related to an extension of the file requested to be deleted is stored in the memory, update (<NUM>) the information related to the extension of the file requested to be deleted, based on the use attribute information; and
configure (<NUM>) an attribute of the extension of the file requested to be deleted, based on whether the updated information related to the extension satisfies a hotness condition of the storage (<NUM>),
wherein the hotness condition comprises at least one of a capacity-based hotness condition or a time-based hotness condition,
wherein the capacity-based hotness condition comprises a sum of write capacities of data blocks after a data block of a specific file is stored in the storage and before being deleted,
wherein the time-based hotness condition comprises a time at which the specific file written to the data block of the specific file is deleted, and
wherein the processor is further configured to store another file having the same attribute of the extension in a same block of the storage based on the configured attribute of the extension, wherein the processor is further configured to receive the hotness condition from the storage based on an input requesting the hotness condition transmitted to the storage.