Method for performing garbage collection and electronic device supporting same

By dynamically determining the starting point and throughput of garbage collection at the host and adjusting the priority of GC and IO processing according to IO attributes, the problem of GC delayed IO processing in the prior art is solved, and the efficiency of GC and IO processing is improved.

CN120035816APending Publication Date: 2025-05-23SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380074163.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-11-09
Filing Date
2023-10-19
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The prior art may delay input/output (IO) processing when performing garbage collection (GC), resulting in slowing or pausing IO-related programs running, and failing to effectively consider the power demand of electronic devices for GC, reducing memory performance and GC efficiency.

Method used

By dynamically determining the starting point and throughput of garbage collection at the host and identifying the properties of IO when the GC is running, it decides whether to delay IO processing or pause GC to optimize the execution of GC.

Benefits of technology

It is realized that GC is continued without delaying IO processing, which improves the efficiency of IO processing and GC performance, and avoids degradation of memory performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120035816A_ABST
    Figure CN120035816A_ABST
Patent Text Reader

Abstract

An electronic device including a storage device and a host is disclosed. The host may be configured to: determine a start point of garbage collection (GC) to be performed by the storage device and a throughput of the GC based on at least one piece of information related to the electronic device; transmitting information about a start point of the GC and a throughput of the GC to the storage device based on the determination; identifying whether an input / output (IO) occurs while the GC is executed by the storage device; identifying the attribute of the IO based on the occurrence of the IO; determining to delay processing of the IO such that execution of the GC by the storage device continues based on an attribute of the IO indicating a first attribute; and control the storage device to at least temporarily suspend execution of the GC and process the IO based on an attribute of the IO indicating a second attribute.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to a method for performing garbage collection and an electronic device supporting the method. Background Art

[0002] With the development of digital convergence combining various information and communication technologies, electronic devices are providing various functions or services incorporated into their core functions. In response to this, effective management of memory storing information related to the functions or services is emerging, and various technologies are applied to electronic devices to improve the performance of the memory. For example, the electronic device may perform so-called garbage collection (GC), which obtains free blocks by releasing no longer valid blocks in the memory blocks dynamically allocated by the program.

[0003] For the purpose of helping to understand the present disclosure, the foregoing content may be provided as related art. No assertion or determination is made as to whether any of the foregoing content may be applied as prior art related to the present disclosure. Summary of the invention

[0004] Solution to the problem An electronic device according to an embodiment of the present disclosure may include a storage device and a host electrically connected to the storage device.

[0005] According to an embodiment, the host may be configured to: determine a starting point of garbage collection (GC) to be performed by the storage device and a throughput of the GC based on at least one information related to the electronic device, send information related to the starting point of the GC and the throughput of the GC to the storage device based on the determination, identify whether input / output (IO) occurs while the GC is performed by the storage device, identify an attribute of the IO based on the occurrence of the IO, indicate a first attribute based on the attribute of the IO, determine to delay processing of the IO to continue the GC performed by the storage device, and control the storage device so that the storage device at least temporarily suspends the GC and processes the IO based on the attribute of the IO indicating a second attribute.

[0006] A method for performing GC of an electronic device may include: determining, at a host of the electronic device, a starting point of the GC to be performed by the storage device and a throughput of the GC based on at least one information related to the electronic device, sending, at the host, information related to the starting point of the GC and the throughput of the GC to the storage device based on the determination, identifying, at the host, whether an IO occurs while the GC is performed by the storage device, identifying, at the host, an attribute of the IO based on the occurrence of the IO, indicating, at the host, a first attribute based on the attribute of the IO, determining to delay processing of the IO to continue the GC performed by the storage device, and controlling, at the host, based on the attribute of the IO indicating a second attribute so that the storage device at least temporarily suspends the GC and processes the IO.

[0007] In a computer-readable storage medium recording a program for executing a method for executing GC of an electronic device, the program can execute the following operations: determining, at a host of the electronic device, a starting point of the GC to be executed by a storage device and a throughput of the GC based on at least one information related to the electronic device, sending, at the host, information related to the starting point of the GC and the throughput of the GC to the storage device based on the determination, identifying, at the host, whether an IO occurs while the GC is executed by the storage device, identifying, at the host, an attribute of the IO based on the occurrence of the IO, indicating a first attribute at the host based on the attribute of the IO, determining to delay processing of the IO to continue the GC executed by the storage device, and controlling, at the host, based on the attribute of the IO indicating a second attribute, so that the storage device at least temporarily suspends the GC and processes the IO. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 is a diagram illustrating electronic devices in a network environment according to various embodiments.

[0009] Figure 2 is a diagram illustrating components of an electronic device according to an embodiment.

[0010] Figure 3 is a diagram illustrating an example of determining a garbage collection (GC) starting point according to an embodiment.

[0011] Figure 4 is a diagram illustrating another example of determining a GC starting point according to an embodiment.

[0012] Figure 5 is a diagram illustrating still another example of determining a GC starting point according to an embodiment.

[0013] Figure 6 is a diagram illustrating an example of determining GC throughput according to an embodiment.

[0014] Figure 7 is a diagram illustrating another example of determining GC throughput according to an embodiment.

[0015] Figure 8 is a diagram illustrating yet another example of determining GC throughput according to an embodiment.

[0016] Fig. 9 is a diagram illustrating an example of a signal flow between a storage device and a host for performing GC according to an embodiment.

[0017] Fig.10 is a diagram illustrating another example of a signal flow between a storage device and a host for performing GC according to an embodiment.

[0018] Fig.11 is a diagram illustrating still another example of a signal flow between a storage device and a host for performing GC according to an embodiment.

[0019] Regarding the description of the drawings, the same or similar drawing reference numerals may be used for the same or similar components. DETAILED DESCRIPTION

[0020] Garbage collection (GC) has been performed in the following manner: a controller integrated with the memory itself determines the starting point, occupation duration, and / or throughput of GC based on information related to the memory (e.g., GC policy of the memory and / or block status of the memory). However, GC limited to memory information (which may not dynamically respond to input / output (IO) occurring during its operation) may delay IO processing and further cause IO-related programs to slow down or pause in operation. In addition, GC performed based on memory information does not take into account the level required by the electronic device (or host) for GC, and therefore, memory performance and / or GC efficiency may be reduced.

[0021] Embodiments of the present disclosure may provide a method for performing GC and an electronic device supporting the method, which may dynamically determine a GC starting point and a GC throughput based on at least one information related to the electronic device.

[0022] In addition, embodiments of the present disclosure may provide a method for performing GC and an electronic device supporting the method, which may dynamically determine control of the operation of GC or the processing of IO based on properties of IO occurring when GC is running.

[0023] Hereinafter, various embodiments of the present disclosure are described with reference to the accompanying drawings. However, it is not intended to limit the present disclosure to specific embodiments, and it should be understood to cover various modifications, equivalents and / or alternatives of the embodiments of the present disclosure.

[0024] Figure 1 is a block diagram illustrating an electronic device 101 in a network environment 100 according to various embodiments.

[0025] Reference Figure 1 , the electronic device 101 in the network environment 100 may communicate with the electronic device 102 via the first network 198 (e.g., a short-range wireless communication network), or communicate with at least one of the electronic device 104 or the server 108 via the second network 199 (e.g., a long-range wireless communication network). According to an embodiment, the electronic device 101 may communicate with the electronic device 104 via the server 108. According to an embodiment, the electronic device 101 may include a processor 120, a memory 130, an input module 150, a sound output module 155, a display module 160, an audio module 170, a sensor module 176, an interface 177, a connection terminal 178, a haptic module 179, a camera module 180, a power management module 188, a battery 189, a communication module 190, a user identification module (SIM) 196, or an antenna module 197. In some embodiments, at least one of the components (e.g., the connection terminal 178) may be omitted from the electronic device 101, or one or more other components may be added to the electronic device 101. In some embodiments, some of the components (eg, sensor module 176, camera module 180, or antenna module 197) may be implemented as a single component (eg, display module 160).

[0026] The processor 120 may run, for example, software (e.g., program 140) to control at least one other component (e.g., hardware component or software component) of the electronic device 101 in combination with the processor 120, and may perform various data processing or calculations. According to one embodiment, as at least part of the data processing or calculation, the processor 120 may store a command or data received from another component (e.g., sensor module 176 or communication module 190) in the volatile memory 132, process the command or data stored in the volatile memory 132, and store the resultant data in the non-volatile memory 134. According to an embodiment, the processor 120 may include a main processor 121 (e.g., a central processing unit (CPU) or an application processor (AP)) or an auxiliary processor 123 (e.g., a graphics processing unit (GPU), a neural processing unit (NPU), an image signal processor (ISP), a sensor hub processor, or a communication processor (CP)) that is independent of or combined with the main processor 121 in operation. For example, when the electronic device 101 includes a main processor 121 and an auxiliary processor 123, the auxiliary processor 123 may be adapted to consume less power than the main processor 121, or adapted to be dedicated to a specific function. The auxiliary processor 123 may be implemented separately from the main processor 121, or as part of the main processor 121.

[0027] When the main processor 121 is in an inactive (e.g., sleep) state, the auxiliary processor 123 (rather than the main processor 121) may control at least some of the functions or states related to at least one component among the components of the electronic device 101 (e.g., the display module 160, the sensor module 176, or the communication module 190), or when the main processor 121 is in an active state (e.g., running an application), the auxiliary processor 123 may control at least some of the functions or states related to at least one component among the components of the electronic device 101 (e.g., the display module 160, the sensor module 176, or the communication module 190) together with the main processor 121. According to an embodiment, the auxiliary processor 123 (e.g., an image signal processor or a communication processor) may be implemented as part of another component (e.g., a camera module 180 or a communication module 190) that is functionally related to the auxiliary processor 123. According to an embodiment, the auxiliary processor 123 (e.g., a neural processing unit) may include a hardware structure dedicated to artificial intelligence model processing. The artificial intelligence model may be generated through machine learning. For example, such learning may be performed by the electronic device 101 where the artificial intelligence is executed or via a separate server (e.g., server 108). The learning algorithm may include, but is not limited to, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, for example. The artificial intelligence model may include multiple artificial neural network layers. The artificial neural network may be a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q network, or a combination of two or more thereof, but is not limited thereto. Additionally or optionally, the artificial intelligence model may include a software structure in addition to a hardware structure.

[0028] The memory 130 may store various data used by at least one component of the electronic device 101 (e.g., the processor 120 or the sensor module 176). The various data may include, for example, software (e.g., the program 140) and input data or output data for commands related thereto. The memory 130 may include a volatile memory 132 or a nonvolatile memory 134.

[0029] The program 140 may be stored as software in the memory 130 , and may include, for example, an operating system (OS) 142 , middleware 144 , or applications 146 .

[0030] The input module 150 may receive a command or data to be used by another component (e.g., the processor 120) of the electronic device 101 from outside (e.g., a user) of the electronic device 101. The input module 150 may include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus).

[0031] The sound output module 155 can output sound signals to the outside of the electronic device 101. The sound output module 155 may include, for example, a speaker or a receiver. The speaker can be used for general purposes such as playing multimedia or playing records. The receiver can be used to receive incoming calls. Depending on the embodiment, the receiver can be implemented as a separate part from the speaker, or as part of the speaker.

[0032] The display module 160 may visually provide information to the outside of the electronic device 101 (e.g., a user). The display module 160 may include, for example, a display, a holographic device, or a projector, and a control circuit for controlling a corresponding one of the display, the holographic device, and the projector. According to an embodiment, the display module 160 may include a touch sensor adapted to detect a touch or a pressure sensor adapted to measure the strength of a force caused by a touch.

[0033] The audio module 170 may convert sound into an electrical signal, or vice versa. According to an embodiment, the audio module 170 may obtain sound via the input module 150, or output sound via the sound output module 155 or an earphone of an external electronic device (e.g., electronic device 102) directly (e.g., wired) or wirelessly coupled to the electronic device 101.

[0034] The sensor module 176 may detect an operating state (e.g., power or temperature) of the electronic device 101 or an environmental state (e.g., a state of a user) outside the electronic device 101, and then generate an electrical signal or a data value corresponding to the detected state. According to an embodiment, the sensor module 176 may include, for example, a gesture sensor, a gyro sensor, an atmospheric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an infrared (IR) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illumination sensor.

[0035] The interface 177 may support one or more specific protocols to be used to directly (e.g., wired) or wirelessly couple the electronic device 101 with an external electronic device (e.g., the electronic device 102). According to an embodiment, the interface 177 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.

[0036] The connection end 178 may include a connector, wherein the electronic device 101 can be physically connected to an external electronic device (e.g., the electronic device 102) via the connector. According to an embodiment, the connection end 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0037] The haptic module 179 may convert the electric signal into mechanical stimulation (eg, vibration or motion) or electric stimulation that can be recognized by the user via his sense of touch or kinesthetic sense. According to an embodiment, the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electric stimulator.

[0038] The camera module 180 may capture still images or moving images. According to an embodiment, the camera module 180 may include one or more lenses, an image sensor, an image signal processor, or a flash.

[0039] The power management module 188 may manage power supply to the electronic device 101. According to one embodiment, the power management module 188 may be implemented as, for example, at least a portion of a power management integrated circuit (PMIC).

[0040] The battery 189 may power at least one component of the electronic device 101. According to an embodiment, the battery 189 may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0041] The communication module 190 may support establishing a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (e.g., electronic device 102, electronic device 104, or server 108), and perform communication via the established communication channel. The communication module 190 may include one or more communication processors capable of operating independently from the processor 120 (e.g., an application processor (AP)) and supporting direct (e.g., wired) communication or wireless communication. According to an embodiment, the communication module 190 may include a wireless communication module 192 (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 194 (e.g., a local area network (LAN) communication module or a power line communication (PLC) module). A corresponding one of these communication modules may communicate via a first network 198 (e.g., a short-range communication network such as Bluetooth TM ), Wireless Fidelity (Wi-Fi) Direct, or Infrared Data Association (IrDA)), or a second network 199 (e.g., a long-distance communication network such as a traditional cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or a wide area network (WAN)))) to communicate with an external electronic device. These various types of communication modules may be implemented as a single component (e.g., a single chip), or may be implemented as multiple components separated from each other (e.g., multiple chips). The wireless communication module 192 may identify and authenticate the electronic device 101 in a communication network (such as a first network 198 or a second network 199) using user information (e.g., an International Mobile Subscriber Identity (IMSI)) stored in the user identification module 196.

[0042] The wireless communication module 192 may support 5G networks after 4G networks and next generation communication technologies (e.g., new radio (NR) access technologies). NR access technologies may support enhanced mobile broadband (eMBB), massive machine type communications (mMTC), or ultra-reliable low latency communications (URLLC). The wireless communication module 192 may support high frequency bands (e.g., millimeter wave bands) to achieve, for example, high data transmission rates. The wireless communication module 192 may support various technologies for ensuring performance on high frequency bands, such as, for example, beamforming, massive multiple input multiple output (massive MIMO), full dimensional MIMO (FD-MIMO), array antennas, analog beamforming, or massive antennas. The wireless communication module 192 may support various requirements specified in the electronic device 101, an external electronic device (e.g., electronic device 104), or a network system (e.g., a second network 199). According to an embodiment, the wireless communication module 192 may support a peak data rate for implementing eMBB (e.g., 20 Gbps or greater), loss coverage for implementing mMTC (e.g., 164 dB or less), or U-plane delay for implementing URLLC (e.g., 0.5 ms or less for each of the downlink (DL) and uplink (UL), or 1 ms or less for a round trip).

[0043] The antenna module 197 may transmit or receive a signal or power to or from the outside of the electronic device 101 (e.g., an external electronic device). According to an embodiment, the antenna module 197 may include an antenna including a radiation element formed of a conductive material or a conductive pattern formed in or on a substrate (e.g., a printed circuit board (PCB)). According to an embodiment, the antenna module 197 may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication scheme used in a communication network (such as the first network 198 or the second network 199) may be selected from the plurality of antennas by, for example, the communication module 190 (e.g., the wireless communication module 192). A signal or power may then be transmitted or received between the communication module 190 and the external electronic device via the selected at least one antenna. According to an embodiment, another component (e.g., a radio frequency integrated circuit (RFIC)) other than the radiation element may be additionally formed as a part of the antenna module 197.

[0044] According to various embodiments, the antenna module 197 may form a millimeter wave antenna module. According to an embodiment, the millimeter wave antenna module may include a printed circuit board, an RFIC, and a plurality of antennas (e.g., array antennas), wherein the RFIC is disposed on a first surface (e.g., bottom surface) of the printed circuit board or adjacent to the first surface and is capable of supporting a designated high frequency band (e.g., millimeter wave band), and the plurality of antennas are disposed on a second surface (e.g., top surface or side surface) of the printed circuit board or adjacent to the second surface and are capable of transmitting or receiving signals of the designated high frequency band.

[0045] At least some of the above components may be coupled to each other via an inter-peripheral communication scheme (e.g., a bus, a general purpose input output (GPIO), a serial peripheral interface (SPI), or a mobile industry processor interface (MIPI)) and communicatively transmit signals (e.g., commands or data) therebetween.

[0046] According to an embodiment, a command or data may be sent or received between the electronic device 101 and the external electronic device 104 via the server 108 combined with the second network 199. Each of the electronic device 102 or the electronic device 104 may be a device of the same type as the electronic device 101, or a device of a different type from the electronic device 101. According to an embodiment, all or some operations to be executed in the electronic device 101 may be executed in one or more of the external electronic device 102, the external electronic device 104, or the server 108. For example, if the electronic device 101 should automatically execute a function or service or should execute a function or service in response to a request from a user or another device, the electronic device 101 may request one or more external electronic devices to execute at least part of the function or service instead of executing the function or service, or the electronic device 101 may request the one or more external electronic devices to execute at least part of the function or service in addition to executing the function or service. The one or more external electronic devices receiving the request may execute at least part of the requested function or service, or execute another function or another service related to the request, and transmit the result of the execution to the electronic device 101. The electronic device 101 may provide the result as at least a partial reply to the request with or without further processing the result. To this end, cloud computing, distributed computing, mobile edge computing (MEC) or client-server computing technology, for example, may be used. The electronic device 101 may use, for example, distributed computing or mobile edge computing to provide ultra-low latency services. In another embodiment, the external electronic device 104 may include an Internet of Things (IoT) device. The server 108 may be an intelligent server using machine learning and / or neural networks. According to an embodiment, the external electronic device 104 or the server 108 may be included in the second network 199. The electronic device 101 may be applied to intelligent services (e.g., smart homes, smart cities, smart cars, or healthcare) based on 5G communication technology or IoT-related technologies.

[0047] The electronic device according to various embodiments of the present disclosure may be various types of devices. The electronic device may include, for example, a portable communication device (e.g., a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a household appliance. According to an embodiment of the present disclosure, the electronic device is not limited to the devices described above.

[0048] It should be understood that the various embodiments of the present disclosure and the terms used therein are not intended to limit the technical features disclosed in this article to specific embodiments, but to cover various changes, equivalents or alternative forms of the corresponding embodiments. For the description of the accompanying drawings, similar reference numerals may be used to refer to similar or related elements. Unless the relevant context clearly indicates otherwise, the noun corresponding to the project in the singular form may include one or more projects. As used herein, each phrase in the phrases such as "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "at least one of A, B and C" and "at least one of A, B or C" may include one or all possible combinations of the projects listed together with the corresponding one of the multiple phrases. Such terms such as "1st" and "2nd" or "first" and "second" can be used to simply distinguish the corresponding component from another component, and do not limit the corresponding component in other aspects (e.g., importance or order). If an element (e.g., a first element) is referred to as being “coupled to another element (e.g., a second element)” or “connected to another element (e.g., a second element)” with or without the terms “operably” or “communicatively”, it means that the element may be coupled to the other element directly (e.g., by wire), wirelessly, or via a third element.

[0049] The term "module" used in the present disclosure may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as "logic", "logic block", "part", or "circuit". A module may be a single integrated component for performing one or more functions or a minimum unit or part of the single integrated component. For example, according to an embodiment, a module may be implemented in the form of an application specific integrated circuit (ASIC).

[0050] Various embodiments of the present disclosure may be implemented as software (e.g., program 140) including one or more instructions stored in a storage medium (e.g., internal memory 136 or external memory 138) that can be read by a machine (e.g., electronic device 101). For example, a processor (e.g., processor 120) of the machine (e.g., electronic device 101) may call at least one of the one or more instructions stored in the storage medium and run it or them. This enables the machine to operate to perform at least one function according to at least one instruction called. The one or more instructions may include code generated by a compiler or code that can be run by an interpreter. A machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, the term "non-transitory" only means that the storage medium is a tangible device and does not include a signal (e.g., an electromagnetic wave), but the term does not distinguish between a case where data is semi-permanently stored in a storage medium and a case where data is temporarily stored in a storage medium.

[0051] According to an embodiment, the method according to various embodiments of the present disclosure may be included and provided in a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product may be released in the form of a machine-readable storage medium (e.g., a compact disk read-only memory (CD-ROM)), or may be downloaded directly or via an application store (e.g., Play Store TM ) The computer program product may be published online (e.g., downloaded or uploaded) or may be distributed (e.g., downloaded or uploaded) between two user devices (e.g., smart phones). When published online, at least part of the computer program product may be temporarily stored in a machine-readable storage medium (such as a memory of a manufacturer's server, an application store's server, or a forwarding server), or at least part of the computer program product may be temporarily generated.

[0052] According to various embodiments, each of the above-mentioned components (e.g., a module or a program) may include a single entity or multiple entities. According to various embodiments, one or more of the above-mentioned components or operations may be omitted, or one or more other components or operations may be added. Alternatively or additionally, multiple components (e.g., modules or programs) may be integrated into a single component. In this case, the integrated component may perform the one or more functions of each of the multiple components in the same or similar manner as the corresponding components of the multiple components perform one or more functions before integration. According to various embodiments, the operations performed by the modules, programs or other components may be performed sequentially, in parallel, repeatedly or in a heuristic manner, one or more of the operations may be run in a different order or omitted, or one or more other operations may be added.

[0053] Figure 2 is a diagram illustrating components of an electronic device according to an embodiment.

[0054] Reference Figure 2 According to an embodiment, the electronic device 101 may include a host 210 and a storage device 220. In various embodiments, the electronic device 101 may include additional components in addition to the host 210 and the storage device 220. For example, the electronic device 101 may also include a display module (e.g., Figure 1 a display module 160 for supporting communication with an external electronic device (eg, Figure 1 communication module 190), a battery for powering components of the electronic device 101 (eg, Figure 1 A battery 189), and a power management module for managing the power of the battery (eg, Figure 1 In addition, for example, the electronic device 101 may also include at least one of the power management modules 188. Figure 1 The electronic devices mentioned in Figure 1 At least one component not mentioned above among the components of the electronic device 101).

[0055] In an embodiment, the host 210 may be electrically connected to components of the electronic device 101 to operate and control various functions supported by the electronic device 101. For example, the host 210 may execute a programming language code to control the general operation of the GC to be executed in the storage device 220. In addition, for example, the host 210 may transmit (or send) at least one command, signal and / or data related to the GC operation to the storage device 220. According to various embodiments, the host 210 may include a central processing unit or an application processor (e.g., Figure 1 main processor 121).

[0056] In an embodiment, the host 210 may include at least one of a GC controller 211 and a storage device driver 213. For example, the GC controller 211 may operate under the control of the host 210 to determine a starting point of a GC to be performed in the storage device 220 and a throughput of the GC, and transmit (or send) the determined at least one information to the storage device 220. For example, the GC controller 211 may determine the GC starting point and the GC throughput based on at least one of time information of the electronic device 101, state information of the electronic device 101 (e.g., idle state information and / or charging state information), state information of the display module (e.g., activation / inactivation state information of the screen), operating system information of the electronic device 101 (e.g., disk statistics (diskstats) file information), and life information of the storage device 220. In addition, for example, the GC controller 211 may provide information related to the determined GC starting point and GC throughput to the storage device 220 through the storage device driver 213 serving as an interface between the host 210 and the storage device 220. According to various embodiments, the host 210 may not include the storage device driver 213, and the information related to the determined GC starting point and the GC throughput may be directly transmitted from the GC controller 211 to the storage device 220. Alternatively, even if the host 210 includes the storage device driver 213, the information related to the determined GC starting point and the GC throughput may be directly transmitted from the GC controller 211 to the storage device 220 by bypassing the storage device driver 213.

[0057] In an embodiment, the GC controller 211 may operate under the control of the host 210 to identify whether an IO occurs while GC is being performed in the storage device 220. If the occurrence of an IO is identified while GC is being performed, the GC controller 211 may transmit a command, signal, and / or data related to continuing GC, delaying IO processing, at least temporarily pausing GC, and / or immediately processing the IO to the storage device 220 based on the attributes of the IO (e.g., information indicated by a flag of the IO).

[0058] According to various embodiments, the IO may include at least one of an IO generated by a user manipulation or input to the electronic device 101, an IO generated by a program running in the background on the electronic device 101, an IO generated by a system service running in the background on the electronic device 101, and an IO generated by interaction (e.g., communication) between the electronic device 101 and an external electronic device. Hereinafter, the IO mentioned when describing the embodiments may refer to at least one of the above-mentioned types of IO.

[0059] In an embodiment, the storage device 220 may operate under the control of the host 210 to perform GC. For example, the storage device 220 may include a controller 221, and the controller 221 may perform GC for releasing at least some of the blocks of the storage device 220 based on commands, signals, and / or data (e.g., GC starting point information and GC throughput information) transmitted (or received) from the host 210 (or the GC controller 211). In addition, for example, the controller 221 may continue GC while performing GC, or at least temporarily suspend GC and process the generated IO based on commands, signals, and / or data (e.g., GC continuation information, IO processing delay information, at least temporarily GC suspension information, and / or immediate IO processing information) transmitted (or received) from the host 210 (or the GC controller 211).

[0060] According to various embodiments, the storage device 220 may include a non-volatile memory (eg, Figure 1 The non-volatile memory 134 includes at least one of a one-time programmable read-only memory (OTPROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), a mask ROM, a flash ROM, a NAND flash memory, a NOR flash memory, a hard disk drive, and a solid-state drive (SSD).

[0061] Hereinafter, embodiments for dynamically controlling the GC operation of the storage device 220 will be described with reference to the accompanying drawings.

[0062] Figure 3 is a diagram illustrating an example of determining a GC start point according to an embodiment.

[0063] Can be executed sequentially Figure 3 The operation of the electronic device described in Figure 3 For example, the operation of the electronic device described in Figure 3 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0064] Reference Figure 3 , according to the electronic device of the embodiment (eg, Figure 2 The electronic device 101) is a host (eg, Figure 2 The host 210 may determine the storage device (eg, Figure 2 For example, the host 210 may determine the starting point of the GC to be executed in the storage device 220 based on the time information and the IO occurrence information of the electronic device 101.

[0065] In this regard, at operation 311, the host 210 (or Figure 2 The GC controller 211 of the host 210 may identify the time information indicated by the electronic device 101 and determine whether the current time falls within a specified time range. For example, the host 210 may determine whether the current time falls within a specified time range set by the user or set by default in the electronic device 101. According to various embodiments, the specified time range may be set to a time range when there are fewer user operations on the electronic device 101 and / or interactions (e.g., communications) between the electronic device 101 and an external electronic device (e.g., late at night or early in the morning).

[0066] In an embodiment, if it is determined that the current time indicated by the time information of the electronic device 101 falls within a specified time range, the host 210 (or GC controller 211 ) may determine whether IO occurs during a first time period specified from the current time in operation 313 .

[0067] In an embodiment, if it is determined that no IO occurs within a first time period specified from the current time, the host 210 (or the GC controller 211) may determine to start GC at a time after the first time period specified has elapsed in operation 315. In addition, the host 210 (or the GC controller 211) may transmit (or send) a command, a signal, and / or data including GC start point information to the storage device 220. According to various embodiments, the GC start point information may indicate a time substantially similar to the time when it is determined to start GC, or a time from the time when it is determined to start GC plus a specific time (e.g., the time taken to transmit the GC start point information from the host 210 to the storage device 220).

[0068] Figure 4 is a diagram illustrating another example of determining a GC starting point according to an embodiment.

[0069] Can be executed sequentially Figure 4 The operation of the electronic device described in Figure 4 For example, the operation of the electronic device described in Figure 4 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0070] Reference Figure 4 , according to the electronic device of the embodiment (eg, Figure 2 The electronic device 101) is a host (eg, Figure 2 The host 210 may determine the storage device (eg, Figure 2 For example, the host 210 may determine the starting point (or GC timing) of GC performed by the storage device 220 of the electronic device 101 based on the status information (eg, charging status information) of the electronic device 101 and the display module (eg, Figure 1The starting point of the GC to be executed in the storage device 220 is determined based on status information of the display module 160 of the storage device 220 (eg, activation / inactivation status information of the screen).

[0071] In this regard, at operation 411, the host 210 (or Figure 2 The GC controller 211 of the host computer 210 may determine whether the electronic device 101 is running a charging function. For example, the host computer 210 may send a power management module (e.g., Figure 1 The power management module 188 (or a fuel gauge IC included in the power management module 188) requests the battery (eg, Figure 1 The charging status information of the battery 189) and the power management module (e.g., Figure 1 The power management module 188 (or the fuel gauge IC included in the power management module 188) obtains (or receives) the battery (eg, Figure 1 The electronic device 101 may collect charging status information of the battery 189 and determine whether the electronic device 101 is currently operating a charging function wired and / or wirelessly based on the charging status information of the battery 189.

[0072] In an embodiment, if it is determined that the electronic device 101 operates the charging function based on the charging status information of the battery 189, the host 210 (or the GC controller 211) may determine whether the screen of the display module 160 is disabled (or turned off) at operation 413. For example, the host 210 may request screen status information from the display module 160 (or a display driver IC included in the display module 160) and obtain (or receive) the screen status information from (or a display driver IC included in the display module 160), and determine whether the screen of the display module 160 is disabled based on the screen status information.

[0073] In an embodiment, if it is determined that the screen of the display module 160 is disabled, the host 210 (or the GC controller 211) may determine to start GC, and transmit (or send) a command, signal, and / or data including starting point information of GC to the storage device 220 in operation 415. According to various embodiments, the GC starting point information may indicate a time substantially similar to the time when it is determined to start GC, or a time from the time when it is determined to start GC plus a specific time (e.g., the time taken to transmit the GC starting point information from the host 210 to the storage device 220).

[0074] Figure 5 is a diagram illustrating still another example of determining a GC starting point according to an embodiment.

[0075] Can be executed sequentially Figure 5 The operation of the electronic device described in Figure 5For example, the operation of the electronic device described in Figure 5 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0076] Reference Figure 5 , according to the electronic device of the embodiment (eg, Figure 2 The electronic device 101) is a host (eg, Figure 2 The host 210 may determine the storage device (eg, Figure 2 For example, the host 210 may determine the starting point (or GC timing) of the GC performed by the storage device 220 of the display module (eg, Figure 1 The starting point of the GC to be executed in the storage device 220 is determined based on the status information of the display module 160 (eg, activation / inactivation status information of the screen) and the status information of the electronic device 101 (eg, idle status information).

[0077] In this regard, at operation 511, the host 210 (or the GC controller 211) may determine whether the screen of the display module 160 is disabled (or turned off). For example, the host 210 may request status information of the screen from the display module 160 (or a display driver IC included in the display module 160) and obtain (or, receive) the status information of the screen from the display module 160 (or a display driver IC included in the display module 160), and determine whether the screen of the display module 160 is disabled based on the screen status information.

[0078] In an embodiment, if it is determined that the screen of the display module 160 is disabled, then at operation 513, the host 210 (or the GC controller 211) may determine whether the idle state of the electronic device 101 is maintained. For example, the host 210 may determine whether the idle state of the electronic device 101 is maintained for a second time period specified from the current time (e.g., the time when the screen of the display module 160 is determined to be in an inactive state). According to various embodiments, if the inactive state for the screen of the display module 160 is maintained for a second time period specified from the current time, if no user manipulation or input to the electronic device 101 occurs within the second time period specified from the current time, and / or if the posture of the electronic device 101 is not changed within the second time period specified from the current time, the host 210 may determine that the idle state of the electronic device 101 is maintained for the specified second time period.

[0079] In an embodiment, if it is determined that the idle state of the electronic device 101 is maintained for a specified second time period, the host 210 (or the GC controller 211) may determine to start GC, and transmit (or send) a command, signal, and / or data including starting point information of GC to the storage device 220 at operation 515. According to various embodiments, the GC starting point information may indicate a time substantially similar to the time when it is determined to start GC, or a time from the time when it is determined to start GC plus a specific time (e.g., the time taken to transmit the GC starting point information from the host 210 to the storage device 220).

[0080] Although not in Figure 3 , Figure 4 or Figure 5 , but according to an embodiment, the host 210 (or the GC controller 211) may determine the starting point of the GC to be performed in the storage device 220 based on the user input to the electronic device 101. For example, if a user input indicating the execution of the GC of the storage device 220 (e.g., memory optimization) is received through an interface related to the system setting of the electronic device 101 or an interface related to the main screen of the electronic device 101, the host 210 may determine to start the CG, and transmit (or send) a command, signal and / or data including the GC starting point information to the storage device 220.

[0081] Figure 6 is a diagram illustrating an example of determining GC throughput according to an embodiment.

[0082] Can be executed sequentially Figure 6 The operation of the electronic device described in Figure 6 For example, the operation of the electronic device described in Figure 6 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0083] Reference Figure 6 , according to the electronic device of the embodiment (eg, Figure 2 The electronic device 101) is a host (eg, Figure 2 The host 210 may determine the storage device (eg, Figure 2 The host 210 may determine the throughput of GC to be performed in the storage device 220 (or the number of free blocks to be obtained by performing GC, or the size of free space to be obtained by performing GC). For example, the host 210 may determine the throughput of GC to be performed in the storage device 220 based on the operating system information of the electronic device 101 (e.g., diskstats file information).

[0084] In this regard, at operation 611, the host 210 (or Figure 2The GC controller 211 of the electronic device 101 can obtain the write information of the storage device 220. For example, the host 210 can access the operating system of the electronic device 101 (for example, Figure 1 operating system 142), and obtain (or read) the write information recorded in the diskstats file of the operating system 142.

[0085] According to an embodiment, at operation 613, the host 210 (or the GC controller 211) may determine a daily write amount based on the write information obtained from the operating system 142, and determine a GC throughput corresponding to the daily write amount. The host 210 may transmit (or send) a command, a signal, and / or data including the determined GC throughput information to the storage device 220.

[0086] Figure 7 is a diagram illustrating another example of determining GC throughput according to an embodiment.

[0087] Can be executed sequentially Figure 7 The operation of the electronic device described in Figure 7 For example, the operation of the electronic device described in Figure 7 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0088] Reference Figure 7 , according to the electronic device of the embodiment (eg, Figure 2 The electronic device 101) is a host (eg, Figure 2 The host 210 may determine the storage device (eg, Figure 2 The storage device 220 may further determine the throughput of GC performed by the storage device 220 (or the number of free blocks to be obtained by performing GC, or the size of free space to be obtained by performing GC), and determine whether to adjust the determined GC throughput based on the life information of the storage device 220.

[0089] In this regard, at operation 711, the host 210 (or Figure 2 The GC controller 211 of the embodiment may obtain the write information of the storage device 220. Operation 711 may be performed with Figure 6 For example, the host 210 may obtain (or read) the operating system (eg, Figure 1 The operating system 142) writes information to the diskstats file.

[0090] According to an embodiment, at operation 713, the host 210 (or the GC controller 211) may determine the throughput of the GC. Operation 713 may be related to Figure 6For example, the host 210 may determine the daily write amount based on the write information obtained from the operating system 142, and determine the GC throughput corresponding to the daily write amount.

[0091] In an embodiment, based on determining the throughput of the GC, the host 210 (or the GC controller 211) may determine whether the life of the storage device 220 is below a specified threshold value at operation 715. For example, the host 210 may identify the life of the storage device 220 based on erase count information and / or total bytes written (TBW) information of cells included in a block of the storage device 220, and determine whether the life of the storage device 220 is less than or equal to a specified threshold value (e.g., 40%).

[0092] In an embodiment, if it is determined that the life of the storage device 220 exceeds a specified threshold, the host 210 (or the GC controller 211) may maintain a GC throughput corresponding to the determined daily write amount in operation 717. The host 210 may transmit (or send) a command, a signal, and / or data including maintained GC throughput information to the storage device 220.

[0093] In an embodiment, if it is determined that the life of the storage device 220 is less than or equal to a specified threshold value, then in operation 719, the host 210 (or the GC controller 211) may adjust the GC throughput corresponding to the determined daily write amount. For example, the host 210 may reduce the GC throughput corresponding to the daily write amount by a specified value (or percentage). According to various embodiments, the host 210 may include a table that defines an appropriate GC throughput based on the life of the storage device 220. The host 210 may reduce the GC throughput corresponding to the daily write amount by a specified value (or percentage) based on the life of the storage device 220 and the table. The host 210 may transmit (or transfer) a command, a signal, and / or data including the adjusted GC throughput information to the storage device 200.

[0094] Figure 8 is a diagram illustrating yet another example of determining GC throughput according to an embodiment.

[0095] Figure 8 The operations of the electronic device described in the embodiment may be performed sequentially, but need not be performed sequentially. For example, Figure 8 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0096] Reference Figure 8 , according to the electronic device of the embodiment (eg, Figure 2 The electronic device 101) is a host (eg, Figure 2 The host 210 may determine the storage device (eg, Figure 2The host 210 may determine whether to adjust the determined GC throughput based on the state information (eg, idle state information) of the electronic device 101.

[0097] In this regard, at operation 811, the host 210 (or Figure 2 The GC controller 211 of the electronic device 101 may determine the throughput of the GC to be performed in the storage device 220. For example, the host 210 may determine the throughput of the GC to be performed in the storage device 220 based on the operating system (eg, Figure 1 The host 210 determines the daily write amount based on the write information obtained from the operating system 142 of the storage device 220, and determines the GC throughput corresponding to the daily write amount. Optionally, the host 210 may determine the GC throughput adjusted from the GC throughput corresponding to the daily write amount based on the life information of the storage device 220.

[0098] According to an embodiment, based on the throughput of the GC being determined, at operation 813, the host 210 (or the GC controller 211) may identify the average idle time of the electronic device 101. In an embodiment, the host 210 may identify the average idle time in a time range (e.g., late night hours or early morning hours) set by a user or specified by default in the electronic device 101. For example, the host 210 may identify whether there is an IO generated by a program and / or a system service running in the background within the specified time range, and if the presence of the IO is determined, determine the average idle time of the electronic device 101 corresponding to the time interval between the IO occurrence periods.

[0099] According to an embodiment, based on identifying the average idle time of the electronic device 101, at operation 815, the host 210 (or the GC controller 211) may determine whether the storage device 220 can process the determined GC throughput within the average idle time of the electronic device 101. For example, the host 210 may determine whether the storage device 220 can process the determined GC throughput within the average idle time of the electronic device 101 based on the specifications, performance, average GC throughput, and / or average GC time of the storage device 220.

[0100] In an embodiment, if it is determined that the storage device 220 can process the determined GC throughput within the average idle time of the electronic device 101, the host 210 (or, the GC controller 211) may maintain the determined GC throughput in operation 817. The host 210 may transmit (or send) a command, a signal, and / or data including the maintained GC throughput information to the storage device 220.

[0101] In an embodiment, if it is determined that the storage device 220 cannot process the determined GC throughput within the average idle time of the electronic device 101, the host 210 (or, the GC controller 211) may adjust the determined GC throughput in operation 819. For example, the host 210 may reduce the determined GC throughput by a specified value (or percentage) based on the specifications, performance, average GC throughput, and / or average GC time of the storage device 220. The host 210 may transmit (or transfer) a command, signal, and / or data including the adjusted GC throughput information to the storage device 200.

[0102] Fig. 9 is a diagram illustrating an example of a signal flow between a storage device and a host for performing GC according to an embodiment.

[0103] Can be executed sequentially Fig. 9 The operation of the electronic device described in Fig. 9 For example, the operation of the electronic device described in Fig. 9 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0104] Reference Fig. 9 , at operation 911, the electronic device according to an embodiment (eg, Figure 2 The electronic device 101) is a host (eg, Figure 2 The host 210 of the host 210 may determine the starting point (or GC timing) of GC to be performed by the storage device 220 and the GC throughput (or the number of free blocks to be obtained by performing GC, or the size of free space to be obtained by performing GC). For example, the GC controller 211 of the host 210 may determine the starting point of GC and the GC throughput under the control of the host 210 based on at least one of the following information: time information of the electronic device 101, state information of the electronic device 101 (e.g., idle state information and / or charging state information), a display module (e.g., Figure 1 status information of the display module 160 (e.g., screen activation / inactivation status information), user input reception information indicating execution of GC, operating system information of the electronic device 101 (e.g., diskstats file information), and life information of the storage device 220.

[0105] In an embodiment, based on the determination of the starting point and throughput of the GC to be performed by the storage device 220, the GC controller 211 of the host 210 may transfer (or send) information related to the starting point and throughput of the GC and a command instructing to perform the GC to the controller 221 of the storage device 220 at operations 913 and 915. For example, by transferring (or sending) the information related to the starting point and throughput of the GC and the command instructing to perform the GC to the storage device driver 213 of the host 210, the GC controller 211 of the host 210 may transfer the command for performing the GC to the controller 221 of the storage device 220 through the storage device driver 213 serving as an interface between the host 210 and the storage device 220. Alternatively, the host 210 may not include the storage device driver 213, and in this case, the GC controller 211 of the host 210 may directly transfer the command for performing the GC to the storage device 220. Alternatively, even if the host 210 includes the storage device driver 213, the GC controller 211 of the host 210 may directly transmit a command of information for performing GC to the controller 221 of the storage device 220 by bypassing the storage device driver 213. Hereinafter, when describing various embodiments, transmitting (or sending, or receiving) a command, a signal, and / or data between the host 210 and the storage device 220 may be applied to all of the embodiments implemented using the storage device driver 213 and the embodiments implemented by bypassing the storage device driver 213.

[0106] According to an embodiment, at operation 917, the controller 221 of the storage device 220 may perform GC in response to a command transmitted (or received) from the host 210 instructing to perform GC. For example, the controller 221 of the storage device 220 may perform GC based on information related to a starting point and a throughput of GC transmitted (or received) from the host 210.

[0107] Fig.10 is a diagram illustrating another example of a signal flow between a storage device and a host for performing GC according to an embodiment.

[0108] Can be executed sequentially Fig.10 The operation of the electronic device described in Fig.10 For example, the operation of the electronic device described in Fig.10 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0109] Reference Fig.10 , according to the electronic device of the embodiment (eg, Figure 2The host 210 of the electronic device 101 may dynamically determine the priority of continuing GC, delaying processing of IO, at least temporarily suspending GC, and / or immediately processing IO based on properties of IO occurring while GC is being performed by the storage device 220.

[0110] In this regard, at operations 1011, 1013, 1015, and 1017, the GC controller 211 of the host 210 may determine a starting point of GC and a throughput of GC, and transmit (or send) information of the determined starting point of GC and the throughput of GC and a command instructing to perform GC to the controller 221 of the storage device 220. The controller 221 may perform GC based on the GC-related information and the command transmitted (or received) from the host 210.

[0111] According to an embodiment, at operations 1019 and 1021, the GC controller 211 of the host 210 may determine (or, monitor) whether an IO occurs while GC is performed by the storage device 220, and if it is determined that the IO occurs, identify the attribute of the IO. For example, the GC controller 211 of the host 210 may identify the attribute of the IO based on information indicated by a flag of the IO.

[0112] In an embodiment, if the attribute of the IO is identified as the first attribute indicating read synchronization or write synchronization by the flag information of the IO, the GC controller 211 of the host 210 may determine an IO process having a higher priority than the GC operation, and therefore, determine to at least temporarily suspend the GC and immediately process the IO. In an embodiment, based on the determination of the IO process having a higher priority, in operations 1023, 1025, and 1027, the GC controller 211 of the host 210 may transmit (or send) a command indicating to at least temporarily suspend the GC in progress in the storage device 220 and immediately process the generated IO to the storage device 220. The controller 221 of the storage device 220 may suspend the GC and process the IO based on the transmitted (or received) command.

[0113] According to an embodiment, based on pausing the ongoing GC and completing the IO processing, the controller 221 of the storage device 220 may transmit (or transfer) a signal and / or data indicating the completion of the IO processing to the GC controller 211 in operations 1029 and 1031. For example, the controller 221 of the storage device 220 may transmit information indicating the throughput of the GC processed before pausing the ongoing GC together with the information indicating the completion of the IO processing to the GC controller 211 of the host 210.

[0114] According to an embodiment, in response to the transmitted (or received) IO processing completion information and the throughput information of the processed GC, at operations 1033 and 1035, the GC controller 211 of the host 210 may transmit (or send) a command instructing to resume the suspended GC and remaining throughput information of the GC by subtracting the throughput of the processed GC from the determined GC throughput to the controller 221 of the storage device 220.

[0115] According to an embodiment, in operation 1037 , the controller 221 of the storage device 220 may resume the at least temporarily suspended GC based on the GC resume command and the GC remaining throughput information transmitted (or received) from the host 210 .

[0116] Fig.11 is a diagram illustrating still another example of a signal flow between a storage device and a host for performing GC according to an embodiment.

[0117] Fig.11 The operations of the electronic device described in the embodiment may be performed sequentially, but need not be performed sequentially. For example, Fig.11 The order of the operations described in the embodiment may be changed, or at least two operations may be performed in parallel.

[0118] Reference Fig.11 , according to the electronic device of the embodiment (eg, Figure 2 The host 210 of the electronic device 101 may dynamically determine the priority of continuing GC, delaying IO processing, at least temporarily suspending GC, and / or immediately processing IO based on the properties of IO occurring while GC is being performed by the storage device 220.

[0119] In this regard, at operations 1111, 1113, 1115, and 1117, the GC controller 211 of the host 210 may determine a starting point of GC and a throughput of GC, and transmit (or send) information thereof and a command instructing to perform GC to the controller 221 of the storage device 220. The controller 221 may perform GC based on the GC-related information and the command transmitted (or received) from the host 210.

[0120] According to an embodiment, at operations 1119 and 1121, the GC controller 211 of the host 210 may determine (or, monitor) whether an IO occurs while GC is performed by the storage device 220, and if it is determined that the IO occurs, identify the properties of the IO. For example, the GC controller 211 of the host 210 may identify the properties of the IO based on information indicated by a flag of the IO.

[0121] In an embodiment, if the attribute of the IO is identified as the second attribute indicating write asynchrony by the flag information of the IO, the GC controller 211 of the host 210 may determine that a GC operation with a higher priority than the IO processing is in progress, and therefore, determine to continue the GC and delay the IO processing. In an embodiment, based on the determination of the continued GC operation with a higher priority, the GC controller 211 of the host 210 may at least temporarily store the information of the generated IO in another storage device different from the storage device 220 (for example, Figure 1 volatile memory 132, buffer or cache memory).

[0122] According to an embodiment, a signal and / or data indicating that the GC operation is completed may be provided from the controller 221 of the storage device 220 to the GC controller 211 of the host 210 (or, the GC controller 211 of the host 210 may receive a signal and / or data indicating that the GC operation is completed from the controller 221 of the storage device 220), and accordingly, in operations 1123 and 1125, information of IO at least temporarily stored in other storage devices and a command instructing to process the IO are transmitted (or sent) to the controller 221 of the storage device 220.

[0123] According to an embodiment, at operation 1127 , the controller 221 of the storage device 220 may process IOs when the GC operation is completed based on IO information and a processing command transmitted (or received) from the host 210 .

[0124] An electronic device according to an embodiment of the present disclosure may include a storage device and a host electrically connected to the storage device.

[0125] According to an embodiment, the host may be configured to: determine a starting point of GC to be performed by the storage device and a throughput of the GC based on at least one information related to the electronic device, send information related to the starting point of the GC and the throughput of the GC to the storage device based on the determination, identify whether IO occurs while GC is performed by the storage device, identify an attribute of the IO based on the occurrence of the IO, indicate a first attribute based on the attribute of the IO, determine to delay processing of the IO to continue the GC performed by the storage device, and control the storage device based on the attribute of the IO indicating a second attribute so that the storage device at least temporarily suspends GC and processes the IO.

[0126] According to an embodiment, the host may be configured to determine the attribute of the IO as a first attribute based on a flag of the IO indicating write asynchrony, and determine to execute GC with a higher priority than IO processing based on determining the attribute of the IO as the first attribute.

[0127] According to an embodiment, the host may be configured to at least temporarily store the IO in another storage device different from the storage device based on determining that the GC is to be performed with a higher priority than the IO processing.

[0128] According to an embodiment, the host may be configured to receive information indicating that the GC operation is completed from the storage device, and transmit IOs stored in other storage devices to the storage device based on the received information indicating that the GC operation is completed.

[0129] According to an embodiment, the host may be configured to determine the attribute of the IO as the second attribute based on a flag of the IO indicating read synchronization or write synchronization, and determine to process the IO with a higher priority than the GC based on determining the attribute of the IO as the second attribute.

[0130] According to an embodiment, the host may be configured to: receive information indicating completion of IO processing and information indicating GC throughput that has been processed before at least temporarily pausing GC operation from the storage device, and based on receiving the information indicating completion of IO processing and the information indicating the processed GC throughput, send information indicating resumption of the at least temporarily suspended GC and information indicating the remaining throughput of the GC to the storage device.

[0131] According to an embodiment, the host may be configured to: determine whether the electronic device is running a charging function, determine whether the screen of the electronic device is in an inactivated state based on determining that the electronic device is running the charging function, and determine the starting point of the GC based on determining that the screen of the electronic device is in an inactivated state.

[0132] According to an embodiment, the host may be configured to: determine whether the screen of the electronic device is in an inactivated state, determine whether the idle state of the electronic device is maintained for a specified time period based on determining that the screen of the electronic device is in an inactivated state, and determine the starting point of the GC based on determining that the idle state of the electronic device is maintained for a specified time period.

[0133] According to an embodiment, the host may be configured to obtain write information recorded in the operating system of the electronic device, determine a daily write amount based on the write information, and determine a throughput of the GC based on the daily write amount.

[0134] According to an embodiment, the host may be configured to: identify at least one of the lifespan of the storage device and the average idle time of the electronic device based on determining the throughput of the GC, and adjust the throughput of the GC based on at least one of the lifespan of the storage device and the average idle time of the electronic device.

[0135] According to an embodiment, a method for performing GC of an electronic device may include: determining, at a host of the electronic device, a starting point of GC to be performed by a storage device and a throughput of the GC based on at least one information related to the electronic device, sending, at the host, information related to the starting point of the GC and the throughput of the GC to the storage device based on the determination, identifying, at the host, whether IO occurs while GC is performed by the storage device, identifying, at the host, an attribute of the IO based on the occurrence of the IO, indicating, at the host, a first attribute based on the attribute of the IO, determining to delay processing of the IO to continue GC performed by the storage device, and indicating, at the host, a second attribute based on the attribute of the IO, controlling the storage device so that the storage device at least temporarily suspends GC and processes the IO.

[0136] According to an embodiment, determining to delay the processing of the IO may include determining the attribute of the IO as a first attribute based on a flag of the IO indicating write asynchrony, and determining to execute GC with a higher priority than the IO processing based on determining the attribute of the IO as the first attribute.

[0137] According to an embodiment, determining to execute GC with a higher priority than IO processing may include at least temporarily storing IO in another storage device different from the storage device.

[0138] According to an embodiment, the method for performing GC may further include receiving information indicating that the GC is completed from the storage device, and transmitting IOs stored in other storage devices to the storage device based on receiving the information indicating that the GC is completed.

[0139] According to an embodiment, controlling the storage device may include determining the attribute of the IO as a second attribute based on a flag of the IO indicating read synchronization or write synchronization, and determining to process the IO with a higher priority than the GC based on determining the attribute of the IO as the second attribute.

[0140] According to an embodiment, the method for performing GC may further include: receiving information indicating completion of IO processing and information indicating GC throughput that has been processed before at least temporarily pausing GC from a storage device, and based on receiving the information indicating completion of IO processing and the information indicating the processed GC throughput, sending information indicating resumption of the at least temporarily suspended GC and information indicating the remaining throughput of GC to the storage device.

[0141] According to an embodiment, the step of determining the starting point of GC may include: determining whether the electronic device is running a charging function, determining whether the screen of the electronic device is in an inactivated state based on determining that the electronic device is running the charging function, and determining the starting point of GC based on determining that the screen of the electronic device is in an inactivated state.

[0142] According to an embodiment, the step of determining the starting point of GC may include: determining whether the screen of the electronic device is in an inactivated state, based on determining that the screen of the electronic device is in an inactivated state, determining whether the idle state of the electronic device is maintained for a specified time period, and based on determining that the idle state of the electronic device is maintained for a specified time period, determining the starting point of GC.

[0143] According to an embodiment, determining the throughput of the GC may include obtaining write information recorded in an operating system of the electronic device, determining a daily write amount based on the write information, and determining the throughput of the GC based on the daily write amount.

[0144] According to an embodiment, determining the throughput of the GC may include identifying at least one of a lifetime of the storage device and an average idle time of the electronic device, and adjusting the throughput of the GC based on at least one of the lifetime of the storage device and the average idle time of the electronic device.

[0145] According to an embodiment of the present disclosure, a mechanism for dynamically determining a GC starting point and a GC throughput based on at least one information related to an electronic device may be provided.

[0146] In addition, according to an embodiment of the present disclosure, a mechanism is provided for dynamically determining control of GC operation or IO processing based on properties of IO occurring when GC is running.

[0147] In addition, according to the embodiments of the present disclosure, efficient management and optimization of free blocks (or free spaces) of a storage device may be achieved based on dynamic determination or dynamic control of a host regarding GC operation.

[0148] In addition, according to an embodiment of the present disclosure, IO processing delay according to GC performed by the storage device itself or slowdown of the operation speed of IO-related programs can be prevented based on dynamic determination or dynamic control of the host regarding GC operation.

[0149] In addition, according to the embodiments of the present disclosure, since the storage device performs GC when the host requires it, it is possible to prevent the life or performance of the storage device from being deteriorated due to the GC operation frequency of the storage device itself.

[0150] Effects obtainable by the present disclosure are not limited to the above-mentioned effects, and other effects not mentioned may be clearly understood by those skilled in the art in the art of the present disclosure through the following description.

Claims

1. An electronic device, include: Storage device; as well as a host, electrically connected to the storage device, Wherein, the host is configured as: determining a starting point of garbage collection (GC) to be performed by the storage device and a throughput of the GC based on at least one information related to the electronic device, Based on the determination, sending information related to the starting point of the GC and the throughput of the GC to the storage device, while the GC is being performed by the storage device, identifying whether input / output (IO) occurs, Based on the occurrence of the IO, identifying the attribute of the IO, Determining to delay processing of the IO to continue the GC performed by the storage device based on the attribute of the IO indicating a first attribute, and Based on the attribute of the IO indicating a second attribute, the storage device is controlled so that the storage device at least temporarily suspends the GC and processes the IO.

2. The electronic device according to claim 1, in, The host is configured as: Based on the flag of the IO indicating that writing is asynchronous, determining the attribute of the IO as a first attribute, and Based on determining the attribute of the IO as the first attribute, it is determined that the GC is executed with a higher priority than the IO processing.

3. The electronic device according to claim 2, in, The host is configured as: Based on the determination that the GC is executed with a higher priority than the IO processing, the IO is at least temporarily stored in another storage device different from the storage device, receiving information from the storage device indicating that the GC operation is complete, and Based on receiving the information indicating that the GC operation is completed, the IO stored in the other storage device is sent to the storage device.

4. The electronic device according to claim 1, in, The host is configured as: determining the attribute of the IO as a second attribute based on the flag of the IO indicating read synchronization or write synchronization, and Based on determining that the attribute of the IO is the second attribute, it is determined that the IO is processed with a higher priority than the GC.

5. The electronic device according to claim 4, in, The host is configured as: receiving, from the storage device, information indicating completion of the IO processing and information indicating GC throughput processed before at least temporarily pausing the GC operation, and Based on receiving the information indicating completion of the IO processing and the information indicating the processed GC throughput, information indicating resumption of the at least temporarily paused GC and information indicating a remaining throughput of the GC are sent to the storage device.

6. The electronic device according to claim 1, in, The host is configured as: determining whether the electronic device is running a charging function, Based on determining that the electronic device is running a charging function, determining whether a screen of the electronic device is in an inactive state, and Based on determining that the screen of the electronic device is in an inactive state, the starting point of the GC is determined.

7. The electronic device according to claim 1, in, The host is configured as: determining whether the screen of the electronic device is in an inactive state, Based on determining that the screen of the electronic device is in an inactive state, determining whether the idle state of the electronic device lasts for a specified period of time, and The starting point of the GC is determined based on determining that the idle state of the electronic device is maintained for the designated time period.

8. The electronic device according to claim 1, in, The host is configured as: obtaining write information recorded in the operating system of the electronic device, Based on the write information, determine the daily write amount, Based on the daily write volume, determining the throughput of GC, identifying at least one of a lifetime of the storage device and an average idle time of the electronic device based on determining the throughput of the GC, and The throughput of the GC is adjusted based on at least one of the lifetime of the storage device and the average idle time of the electronic device.

9. A method for performing garbage collection (GC) of an electronic device, include: determining, at a host of the electronic device, a starting point of the GC to be performed by a storage device of the electronic device and a throughput of the GC based on at least one information related to the electronic device; sending, at the host, information related to the starting point of the GC and the throughput of the GC to the storage device based on the determination; identifying, at the host, whether input / output (IO) occurs while the GC is being executed by the storage device; identifying, at the host, attributes of the IO based on occurrence of the IO; determining, at the host, to delay processing of the IO based on an attribute of the IO indicating a first attribute, so as to continue the GC performed by the storage device; as well as Based on the attribute of the IO indicating a second attribute, the host controls the storage device so that the storage device at least temporarily suspends the GC and processes the IO.

10. The method for performing the GC according to claim 9, in, The step of determining to delay the processing of the IO comprises: Based on the flag of the IO indicating asynchronous writing, determining the attribute of the IO as a first attribute; and Based on determining the attribute of the IO as the first attribute, it is determined that the GC is executed with a higher priority than the IO processing.

11. The method for performing the GC according to claim 10, in, The step of determining to execute the GC with a higher priority than the IO processing comprises: storing the IO at least temporarily in another storage device different from the storage device, The method for performing the GC further comprises: receiving information from the storage device indicating that the GC operation is complete; and Based on receiving the information indicating that the GC operation is completed, the IO stored in the other storage device is sent to the storage device.

12. The method for performing the GC according to claim 9, in, The step of controlling the storage device comprises: Based on the flag of the IO indicating read synchronization or write synchronization, determining the attribute of the IO as a second attribute; and Based on determining that the attribute of the IO is the second attribute, it is determined that the IO is processed with a higher priority than the GC.

13. The method for performing the GC according to claim 12, further comprising: include: receiving, from the storage device, information indicating completion of the IO processing and information indicating GC throughput processed before at least temporarily pausing the GC; as well as Based on receiving the information indicating completion of the IO processing and the information indicating the processed GC throughput, information indicating resumption of the at least temporarily paused GC and information indicating a remaining throughput of the GC are sent to the storage device.

14. The method for performing the GC according to claim 9, in, The step of determining the starting point of the GC comprises: Determining whether the electronic device is running a charging function; Based on determining that the electronic device is running a charging function, determining whether a screen of the electronic device is in an inactive state; and Based on determining that the screen of the electronic device is in an inactive state, determining the starting point of the GC, or determining whether a screen of the electronic device is in an inactive state; Based on determining that the screen of the electronic device is in an inactive state, determining whether the idle state of the electronic device continues for a specified period of time; and The starting point of the GC is determined based on determining that the idle state of the electronic device is maintained for the designated time period.

15. The method for performing the GC according to claim 9, wherein the step of determining the throughput of the GC include: Obtaining write information recorded in the operating system of the electronic device; Based on the write information, determine a daily write amount; Based on the daily write amount, determining the throughput of the GC; identifying at least one of a lifespan of the storage device and an average idle time of the electronic device; as well as The throughput of the GC is adjusted based on at least one of the lifetime of the storage device and the average idle time of the electronic device.