Memory management of data processing systems

Techniques for memory management of a data processing system are described herein. According to one embodiment, a memory usage monitor executed by a processor of a data processing system monitors memory usages of groups of programs running within a memory of the data processing system. In response to determining that a first memory usage of a first group of the programs exceeds a first predetermined threshold, a user level reboot is performed in which one or more applications running within a user space of an operating system of the data processing system are terminated and relaunched. In response to determining that a second memory usage of a second group of the programs exceeds a second predetermined threshold, a system level reboot is performed in which one or more system components running within a kernel space of the operating system are terminated and relaunched.

FIELD OF THE INVENTION

Embodiments of the present invention relate generally to data processing systems. More particularly, embodiments of the invention relate to resource management of a data processing system.

BACKGROUND

An operating system (OS), such as iOS™ or OS X™ from Apple Inc® or Microsoft Windows™ from Microsoft®, is a collection of software that manages device hardware resources and provides common services for computer programs such as application software. Application software can be considered to be the computer program that causes a computer or other data processing system to perform useful tasks in response to user requests or other requests or other inputs. A specific instance of application software is called a software application, application program, application or app, which are used interchangeably herein. Application programs usually require an operating system to function.

As more and more apps and services are becoming available for small or mobile devices (e.g., a smartphone), the number of applications running at the same time in a single device has increased significantly. Moreover, many of these applications are not terminated or quit by a user after a user finishes using them so they continue to run and therefore continue to use system resources such as memory (e.g. volatile memory such as DRAM) even when they are no longer being used. Furthermore, idle background and foreground applications, while they may not use processing or computation resources, such as one or more microprocessors, they often use memory resources such as RAM while they are idle and not in use. These multiple applications or processes in the same device compete with each other by sharing the same memory resources and computation resources embedded within a device, and the operating system performs resource management, such as memory management, to deal with resource contention in concurrent computing. Memory management to control use of memory by running or idle applications has included techniques to terminate applications based on one or more indications of use of memory (e.g. DRAM) in a data processing system.

DETAILED DESCRIPTION

According to one aspect of the invention, memory management of a data processing system is performed at multiple levels. In one embodiment, an overall memory usage of a predetermined set of programs (e.g., applications, daemons, system components of an operating system) is monitored. When the overall memory usage of the set of programs exceeds a first predetermined threshold, a first memory usage reduction action or operation is performed. When the overall memory usage of the set of programs exceeds a second predetermined threshold, a second memory usage reduction action or operation is performed. For example, when the overall memory usage of a set of one or more programs exceeds a first watermark, a user space reboot may be performed, in which user level programs may be terminated and relaunched. When the overall memory usage exceeds a second watermark (which may be higher than the first watermark), a system level reboot may be performed, in which the entire or a significant portion of programs running within a data processing system may be terminated and relaunched. The reboots may cause certain memory used by certain programs (e.g., memory leaks) to be released to reduce the overall memory usage. The reboots may be performed based on the overall memory usage of the predetermined set of programs, even though the individual memory usage of an individual one of the programs may not exceed its corresponding threshold.

According to another aspect of the invention, certain programs or components may be grouped into different groups. Each of the groups may be associated with a different memory usage threshold, which may be user configurable. Some of the programs or components in different groups may be overlapped, dependent upon the specific user configuration. The memory usage of these groups may be monitored in view of their respective memory usage thresholds. When a memory usage of a group of one or more programs or components exceeds its corresponding memory usage threshold, a preconfigured memory reduction action corresponding to that group may be performed. The memory reduction action may also be user configurable. The groups of programs or components may include a group of user level components, a group of kernel level components, and a group of system application level components. A memory reduction action may include a specific level of reboots such as user level reboot, system level reboot, and system application level reboot.

According to another aspect of the invention, the memory usages of individual programs are also monitored, where each of the programs is associated with multiple levels of memory usage thresholds dependent upon its operating state or operating status. In one embodiment, a memory usage and an operating state of each program are monitored by monitoring logic of an operating system. When a memory usage of a program exceeds a first predetermined threshold (e.g., high watermark) that is associated with the program and the program is in an active state, a first memory usage reduction action is performed on the program. When the memory usage of the program exceeds a second predetermined threshold (e.g., low watermark) associated with the program and the program is in an inactive state, a second memory usage reduction action is performed on the program.

According to a further aspect of the invention, the time of certain transactions (e.g., inter-process call (IPC) transaction such as an XPC™ transaction of iOS available from Apple Inc.) performed by a program is tracked. If a program initiates a predetermined type of transactions, a timer or a timer object may be used to track how long the program has been active with that transaction. If the time exceeds a predetermined threshold, a memory usage reduction action may be performed on the program, such as, for example, forcing the program to transition from an active state to an inactive state. Alternatively, the program may be terminated.

According to a further aspect of the invention, when a user of a data processing system is asleep, e.g., no user interaction with the system is detected for a period of time, the system examines whether there are some events that still consume unnecessary memory or other resources. If so, a memory reduction action may also be performed such as terminating any program that the user typically would not use when there is no user interaction detected. For example, if there is no user interaction detected for a predetermined period of time, an application launcher daemon may be terminated, since it is less likely the user would launch any program at the moment. Furthermore, when a maintenance action (e.g., reboot while the user is asleep) is performed, the system may examine one or more flags or one or more data members of one or more data structures stored at various storage locations to determine whether the flags have been set to a predetermined value, for example, by the user or by a manufacturer or distributor of the system. If the flags have been set to the predetermined value, the user may be notified that the maintenance action has been performed, for example, by displaying a message or sending a message to a user's inbox; otherwise, the user will not be notified. The flag may be set to the predetermined value so that the user will not be disrupted by the maintenance action, as the user may prefer not to know about the maintenance action.

FIG. 1is a block diagram illustrating a memory management system of a data processing system according to one embodiment of the invention. Referring toFIG. 1, system100represents any kind of data processing systems, such as, for example, a server, a desktop (e.g., iMac™ available from Apple Inc® of Cupertino, Calif.), a laptop (e.g., MacBook™), a tablet (e.g., iPad™), a server, a mobile phone (e.g., iPhone™), a media player (e.g., iPod™ or iPod Touch™), a personal digital assistant (PDA), a Smartwatch (e.g., Apple Watch™), a personal communicator, a gaming device, a network router or hub, a wireless access point (AP) or repeater, a set-top box (e.g., Apple TV™ box), or a combination thereof.

In one embodiment, system100memory manager101and memory usage monitor102executed by processing resources (e.g., processor(s)160). Processing resources may present one or more processors or processor cores. A physical processor typically refers to an integrated circuit, which potentially includes any number of other processing elements, such as cores or hardware threads. A core often refers to logic located on an integrated circuit capable of maintaining an independent architectural state, where each independently maintained architectural state is associated with at least some dedicated execution resources. A processor may be a general-purpose processor such as a central processing unit (CPU).

Memory manager101and memory usage monitor102may be a part of an operating system (OS) loaded in memory150(e.g., volatile or system memory) and executed by the processing resources within the system. An operating system is a collection of software that manages computer hardware resources and provides common services for computer programs. The operating system is an essential component of the system software in a computer system. Application programs usually require an operating system to function. Amongst many functionalities of an operating system, scheduling is the method by which threads, processes or data flows are given access to system resources (e.g. processor time, communications bandwidth). This is usually done to load balance and share system resources effectively or achieve a target quality of service. In addition, an operating system may further include other core components, such as a scheduler, a device manager, a kernel, etc. In order not to unnecessarily obscure embodiments of the present invention, these components are not shown herein. An operating system may be any kind of operating systems, such as, for example, iOS™ or OS X™ from Apple®, Android™ from Google®, Windows™ from Microsoft®, or other operating systems (e.g., UNIX, LINUX, real-time or embedded operating systems).

In one embodiment, memory usage monitor102is configured to monitor memory usages of a variety of software programs loaded and running within memory150, such as, for example, applications111, daemons112, and other system components113(e.g., kernel components) of the operating system. Applications111may be user applications that are downloaded and installed by a user of system100or alternatively, preloaded applications by a vendor or manufacturer of system100(e.g., system applications). Daemons112may be helper applications that are configured to help or coordinate communications between applications111and other system components113of the operating system.

According to one embodiment, each of applications or processes111-113(collectively referred to as programs hereafter) may be executed within a respective dedicated or isolated operating environment, such as a sandboxed environment as a separate process address space. A process address space refers to a virtual address space or address space that is the set of ranges of virtual addresses that an operating system makes available to a process. The range of virtual addresses usually starts at a low address and can extend to the highest address allowed by the computer's instruction set architecture. This provides several benefits, one of which is, if each process is given a separate address space, security through process isolation.

In one embodiment, based on the memory usages monitored by memory monitor102, memory manager101performs a resource management action such as a memory usage reduction action on any of applications111, daemons112, and system components113based on a set of memory management rules103, which defines certain actions to be taken in response to certain conditions (e.g., memory usage levels) as shown inFIG. 2. For example, if it is determined that the memory usage of any or all of applications111, daemons112, and system components113exceeds a certain level, based on memory management rules103, memory manager101may cause program launcher104or other logic to terminate a specific program or to reboot the system (e.g., user space reboot and/or system level reboot).

In addition, system100further includes a persistent storage device170(e.g., hard disk or other non-volatile storage devices) to store user data121, applications111, system software122(e.g., operating system), and memory management rules103. Any of applications111and system software122can be loaded into memory150and executed by processor(s)160. A user can store any user data, such as email files, user files, as well as other user or system settings of system100(e.g., reboot notification flag(s)).

According to one embodiment of the invention, memory usage monitor102monitors an overall memory usage of a set of predetermined programs, in this example, applications111, daemons112, and system components113. When the overall memory usage of the set of programs exceeds a first predetermined threshold, memory manager101performs a first memory usage reduction action based on memory management rules103. When the overall memory usage of the set of programs exceeds a second predetermined threshold, a second memory usage reduction action is performed based on memory management rules103.

For example, based on memory management rules103as shown as an example inFIG. 2, when the overall memory usage exceeds a first watermark, memory manager101may instructs program launcher104or other reboot logic to perform a user level reboot. When the overall memory usage exceeds a second watermark (which may be higher than the first watermark), memory manager101may instructs program launcher104or other reboot logic to perform a system level reboot. A user level reboot refers to a reboot in which only certain programs running within a user space of an operating system may be terminated and reloaded, while programs running within a kernel space of the operating system may not be terminated and launched. A system level reboot refers to a reboot in which most of the programs, including those running within the user space and kernel space, may be terminated and reloaded. A reboot may cause certain memory used or occupied by certain programs (e.g., memory leaks) to be released to reduce the overall memory usage. The reboots may be performed based on the overall memory usage of the predetermined set of programs, even though the individual memory usage of an individual one of the programs may not exceed a specific memory usage threshold that is associated with the specific program.

According to one embodiment, dependent upon memory management rules103, a diagnostic report may also be generated and transmitted to a predetermined destination (e.g., a remote data collection server). The diagnostic report may include information collected from at least some of the programs concerning their memory usages, for example, for debugging or diagnostic purposes.

According to another embodiment, the reboots may be configured in at least two stages. When the overall memory usage exceeds the first predetermined threshold, a user level/space reboot is performed. After the user space reboot is performed, memory monitor102measures the overall kernel memory usage of at least the kernel components of the operating system to determine whether the overall kernel memory usage exceeds a third predetermined threshold. If so, the system reboot is then performed accordingly.

According to one embodiment of the invention, certain programs or components may be grouped into different groups. Each of the groups may be associated with a different memory usage threshold, which may be user configurable and stored as part of memory management rules103. Some of the programs or components in different groups may be overlapped, dependent upon the specific user configuration. The memory usage of these groups may be monitored by memory usage monitor102in view of their respective memory usage thresholds. When a memory usage of a group of one or more programs or components exceeds its corresponding memory usage threshold, memory manager101performs a preconfigured memory reduction action corresponding to that group. The memory reduction action may also be user configurable. The groups of programs or components may include a group of user level components, a group of kernel level components, and a group of system application level components. Alternatively, a user can configure a group that may include a user program, kernel level component, and/or a system application. A memory reduction action may include a specific level of reboots such as user level reboot, system level reboot, and system application level reboot.

A user program refers to a program that is installed by a user. A system application refers to an application or program that authorized and signed by a provider of an operating system. For example, a system application may be an application that is bundled and shipped with the operating system. Typically, a user application and a system application are running within a user space of an operating system. A kernel level component refers to a software component that is running within a kernel space of the operating system, such as daemons. Amongst the user space programs, some may be associated with a higher memory usage threshold than others (e.g., foreground applications). According to one embodiment, each system daemon may have its own memory usage threshold.

According to one embodiment, when the memory usage of a first group (e.g., a group of user level components) exceeds a first predetermined threshold (e.g., a user level threshold), memory manager101causes a first predetermined memory reduction action (e.g., a user level reboot) to be performed. When the memory usage of a second group (e.g., a group of kernel level components) exceeds a second predetermined threshold (e.g., a kernel level threshold), memory manager101causes a second predetermined memory reduction action (e.g., a system level reboot) to be performed.

According to another embodiment, a reboot, either a user space reboot or a system level reboot, may be performed only if there is no user interaction with system100for a predetermined period of time (e.g., asleep). In some situations, dependent upon the specific configuration of memory management rules103, instead of rebooting, if there is no user interaction for a while, program launcher or daemon104(e.g., Springboard) may be terminated. The rationale behind it is that since the user is asleep, there is no program to be launched for a while and thus there is no need for program launcher104to be running. That is, the system may perform any necessary memory reduction actions in an attempt to reduce the overall memory usage of the programs. Only if the overall memory usage is still too high, the reboot(s) may then be performed.

FIG. 3Ais a flow diagram illustrating a process for memory management of a data processing system according to one embodiment of the invention. Process300may be performed by processing logic that includes hardware (e.g. circuitry, dedicated logic, etc.), software (e.g., embodied on a non-transitory computer readable medium), or a combination thereof. For example, process300may be performed by memory manager101and/or memory monitor102ofFIG. 1. Referring toFIG. 3A, at block301, processing logic monitors the overall memory usage of a predetermined set of programs (e.g., applications, daemons, system components) that are running in the system memory of a data processing system. At block302, it is determined whether the overall memory usage exceeds a first predetermined threshold. If so, at block302, processing logic performs a user space reboot, in which at least some programs that are running within a user space of an operating system are terminated and reloaded, without having to terminating and reload a program running in a kernel space of the operating system. After the user space reboot, at block304, processing logic determines overall memory usage of the programs or only some kernel space programs. If the overall memory usage exceeds a second predetermined threshold at block305, processing logic performs a system level reboot at block306, in which most of the programs will be terminated and reloaded.

Note that in the embodiment as shown inFIG. 3A, the system level reboot is performed only if the overall memory usage is still too high after the user space reboot. According to another embodiment, the system level reboot or the user space reboot may be performed dependent upon the specific overall memory usage at the point in time. For example, if the overall memory usage is above a high watermark, the system level reboot may be performed without performing the user space reboot. If the overall memory usage is above a low watermark but below the high watermark, the user space reboot is then performed.

FIG. 3Bis a flow diagram illustrating a process for memory management of a data processing system according to alternative embodiment of the invention. Process350may be performed by processing logic that includes hardware (e.g. circuitry, dedicated logic, etc.), software (e.g., embodied on a non-transitory computer readable medium), or a combination thereof. For example, process350may be performed by memory manager101and/or memory monitor102ofFIG. 1. Referring toFIG. 3B, at block351, processing logic monitors memory usages of groups of components of a data processing system. Each group is associated with a specific memory usage threshold. At block352, processing logic detects that a memory usage of a first group of components (e.g., user level components) exceeds a first predetermined memory usage threshold corresponding to the first group. In response, at block353, processing logic causes a first predetermined memory reduction action (e.g., user level reboot) to be performed. At block354, processing logic detects that a memory usage of a second group of components (e.g., system or kernel level components) exceeds a second predetermined memory usage threshold corresponding to the second group. In response, at block355, processing logic causes a second predetermined memory reduction action (e.g., system level reboot) to be performed.

FIG. 3Cis a flow diagram illustrating a process for memory management of a data processing system according to another embodiment of the invention. Process380may be performed by processing logic that includes hardware (e.g. circuitry, dedicated logic, etc.), software (e.g., embodied on a non-transitory computer readable medium), or a combination thereof. For example, process380may be performed by memory manager101and/or memory monitor102ofFIG. 1. Referring toFIG. 3C, at block381, processing logic monitors memory usages of groups of components of a data processing system, including user level components, kernel level components, and system application components. At block382, processing logic determines whether the memory usage of the user level components exceeds a user level threshold. If so, at block383, processing logic determines whether the memory usage of the kernel level components exceeds a kernel level threshold. If so, at block384, processing logic causes the data processing system to perform a system level reboot. During the system level reboot, all of the components such as hardware and the kernel of an operating system may be reset.

If it is determined at block383that the memory usage of the kernel level components does not exceed the kernel level threshold, processing logic causes the data processing system to perform a user level reboot at block387. During the user level reboot, all user space applications or processes may be restarted. If it is determined at block382that the memory usage of the user level components does not exceed the user level threshold, processing logic determines whether the memory usage of the system application components exceeds a system application level threshold at block385. If so, at block386, processing logic causes the data processing system to perform a system application level reboot, in which the system applications will be terminated and relaunched. In one embodiment, during the system application reboot, all of the user applications and the system main processes running at the user space (e.g., launch module) may be restarted.

In addition to the memory management based on an overall memory usage of a set of programs, a memory management function is also performed based on an individual memory usage of an individual program. Some of the programs may be associated with or assigned with multiple memory usage thresholds corresponding to different operating states, statuses, events, or conditions. When an application operates in a certain state and its memory usage satisfies a certain threshold corresponding to that state, a memory usage reduction action corresponding to that state and/or threshold is performed.

FIG. 4is a block diagram illustrating a memory management system of a data processing system according to another embodiment of the invention. Referring toFIG. 4, similar to system100ofFIG. 1, system400includes memory usage monitor102(which is loaded in memory150and executed by processor(s)160) to monitor memory usages of applications111, daemons112, and system components113. In response to the memory usage data provided by memory monitor102, memory manager101performs a certain memory management action based on memory management rules103, as described above.

In addition, according to one embodiment, system400includes a program state monitor401loaded in memory150and executed by processor(s)160to monitor operating states of programs111-113. In one embodiment, program state monitor401can determine whether a particular program is active or inactive based on the activities of the program. For example, if a program opens a communication session with another component (e.g., IPC or XPC communication session), the program is considered as active. In another example, if a program operates in a foreground, it may be considered as active; otherwise, it may be considered as inactive. Whether a program is considered as active vs. inactive under certain circumstances may be determined based on the type, role, or access privilege of the program. One program may be considered active while another program may be considered inactive under the same circumstances, dependent upon memory management rules103associated with the individual programs. The memory management rules103of a program may be configured by an administrator of the data processing system or alternatively, they may be automatically generated based on metadata or profile of the program (e.g., resource entitlement and/or resource budget), when the program is installed or launched.

According to one embodiment of the invention, memory usage monitor102monitors a memory usage of an individual program (e.g., daemon112). Program state monitor401monitors an operating state of the program. Based on the data received from memory usage monitor102and program state monitor401, when the memory usage of the program exceeds a first predetermined threshold (e.g., high watermark) that is associated with the program and the program is in an active state, memory manager101performs a first memory usage reduction action on the program. When the memory usage of the program exceeds a second predetermined threshold (e.g., low watermark) associated with the program and the program is in an inactive state, a second memory usage reduction action is performed on the program.

When a program operates in an active state, in general, it consumes more memory. Likewise, when the program operates in an inactive state, it consumes less memory. By maintaining a high watermark and a low watermark, memory manager101can determine whether there is a memory leak of the program early on.FIG. 5Ashows a typical memory usage of a program according one embodiment of the invention. Referring toFIG. 5A, when the program is in an active state511, its memory usage is usually higher. When the program is in an inactive state512, its memory usage is usually lower. In this example, this program has been associated with assigned with a first threshold501as a high watermark and a second threshold502as a low watermark. During a normal operation, the memory usage of the program should be below threshold501when it is in an active state511. Likewise, the memory usage of the program should be below threshold502when it is in an inactive state512.

If the memory usage of the program is above threshold501while in an active state, a first memory usage reduction action is performed. Similarly, when the memory usage of the program is above threshold502while in an inactive state, a second memory usage reduction action is performed. The first and second memory usage reduction actions may be the same or different dependent upon the specific configuration, such as memory management rules103. By monitoring the memory usage of a program in view of the high watermark and low watermark, a potential memory leak may be detected before more damage to an operating system occurs. As shown inFIG. 5B, the memory usage of a program while it is inactive is trending higher and exceeding threshold512. This may indicate that the program may have a memory leak and a memory usage reduction action should be performed before it causes further damage to the system.

A memory usage reduction action can be a variety of actions. For example, memory manager101may force the program to transition from an active state to an inactive state to reduce memory usage. The program may be terminated and reloaded. Memory manager101may also communicate with the program via an API to modify a functionality or behavior of the program to consume less memory. Memory manager101may disassociate or terminate a helper process or an extension associated with the program without or before terminating the program.

As described above, the memory management can be performed based on an overall memory usage of programs at a global level and at an individual program level. In one embodiment, the memory management can also performed on a coalition of programs or processes level. The total or overall memory usage of all programs in a coalition is monitored and a memory usage reduction operation is performed if the total memory usage of the coalition exceeds a certain threshold. A coalition of programs refers to a group or bundle of programs that are related or communicating with each other for a particular purpose or event.

A coalition of programs includes at least one host program and one or more other associated programs, such as a helper process, an extension, a library, etc. The host program can launch or cause a second program to be launched, where the second program will be added to the coalition. For example, a host program may be a Web browser which can launch a social network application. The social network application may further include an extension to help the browser to create a post in the corresponding social network. These programs are considered as part of the coalition. The total memory usage of all of these components in the coalition is monitored. When the total memory usage of a coalition exceeds a predetermined threshold, a memory usage reduction operation is performed on the programs of the coalition. Some programs within the coalition may be terminated prior to the host program. In the example above, the extension may be terminated first to determine whether the memory usage has been brought down to an acceptable level. If not, the social network application is then terminated prior to terminating the host program. In one embodiment, a memory usage reduction operation may be performed on the programs based on the priorities or roles of the programs. For example, an idle application may be terminated before terminating a background application, which may be terminated before an extension, a foreground application, an operating system component, and a program launcher in order.

FIG. 6is a flow diagram illustrating a process for memory management of a data processing system according to one embodiment of the invention. Process600may be performed by processing logic that includes hardware (e.g. circuitry, dedicated logic, etc.), software (e.g., embodied on a non-transitory computer readable medium), or a combination thereof. For example, process600may be performed by memory manager101, memory monitor102, and/or program state monitor401ofFIG. 4. Referring toFIG. 6, at block601, processing logic monitors an operating state and a memory usage of a program. At block602, in response to determining that the program is active, processing logic determines an active memory usage of the program. At block603, if it is determined that the active memory usage exceeds a first predetermined threshold, a first memory usage reduction action is performed at block604. Meanwhile in response to determining that the program is inactive, at block605, processing logic determines an inactive memory usage of the program. At block606, if it is determined that the inactive memory usage exceeds a second predetermined threshold, a second memory usage reduction action is performed at block607.

Referring back toFIG. 4, according to another embodiment of the invention, system400further includes timer logic402coupled to program state monitor401to track the time of certain transactions (e.g., inter-process call (IPC) transaction such as XPC™ transaction of iOS available from Apple Inc.) performed by a program. If a program initiates a predetermined type of transactions, timer logic402may be used to track how long the program has been active with respect to that transaction. If the time period exceeds a predetermined threshold, a memory usage reduction action may be performed on the program, such as, for example, forcing the program to transition from an active state to an inactive state. Alternatively, the program may be terminated as described above.

FIG. 7is a flow diagram illustrating a process for memory management of a data processing system according to one embodiment of the invention. Process700may be performed by processing logic that includes hardware (e.g. circuitry, dedicated logic, etc.), software (e.g., embodied on a non-transitory computer readable medium), or a combination thereof. For example, process700may be performed by memory manager101, memory monitor102, program state monitor401, and/or timer logic402ofFIG. 4. Referring toFIG. 7, at block701, processing logic detects that a program transitions from an inactive state to an active state, such as, for example, opening an IPC connection with an operating system. At block702, processing logic tracks a period of time during which the program remains active after starting of the transaction. At block703, if it is determined the period of time exceeds a predetermined threshold, a predetermined action (e.g., generating a diagnosis report, memory usage reduction operation, forcing the program to be inactive, terminating the program, or user space reboot, etc.) is performed at block704.

FIG. 8is a flow diagram illustrating a process for memory management of a data processing system according to one embodiment of the invention. Process800may be performed by processing logic that includes hardware (e.g. circuitry, dedicated logic, etc.), software (e.g., embodied on a non-transitory computer readable medium), or a combination thereof. Referring toFIG. 8, at block801, processing logic receives a request to perform a maintenance operation for a data processing system (e.g., a reboot while a user is asleep). At block802, processing logic performs the maintenance operation. At block803, processing logic examines one or more flags or data structures stored at one or more storage locations of the data processing system to determine whether the flags have been set to a predetermined value. At block804if it is determined that the flags have been set to the predetermined value, processing logic notifies a user of the data processing system that the maintenance operation has been performed at block805.

FIG. 9is a block diagram illustrating an example of a data processing system which may be used with one embodiment of the invention. For example, system1500may represents any of data processing systems described above performing any of the processes or methods described above, such as, for example, systems100and400as shown inFIGS. 1 and 4. System1500can include many different components. These components can be implemented as integrated circuits (ICs), portions thereof, discrete electronic devices, or other modules adapted to a circuit board such as a motherboard or add-in card of the computer system, or as components otherwise incorporated within a chassis of the computer system.

Note also that system1500is intended to show a high level view of many components of the computer system. However, it is to be understood that additional components may be present in certain implementations and furthermore, different arrangement of the components shown may occur in other implementations. System1500may represent a desktop (e.g., iMac™ available from Apple Inc. of Cupertino, Calif.), a laptop (e.g., MacBook™), a tablet (e.g., iPad™), a server, a mobile phone (e.g., iPhone™), a media player (e.g., iPod™ or iPod Touch™), a personal digital assistant (PDA), a Smartwatch (e.g., Apple Watch™), a personal communicator, a gaming device, a network router or hub, a wireless access point (AP) or repeater, a set-top box (e.g., Apple TV™ box), or a combination thereof. Further, while only a single machine or system is illustrated, the term “machine” or “system” shall also be taken to include any collection of machines or systems that individually or jointly execute a set (or multiple sets) of instructions to perform any one or more of the methodologies discussed herein.

Module/unit/logic1528, components and other features described herein can be implemented as discrete hardware components or integrated in the functionality of hardware components such as ASICS, FPGAs, DSPs or similar devices. In addition, module/unit/logic1528can be implemented as firmware or functional circuitry within hardware devices. Further, module/unit/logic1528can be implemented in any combination hardware devices and software components.