CN103559080A - Constrained Execution of Background Application Code on Mobile Devices - Google Patents
Constrained Execution of Background Application Code on Mobile Devices Download PDFInfo
- Publication number
- CN103559080A CN103559080A CN201210031539.4A CN201210031539A CN103559080A CN 103559080 A CN103559080 A CN 103559080A CN 201210031539 A CN201210031539 A CN 201210031539A CN 103559080 A CN103559080 A CN 103559080A
- Authority
- CN
- China
- Prior art keywords
- resource
- backstage
- code
- agency
- application
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The subject disclosure is directed towards a technology by which background application code (e.g., provided by third-party developers) runs on a mobile device in a way that is constrained with respect to resource usage. A resource manager processes a resource reservation request for background code, to determine whether the requested resources meet constraint criteria for that type of background code. If the criteria are met and the resources are available, the resources are reserved, whereby the background code is ensured priority access to its reserved resources. As a result, a properly coded background application that executes within its constraints will not experience glitches or other problems (e.g., unexpected termination) and thereby provide a good user experience.
Description
Technical field
The present invention relates to mobile device application, relate in particular to the background application of mobile device.
Background technology
People want mobile device can once complete many things, such as browsing web, play music, to their notified of specified events etc.In fact do not have single application can complete many possible tasks, so mobile device is configured to have some discrete application and downloads the ability of more application from " third party " application vendor (comprising that working as manufacturer is the situation of identical entity with " first party " supplier of mobile device).
At present, application is dividually in the upper operation of mobile device (the relative high power computing equipment such as PC that can parallel running with them is contrary).Expectation " at one time " moves application to give user more desirable experience on mobile device.For the affined equipment of the resource such as mobile device of given its computing power, limited screen real estate, battery, network bandwidth etc., this is problematic.
Adopted in the past the whole bag of tricks addressing this problem.Conventional desktop operating system for example, the various application of parallel running simply of some Mobile operating system, suppose that this system has enough resources and completes the task of all activities and suppose that user can experience (UX comprises user interface or UI) problem by leading subscriber.This often causes poor user to experience, as the glitch and the other problems that occur in the insufficient situation of resource.Other platforms allow one or more application to continue to carry out, and apply, but these platforms do not guarantee the continuity (quality) about service even if user has been switched from these; For example, if resource starts to use up, application is terminated.
Summary of the invention
Provide content of the present invention to introduce in simplified form some representative concepts that further describe in following embodiment.Content of the present invention is not intended to identify key feature or the essential feature of theme required for protection, is not intended to limit any mode of the scope of theme required for protection yet and uses.
In brief, the each side of theme as herein described relates to a kind of backstage code and is allowed to move in the affined mode of resource by it, to backstage code, for example gives priority, to use the technology of the resource (, under non-abnormal operation condition) being retained.After receiving the reservation request of request for the device resource of backstage code, explorer determines whether this reservation request meets policy criteria, (for example, CPU and storer) can be in order to guarantee that backstage code can have the priority of the just requested device resource of use to comprise whether there are enough resources.If so, retaining device resource is used for backstage code.If do not have enough resources to use, this is asked unsuccessfully.In this way, for example, guarantee that backstage code moves to avoid glitch, unexpectedly do not stopped etc. with enough resources.
Policy criteria generally comprises the constrained for the type of the backstage code corresponding with retaining request.For example, the backstage audio player agency request of being only allowed to distributes limited amount storer.Policy criteria generally also comprises which resource of indication is allowed to and/or is rejected the data of being used by backstage code, and for example, the navigation backstage code of turning one by one can be used GPS mechanism as resource, but may not use screen display.
On the one hand, when reservation is asked successfully, application example manager starts the example of backstage code for execution.Application example manager is also configured to manage the life cycle of backstage code, be included in active state (under this state, backstage code is carried out) and dormant state (under this state, backstage code is not carried out) between at least a portion of mobile backstage code.
On the one hand, described from application and received services request, this request comprises will act on behalf of for backstage the request of reservation of resource.Process (for example, corresponding to explorer) determines whether to act on behalf of reservation of resource for backstage, and if be, and reservation of resource.Backstage agency is called for example, with run time version (,, to communicate by letter to carry out at least one background task with system service, being included in application pent time).When no longer need backstage agency and be retained resource time, releasing resource is also abandoned retaining.
Read by reference to the accompanying drawings following embodiment, other advantages of the present invention can become apparent.
Accompanying drawing explanation
As example and unrestricted, the present invention shown in the drawings, in accompanying drawing, identical Reference numeral is indicated same or analogous element, in accompanying drawing:
Fig. 1 means the block diagram for the exemplary components of management resource (comprise to backstage application code one group of affined resource is provided).
Fig. 2 means example backstage code block diagram/control flow graph of life cycle.
Fig. 3 is the expression for the resource bounding box of each operating load (process group).
Fig. 4 is the expression of example application model framework, and this application model comprises the assembly that is configured to provide the backstage code of carrying out in mobile device.
Fig. 5 means that exemplary operations plays block diagram/control flow graph of backstage audio frequency to prepare backstage code.
Fig. 6 means for the process flow diagram that the exemplary step of the backstage code of carrying out in mobile device is provided.
Fig. 7 means and wherein can realize herein exemplary, the non-limiting computing system of one or more aspects of described each embodiment or the block diagram of operating environment, for example, and in the example of mobile telephone equipment.
Embodiment
The each side of technology described herein relates generally to a kind of background application code and by it, is configured and is allowed to operation, but in resource use, is subject to the technology of system restriction.This allows third party developer to provide and can be used as the code that non-foreground code is carried out.Example backstage code scene comprises backstage audio frequency broadcasting, periodically logins (checking into) social networking website, the backstage of content is downloaded for use after a while, arrange alarm and notice etc. on foreground.Some in these scenes (for example, backstage audio frequency is play, social networking is logined, geo-fence/geographical high-speed cache etc.) can be by making application code move and operate in backstage.
, described for managing the life cycle of background application code and the centralized service of execution for this reason, and protected foreground to experience and avoid the resource management system that background application is carried out, made background application still can obtain simultaneously and carry out progress.General warranty has also been described for example, in a kind of mechanism that can start given experience (, supposing that system itself is not in abnormality) in the future.
Usually, before background application code is allowed to operation, the use that background application code request is it retains the resource (for example, CPU is used and storer) of specified quantitative and/or the resource (for example, peripherals) of particular type.If request in the acceptable policy constraints of the background application code of the type/meet the acceptable policy constraints of the background application code of the type, and requested resource is available in this time, for background application code retains requested resource (otherwise asking unsuccessfully).If resource is retained, guarantee that resource (except possible abnormal conditions) under typical equipment operating can use background application code.In this way, suffer restraints aspect the resource that backstage resource can ask and retain at it, if but resource is successfully retained, and in needs, resource will be available.As a result, by correct coding, with the background application of carrying out, will can not be experienced glitch or other problems (for example, unexpected termination) in its constraint, thereby and provide good user to experience.
Should be appreciated that any example is herein all nonrestrictive.Therefore, the invention is not restricted to any specific embodiment described here, aspect, concept, structure, function or example.On the contrary, any in embodiment described herein, aspect, concept, structure, function or example is all nonrestrictive, and the present invention generally can be to provide the variety of way of benefit and advantage to use in calculating and mobile device.
Fig. 1 is the block diagram that each assembly in example implementation is shown, be included in mobile device (such as
phone) application model that provides backstage to carry out in.For this reason, the request 102 relevant with application task for example, by (, system shell) task list assembly 104 management of controlling application resource manager 106.
Usually, explorer 106 is distributed to the process of main memory on equipment by system resource 108 (shown in frame 111-116).Except CPU111 and storer 112 resources, resource can comprise that the network bandwidth 113, dribbling are wide by 114 (for the I/O of any non-volatile memories type, dish not necessarily), screen display 115 and peripherals/sensor 116, such as equipment microphone, equipment camera, accelerometer, gyroscope, GPS mechanism etc.
The type of process comprises system process, foreground process and backstage agent process.The process of working together to carry out function is called as " operating load " (being also feasible although operating load also can comprise individual process) herein.For example, Fig. 1 thereby show system works load 120, foreground operating load 121 and backstage factorage load 122-124.
To the operating load 124 of each type, guarantee to be determined in advance as the amount of each resource relevant to this process type and that needed by this process, as " bounding box " 118 in Fig. 1 summarized expression.For example, the CPU 111 of a certain amount and storer 112 are needed by each background work load (or agent process), and when initial request, are this operating load reservation, if or do not have enough resources to use, this is asked unsuccessfully.The amount of guaranteed each resource (if not having unsuccessfully) can be corresponding with the class of corresponding application, and for example, backstage audio agents can be given so many storer and CPU, and different backstages agency can be given storer and the CPU of different amounts.
Explorer 106 is implemented for controlling the access of specific resources (such as camera or microphone) to stop them by for example strategy of backstage proxy access.As another example, foreground operating load 121 obtains the screen display resource that background process operating load cannot retain.Other resources are described below and about the additional detail of resource reservation.
Thereby, the assembly of application model described herein comprises system process/operating load, comprises application code fragment the foreground application/operating load of (user who comprises application experiences (UX comprises user interface components) and can comprise for presenting the required a large number of services logic of this UX).The assembly of application model also can comprise backstage agency/operating load, (for example comprise the real work of execution application, flow transmission music, carry out geo-location service etc., be included in after foreground application is closed) code snippet, but generally do not comprise visual user interface components.Agency is relevant with foreground application on backstage, but is independent of foreground application; In one implementation, backstage agency operation (wherein main frame comprises the process of the one or more task instances that contain application) in proxy.
The function relevant with resource management of task list assembly 104 comprises such as be activated or delete when the operating load (one or more processes as described here) of instantiation suitable type the termination of main frame when operating load in this operating load when backstage proxy is created when session (user interface operating load).When operating duty is during from becoming of activity inactive (and from inactive become movable), task list assembly 104 is also attached to operating load reservations (corresponding to bounding box)/from the load of reservation mask work.The main frame that task list assembly 104 monitoring host computers create and each is created adds suitable operating load to, monitoring host computer stops and remove the main frame that is terminated and monitoring host computer Status Change and change the state of its operating load comprising the needs from its operating load.
In one implementation, relate to the assembly of carrying out on backstage and also comprise application example manager 126 (AIM), comprise and manage life cycle of backstage agency/operating load 122-124 representative client to the central service of their tell offs.Relating to other assemblies of carrying out on backstage comprises and utilizes one or more backstages to act on behalf of to carry out each work item background service (such as media services) of (such as the media that will play are ranked).System UX is also provided, and such as playback controls or toast (toast) notice, it makes user to act on behalf of mutual (vice versa) with limited mode and backstage.
Certain function that system works load 120 provides comprises the foreground UI that system provides, such as comprising screen locking, edge frame members (application hurdle, toast etc.), importing call experience, alarm and prompting etc. into.The backstage voice reproducing that system provides, comprise media services (554, Fig. 5, for example,
media queue) built-in music playback, is not used any main frame for media decodes or playback controls.System works load 120 also can be carried out background process, such as email synchronization, download and installation renewal and application etc.
Process in system works load 120 usually represents that the process in other operating loads carrys out work.For example, if foreground task example is made protected server library (PSL) method call to TelShell.exe, TelShell.exe will carry out this PSL method by resource.Note, system do not have that the resource of measuring in server processes is used and by it ability owing to client computer (or request) process, and therefore the resource of this type of process is used a part that is considered to system works load itself.
One group of UI main frame of vision user's experience of working together to provide based on UI is provided UI operating load.The UI page being shown by UI operating load forms session,, has man-to-man mapping between UI operating load and session that is.Do not have system process to be included in such operating load.
The UI operating load that comprises movable UI main frame is called as movable UI operating load, and it is the current UI operating load (for example, foreground operating load 121) that shows UI in foreground.Other UI operating loads are considered to inactive.Because only have a movable UI main frame a time, so only have at any given time a movable UI operating load.Sometimes, when system works load 120 is providing foreground UI, may not there is not movable UI operating load (for example,, when showing screen locking).May have at one time some inactive UI operating loads, quantity is determined (its frame server component by TelShell is controlled, described in one or more related application) by the size of storehouse backward.
A kind of main frame of regulation in movable UI operating load of realizing of application model is successfully completed inactive or cancels, contrary with the main frame being comprised in inactive UI operating load.When the UI main frame in UI operating load stops, this UI operating load stops.UI main frame generally stops because it exits after its task instances completes, or because its task instances completed stop using after dehydrated (dehydrated) and stop.
Also describe the assembly of being convenient to background work load scene herein, comprised the above-mentioned application resource manager 106 of the resource consumption of management host.Backstage UX operating load comprises the background host computer of working together to provide non-vision user's experience, such as backstage voice reproducing or the guide of turning one by one, playback video, flow to external display read electric mail (for example, using DLNA/ DLNA technology) etc. on phone simultaneously.Note, do not have system process need to be included in such operating load.
The backstage UX operating load that comprises movable background host computer is called as movable backstage UX operating load.The backstage UX operating load that only comprises inactive background host computer is considered to inactive.
Using the backstage voice reproducing of third party's media decoder and/or playback agent is feasible (and being described in one or more related application).At any given time, a playlist is at most being play in media services, and it is had by an application; Via strategy, can a time, play a media item from playlist at most.Equally, the backstage of particular play list agency is hosted in identical background host computer.In so a kind of realization, may there is at most a movable backstage UX operating load a time in these constraint (taking together) hints.They have also implied that each backstage UX operating load all comprises a background host computer.
Fig. 2 illustrates the life cycle of backstage UX operating load.As represented in frame 220, start agency and created movable backstage UX operating load, or alternatively activated inactive backstage UX operating load.The agency's (frame 222) who cancels in main frame makes backstage UX operating load become inactive.When the agency in main frame completes, main frame can be changed into dormancy (frame 224; Dormancy is applied in one or more related application and is described).Do not require that the main frame in the UX operating load of inactive backstage is allowed to successfully complete cancellation.
When the background host computer in the UX operating load of backstage stops, this backstage UX operating load stops.Background host computer is conventionally only after its all backstage agency has completed, inform will exit time and just stop when it is employed model.
The background work load of another type is background process operating load, and it comprises one group of background host computer working together to represent some background process of application execution; (different from backstage UX operating load, background process operating load does not provide any user to experience, and user does not know this operating load existence conventionally).The example of background process operating load comprise periodically from backstage to server update customer location, when call screen is closed downloads of media etc.Note, do not have system process need to be included in background process operating load.
In one implementation, each background process operating load all comprises a background host computer.The background process operating load that comprises movable background host computer is called as movable background process operating load; The background process operating load that only comprises inactive background host computer is considered to inactive.
The registrable background process of a plurality of application, however a kind of realization allows at maximum movable background process operating loads of time.If a plurality of background process operating loads are scheduled to carry out at one time, their execution of serialization is acceptable, if or resource permission, carry out concurrently their (for example, this consume less battery).Do not require that the main frame in inactive background process operating load successfully completes cancellation; The lifetimes and status conversion of background process operating load is similar with the lifetimes and status conversion of backstage UX operating load.
Operating load be an opportunistic operating load, it is not required to have any main frame that is successfully completed its work.Inactive operating load (inactive UI, inactive backstage UX and inactive background process operating load) is the example of opportunism workload type.
As described herein, a part for policy in resource management is only just to support this feature while having enough resources to support to realize to have the feature that suitable user experiences knowing in advance; If new operating load may cause equipment itself or existing operating load to stop normally working, do not add this new operating load.In other words, only when knowing, the process of (in typical situation) particular job load has the support to this particular job load is just provided when enough resources are carried out well.A kind of exception of this situation is for opportunism operating load, that is, opportunism operating load needn't successfully move complete, and therefore needn't guarantee there are enough resources.
For this reason, aspect standard resource requirement, can pre-determine " normally working "/" health " about operating load.For each workload type, for example, the amount that pre-determines each required resource of the example of well writing of this workload type by analysis is to provide good user to experience.Note, the amount of determining each resource that system works load is required need to arouse attention, because system works load can represent other operating loads and finish the work, and therefore system process need to be considered the amount of the required resource of service is provided and this resource requirement is included in their resource requirement to its client computer.
In when operation, if particular job load just at least obtains the amount of the required resource of its workload type, this particular job load is considered to healthy.As example, consider that (for example,, via experiment) every 16ms of nearly all UI operating load when activity needs at the most 75% CPU to work well.When operation, as long as the UI operating load of current active can obtain 75% CPU by every 16ms, it is just considered to healthy (in CPU use).
In the situation that the operating load of behavioral deficiency need to be compared the desired more resource of its type, such operating load is not considered to be in the constraint of distributed resource requirement and normally works.For avoiding interference other operating loads, in one implementation, such operating load is not assigned with more resource to attempt making them become healthy.
Fig. 3 illustrates the conceptual view of operating load and bounding box thereof, is wherein with hypographous frame table to show idling-resource.Note, for the frame that is marked as 330, " from the main frame of a certain inactive operating load ", notes only in resource, being allowed to survival be idle in the situation that from the main frame of inactive operating load.
Corresponding to each operating load retaining, can considered to be in bounding box, the size of bounding box wants the amount of healthy required resource to determine by its workload type; (note, shown in the not of uniform size of operating load in frame be representational and/or relevant with size surely).For example, audio work load in backstage needs the storer of a certain amount, a certain CPU time etc. so that audio plays and the glitch or other interference that do not have user to notice smoothly.Conceptive, for the resource of each type that can divide, may there is different bounding boxes between operating load.
For determining whether to allow new background work load, system is distributed and is checked whether the bounding box (for example, each resource) of this operating load meets equipment for this scene based on any other current resource.If so, system allows this scene; If not, this scene is not allowed to (retain and ask unsuccessfully).Alternatively, the resource requirement of existing scene can be ejected or revise, so that resource becomes, to new scene, can use.It is also feasible consulting, and for example, after having refused to retain, retains request and can be resubmited to require the resource of a certain small amount, so that be for example written as, can realize with the background work load of the operation mode of a certain reduction.
For operating load (except opportunism operating load) time is kept fit in operation, application resource manager guarantees that process has the access right of limit priority to the resource in its oneself bounding box.In other words, application resource manager guarantees for each bounding box X, from the resource request of process that belongs to X only when any process that does not belong to X just can be failed when X is ejected and still do not have enough resources to meet this request.Therefore, system works load for example can be used the resource (such as for memory cache) being retained and/or use more CPU, yet system does not have this reservation and is encoded as, does not understand that this high-speed cache may need to be released and it may receive or may not receive extra CPU.
Note, be there is to physical constraint in universal resource management strategy, because the process of system works load is limited to bounding box and makes their resource request unsuccessfully may there is uncertain result and/or may cause equipment to become unstable when this bounding box is full.In one implementation, when system process needs more resource, the bounding box of system works load is allowed to increase.Such growth can mean, the bounding box of a certain other operating loads shrinks in size, this causes this operating load to become unhealthy, but this is than allowing system works load (it provides prior function, as call is experienced) to become unhealthy better.Therefore, the resource that nonsystematic operating load is made " assurance " has an accident, and comprises the abnormal conditions when having expired and need to increase for the bounding box change such as when system works load.
Fig. 4 also illustrates application resource manager 106 is integrated into the additional detail in the framework of an example implementation of application model.In one implementation, application resource manager 106 comprises the static library in the process 440 that resides in system shell (TelShell).Application resource manager 106 operation is used for safeguarding and is wherein retained in reservation and is equivalent in essence bounding box discussed above, and comprises one group of resource quota.Resource quota can adopt the form of (resource type, size) tuple, and it has been described and has retained how many these resources for reservation.For example, following reservation comprises two resource quota/tuples, and it can be set as: { (CPU, 10% every 5 seconds), (storer, 10MB) }, its retains 10% CPU and the storer of 10 megabyte for every 5 seconds.
When reservation has operating load associated with it, 106 operations of application resource manager have the access right of limit priority for guaranteeing the process of this operating load to the resource retaining.Therefore,, if movable backstage UX operating load is assigned to the reservation in above example, application resource manager guarantees that the main frame in this movable backstage UX operating load can use the storer of 10MB and the CPU of every 5 seconds 10% jointly.
Retain and comprise one or more resource quotas.Operating load comprises one or more main frames.In any given time, retain and be associated with an operating load.Operating load can be associated with a reservation a time.Each main frame is at any given time in an operating load; (technical, main frame at one time can be in a plurality of operating loads, although this may not allowed by model).Main frame can be in different operating load at different time, although may main frame can not be moved to less bounding box from larger bounding box, some resource (as storer) consuming because current may not be callable.
As a mutual example of the typical case between system component described herein, in an example, use backstage media playback.Note, for relate to such as position follow the tracks of, data are synchronous, voip call, other scenes that the backstage of the application codes such as guide carries out of turning one by one, generally have same pattern.
As represented in Fig. 5, consider that user starts foreground application 552 to initiate audio experience.Use foreground application 552, the parameter (the music track list that for example, play on backstage) that user selects required backstage to experience.
Fig. 5 illustrates for the fundamental block diagram of the scene of media playback and data/control flow graph.Note, as shown in the figure, apply 552 and agency 558 there is the storage 560 of their isolation, and media services have its oneself data and store 562, it can comprise queue.The step of following institute mark is corresponding to the numeral of zone circle in Fig. 5:
1. application creates services request (" play this song and when you need next song callback me ")
2. service request system is agency's experience reservation of resource
3. system reservation of resource can carried out its work in the future to guarantee agency
4. service starts play list
5. user closes application
6. current song finishes
7. service request system calling acts on behalf of to obtain next song
8. system starts new process and calls agency
9. backstage proxy execution logic next song information is provided
10. this agency is hung up or destroyed to system
11. current songs finish ... (being back to step 5)
12. playback complete
13. services no longer need to retain to notifications
14. systems are abandoned retaining.
As can be seen, foreground application 552 (via API Calls) creates background service 554, and submits services request to media playback background service 554, requires it to represent foreground application execution voice reproducing.It is that backstage agency 558 retains some resource that media playback background service 554 requires system 556 (Fig. 1 and 4 explorer 106), so that it can be performed and have high deterministic success ratio (note, such as the fault of operating system itself extremely can stop such execution) at time point in the future.Suppose that retaining is successfully, media playback background service 554 starts voice reproducing experience.
When media playback background service 554, determine it and for example need the participation of application code, to (continue to provide experience, the URL of next song of playing), background service is submitted to system 556 (for example, the application example manager 126 in Fig. 1 and 4) by work item.Application example manager 126 attempts to find the suitable proxy that moves therein backstage agency 558.If there is no such main frame, by the resource previously being retained by explorer 106, create a new main frame.Spendable suitable resource constraints such as amount such as storer and CPU of application proxy now.
Work item is assigned to backstage agency 558, and it is implemented as the logic that meets its required application specific, for example, is connected to web services 564 to download track metadata and these data are offered to media playback background service 554.
Once backstage agency 558 has completed its work item, application example manager 126 freely reclaims its resource (for example,, by hanging up its execution or stopping completely) as required.Yet agency can still keep dormancy in storer, for example, in case act on behalf of 558, be again required in the future.
If background service 554 has more work to do, it returns to obtain the participation of application code, as mentioned above.Otherwise once meet services request (or user's explicitly or implicitly indication will stop experiencing), releasing resource retains and this request has been considered to.
Note, point at any time, user can turn back to the example of foreground application 552, and further directly or indirectly mutual or mutual with backstage agency 558 itself with background service 554 via system event etc.In addition, user can use system UX (such as general Playback controls), for example, to affect background service (, jumping to next song), this so can call backstage and act on behalf of the item of finishing the work.
As general introduction, Fig. 6 illustrates and processes the process flow diagram of asking relevant exemplary step for the reservation of background work load, receives request start in step 602.Step 604 represents that system searching is for the policy criteria of the background work load of this type, and for example, which resource is allowed to, and in these resources for the restriction of each resource be what (if present).For example, backstage audio agents needs storer and the CPU of a certain amount and other possible resources of a certain (predetermined, rational) amount, but does not need screen display.The guide backstage agency that turns one by one needs a certain storer and CPU, and the access to GPS sensing data, but does not also need screen display.
Step 606 is selected resource from retain tuple, and step 608 assesses to determine whether requested resource is permitted for the operating load of this type.If not, process asks unsuccessfully in step 618, to finish by making.
If be allowed to, whether whether step 610 assessment requested resource amount (if needs) available and in policy constraints restriction, for example, and the only CPU of so many number percents, so many storer etc. only.Note, some resource or be allowed to access or be rejected access, for example, Memory-limited, but gps data not limited (because its addressable or inaccessible), and therefore step 610 is not suitable for these resources.Note, as a part that whether meets policy criteria, consider Resource Availability or consider that as the condition of separating that needs meet except policy criteria Resource Availability is generally of equal value.
If the amount of asking in any predetermined quantitative limitation being allowed to and current be available, in step 612, retain this resource.If requested resource is unavailable or surpassed the predetermined amount (if there is) being allowed to, step 610 is branched off into step 618, and process asks unsuccessfully to finish by making there.
Step 614 pair other resources that retain in tuple repeat this process, for example, assess in order each resource.When retaining requested resource for reservation request, in step 616, ask successfully.Now, backstage agency can be activated; It can be rejected exceeding the access of those initial resources that retain afterwards, and for example, in one implementation, backstage agency is not assigned with the more storer (if in operation requested words) that exceeds initial reservation.
Exemplary operation environment
Fig. 7 illustrates the example of the suitable mobile device 700 of the each side that can realize theme described herein thereon.Mobile device 700 is only an example of equipment, is not intended to the usable range of the each side of theme described herein or function to propose any restriction.Mobile device 700 should not be construed as for having any dependence or requirement in arbitrary assembly or its combination shown in exemplary mobile device 700 yet.
With reference to figure 7, for realizing the exemplary apparatus of the each side of theme described herein, comprise mobile device 700.In certain embodiments, mobile device 700 comprises the handheld device of the voice communication of cell phone, permission and other handheld devices, a certain other voice communication apparatus etc.In these embodiments, mobile device 700 can be equipped with the camera for taking pictures, although this in other embodiments may be optional.In other embodiments, mobile device 700 comprises personal digital assistant (PDA), handheld games equipment, and notebook, printer, comprises the electrical equipment of Set Top Box, media center or other electrical equipment etc., other mobile devices etc.In other embodiment, mobile device 700 can comprise and is conventionally construed to non-moving equipment, as personal computer, server etc.
The assembly of mobile device 700 can include but not limited to, processing unit 705, system storage 710 and the various system components that comprise system storage 710 are coupled to the bus 715 of processing unit 705.Bus 715 can comprise any in the bus structure of several types, comprises memory bus, memory controller, peripheral bus and uses any the local bus etc. in various bus architectures.Bus 715 allows to transmit data between the various assemblies of mobile device 700.
Communication media embodies computer-readable instruction, data structure, program module or other data with modulated message signal such as carrier wave or other transmission mechanisms conventionally, and comprises any information-delivery media.Term " modulated message signal " refers to have the signal that is set or changes its one or more features in the mode of coded message in signal.As example, and unrestricted, communication media comprises wire medium, such as cable network or directly line connection, and wireless medium, such as acoustics, RF, bluetooth
wireless USB, infrared, WiFi, WiMAX and other wireless mediums.Above-mentioned combination in any also should be included in the scope of computer-readable medium.
In certain embodiments, can connect hard disk drive 736 by the mode that is more for good and all attached to mobile device 700.For example, hard disk drive 736 can be connected to such as parallel Advanced Technology Attachment (PATA), Serial Advanced Technology Attachment (SATA) or other and can be connected to the interfaces such as annex of bus 715.In this type of embodiment, remove hard disk drive and can relate to and remove the shell of mobile device 700 and remove screw or other securing members that hard disk drive 736 is connected to the supporting structure in mobile device 700.
More than description and movable memory equipment 735-737 shown in Figure 7 and the computer-readable storage medium being associated thereof provide the storage to the computer-readable instruction for mobile device 700, program module, data structure and other data.For example, removable memory equipment 735-737 can store the image taken by mobile device 700, voice recording, associated person information, program, for data of program etc.
User can be by input equipments such as keypad 741 and microphone 742 to input command and information in mobile device 700.In certain embodiments, display 743 can be touch sensitive screen and can allow user input command and information thereon.Keypad 741 and display 743 can be connected to processing unit 705 by being coupled to user's input interface 750 of bus 715, but also can be connected with bus structure by other interfaces, as communication module 732 and cable port 740.Motion detection 752 can be used for determining the posture that equipment 700 is made.
For example, user can and come and other telex networks via the text message of input on keypad 741 or touch-sensitive display 743 via microphone 742 speeches.Audio unit 755 can provide electric signal to drive loudspeaker 744 and to receive the sound signal that also digitizing is received from microphone 742.
Further, antenna will offer GPS interface and mechanism 772 such as location-based information such as gps signals.GPS mechanism 772 makes again corresponding gps data (for example time and coordinate) can be used for processing.
In certain embodiments, can launch and/or receive for surpassing the message of the network of a type by single antenna.For example, voice and blocking message can be launched and receive to single antenna.
When operating in networked environment, mobile device 700 can be connected to one or more remote equipments.Remote equipment can comprise personal computer, server, router, network PC, cell phone, media-playback device, peer device or other common network nodes, and generally comprises above with respect to the many or whole elements described in mobile device 700.
The each side of theme described herein can operation together with numerous other universal or special computingasystem environment or configuration.The example of known computing system, environment and/or configuration that is applicable to the each side of theme described herein comprises, but be not limited to, personal computer, server computer, hand-held or laptop devices, multicomputer system, the system based on microprocessor, Set Top Box, programmable consumer electronics, network PC, small-size computer, mainframe computer, comprise any the distributed computing environment etc. in said system or equipment.
The each side of theme described herein can be described in the general context such as computer executable instructions such as program modules of being carried out by mobile device.Generally speaking, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.In the each side of the theme described herein distributed computing environment that also task is carried out by the teleprocessing equipment linking by communication network therein, realize.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium that comprises memory storage device.
In addition, although frequently use term server herein, but can recognize, this term also can be contained client computer, is distributed in the set of the one or more processes on one or more computing machines, one or more independently memory device, the set of one or more other equipment, above one or more combination, etc.
Conclusion
Although the present invention is easy to make various modifications and replacing structure, its some illustrative embodiment is shown in the drawings and be described in detail in the above.Yet should understand, this is not intended to limit the invention to disclosed concrete form, but on the contrary, is intended to covering and falls into all modifications, replacing structure and the equivalents within the spirit and scope of the present invention.
Claims (10)
1. a kind of method of carrying out at least one processor at least in part in computing environment, described method comprises: (602) request that receives is for the reservation request of the device resource of backstage code, determine whether (608,610) described reservation request meets policy criteria, comprise whether having enough resources can be in order to guarantee that described backstage code can have the priority of the just requested device resource of use, and if be, retain (612) described device resource and use for described backstage code.
2. the method for claim 1, it is characterized in that, determine whether described reservation request meets described policy criteria and also comprise, to some resource at least, determine that those requested resources are whether in the constrained of the type of the backstage code corresponding to described reservation request, and if no, make described request failure.
3. the method for claim 1, is characterized in that, determines whether described reservation request meets described policy criteria and also comprise at least one resource is determined to whether this resource is allowed to be used by described backstage code.
4. the method for claim 1, it is characterized in that, also comprise, manage the life cycle of described backstage code, comprise that the backstage starting corresponding at least a portion of described backstage code acts on behalf of to enter the active state that described backstage agency carries out therein, and mobile described backstage agency between the dormant state that described backstage agency does not carry out therein and described active state.
5. a kind of system in computing environment, described system comprises: explorer (106), described explorer is configured to retrain the resource use of backstage code, comprise by contrast resource reservation request (102) assessment strategy criterion and Resource Availability and determine whether to retain requested resource for described backstage code, and if meet policy criteria and resource, can use, described explorer is described backstage code reservation of resource to indicate described reservation request be successful.
6. system as claimed in claim 5, is characterized in that, also comprises application example manager, and the example that described application example manager is configured to start described backstage code when described reservation request success is for execution.
7. system as claimed in claim 5, it is characterized in that, described explorer is system code, foreground code and backstage code reservation of resource, described resource comprises CPU, storer, the network bandwidth, non-volatile memories bandwidth, screen display, equipment microphone, equipment camera, equipment accelerometer, equipment gyroscope, equipment GPS mechanism, or any combination of CPU, storer, the network bandwidth, non-volatile memories bandwidth, screen display, equipment microphone, equipment camera, equipment accelerometer, equipment gyroscope, equipment GPS mechanism.
8. one or more computer-readable mediums with computer executable instructions, described computer executable instructions is carried out following steps when being performed, and comprising:
From application, receive (602) services request, described request comprises will act on behalf of for backstage the request of reservation of resource;
Determine that whether (608,610) will act on behalf of reservation of resource for described backstage, and if be, retain described resource;
Call described backstage agency (558) with run time version;
Determine the resource when (222) no longer need described backstage agency and retain; And
Discharge described resource (108) and abandon described reservation.
9. one or more computer-readable medium as claimed in claim 8, it is characterized in that, described backstage agency communicates by letter to carry out at least one background task or described backstage agency run time version after application is closed with system service, or described backstage agency communicates by letter to carry out at least one background task and described backstage agency run time version after application is closed with system service.
10. one or more computer-readable medium as claimed in claim 8, is characterized in that, also has and comprises the computer executable instructions of hanging up or stop described backstage agency.
Applications Claiming Priority (10)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US201161442701P | 2011-02-14 | 2011-02-14 | |
US201161442735P | 2011-02-14 | 2011-02-14 | |
US201161442753P | 2011-02-14 | 2011-02-14 | |
US201161442713P | 2011-02-14 | 2011-02-14 | |
US61/442,753 | 2011-02-14 | ||
US61/442,735 | 2011-02-14 | ||
US61/442,701 | 2011-02-14 | ||
US61/442,713 | 2011-02-14 | ||
US13/162,936 US9060196B2 (en) | 2011-02-14 | 2011-06-17 | Constrained execution of background application code on mobile devices |
US13/162,936 | 2011-06-17 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103559080A true CN103559080A (en) | 2014-02-05 |
CN103559080B CN103559080B (en) | 2017-04-12 |
Family
ID=50013333
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210031539.4A Active CN103559080B (en) | 2011-02-14 | 2012-02-13 | Constrained Execution of Background Application Code on Mobile Devices |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103559080B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104268011A (en) * | 2014-09-25 | 2015-01-07 | 北京网秦天下科技有限公司 | Instruction processing method, device and system of mobile device |
CN106104485A (en) * | 2014-03-10 | 2016-11-09 | 微软技术许可有限责任公司 | Dynamic resource management for multi-process application |
CN109714640A (en) * | 2017-10-26 | 2019-05-03 | 创盛视联数码科技(北京)有限公司 | The method for playing live video |
CN112363836A (en) * | 2020-11-12 | 2021-02-12 | 四川长虹电器股份有限公司 | Android system camera resource control method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060236368A1 (en) * | 2000-05-02 | 2006-10-19 | Microsoft Corporation | Resource Manager Architecture Utilizing a Policy Manager |
CN101673216A (en) * | 2008-09-09 | 2010-03-17 | 联想(北京)有限公司 | Method and device for closing application program |
CN101821997A (en) * | 2007-10-11 | 2010-09-01 | 微软公司 | Hierarchical reservation resource scheduling infrastructure |
CN101859261A (en) * | 2010-06-09 | 2010-10-13 | 中兴通讯股份有限公司 | Control method and control equipment for releasing memory |
-
2012
- 2012-02-13 CN CN201210031539.4A patent/CN103559080B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060236368A1 (en) * | 2000-05-02 | 2006-10-19 | Microsoft Corporation | Resource Manager Architecture Utilizing a Policy Manager |
CN101821997A (en) * | 2007-10-11 | 2010-09-01 | 微软公司 | Hierarchical reservation resource scheduling infrastructure |
CN101673216A (en) * | 2008-09-09 | 2010-03-17 | 联想(北京)有限公司 | Method and device for closing application program |
CN101859261A (en) * | 2010-06-09 | 2010-10-13 | 中兴通讯股份有限公司 | Control method and control equipment for releasing memory |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106104485A (en) * | 2014-03-10 | 2016-11-09 | 微软技术许可有限责任公司 | Dynamic resource management for multi-process application |
CN104268011A (en) * | 2014-09-25 | 2015-01-07 | 北京网秦天下科技有限公司 | Instruction processing method, device and system of mobile device |
CN109714640A (en) * | 2017-10-26 | 2019-05-03 | 创盛视联数码科技(北京)有限公司 | The method for playing live video |
CN112363836A (en) * | 2020-11-12 | 2021-02-12 | 四川长虹电器股份有限公司 | Android system camera resource control method |
Also Published As
Publication number | Publication date |
---|---|
CN103559080B (en) | 2017-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9060196B2 (en) | Constrained execution of background application code on mobile devices | |
KR101933246B1 (en) | Resuming applications and/or exempting applications from suspension | |
CN102866903B (en) | Background work and foreground work are separated to coupling | |
KR101672227B1 (en) | Multimodal computing device | |
US8099548B2 (en) | Power efficient media playback on general purpose portable devices | |
US10248279B2 (en) | Task completion across devices using a shared work space | |
US9063775B2 (en) | Event aggregation for background work execution | |
US9148700B2 (en) | Remotely defining security data for authorization of local application activity | |
US20100211680A1 (en) | Apparatus and method to allocate limited resources | |
CN103559080A (en) | Constrained Execution of Background Application Code on Mobile Devices | |
US10430080B2 (en) | Subsystem storage space manager | |
US8677476B2 (en) | Providing remotely defined security data to a local application extension | |
US9641597B2 (en) | Managing an application on a computing system | |
US10033783B1 (en) | Tracking media consumption | |
TW201239767A (en) | Background transfer service for applications on mobile devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
ASS | Succession or assignment of patent right |
Owner name: MICROSOFT TECHNOLOGY LICENSING LLC Free format text: FORMER OWNER: MICROSOFT CORP. Effective date: 20150729 |
|
C41 | Transfer of patent application or patent right or utility model | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20150729 Address after: Washington State Applicant after: Micro soft technique license Co., Ltd Address before: Washington State Applicant before: Microsoft Corp. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |