Flash memory usage management
By managing flash memory usage through monitoring and limiting data writes based on application-specific thresholds, the vehicle computing device extends the lifespan of flash memory, preventing premature failure and maintaining device operability.
Patent Information
- Application Number
- JP2022168445
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-10-26
- Filing Date
- 2022-10-20
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-10-20
AI Technical Summary
The limited write lifetime of solid-state storage devices in vehicle computing devices, such as flash memory, due to erase cycles, poses a challenge as excessive data writing can lead to premature failure, rendering the device inoperable.
A vehicle computing device manages flash memory usage by monitoring and limiting data written by applications within a specified period, comparing usage to application-specific thresholds, and taking actions such as termination or notification to prevent excessive writing.
This approach extends the lifespan of flash memory in vehicle computing devices by preventing excessive data writing, thereby maintaining device functionality and reducing the need for costly replacements.
Smart Images

Figure 0007555383000006 
Figure 0007555383000002 
Figure 0007555383000005
Abstract
Description
[Background technology]
[0001] background Vehicles may include a so-called "head unit" or other integrated computing device that presents an interface (e.g., a graphical user interface (GUI)) for controlling vehicle systems such as the heating, ventilation, and air conditioning (HVAC) system, the lighting system (for controlling interior and / or exterior lights), the entertainment system, the seating system (for controlling the position of the driver's seat and / or passenger seat), etc.
[0002] The head unit may include one or more solid-state storage devices (sometimes referred to as "flash memory") to which the head unit can write data and from which the head unit can read data during operation of the head unit. The solid-state storage devices may be composed of cells, such as NOT-AND ("NAND") cells. If a cell currently stores data, the cell must be erased before new data can be written to the cell. Such erasing and writing of data, referred to as an erase cycle, can cause wear on the cell and limit the write life of the cell for a solid-state storage device. For example, a solid-state storage device may have a maximum number of erase cycles of 3,000 to 10,000 per cell.
[0003] The lifespan of a solid-state storage device may depend on the maximum number of erase cycles of a cell of the solid-state storage device and the storage capacity of the solid-state storage device, since a cell of a higher capacity solid-state storage device may undergo fewer erase cycles than a cell of a lower capacity solid-state storage device. For example, the lifespan (in years) of a solid-state storage device may be expressed as follows:
[0004]
number
[0005] overview In general, the techniques of this disclosure are directed to enabling a vehicle computing device (e.g., a vehicle head unit) to manage usage of a solid-state storage device, such as a flash memory of the vehicle computing device, in a manner that enhances the life of the solid-state storage device, i.e., the vehicle computing device may be able to limit the amount of data that can be written to the flash memory of the vehicle computing device within a specified period of time by an application executing on the vehicle computing device.
[0006] Specifically, the vehicle computing device may monitor disk access usage, such as the amount of data written to the flash memory of the vehicle computing device, within a specified period, such as within a day, by each of a plurality of applications, such as Java applications, Java services, and C++ services, executing on the vehicle computing device. The vehicle computing device may compare the respective amount of data written to the flash memory by each of the plurality of applications to a respective application-specific disk usage threshold. If the vehicle computing device determines that the disk access usage of the application during the specified period exceeds the application-specific disk usage threshold, it may determine that the application is using excessive disk access of the flash memory and may take one or more actions, such as terminating the application, flagging the excessive use of disk access of the flash memory, generating a notification indicating that the application is using excessive disk access of the flash memory, etc. The vehicle computing device may also disable the application until the end of the specified period, such as until the end of a day, thereby preventing the application from writing additional data to the flash memory until the end of the specified period to prevent further excessive use of disk access of the flash memory by the application.
[0007] The techniques of the present disclosure provide one or more technical advantages. By determining an amount of data an application is permitted to write to flash memory within a specified time period and disabling an application that writes more than the permitted amount of data to flash memory within the specified time period, the techniques of the present disclosure limit an application from writing an excessive amount of data to flash memory. Flash memory installed in a vehicle head unit can be difficult and costly to replace. When the flash memory of a vehicle head unit reaches the end of its life, the flash memory may fail, rendering the vehicle head unit inoperable or otherwise unusable. Preventing an application from writing an excessive amount of data to flash memory may help preserve the life of the flash memory, thereby also extending the usable life of a vehicle head unit that uses the flash memory, providing a technical advantage. [Means for solving the problem]
[0008] In one example, the disclosure describes a method comprising: one or more processors of a computing device determining a respective disk access usage of a flash memory of the computing device by each of a plurality of applications; the one or more processors comparing the respective disk access usage of the flash memory by each of the plurality of applications to a respective application-specific disk access excess usage threshold to determine excessive disk access usage of the flash memory by an application of the plurality of applications; and in response to determining the excessive disk access usage of the flash memory by the application, the one or more processors terminating the application.
[0009] In another example, the disclosure describes a computing device comprising a flash memory and one or more processors communicatively coupled to the flash memory, the one or more processors configured to determine a respective disk access usage of the flash memory by each of a plurality of applications, compare the respective disk access usage of the flash memory by each of the plurality of applications to a respective application-specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory by an application of the plurality of applications, and terminate the application in response to determining the excessive disk access usage of the flash memory by the application.
[0010] In another example, the disclosure describes a non-transitory computer-readable storage medium having stored thereon instructions that, when executed, cause one or more processors of a computing device to compare a respective disk access usage of a flash memory by each of a plurality of applications to a respective application-specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory by an application of the plurality of applications, and in response to determining the excessive disk access usage of the flash memory by the application, terminate the application.
[0011] The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages of the disclosure will become apparent from the description and drawings, and from the claims. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a block diagram illustrating an example vehicle configured to perform various aspects of the techniques described in this disclosure. [Diagram 2] FIG. 2 is a block diagram illustrating the example head unit of FIG. 1 in greater detail. [Figure 3A] 5 is a flow chart illustrating example operations that can be performed by the example head unit of FIG. 2 to manage disk access usage of applications. [Figure 3B] 5 is a flowchart illustrating example operations that can be performed by the example head unit of FIG. 2 to manage disk access usage of applications. [Figure 4] 2 is a flowchart illustrating example operations that the example head unit 202 of FIG. 2 can perform to manage disk access usage for applications. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Detailed Description FIG. 1 is a block diagram illustrating an example of a vehicle 100 configured to perform various aspects of the techniques described in this disclosure. In the example of FIG. 1, the vehicle 100 is assumed to be an automobile for the following description. However, the techniques described in this disclosure may be applied to any type of vehicle capable of transporting one or more occupants between locations, such as motorcycles, buses, recreational vehicles (RVs), semi-trailer trucks, tractors or other types of farm equipment, trains, airplanes, drones, helicopters, and personal transport vehicles. Additionally, the techniques described in this disclosure may be applied to any type of computing device, such as a laptop computer, desktop computer, smartphone, wearable device, tablet computer, or any other device that includes a flash memory.
[0014] 1, vehicle 100 includes one or more processors 112, a graphics processing unit (GPU) 114, and a flash memory 116. In some examples, one or more of processors 112, GPU 114, and a transceiver module (not shown in FIG. 1) may be formed as an integrated circuit (IC). For example, an IC may be considered a processing chip in a chip package or may be a system-on-chip (SoC).
[0015] Examples of the one or more processors 112 and GPU 114 include, but are not limited to, one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. The one or more processors 112 may represent a central processing unit (CPU) of the vehicle 100. In some examples, the GPU 114 may be special-purpose hardware including integrated and / or discrete logic circuitry that provides the GPU 114 with massively parallel processing capabilities suitable for graphics processing. In some examples, the GPU 114 may also include general-purpose processing capabilities and may be referred to as a general purpose GPU (GPGPU) when implementing general-purpose processing tasks (i.e., non-graphics related tasks). Although shown as a dedicated GPU 114, GPU 114 may represent an integrated GPU that is integrated into an underlying circuit board (such as a so-called "motherboard"), or in other embodiments may be incorporated into one or more processors 112.
[0016] The one or more processors 112 may execute various types of applications. Examples of applications include navigation applications, such as a mapping application that caches offline map tiles in the flash memory 116, a music application that downloads music files to the flash memory 116, a video application that downloads video files to the flash memory 116, a dash cam application that stores captured video files in the flash memory 116, an over the air (OTA) update application that writes large files to the flash memory 116, or other applications that generate visible objects for display. The flash memory 116 serves as a system memory for the head unit 102 and may store instructions for execution of one or more applications. Execution of an application by the one or more processors 112 causes the one or more processors 112 to generate graphics data for image content to be displayed. The one or more processors 112 may send the graphics data of the image content to the GPU 114 for further processing based on instructions or commands that the one or more processors 112 send to the GPU 114. In some examples, the one or more processors 112 may also execute applications that do not generate visible objects for display. For example, one or more processors 112 may execute background services, such as background services that act as core components for other applications that generate viewable objects for display.
[0017] The one or more processors 112 may communicate with the GPU 114 according to an application programming interface (API). Additionally, the techniques described in this disclosure need not function according to an API, and the one or more processors 112 and the GPU 114 may utilize any technique for communicating with the GPU 114.
[0018] Flash memory 116 may represent the memory of vehicle 100. Flash memory 116 may include one or more computer-readable storage media. Examples of flash memory 116 include one or more solid-state storage devices that may be used to carry or store desired program code in the form of instructions and / or data structures and that may be accessed by a computer or processor.
[0019] In some aspects, flash memory 116 may include instructions that cause one or more processors 112 to perform functions attributed to one or more processors 112 in this disclosure. Thus, flash memory 116 may be a non-transitory computer-readable storage medium on which are stored instructions that, when executed, cause one or more processors (e.g., one or more processors 112) to perform various functions.
[0020] Flash memory 116 is a non-transitory storage medium. The term "non-transitory" indicates that the storage medium is not embodied in a carrier wave or a propagating signal. However, the term "non-transitory" should not be interpreted to mean that flash memory 116 is not movable or that its contents are static. As an example, flash memory 116 can be removed from vehicle 100 and moved to another device, such as in the case of a Secure Digital (SD) card or a Universal Serial Bus (USB) mass storage device. As another example, a memory substantially similar to flash memory 116 can be inserted into autonomous vehicle 100. In certain examples, non-transitory storage media can store data that can change over time.
[0021] 1, vehicle 100 may include vehicle systems 126. Vehicle systems 126 may include a heating, ventilation, and air conditioning (HVAC) system, a climate control system (which may include, for example, heated and / or cooled seats in addition to an HVAC system), a lighting system (to provide interior and / or exterior lighting), a seat control system (to adjust the position of a passenger seat), a mirror control system (to control interior and / or exterior mirrors, including rearview mirrors, side mirrors, sun visor mirrors, etc.), a windshield wiper control system, an entertainment system (to control radio playback, video playback, image display, etc.), a safety assistance system (to control parking assistance, reverse assistance, etc.), a sunroof / moonroof control system (to control a sunroof and / or moonroof), and other types of vehicle systems that may be controlled via one or more processors 112. Examples of vehicle systems 126 may include electronic control units (ECUs) capable of controlling any of the foregoing examples of vehicle systems 126.
[0022] As further shown in the example of FIG. 1, the vehicle 100 may include a display 120 and a user interface 122. The display 120 may represent any type of passive reflective screen capable of projecting an image, or an active reflective, emissive, or transmissive display capable of displaying an image, such as a light emitting diode (LED) display, an organic LED (OLED) display, a liquid crystal display (LCD), or other type of active display. Although the vehicle 100 is shown to include one display 120, the vehicle 100 may include multiple displays that may be disposed throughout the cabin of the vehicle 100. In some examples, a passive version of the display 120 or some active version of the display 120 (e.g., an OLED display) may be integrated into a seat, a table, a roof liner, flooring, a window (or a wall in a vehicle with no or few windows), or other aspects of the cabin of the vehicle. When the display 120 represents a passive display, the display 120 may also include a projector or other image projection device that may project or otherwise reproduce an image onto the passive display 120. Additionally, display 120 may include a display integrated into the driver's dash that provides a virtual representation of the physical instrument cluster (showing speed, revs, engine temperature, etc.).
[0023] Display 120 may also represent a display in wired or wireless communication with autonomous vehicle 100. Display 120 may represent, for example, a laptop computer, a head-up display, a head-mounted display, an augmented reality computing device or display (such as "smart glasses"), a virtual reality computing device or display, a mobile phone (including so-called "smartphones"), a tablet computer, a gaming system, or another type of computing device that can function as an extension of, or in place of, a display integrated into vehicle 100.
[0024] The user interface 122 may represent any type of physical or virtual interface with which a user may interface to control various functions of the vehicle 100. The user interface 122 may include physical buttons, knobs, sliders, or other physical controls. The user interface (UI) 122 may also include a virtual interface in which an occupant of the vehicle 100 interacts with virtual buttons, knobs, sliders, or other virtual interface elements, as an example, via a touch-sensitive screen or via a touchless interface. The occupant may interact with the user interface 122 to control one or more of the environment within the vehicle 100, audio playback by the vehicle 100, video playback by the vehicle 100, transmissions (such as cellular phone calls) through the vehicle 100, or other operations that may be performed by the vehicle 100.
[0025] User interface 122 may also represent an interface that is extended on display 120 when acting as an extension of, or in place of, a display integrated into vehicle 100. That is, user interface 122 may include a virtual interface presented via a heads-up display (HUD), an augmented reality computing device, a virtual reality computing device or display, a tablet computer, or other of the different types of augmented displays listed above.
[0026] In the context of vehicle 100, user interface 122 may also represent physical elements used to manually or semi-manually control vehicle 100. For example, user interface 122 may include one or more steering wheels for controlling the direction of travel of vehicle 100, one or more pedals for controlling the travel speed of vehicle 100, one or more manual brakes, etc.
[0027] 1, the one or more processors 112, GPU 114, flash memory 116, display 120, and user interface 122 may collectively represent, at least in part, what in the automotive context is referred to as a head unit 102 (or in other words, a “vehicle head unit 102”). The head unit 102 may represent any integrated or separate computing device that can interface with various aspects of the vehicle 100 (e.g., vehicle systems 126) and / or provide entertainment for the occupants and / or information about the vehicle 100 (wherein such a head unit may be referred to as an “infotainment unit” or “infotainment system”).
[0028] The head unit 102 may execute an operating system (OS) 130 configured to monitor disk access usage, also referred to as disk I / O (input / output), of applications executing on one or more processors 112 and limit the disk access usage by the applications within a specified time period to extend the life of the flash memory 116. The disk access usage of an application may correspond to an amount of writes by the application to the flash memory 116. That is, in some examples, the disk access usage of an application may be an amount of data, such as in bytes, written by the application to the flash memory 116. The OS 130 may monitor the amount of writes by each of the applications executing on the one or more processors 112 to the flash memory 116 to determine whether the disk access usage by the application is too high. If the OS 130 determines that the disk access usage by the application is too high, it may take one or more remedial actions to limit further disk access usage of the application, such as terminating the application.
[0029] The kernel of OS 130 may track disk access usage statistics of flash memory 116, such as the amount of data written to flash memory 116, and store the disk access usage statistics of flash memory 116 in one or more files in flash memory 116. For example, the kernel may store and update a file in flash memory 116 that includes the number of sectors written to each block device of flash memory 116. In an example where OS 130 is a Linux operating system, such a file may be a / proc / diskstats file. The kernel may also track disk access usage statistics for each application of flash memory 116, such as the amount of data that each of applications 225 has written to flash memory 116, and store and update a file in flash memory 116 that includes the disk access usage statistics for each application of flash memory 116. In an example where OS 130 is a Linux operating system, such a file may be a / proc / uid_io / stats file.
[0030] OS 130 may include a daemon that periodically determines disk access usage by all applications 125A-125N ("applications 125") executed on processor 112, such as by periodically polling a file in flash memory 116, e.g., a / proc / uid_io / stats file, that contains disk access usage statistics for each application in flash memory 116. For example, the daemon may poll the / proc / uid_io / stats file to fetch disk I / O statistics per UID. The proc / uid_io / stats file may contain disk I / O statistics per UID for all applications that have executed on processor 112, not just applications currently executing on one or more processors 112. Specifically, the / proc / uid_io / stats file may contain disk I / O statistics per UID for each application, such as the number of bytes written by the application to flash memory 116. Based on the per-UID disk I / O statistics in the / proc / uid_io / stats file, OS 130 may determine the disk access usage of each of the applications executing on one or more processors 112. For example, for an application, OS 130 may determine the application's disk access usage as the number of bytes written by the application to system flash memory.
[0031] The OS 130 may determine whether each of the applications 125 is excessively using disk access of the flash memory 116 within a specified period, such as within a day (e.g., from 12:00 a.m. to 11:59 p.m. on that day), by comparing each of the applications 125 to an application-specific excessive disk access usage threshold that specifies, for the associated application, the amount of disk access of the flash memory 116 that the application may use during the specified period. Each application of the applications 125 may have an individual, application-specific excessive disk access usage threshold because different applications may have different memory access usage requirements. For example, a mapping application and a media application (e.g., a music streaming application) tend to write more data to the flash memory 116 than other applications, and therefore each may be associated with a higher excessive disk access usage threshold than other applications.
[0032] Thus, OS 130 may compare the disk access usage of flash memory 116 by an application of applications 125 to an application-specific excessive disk access usage threshold associated with the application to determine whether the application is using excessive disk access. OS 130 may determine that an application is using excessive disk access of flash memory 116 if it determines that the amount of disk access of flash memory 116 used by an application of applications 125 exceeds the application-specific excessive disk access usage threshold associated with the application within a specified period of time.
[0033] For example, each of applications 125 may be associated with an application-specific disk access excess usage threshold that specifies, for the associated application, an amount of data, such as in bytes, that the associated application can write to flash memory 116 during a specified period of time. OS 130 may thus compare the amount of data written to flash memory 116 by an application of applications 125 during a specified period of time to the amount of data the application can write to flash memory 116, as indicated by the application-specific disk access excess usage threshold, to determine whether the application is excessively using disk access of flash memory 116.
[0034] Thus, OS 130 may determine one or more applications that are excessively using disk access of flash memory 116 within a specified time period based on comparing the respective disk access usage of flash memory 116 within the specified time period by each of applications 125 to a respective application-specific disk access excessive usage threshold. OS 130 may perform one or more actions in response to limit the amount of further disk access by the one or more applications within the specified time period. For example, OS 130 may terminate an application that is excessively using disk access of flash memory 116 within the specified time period n to prevent further disk access usage by the application within the specified time period. In an example where the specified time period is one day (e.g., from 12:00 a.m. to 11:59 p.m.), OS 130 may terminate the application so that the application does not run until 12:00 a.m. the next day.
[0035] In some examples, the OS 130 may periodically determine the respective disk access usage of the flash memory 116 by each of the applications 125 at relatively long intervals, such as every 10 seconds, every minute, etc. Such long intervals between determining the respective disk access usage by each of the applications 125 may cause the OS 130 to react too slowly to excessive disk access usage of the flash memory 116 by one or more of the applications 125. Thus, in some examples, the OS 130 may be configured to detect the occurrence of a system-wide excessive disk access usage condition. In response to detecting the occurrence of a system-wide excessive disk access usage condition, the OS 130 may determine the respective disk access usage of the flash memory 116 by each of the applications 125 and compare the respective disk access usage of the flash memory 116 by each of the applications 125 to a respective disk access usage threshold to determine one or more of the applications 125 that are excessively using disk access of the flash memory 116.
[0036] A system-wide disk access over-utilization may correspond to a short burst of disk access usage of the flash memory 116. To determine whether a system-wide disk access over-utilization is occurring, the OS 130 may periodically poll a file in system memory, such as a / proc / diskstats file, that specifies the total amount of data written to the flash memory 116 since the head unit 102 was started. The OS 130 may perform such polling at relatively short intervals, such as every 5 seconds, for the total amount of data written to the flash memory 116. In some examples, the OS 130 may determine that a system-wide disk access over-utilization is occurring when the total amount of data written to the flash memory 116 over the last one or more polls by the OS 130 exceeds a threshold value.
[0037] The OS 130 may determine that a system-wide excessive disk access usage condition is occurring when the total amount of data written to the flash memory 116 over a specified period of time exceeds a threshold. For example, the OS 130 may determine that a system-wide excessive disk access usage condition is occurring when the total amount of data written to the flash memory 116 over the past 30 seconds exceeds 500 megabytes. Thus, in response to detecting the occurrence of a system-wide excessive disk access usage condition, the OS 130 may determine a respective disk access usage of the flash memory 116 by each of the applications 125 within the specified period of time, and compare the respective disk access usage of each of the applications 125 within the specified period of time with a respective disk access usage threshold to determine one or more of the applications 125 that are excessively using disk access of the flash memory 116 within the specified period of time. Thus, the OS 130 may terminate an application that is excessively using disk access of the flash memory 116 within the specified period of time to prevent further excessive use of disk access of the flash memory 116 by the application.
[0038] 2 is a block diagram illustrating an example of head unit 102 of FIG. 1 in more detail. The head unit 202 shown in the example of FIG. 2 is an example of head unit 102 shown in FIG. 1. Head unit 202 may include one or more processors 212, flash memory 216, display 220, and UI 222. The one or more processors 212 are an example of one or more processors 112 shown in FIG. 1. Flash memory 216 is an example of flash memory 116 of FIG. 1. Display 220 is an example of display 120 of FIG. 1. UI 222 is an example of UI 122 of FIG. 1.
[0039] Flash memory 216 may include OS 230, which is an example of OS 130 of Figure 1. OS 230 includes a watchdog daemon 232, a watchdog service 234, a power manager 236, a helper service 238, and a package manager 240 that execute on one or more processors 212 to perform various functions of OS 230. For example, watchdog daemon 232 may execute on one or more processors 212 to monitor disk access usage statistics of head unit 202 by polling disk access usage statistics data store 242.
[0040] The disk access usage statistics data store 242 may store system-wide data access usage statistics for the flash memory 216. For example, the disk access usage statistics data store 242 may include a / proc / diskstats file that contains statistics per block device regarding the amount of data written to the flash memory 216 since the head unit 202 was booted.
[0041] The disk access usage statistics data store 242 may also store disk access usage statistics for each application of the flash memory 216. For example, the disk access usage statistics data store 242 may include a / proc / uid_io / stats file that includes disk input / output statistics for each user identifier (UID) of all applications 225 executed on one or more processors 212, each of the applications 225 being associated with a UID. Specifically, the / proc / uid_io / stats file may include, for each application of the applications 225, disk input / output statistics for each UID in the form of the number of bytes written by each application to the flash memory 216. In this manner, the / proc / uid_io / stats file may track the number of bytes written by each application of the applications 225 to the flash memory 216 individually.
[0042] In some examples, the watchdog daemon 232 may execute on one or more processors 212 to periodically determine the disk access usage of each of the flash memories 216 by each of the applications 225 within a specified period of time. The specified period of time may be one day, two days, one week, etc. For example, the watchdog daemon 232 may execute on one or more processors 212 to periodically poll the / proc / uid_io / stats file in the disk access usage statistics data store 242 every M seconds, such as every 10 seconds, every 15 seconds, every minute, etc., to read the total number of bytes written to the flash memory 216 by each of the applications 225 since booting the head unit 202, to determine the disk access usage of each of the flash memories 216 within the specified period of time by each of the applications 225.
[0043] The watchdog daemon 232 may track disk access usage per application of the flash memory 216 within a specified period of time, such as one day, 12 hours, 48 hours, etc. Although the disk access usage statistics data store 242 stores the disk access usage per application of the flash memory 216 since booting of the head unit 202, booting of the head unit 202 may not necessarily occur at the beginning of such period, and therefore the disk access usage per application of the flash memory 216 since booting of the head unit 202 may not be the same as the disk access usage per application of the flash memory 216 over the specified period of time. For example, if the specified period of time is one day from 12:00 a.m. to 11:59 p.m., booting of the head unit 202 at 5:00 p.m. may cause the disk access usage statistics data store 242 to store the disk access usage per application of the flash memory 216 only from 5:00 p.m. on that day onward.
[0044] In this manner, the watchdog daemon 232 may use the disk access usage per application of the flash memory 216 since boot of the head unit 202 stored by the disk access usage statistics data store 242 to determine the disk access usage per application of the flash memory 216 during the specified time period. Because the UID of an application is not guaranteed to be the same across reboots of the head unit 202, the package manager 240 of the OS 230 may execute on one or more processors 212 to determine an association between the UID and the package name of the application 225 and send an indication of that association to the watchdog daemon 232. Thus, the watchdog daemon 232 may track the UID of each of the applications 225 across reboots during the specified time period to determine the disk access usage of each of the applications 225 across reboots during the specified time period and store in the disk access usage statistics data store 242 an association between each application of the applications 225 and the disk access usage of the flash memory 216 by the application during the specified time period. Similarly, the watchdog daemon may track system-wide disk access usage of the flash memory 216 for a specified period across reboots and store the system-wide disk access usage of the flash memory 216 for the specified period in the disk access usage statistics data store 242.
[0045] In some examples, the disk access usage statistics data store 242 may store, for each application 225, separate disk access usage statistics for the application for different application states and different operational modes of the head unit 202. In some examples, an application may run in a foreground state or a background state. If an application is a foreground application, it may run in a foreground state such that the application's GUI is output for display on the display 220. Conversely, if an application is a background application, it may run in a background state such that the application's GUI is not output for display on the display 220. Thus, the disk access usage of an application when in a foreground state and the disk access usage of an application when in a background state may be tracked separately in the disk access usage statistics data store 242.
[0046] Similarly, the head unit 202 may operate in different operating modes, such as a garage mode or a normal mode. The head unit 202 may operate in a garage mode when the head unit 202 vehicle is idle. For example, the head unit 202 vehicle may be idle when it has not been used or operated by a user (e.g., a passenger) for a specified period of time (e.g., 30 minutes, 1 hour, etc.). In another example, the head unit 202 vehicle is parked and the vehicle engine is turned off. The head unit 202 may operate in a normal mode, in other aspects, when the vehicle is used or operated by a user or when the vehicle is no longer idle, such as when the vehicle engine is turned on. The disk access usage of each of the applications 225 while the head unit 202 is operating in the normal mode and the disk access usage of each of the applications 225 while the head unit 202 is operating in the garage mode may thus be tracked separately in the disk access usage statistics data store 242.
[0047] In some examples, the watchdog daemon 232 also executes on one or more processors 212 to periodically determine system-wide disk access usage of the flash memory 216 to determine the occurrence of a system-wide disk access over-utilization condition. For example, the watchdog daemon 232 executes on one or more processors 212 to periodically poll the / proc / diskstats file in the disk access usage statistics data store 242 every N seconds, where N is less than M, such as every 1 second, every 3 seconds, every 5 seconds, etc., and reads the total number of bytes written to the flash memory 216 since the start of the head unit 202. The watchdog daemon 232 may determine that a system-wide disk access over-utilization condition is occurring when the total amount of data written to the flash memory 216 over a specified time period exceeds a threshold value. For example, the watchdog daemon 232 may determine that a system-wide disk access over-utilization condition is occurring when the total amount of data written to the flash memory 216 over the past 30 seconds exceeds 1 gigabyte. In response to determining the occurrence of a system-wide excessive disk access usage condition, the watchdog daemon 232 may determine the amount of disk access usage of each of the applications 225 to the flash memory 216 within a specified period of time, such as by following the techniques described above.
[0048] A watchdog daemon 232 of the OS 230 may execute on one or more processors 212 and utilize the disk access usage statistics stored in the disk access usage statistics data store 242 to detect excessive usage of disk accesses of the flash memory 216 by one or more applications and remedy such excessive usage of disk accesses of the flash memory 216 by one or more applications. To that end, in response to determining the respective disk access usage of the flash memory 216 by each of the applications 225 or in response to determining an occurrence of a system-wide excessive disk access usage condition, the watchdog daemon 232 may compare the respective disk access usage of the flash memory 216 by each of the applications 225 to a respective application-specific disk access usage threshold to detect excessive disk access usage of the flash memory 216 by one or more of the applications 225.
[0049] The disk access usage threshold associated with an application may indicate the total amount of data (e.g., in bytes) that can be written by the application to the flash memory 216 during a specified period of time (e.g., in a day). Thus, to compare the disk access usage of an application to the disk access usage threshold associated with the application, the watchdog daemon 232 may compare the disk access usage of the application during the specified period, as stored in the disk access usage statistics data store 242, to the disk access usage threshold associated with the application. If the watchdog daemon 232 determines that the disk access usage of the application during the specified period of time exceeds (i.e., is greater than) the disk access usage threshold associated with the application, the watchdog daemon 232 may determine excessive disk access usage of the flash memory 216 by the application.
[0050] In some examples, each of the applications 225 may be associated with multiple application-specific disk access usage thresholds. In some examples, an application may be associated with a disk access usage threshold associated with each of multiple application states, such as a disk access usage threshold associated with a foreground state and a disk access usage threshold associated with a background state. In some examples, an application may be associated with a disk access usage threshold associated with each of one or more operational modes of the head unit 202, such as a disk access usage threshold associated with a garage mode.
[0051] The disk access usage thresholds associated with the applications may differ from one another. In some examples, the disk access usage threshold associated with the garage mode may be greater than the disk access usage threshold associated with the foreground state and the disk access usage threshold associated with the background state because when the head unit 202 is in the garage mode, it may be downloading and / or executing system and application updates and therefore writing a greater amount of data to the flash memory 216 than when the head unit 202 is not in garage mode. In some examples, the disk access usage threshold associated with the foreground state may be greater than the disk access usage threshold associated with the background state to not terminate foreground applications running on one or more processors 212.
[0052] Thus, to compare the disk access usage of flash memory 216 by an application to an application-specific disk access usage threshold associated with the application, the watchdog daemon 232 may determine the operational mode of the head unit 202 and / or the application state of the application. For example, the watchdog daemon 232 may receive an indication of the application state of the application from the package manager 240 and / or an indication of the operational mode of the head unit 202 from the power manager 236.
[0053] The watchdog daemon 232 may determine an application-specific disk access usage threshold from among a plurality of application-specific disk access usage thresholds based on the application state of the application and / or the operational mode of the head unit 202, and may compare the disk access usage of the flash memory 216 by the application to the determined application-specific disk access usage threshold associated with the application. For example, if the watchdog daemon 232 determines that the application is in a foreground state, it may compare the disk access usage of the flash memory 216 of the application while in the foreground state to the disk access usage threshold associated with the foreground state. In another example, if the watchdog daemon 232 determines that the application is in garage mode, it may compare the disk access usage of the flash memory 216 of the application to the disk access usage threshold associated with the garage mode.
[0054] Thus, the watchdog daemon 232 may compare the respective disk access usage of the flash memory 216 by each of the applications 225 within a specified time period with a respective application-specific disk access usage threshold to determine one or more of the applications 225 that are excessively using disk accesses of the flash memory 216. Specifically, the watchdog daemon 232 may determine that an application is excessively using disk accesses of the flash memory 216 if it determines that the disk access usage of the flash memory 216 by the application within a specified time period exceeds the application-specific disk access usage threshold.
[0055] Also, in some examples, the watchdog daemon 232 may determine one or more of the applications 224 that are not using excessive disk accesses of the flash memory 216 but are potentially at risk of using excessive disk accesses of the flash memory 216 before the end of the specified period based on comparing the respective disk access usage of the flash memory 216 by each of the applications 225 within the specified period to a respective application-specific disk access usage threshold. For example, if the watchdog daemon 232 determines that the disk access usage of the flash memory 216 by the application within the specified period does not exceed the application-specific disk access usage threshold but instead exceeds a specified percentage of the application-specific disk access usage threshold, such as exceeding 70% of the application-specific disk access usage threshold, the watchdog daemon 232 may determine that the application is potentially at risk of using excessive disk accesses of the flash memory 216 by the end of the specified period.
[0056] The watchdog daemon 232 may determine, for each of one or more of the applications 225 that are not using excessive disk accesses of the flash memory 216, a remaining amount of disk access usage of the flash memory 216 by the application before the application will use excessive disk accesses of the flash memory 216. Specifically, the watchdog daemon 232 may determine, for an application, the remaining amount of disk access usage of the flash memory 216 by the application before the application will use excessive disk accesses of the flash memory 216 as the difference between an application-specific disk access usage threshold associated with the application and the disk access usage of the flash memory 216 by the application within a specified period of time.
[0057] The watchdog daemon 232 may communicate with a watchdog service 234 running on one or more processors 212 to push data collected by the watchdog daemon 232 to the watchdog service 234. For example, at each periodic poll, the watchdog daemon 232 pushes the latest per-application statistics (e.g., bytes remaining, total bytes written, total overutilization for a specified period, etc.) to the watchdog service 234 along with a list of potential and actual overutilization.
[0058] In some examples, the watchdog daemon 232 and / or the watchdog service 234 may send a notification to each application determined to be at risk of potentially overusing disk access of the flash memory 216 before the end of the specified time period, indicating that the application is at risk of potentially overusing disk access of the flash memory 216 before the end of the specified time period. In some examples, the watchdog daemon 232 may send the notification to native services, while the watchdog service 234 may send the notification to Java applications and services. The watchdog daemon 232 and / or the watchdog service 234 may include in the notification sent to each application the remaining amount of disk access usage of the flash memory 216 by the application before the application overuses disk access of the flash memory 216. In response to receiving the notification, the application may take one or more actions to reduce the disk access usage of the flash memory 216 during the specified time period, such as reducing the number of bytes the application writes to the flash memory 216.
[0059] In some examples, an application may, at any time, query the watchdog daemon 232 and / or the watchdog service 234 regarding the application's remaining disk access usage of flash memory 216 before the application uses excessive disk accesses of flash memory 216. In response to receiving such a query from the application, the watchdog daemon 232 and / or the watchdog service 234 may determine the application's remaining disk access usage of flash memory 216 before the application uses excessive disk accesses of flash memory 216 and send to the application an indication of the application's remaining disk access usage of flash memory 216 before the application uses excessive disk accesses of flash memory 216.
[0060] For each of one or more of the applications 225 that the watchdog service 234 determines is using excessive disk access of the flash memory 216, the watchdog service 234 may determine whether the application can be terminated by the head unit 202. In some examples, the applications 225 may include first party applications, which are applications developed or controlled by the original equipment manufacturers (OEMs) of the head unit 202 and the same organizations that developed or controlled the OS 230, as well as third party applications that are not developed or controlled by the OEM of the head unit 202 or the organizations that developed or controlled the OS 230. In some examples, the head unit 202 may terminate third party applications, but the head unit 202 may only be able to terminate first party applications that are explicitly included in a safe termination list. This is because certain first party applications may be critical system components that the head unit 202 may rely on for the proper functioning of the head unit 202. In this manner, the watchdog service 234 may determine that the head unit 202 can terminate an application if the application is a third-party application or if the application is a first-party application that is explicitly included in the safe termination list.
[0061] The watchdog service 234 may send a notification to each application in applications 225 that the watchdog service 234 determines is using excessive disk access of the flash memory 216 and that the head unit 202 is unable to terminate, indicating that the application is using excessive disk access of the flash memory 216. In response to receiving the notification, the application may take one or more actions to reduce disk access usage of the flash memory 216 during a specified period of time, such as reducing the number of bytes that the application writes to the flash memory 216.
[0062] For each application of applications 225 that the watchdog service 234 determines is using excessive disk access of flash memory 216 and that the head unit 202 determines can be terminated, the watchdog service 234 may determine whether to terminate the application. Terminating the application may include stopping execution of the application by one or more processors 212. When an application is terminated, the head unit 202 may refrain from executing the application on one or more processors 212 until a user provides an input in the UI 222 corresponding to a command to resume execution of the application on one or more processors 212. To terminate an application, the watchdog service 234 may send an indication of the application to be terminated to a helper service 238 of the OS 230 executing on the one or more processors 212. In response to receiving an indication of the application to be terminated from the watchdog service 234, the helper service 238 may terminate the indicated application.
[0063] In some examples, the watchdog service 234 may determine whether the excessive use of disk accesses of the flash memory 216 by an application is a reoccurring occurrence of the excessive use of disk accesses of the flash memory 216 by an application to determine whether to terminate an application that has determined to be excessively using disk accesses of the flash memory 216 and that the head unit 202 may terminate. Each time the watchdog service 234 detects excessive use of disk accesses of the flash memory 216 by an application, it may save an indication of such excessive use of disk accesses of the flash memory 216 by the application in the disk access usage statistics data store 242, or the like, thereby keeping track of the number of times an application has excessively used disk accesses of the flash memory 216 over time.
[0064] In this manner, if the watchdog service 234 determines that the occurrence of excessive disk access of the flash memory 216 by an application occurs a specified number of times or more within a specified number of days, the watchdog service 234 may determine that the excessive disk access of the flash memory 216 by an application is a reoccurrence of excessive disk access of the flash memory 216 by an application if the excessive disk access of the flash memory 216 by an application occurs seven or more times within a 30 day period. In response to determining that the excessive disk access of the flash memory 216 by an application is a reoccurrence of excessive disk access of the flash memory 216 by an application, the watchdog service 234 may terminate the application.
[0065] In some examples, the watchdog service 234 may terminate an application that the watchdog service 234 determines is using excessive disk access of the flash memory 216 and may terminate the head unit 202 if the display 220 is off. Thus, the watchdog service 234 may determine whether the display 220 is on in response to determining that the application is using excessive disk access of the flash memory 216 and that the head unit 202 may terminate the application. In response to determining that the display is not on, the watchdog service 234 may terminate the application. In some examples, the watchdog service 234 may determine whether the display 220 is on in response to determining that the excessive use of disk access of the flash memory 216 by the application is not a reoccurrence of the excessive use of disk access of the flash memory 216 by the application. In response to determining that the display 220 is not on, the watchdog service 234 may terminate the application.
[0066] In some examples, the watchdog service 234 may terminate an application that the watchdog service 234 determines is using excessive disk access of the flash memory 216 when the display 220 is on and that the head unit 202 may terminate if the application is not a foreground application. The watchdog service 234 may receive an indication of the application state of the application from the package manager 240 to determine whether the application is a foreground or background application. The watchdog service 234 may terminate the application in response to determining that the application is a background application.
[0067] In some examples, if the watchdog service 234 cannot terminate an application that is using excessive disk accesses of the flash memory 216, such as when the display 220 is on and the application is a foreground application, the watchdog service 234 may notify a user of the head unit 202 that the application is using excessive disk accesses of the flash memory 216 and allow the user to select whether to terminate the application. For example, in response to determining that the watchdog service 234 cannot terminate an application that is using excessive disk accesses of the flash memory 216, it may output a notification for display on the display 220 indicating that the application is using excessive disk accesses of the flash memory 216. If the user provides user input on the UI 222 corresponding to a request to terminate the application in response to the notification displayed on the display 220, the watchdog service 234 may terminate the application.
[0068] 3A and 3B are flow charts illustrating example operations that may be performed by example head unit 202 of FIG. 2 to manage disk access usage of applications. The techniques of FIG. 3A and 3B are described in the context of head unit 202 of FIG.
[0069] 3A, OS 230 may detect the occurrence of a system-wide excessive disk access usage condition and, in response, determine (302) a per-application disk access usage statistic for each of applications 225 in head unit 202. In some examples, instead of or in addition to detecting the occurrence of a system-wide excessive disk access usage condition, OS 230 may periodically determine (304) a per-application disk access usage statistic for each of applications 225. The per-application disk access usage statistic for each of applications 225 may be, for each of applications 225, an amount of data written by the application to flash memory 216 within a specified period, such as within a day.
[0070] In response to determining the disk access usage statistics for each of applications 225, OS 230 may compare (306) each application's disk access usage to an application-specific disk access usage threshold. Each application of applications 225 may be associated with an application-specific disk access usage threshold. In this manner, different applications of applications 225 may have different disk access usage thresholds.
[0071] In some examples, an application may operate in different application states, and the application-specific disk access usage thresholds associated with an application may include application-state-specific disk access usage thresholds that may vary depending on the application state of the application. For example, an application may operate in a foreground state or a background state. An application operates in a foreground state if the application's graphical user interface is being output on the display of the head unit 202. Conversely, an application operates in a background state if the application's graphical user interface is not being output on the display of the head unit 202.
[0072] Thus, an application may be associated with both a foreground disk access usage threshold and a background disk access usage threshold. In some examples, the foreground disk access usage threshold associated with an application may be different from the background disk access usage threshold associated with the application. For example, the foreground disk access usage threshold associated with an application may be greater than the background disk access usage threshold associated with the application.
[0073] When an application operates in a foreground state, OS 230 may compare the application's disk access usage to a foreground disk access threshold associated with the application to determine whether the application's disk access usage exceeds the foreground disk access threshold. Conversely, when an application operates in a background state, OS 230 may compare the application's disk access usage to a background disk access threshold associated with the application to determine whether the application's disk access usage exceeds the background disk access threshold.
[0074] In some examples, the head unit 202 may operate in different system modes, and the application-specific disk access usage thresholds associated with an application may vary depending on the system mode of the head unit 202. For example, the head unit 202 may operate in either a normal mode or a garage mode. The head unit 202 may operate in the garage mode when the head unit's 202 vehicle is parked and the vehicle's engine is turned off, and the head unit 202 may operate in the normal mode when the vehicle's engine is not turned off.
[0075] Thus, an application may be associated with a garage mode disk access usage threshold that may differ from the foreground disk access threshold associated with the application and the background disk access threshold associated with the application. For example, when the head unit 202 operates in garage mode, the head unit 202 may download and install updates to the application 225 and / or OS 230, and therefore may read from and write to the flash memory 216 at a faster rate than when the application is in a foreground or background state. Thus, the garage mode disk access usage threshold associated with the application may be higher than the foreground disk access threshold associated with the application and the background disk access threshold associated with the application.
[0076] To compare the disk access usage of the application to the application-specific disk access usage thresholds, OS 230 may determine a number of disk access usage thresholds associated with the application, such as a background disk access usage threshold associated with the application, a foreground disk access usage threshold associated with the application, a garage mode disk access usage threshold associated with the application, and a normal mode disk access usage threshold associated with the application. OS 230 may determine a current application state of the application and / or a current operating mode of head unit 202. OS 230 may determine a disk access usage threshold associated with the application from among a number of disk access usage thresholds associated with the application based on a current application state of the application and / or a current operating mode of head unit 202. Thus, OS 230 may compare the disk access usage of the application to the disk access usage thresholds associated with the application.
[0077] OS 230 may compare the disk access usage of each of applications 225 to a respective application-specific disk access usage threshold to determine whether the disk access usage of each of applications 225 exceeds the disk access usage threshold associated with the application (308). If OS 230 determines that the disk access usage of the application does not exceed the disk access usage threshold associated with the application, OS 230 may determine whether the disk access usage of the application exceeds a specified percentage, e.g., 70%, of the disk access usage threshold associated with the application (310).
[0078] If OS 230 determines that the application's disk access usage exceeds a specified percentage of the disk access usage threshold associated with the application, OS 230 may warn that the application may be terminated if the application's disk access usage exceeds the disk access usage threshold associated with the application. Specifically, OS 230 may determine (312) whether the application can be terminated due to excessive disk access usage. If the application cannot be terminated due to excessive disk access usage, it may not be necessary to warn the application that the application may be terminated if the application's disk access usage exceeds the disk access usage threshold associated with the application.
[0079] In some examples, all third party applications may be terminated for excessive disk access usage, but first party applications and system applications may not be terminated for excessive disk access usage unless these applications are on the safe termination list. Thus, to determine whether an application may be terminated for excessive disk access usage, OS 230 may determine whether the application is a third party application or an application on the safe termination list.
[0080] If OS 230 determines that the application may be terminated due to excessive disk access usage, it may determine whether OS 230 has previously sent a notification to the application warning that the application may be terminated if the application's disk access usage exceeds a disk access usage threshold associated with the application (314). If OS 230 determines that OS 230 has not previously sent a notification to the application warning that the application may be terminated if the application's disk access usage exceeds a disk access usage threshold associated with the application, OS 230 may send a notification to the application warning that the application may be terminated if the application's disk access usage exceeds a disk access usage threshold associated with the application (316).
[0081] In some examples, the notification may indicate a remaining amount of data that can be safely written by the application to flash memory 216. The remaining amount of data that can be safely written by the application to flash memory 216 may be the difference between a disk access usage threshold associated with the application and the application's current disk access usage.
[0082] If OS 230 determines that the application's disk access usage exceeds a disk access usage threshold associated with the application, OS 230 may determine whether the application can be terminated for excessive disk access usage (318). As described above, in some examples, all third-party applications can be terminated for excessive disk access usage, but first-party applications and system applications cannot be terminated for excessive disk access usage unless these applications are on a safe termination list. If OS 230 determines that the application cannot be terminated for excessive disk access usage, OS 230 may send a notification to the application indicating that the application's disk access usage is excessive (320). In response to receiving the notification, the application may reduce its disk access usage.
[0083] If OS 230 determines that an application's disk access usage exceeds a disk access usage threshold associated with the application and that the application may be terminated for excessive disk access usage, OS 230 may send a notification to the application indicating that the application's disk access usage is excessive (329) and may terminate the application under certain circumstances. As shown in FIG. 3B, if OS 230 determines that an application's disk access usage exceeds a disk access usage threshold associated with the application and that the application may be terminated for excessive disk access usage, OS 230 may determine whether a user has opted out of terminating the application for excessive disk access usage (322). If OS 230 determines that a user has not opted out of terminating the application for excessive disk access usage ("No" at 322), OS 230 may determine whether the user is currently using the application (324). For example, OS 230 may determine that a user is currently using an application if display 220 is on and the application is a foreground application (i.e., the application is in a foreground state).
[0084] In response to determining that the user is not currently using the application ("No" at 324), OS 230 may terminate the application (336) and determine whether the excessive use of disk access by the application is a reoccurrence of excessive use of disk access by the application (338). The excessive use of disk access by the application may be a reoccurrence of excessive use of disk access by the application if the excessive use of disk access by the application occurs more than a specified number of times within a specified number of days. For example, the excessive use of disk access by the application may be a reoccurrence of excessive use of disk access by the application if the excessive use of disk access by the application occurs more than seven times within a 30-day period.
[0085] If OS 230 determines that the excessive usage is not a recurrence of excessive usage ("No" at 338), OS 230 may not notify the user that the application's disk access usage exceeds a disk access usage threshold associated with the application (334). If OS 230 determines that the excessive usage is a recurrence of excessive usage ("Yes" at 338), OS 230 may determine whether the user is currently driving the vehicle (340). If the user is currently driving the vehicle ("Yes" at 340), OS 230 may wait until the user is no longer driving the vehicle. If the user is not driving the vehicle ("No" at 340), OS 230 may notify the user of head unit 202 of an indication that the application is using excessive disk access of flash memory 216 (342). For example, the one or more processors 212 may output a notification for display on the display 220, including an indication that the current foreground application is using excessive disk access of the flash memory 216, and allow the user to provide input in the UI 222 to indicate whether to temporarily allow the application to run (344).
[0086] If the user selects to temporarily allow the application to run ("yes" at 344), such as by providing user input in UI 222, OS 230 may prevent the application from terminating (346) if the application is using excessive disk access of flash memory 216. If the user does not select to temporarily allow the application to run ("no" at 344), such as by providing user input in UI 222, OS 230 may wait (348) until display 220 is turned off and may terminate (350) the application.
[0087] In response to determining that the user is currently using the application ("Yes" at 324), OS 230 may determine whether the excessive use of disk access by the application is a reoccurrence of excessive use of disk access by the application (326). The excessive use of disk access by the application may be a reoccurrence of excessive use of disk access by the application if the excessive use of disk access by the application occurs more than a specified number of times within a specified number of days. For example, the excessive use of disk access by the application may be a reoccurrence of excessive use of disk access by the application if the excessive use of disk access by the application occurs more than seven times within a 30 day period.
[0088] If OS 230 determines that the excessive usage is not a recurrence of excessive usage ("No" at 326), then OS 230 may not notify the user that the application's disk access usage exceeds a disk access usage threshold associated with the application (327). If OS 230 determines that the excessive usage is a recurrence of excessive usage ("Yes" at 326), then OS 230 may determine whether the user is currently driving the vehicle (340). If the user is currently driving the vehicle ("Yes" at 340), then OS 230 may wait until the user is no longer driving the vehicle. If the user is not driving the vehicle ("No" at 340), then OS 230 may notify the user of head unit 202 that the application is using excessive disk access of flash memory 216 (342). For example, the one or more processors 212 may output a notification for display on the display 220 that includes an indication that the current foreground application is using excessive disk access of the flash memory 216, and allows the user to provide input in the UI 222 to indicate whether to temporarily allow the application to run.
[0089] If the user selects to temporarily allow the application to run ("yes" at 344), such as by providing user input in the UI 222, the OS 230 may prevent the application from terminating (346) if the application is using excessive disk access of the flash memory 216. If the user does not select to temporarily allow the application to run ("no" at 344), such as by providing user input in the UI 222, the OS 230 may wait (348) until the display 220 is turned off and may terminate (350) the application.
[0090] If OS 230 determines that an application has opted out of terminating due to excessive disk access usage ("Yes" at 322), OS 230 may determine whether the excessive disk access usage by the application is a reoccurrence of excessive disk access by the application (328). The excessive disk access usage by the application may be a reoccurrence of excessive disk access by the application if the excessive disk access usage by the application occurs more than a specified number of times within a specified number of days. For example, the excessive disk access usage by the application may be a reoccurrence of excessive disk access by the application if the excessive disk access usage by the application occurs more than seven times within a 30-day period.
[0091] If OS 230 determines that the excessive disk access usage by the application is not a recurrence of excessive disk access usage by the application ("No" at 328), OS 230 may not notify the user that the application's disk access usage exceeds a disk access usage threshold associated with the application (334). If OS 230 determines that the excessive disk access usage by the application is a recurrence of excessive disk access usage by the application ("Yes" at 328), OS 230 may determine whether the user is currently driving the vehicle (330). If the user is currently driving the vehicle ("Yes" at 330), OS 230 may wait until the user is no longer driving the vehicle. If the user is not driving the vehicle ("No" at 330), OS 230 may notify the user of head unit 202 that the application is excessively using disk access of flash memory 216 (332). For example, the one or more processors 212 may output a notification for display on the display 220 that includes an indication that the current foreground application is using excessive disk accesses of the flash memory 216 .
[0092] 4 is a flow chart illustrating an example operation of the example head unit 202 of FIG. 2 to manage disk access usage of applications. FIG. 4 is described with respect to FIG.
[0093] 4, the one or more processors 212 of the head unit 202 may determine a respective disk access usage of the flash memory 216 of the head unit 202 by each of the plurality of applications 225 (402). The one or more processors 212 may compare the respective disk access usage of the flash memory by each of the plurality of applications 225 to a respective application-specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory 216 by an application of the plurality of applications 225 (404). The one or more processors 212 may terminate the application in response to determining the excessive disk access usage of the flash memory 216 by the application (406).
[0094] In some examples, the one or more processors 212 may compare the disk access usage of the flash memory by each of the plurality of applications 225 to a respective application-specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory 216 by the application. In response to determining that the disk access usage of the flash memory 216 by the application exceeds the excessive disk access usage threshold associated with the application, the one or more processors 212 may determine the disk access usage of the flash memory 216 by the application.
[0095] In some examples, the one or more processors 212 may determine an application state of the application and determine a disk access excess utilization threshold associated with the application from a plurality of disk access excess utilization thresholds associated with the application based at least in part on the application state of the application.
[0096] In some examples, the one or more processors 212 may determine an operational mode of the head unit 202. The one or more processors 212 may determine a disk access over-utilization threshold associated with an application from a plurality of disk access over-utilization thresholds associated with the application based at least in part on the operational mode of the head unit 202.
[0097] In some examples, the respective application-specific disk access excess usage threshold of each of the plurality of applications 225 is associated with a specified time period, and the respective disk access usage of the flash memory 216 by each of the plurality of applications 225 is the respective disk access usage of the flash memory 216 within the specified time period by each of the plurality of applications 225.
[0098] In some examples, the one or more processors 212 may determine an occurrence of a system-wide disk access over-utilization condition to determine the respective disk access usage of the flash memory 216 of the head unit 202 by each of the plurality of applications 225. In response to determining the occurrence of a system-wide disk access over-utilization condition, the one or more processors 212 may determine the respective disk access usage of the flash memory 216 of the head unit 202 by each of the plurality of applications 225.
[0099] In some examples, to determine the occurrence of a system-wide disk access over-utilization condition, the one or more processors 212 may determine that the total disk usage of the flash memory 216 exceeds a specified threshold for a specified time. In response to determining that the total disk usage of the flash memory 216 exceeds a specified threshold for a specified time, the one or more processors 212 may determine the occurrence of a system-wide disk access over-utilization condition.
[0100] In some examples, to terminate an application, the one or more processors 212 may determine that the display 220 of the head unit 202 is off in response to determining excessive disk access usage of the flash memory 216 by the application. The one or more processors 212 may terminate the application in response to determining that the display 220 of the head unit 202 is off.
[0101] In some examples, to terminate the application, the one or more processors 212 may determine that the display 220 of the head unit 202 is not off in response to determining excessive disk access usage of the flash memory 216 by the application. The one or more processors 212 may determine that the application is not a foreground application in response to determining that the display 220 of the head unit 202 is not off. The one or more processors 212 may terminate the application in response to determining that the application is not a foreground application.
[0102] Example 1: A method comprises one or more processors of a computing device determining a respective disk access usage of a flash memory of the computing device by each of a plurality of applications, the one or more processors comparing the respective disk access usage of the flash memory by each of the plurality of applications to a respective application-specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory by an application of the plurality of applications, and in response to determining the excessive disk access usage of the flash memory by the application, the one or more processors terminating the application.
[0103] Example 2: The method of Example 1, wherein comparing a respective disk access usage of the flash memory by each of a plurality of applications to a respective application-specific disk access excessive usage threshold to determine excessive disk access usage of the flash memory by the application further includes: one or more processors comparing the disk access usage of the flash memory by the application to a disk access excessive usage threshold associated with the application; and in response to determining that the disk access usage of the flash memory by the application exceeds the disk access excessive usage threshold associated with the application, the one or more processors determining excessive disk access usage of the flash memory by the application.
[0104] Example 3: The method of Example 2, further comprising: one or more processors determining an application state of the application; and one or more processors determining, based at least in part on the application state of the application, a disk access excess utilization threshold associated with the application from a plurality of disk access excess utilization thresholds associated with the application.
[0105] Example 4: The method of Example 2, further comprising: one or more processors determining an operating mode of the computing device; and, the one or more processors determining, based at least in part on the operating mode of the computing device, a disk access overutilization threshold associated with the application from a plurality of disk access overutilization thresholds associated with the application.
[0106] Example 5: A method as described in any one of Examples 1 to 4, wherein a respective application-specific disk access excess usage threshold for each of the plurality of applications is associated with a specified time period, and a respective disk access usage of the flash memory by each of the plurality of applications is a respective disk access usage of the flash memory within the specified time period by each of the plurality of applications.
[0107] Example 6: The method of any one of Examples 1-5, wherein determining each of the plurality of applications' disk access usage of the flash memory of the computing device further includes: one or more processors determining an occurrence of a system-wide disk access over-utilization condition; and in response to determining the occurrence of a system-wide disk access over-utilization condition, one or more processors determining each of the plurality of applications' disk access usage of the flash memory of the computing device.
[0108] Example 7: The method of Example 6, wherein determining the occurrence of a system-wide disk access over-utilization condition further includes: the one or more processors determining that a total amount of disk usage of the flash memory exceeds a specified threshold for a specified time period; and in response to determining that a total amount of disk usage of the flash memory exceeds a specified threshold for a specified time period, the one or more processors determining that a system-wide disk access over-utilization condition occurs.
[0109] Example 8: The method of any one of Examples 1-7, wherein terminating the application further includes, in response to determining excessive disk access usage of the flash memory by the application, the one or more processors determining that a display of the computing device is off, and in response to determining that the display of the computing device is off, the one or more processors terminating the application.
[0110] Example 9: The method of any one of Examples 1-8, wherein terminating the application further includes: in response to determining excessive usage of disk access of the flash memory by the application, the one or more processors determining that a display of the computing device is not off; in response to determining that a display of the computing device is not off, the one or more processors determining that the application is not a foreground application; and in response to determining that the application is not a foreground application, the one or more processors terminating the application.
[0111] Example 10: The method of any one of Examples 1 to 9, wherein the computing device includes a head unit of a vehicle.
[0112] Example 11: A computing device includes a flash memory and one or more processors communicatively coupled to the flash memory, the one or more processors configured to determine a respective disk access usage of the flash memory by each of a plurality of applications, compare the respective disk access usage of the flash memory by each of the plurality of applications to a respective application-specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory by an application of the plurality of applications, and terminate the application in response to determining the excessive disk access usage of the flash memory by the application.
[0113] Example 12: The computing device of Example 11, wherein to compare each of the plurality of applications' respective disk access usage of the flash memory to a respective application-specific disk access excess usage threshold to determine excessive disk access usage of the flash memory by the application, the one or more processors are further configured to compare the disk access usage of the flash memory by the application to a disk access excess usage threshold associated with the application, and in response to determining that the disk access usage of the flash memory by the application exceeds the disk access excess usage threshold associated with the application, determine excessive disk access usage of the flash memory by the application.
[0114] Example 13: The computing device of Example 12, wherein the one or more processors are further configured to determine an application state of the application and determine a disk access overutilization threshold associated with the application from a plurality of disk access overutilization thresholds associated with the application based at least in part on the application state of the application.
[0115] Example 14: The computing device of Example 12, wherein the one or more processors are further configured to determine an operating mode of the computing device and determine a disk access overutilization threshold associated with the application from a plurality of disk access overutilization thresholds associated with the application based at least in part on the operating mode of the computing device.
[0116] Example 15: A computing device described in any one of Examples 11 to 14, wherein a respective application-specific disk access excess usage threshold for each of the plurality of applications is associated with a specified time period, and a respective disk access usage of the flash memory by each of the plurality of applications is a respective disk access usage of the flash memory within the specified time period by each of the plurality of applications.
[0117] Example 16: A computing device described in any one of Examples 11 to 15, wherein, in order to determine respective disk access usage of the flash memory of the computing device by each of the plurality of applications, the one or more processors are further configured to determine an occurrence of a system-wide disk access over-utilization condition, and in response to determining the occurrence of the system-wide disk access over-utilization condition, determine respective disk access usage of the flash memory of the computing device by each of the plurality of applications.
[0118] Example 17: The computing device of Example 16, wherein to determine the occurrence of a system-wide disk access over-utilization condition, the one or more processors are further configured to determine that an aggregate amount of disk usage of the flash memory exceeds a specified threshold for a specified time period, and in response to determining that an aggregate amount of disk usage of the flash memory exceeds a specified threshold for a specified time period, determine the occurrence of a system-wide disk access over-utilization condition.
[0119] Example 18: A computing device described in any one of Examples 11 to 17, wherein to terminate the application, the one or more processors are further configured to: determine that a display of the computing device is off in response to determining excessive disk access usage of the flash memory by the application; and terminate the application in response to determining that a display of the computing device is off.
[0120] Example 19: A computing device described in any one of Examples 11 to 18, wherein to terminate the application, the one or more processors are further configured to: determine that a display of the computing device is not off in response to determining excessive disk access usage of the flash memory by the application; determine that the application is not a foreground application in response to determining that the display of the computing device is not off; and terminate the application in response to determining that the application is not a foreground application.
[0121] Example 20: A non-transitory computer-readable storage medium having instructions stored thereon that, when executed, cause one or more processors of a computing device to determine a respective disk access usage of a flash memory of the computing device by each of a plurality of applications, compare the respective disk access usage of the flash memory by each of the plurality of applications to a respective application-specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory by an application of the plurality of applications, and in response to determining the excessive disk access usage of the flash memory by the application, terminate the application.
[0122] By way of example and not limitation, such computer readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or other storage media that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is properly referred to as a computer readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as Bluetooth, WiFi, infrared, radio, and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer readable storage media and data storage media do not include connections, carrier waves, signals, or other transitory media, but are instead directed to non-transitory tangible storage media. As used herein, disk or disc includes compact disc (CD), laser disc, optical disk, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks typically reproduce data magnetically and discs reproduce data optically using lasers, and combinations of the above are also intended to be included within the scope of computer readable media.
[0123] The instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuitry. Thus, the term "processor" as used herein may refer to any of the foregoing structures, or other structures suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described herein may be provided in dedicated hardware and / or software modules. Also, the techniques may be implemented completely in one or more circuits or logic elements.
[0124] The techniques of the present disclosure may be implemented in a wide variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or sets of ICs (e.g., chipsets). Various components, modules, or units are described in the present disclosure to highlight functional aspects of devices configured to perform the disclosed techniques, but do not necessarily require implementation by different hardware units. Rather, as described above, various units may be combined in a hardware unit, or may be provided by a collection of interoperable hardware units including one or more processors as described above, in combination with appropriate software and / or firmware.
[0125] Various embodiments have been described. These and other embodiments are within the scope of the following claims.
Claims
1. determining, by one or more processors of a computing device, a respective disk access usage of a flash memory of said computing device by each of a plurality of applications; the one or more processors comparing the respective disk access usage of the flash memory by each of the plurality of applications to a respective application-specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory by an application of the plurality of applications; in response to determining excessive disk access usage of the flash memory by the application, the one or more processors terminating the application.
2. comparing the respective disk access usage of the flash memory by each of the plurality of applications to a respective application specific disk access excessive usage threshold to determine the excessive disk access usage of the flash memory by the application further comprises: the one or more processors comparing disk access usage of the flash memory by the application to a disk access over-utilization threshold associated with the application; 2. The method of claim 1, further comprising: in response to determining that the disk access usage of the flash memory by the application exceeds the disk access excessive usage threshold associated with the application, the one or more processors determining the excessive disk access usage of the flash memory by the application.
3. determining, by the one or more processors, an application state representative of an execution format of the application; 3. The method of claim 2, further comprising: the one or more processors determining, based at least in part on the application state of the application, the disk access excess utilization threshold associated with the application from a plurality of disk access excess utilization thresholds associated with the application.
4. the one or more processors determining an operational mode of the computing device; 3. The method of claim 2, further comprising: the one or more processors determining, based at least in part on the operational mode of the computing device, the disk access overutilization threshold associated with the application from a plurality of disk access overutilization thresholds associated with the application.
5. the respective application-specific disk access excess utilization thresholds for each of the plurality of applications are associated with a designated time period; 2. The method of claim 1, wherein the respective disk access usage of the flash memory by each of the plurality of applications is the respective disk access usage of the flash memory within the specified time period by each of the plurality of applications.
6. Determining the respective disk access usage of the flash memory of the computing device by each of the plurality of applications further comprises: the one or more processors determining an occurrence of a system-wide disk access overutilization condition; 2. The method of claim 1, further comprising: in response to determining an occurrence of the system-wide disk access over-utilization condition, the one or more processors determining the respective disk access usage of the flash memory of the computing device by each of the plurality of applications.
7. Determining the occurrence of an excessive disk access usage condition across the entire system further comprises: determining, by the one or more processors, that a total amount of disk usage of the flash memory exceeds a specified threshold for a specified period of time; 7. The method of claim 6, further comprising: in response to determining that the total amount of disk usage of the flash memory exceeds the specified threshold for the specified time, the one or more processors determining that an over-utilization of disk access condition has occurred across the system.
8. Terminating the application further comprises: in response to determining the excessive disk access usage of the flash memory by the application, the one or more processors determining that a display of the computing device is off; 2. The method of claim 1, further comprising: in response to determining that the display of the computing device is off, the one or more processors terminating the application.
9. Terminating the application further comprises: in response to determining the excessive disk access usage of the flash memory by the application, the one or more processors determining that a display of the computing device is not off; in response to determining that the display of the computing device is not off, the one or more processors determine that the application is not a foreground application; 2. The method of claim 1, further comprising: in response to determining that the application is not the foreground application, the one or more processors terminating the application.
10. The method of claim 1 , wherein the computing device comprises a vehicle head unit.
11. 1. A computing device comprising: A flash memory; and one or more processors communicatively coupled to the flash memory, the one or more processors comprising: determining a respective disk access usage of said flash memory by each of a plurality of applications; comparing the respective disk access usage of the flash memory by each of the plurality of applications to a respective application specific excessive disk access usage threshold to determine excessive disk access usage of the flash memory by an application of the plurality of applications; A computing device configured to terminate the application in response to determining excessive disk access usage of the flash memory by the application.
12. comparing the respective disk access usage of the flash memory by each of the plurality of applications to the respective application-specific excessive disk access usage thresholds to determine the excessive disk access usage of the flash memory by the applications, the one or more processors further comprising: comparing the disk access usage of the flash memory by the application to a disk access overutilization threshold associated with the application; 12. The computing device of claim 11, configured to determine the excessive disk access usage of the flash memory by the application in response to determining that the disk access usage of the flash memory by the application exceeds the excessive disk access usage threshold associated with the application.
13. The one or more processors further comprise: determining an application state representative of an execution format of the application; 13. The computing device of claim 12, configured to determine the disk access overutilization threshold associated with the application from a plurality of disk access overutilization thresholds associated with the application based at least in part on the application state of the application.
14. The one or more processors further comprise: determining an operational mode of the computing device; 13. The computing device of claim 12, configured to determine the disk access overutilization threshold associated with the application from a plurality of disk access overutilization thresholds associated with the application based at least in part on the operational mode of the computing device.
15. the respective application-specific disk access excess utilization thresholds for each of the plurality of applications are associated with a designated time period; 12. The computing device of claim 11, wherein the respective disk access usage of the flash memory by each of the plurality of applications is the respective disk access usage of the flash memory within the specified time period by each of the plurality of applications.
16. To determine the respective disk access usage of the flash memory of the computing device by each of the plurality of applications, the one or more processors further comprise: Determines whether excessive disk access usage is occurring throughout the system, 12. The computing device of claim 11, configured to determine the respective disk access usage of the flash memory of the computing device by each of the plurality of applications in response to determining an occurrence of the system-wide disk access over-utilization condition.
17. To determine the occurrence of the system-wide disk access overutilization condition, the one or more processors further comprise: determining that a total disk usage of the flash memory exceeds a specified threshold for a specified period of time; 17. The computing device of claim 16, configured to determine an occurrence of the system-wide disk access overutilization condition in response to determining that the total amount of disk usage of the flash memory exceeds the specified threshold for the specified time period.
18. To terminate the application, the one or more processors further comprise: determining that a display of the computing device is off in response to determining the excessive disk access usage of the flash memory by the application; The computing device of claim 11 , configured to terminate the application in response to determining that the display of the computing device is off.
19. To terminate the application, the one or more processors further comprise: determining that a display of the computing device is not off in response to determining the excessive disk access usage of the flash memory by the application; in response to determining that the display of the computing device is not off, determining that the application is not a foreground application; The computing device of claim 11 , configured to terminate the application in response to determining that the application is not the foreground application.
20. A program causing one or more processors to carry out the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Image forming device, control method and program
JP2020062759A
Dashboard camera, data recording method, and program
JP2021005210A
Non-volatile memory monitoring
US20140223074A1
