CN103559080B - Constrained Execution of Background Application Code on Mobile Devices - Google Patents

Constrained Execution of Background Application Code on Mobile Devices Download PDF

Info

Publication number
CN103559080B
CN103559080B CN201210031539.4A CN201210031539A CN103559080B CN 103559080 B CN103559080 B CN 103559080B CN 201210031539 A CN201210031539 A CN 201210031539A CN 103559080 B CN103559080 B CN 103559080B
Authority
CN
China
Prior art keywords
resource
background
code
backstage
proxy
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.)
Active
Application number
CN201210031539.4A
Other languages
Chinese (zh)
Other versions
CN103559080A (en
Inventor
P·J·托尔
A·巴德热辛
S·P·伯克
V·戈帕拉奥
J·W·富勒
R·J·拉米基
K·R·甘地
J·I·拉斯特洛姆
D·米勒
A·塞尔丘克
T·M·库尔策曼
R·江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Microsoft Technology Licensing LLC
Original Assignee
Microsoft Technology Licensing LLC
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Priority claimed from US13/162,936 external-priority patent/US9060196B2/en
Application filed by Microsoft Technology Licensing LLC filed Critical Microsoft Technology Licensing LLC
Publication of CN103559080A publication Critical patent/CN103559080A/en
Application granted granted Critical
Publication of CN103559080B publication Critical patent/CN103559080B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

The constrained execution of the background application code on mobile device
Technical field
The present invention relates to mobile device application, more particularly to the background application of mobile device.
Background technology
People want mobile device and can once complete many things, such as browse web, play music, notify to them Particular event etc..It is practically without single application and can completes many possible tasks, so mobile device is configured with Some discrete applications and (include that be phase with " first party " supplier of mobile device when manufacturer from " third party " application vendor With the situation of entity) download the ability of more applications.
At present, application dividually (can be with the relative high powers of such as PC etc of parallel running with them in mobile device Computing device is contrary) on run.Expecting, " in the same time ", operation was applied user to be given more in accordance with need on the mobile apparatus The experience wanted.For such as moving for given its computing capability, limited screen real estate, battery, the network bandwidth etc. For the affined equipment of resource of equipment etc, this is problematic.
In the various methods for employing this problem of solution in the past.Such as conventional desktop operating system, some moving operations The various applications of simple system ground parallel running, it is assumed that the system has enough resources to complete task and the vacation of all activities Determine user and can manage Consumer's Experience (UX, including user interface or UI) problem.This often leads to poor Consumer's Experience, such as exists The glitch occurred in the case of resource is insufficient and other problemses.Other platforms allow one or more applications to continue executing with, Even if user has switched from these applications, but these platforms do not ensure the seriality (quality) with regard to servicing;For example, if Resource starts to use up, then application is terminated.
The content of the invention
Present invention is provided and will be further described in detailed description below to introduce in simplified form Some representative concepts.Present invention is not intended to the key feature or essential feature for identifying theme required for protection, It is not intended in any way that would limit the scope of the claimed subject matter use.
In short, each side of theme as herein described be related to a kind of backstage code be allowed to by which it is constrained with resource Mode run, give priority using retained resource (for example, under non-abnormal operating conditions) to backstage code Technology.After the reservation request for receiving request for the device resource of backstage code, explorer determines that the reservation is asked Whether meet policy criteria, include whether that enough resources (for example, CPU and memorizer) may be used to guarantee that backstage code can With the priority for using just requested device resource.If it is, retaining device resource is used for backstage code.If Available without enough resources, then the request fails.In this way, for example, it is ensured that backstage code with enough resource operations with Avoid glitch, be not abruptly terminated.
Policy criteria generally comprises the constrained of the type for the backstage code corresponding with request is retained.For example, Background audio player agency is only permitted request and limited amount memory distribution is allocated.Policy criteria typically also includes Indicate which resource is allowed to and/or is rejected the data that used by backstage code, for example, turning navigation backstage code one by one can Using GPS mechanism as resource, but screen display may not be used.
On the one hand, when reservation is asked successfully, application example manager starts the example of backstage code for performing.Should The life cycle of management backstage code is further configured to Instance Manager, active state (in this condition, backstage code is included in Perform) at least a portion of mobile backstage code and resting state (in this condition, backstage code is not performed) between.
On the one hand, describe to receive service request from application, the request includes being that background proxy retains asking for resource Ask.Process (for example, corresponding to explorer) determines whether to retain resource for background proxy, and if it is, retains Resource.Background proxy is called (for example, to be performed at least one background task to be communicated with system service, is wrapped to perform code Include using it is pent when).When background proxy and the resource being retained no longer is needed, discharge resource and simultaneously abandon retaining.
Detailed description below is read in conjunction with the accompanying, other advantages of the present invention can become apparent.
Description of the drawings
It is unrestricted as an example, the present invention is shown in the drawings, in accompanying drawing identical reference indicate it is identical or Similar element, in accompanying drawing:
Fig. 1 is represented for managing the example set of resource (include provide to backstage application code one group of affined resource) The block diagram of part.
Fig. 2 is the block diagram/controlling stream graph for representing exemplary background code life cycle.
Fig. 3 is the expression of the resource boundaries frame for each live load (process group).
Fig. 4 is the expression of example application model framework, and the application model includes being configured to provide holding in a mobile device The component of capable backstage code.
Fig. 5 is to represent exemplary operations to prepare backstage code to play the block diagram/controlling stream graph of background audio.
Fig. 6 is the flow chart for representing the exemplary step for providing the backstage code for performing in a mobile device.
Fig. 7 is represent the one or more aspects that wherein may be implemented in embodiments described herein exemplary, non- The block diagram of restricted computing system or operating environment, for example, in the example of mobile telephone equipment.
Specific embodiment
The each side of technique described herein relate generally to a kind of background application code and are configured by which and are allowed to fortune OK, but in resource use it is subject to the technology of system restriction.This allows third party developer to provide can be used as non-foreground code Come the code for performing.Exemplary background code scene includes that background audio is played, periodically logins (checking into) social activity Networking site, the backstage to content are downloaded for using, arranging alarm and notice etc. on foreground after a while.Some of these scenes (for example, background audio is played, social networking is logined, geo-fence/geography cache etc.) can be by making application code rear Run to operate in platform.
For this purpose, life cycle and the centralized service for performing for management backstage application code is described, and before protecting Stage body tests the resource management system performed from background application, while so that background application can still be obtained performs progress.Also Describe one kind that general warranty can start given experience (for example it is assumed that system is not in abnormality) in itself in future Mechanism.
Usually, before background application code is allowed to operation, background application code request is the special using retaining of it Quantitative resource (for example, CPU is used and memorizer) and/or certain types of resource (for example, ancillary equipment).If request exists In the acceptable policy constraints of the background application code of the type/meet the type background application code acceptable plan Slightly constrain, and requested resource is available in the time, then retain requested resource (otherwise for background application code Request failure).If resource be retained, ensure resource under typical equipment operation (i.e. except possible abnormal conditions it It is available to background application code outward).In this way, backstage resource it can ask and the resource that retains in terms of suffer restraints, but If being that resource is successfully reserved, when needing, resource will be available.As a result, it is properly encoded with its constraint The background application of execution will not experience glitch or other problemses (for example, unexpected termination), and thereby provide good Consumer's Experience.
It should be appreciated that any example herein is nonrestrictive.Therefore, the invention is not restricted to described here any Specific embodiment, aspect, concept, structure, function or example.Conversely, embodiment described herein, aspect, concept, knot Any one in structure, function or example be all it is nonrestrictive, and the present invention be generally possible to calculate and mobile device in There is provided the various modes of benefit and advantage to use.
Fig. 1 is the block diagram for illustrating each component in an example implementation, is included in mobile device (such asElectricity Words) the middle application model that backstage execution is provided.For this purpose, the request 102 relevant with application task is by control application resource manager 106 (for example, system shell) task list component 104 is managed.
Usually, system resource 108 (illustrating in such as frame 111-116) is distributed to main memory and is existed by explorer 106 Process on equipment.In addition to 112 resource of CPU111 and memorizer, resource may include that the network bandwidth 113, dribbling is wide by 114 and (use In the I/O of any non-volatile memories type, be not necessarily disk), screen display 115 and ancillary equipment/sensor 116, such as Equipment microphone, equipment camera, accelerometer, gyroscope, GPS mechanism etc..
The type of process includes system process, foreground process and background proxy process.Work entering with perform function together Journey is referred to here as " live load " (although it is also feasible that live load may also comprise individual process).For example, Fig. 1 thus Show system workload 120, foreground load 121 and background proxy live load 122-124.
Ensure to be determined in advance as related to the process type and needed by the process to the live load 124 of each type Each resource amount, as " bounding box " 118 in Fig. 1 is generally represented.For example, the CPU 111 and memorizer of a certain amount 112 are needed by each background work load (or agent process), and are retained for the live load in initial request, or if Fail without the available then request of enough resources.The amount (if not failing) of guaranteed each resource can be with corresponding application Class it is corresponding, for example, background audio agency can be given so many memorizeies and CPU, and different background proxies can quilt Give different amounts of memorizer and CPU.
Explorer 106 is implemented for control to the access of specific resources (such as camera or microphone) to prevent their quilts The strategy that for example background proxy is accessed.Used as another example, foreground load 121 obtains background process live load and cannot protect The screen display resource stayed.The additional detail for describing other resources below and retaining with regard to resource.
Thus, the component of application model described herein includes system process/live load, including application code fragment (include the Consumer's Experience (UX, including user interface components) applied and also can include for a large amount of industry needed for the UX are presented Business logic) foreground application/live load.The component of application model may also include background proxy/live load, including execution should Real work (for example, streaming music, perform geo-location service etc., be included in after foreground application is closed) generation Chip segment, but typically do not include visual user interface components.Background proxy is relevant with foreground application, but should independently of foreground With;In one implementation, background proxy in the proxy operation (wherein main frame includes one or more tasks containing application The process of example).
The function relevant with resource management of task list component 104 is included such as when session (user interface live load) Be activated or when background proxy main frame is created the live load of instantiation suitable type (one as described here more Individual process) and the live load is deleted when the main frame in live load terminates.When operating duty is changed into non-from movable When (and being changed into activity from inactive) of activity, live load is also attached to reservations (correspondingly by task list component 104 In bounding box)/from reservation mask work load.104 monitoring host computer of task list component is created and by each created main frame It is added to suitable live load, monitoring host computer to terminate and the main frame and monitoring host computer being terminated is removed from its live load Status Change simultaneously changes the state of its live load for including in case of need.
In one implementation, the component for being related to backstage execution also includes application example manager 126 (AIM), including management Life cycle of background proxy/live load 122-124 representative client assign them the central service of work.It is related to backstage The other assemblies of execution include using one or more background proxies (such as entering media to be played performing each work item Row queue up) background service (such as media services).System UX is provided also, such as playback controls or toast (toast) are notified, it Allow users to interact (vice versa) in the way of limited with background proxy.
System workload 120 includes various system processs.In one implementation, the such example of only one of which. System process (such as TelShell.exe 440 and NK.exe 442, Fig. 4 and ServicesD.exe) and other processes belong to In this live load, but no main frame belongs to this live load.
Certain function that system workload 120 is provided includes the foreground UI that system is provided, such as including screen locking, frame unit Part (using hurdle, toast etc.), incoming call experience, alarm and prompting etc..The background audio playback that system is provided, including Media services (554, Fig. 5, for example,Media queue) built-in music playback, do not use any main frame for media solution Code or playback controls.System workload 120 can also carry out background process, and such as email synchronization, download and installation update With application etc..
The process that process in system workload 120 is usually represented in other live loads carrys out work.For example, if front Platform task instances make protected server library (PSL) method call to TelShell.exe, then TelShell.exe will be used Resource is performing this PSL method.Note, system have measurement server processes in resource using and be attributed to visitor The ability of family machine (or making requests on) process, and therefore such process resource using being considered as system workload sheet A part for body.
UI live loads include one group of UI main frame that the visual user for being worked to provide based on UI together is experienced.Worked by UI The UI pages that load shows form session, i.e. there is man-to-man mapping between UI live loads and session.Enter without system Journey is included in such live load.
The UI live loads of the UI main frames comprising activity are referred to as the UI live loads of activity, and it is current aobvious in foreground Show UI UI live loads (for example, foreground load 121).Other UI live loads are considered as inactive.Because The UI main frames of one time only one of which activity, so the UI live loads of only one of which activity at any given time.Sometimes Wait, when system workload 120 is providing foreground UI, the UI live loads that may not there is activity (for example, are showing lock During screen).There may be some inactive UI live loads in the same time, quantity determined by the size of storehouse backward (its by The frame server component control of TelShell, as described in one or more related applications).
The a kind of of application model realizes that specifying that the main frame being in the UI live loads of activity is successfully completed disables or cancel, It is contrary with the main frame being comprised in inactive UI live loads.When the UI main frames in UI live loads terminate, the UI works Make load to terminate.UI main frames generally because its backed off after random for completing in its task instances and terminate, or because in its task reality Example completed disable after dehydrated (dehydrated) and terminate.
The component for being easy to background work to load scene is also described herein, including the above-mentioned of the resource consumption of managing main frame should With explorer 106.Backstage UX live loads include working together to provide the background host computer of non-vision Consumer's Experience, such as Background audio playback or one by one turning guide, playback video flowing to external display are while read Email (example on phone Such as, using DLNA/ DLNA technologies) etc..Note, no system process needs to be included in such work In loading.
The backstage UX live loads of the background host computer comprising activity are referred to as the backstage UX live loads of activity.Only comprising non- The backstage UX live loads of the background host computer of activity are considered as inactive.
The use of the background audio playback of third party's media decoder and/or playback agent is feasible (and at one or many It is described in individual related application).At any given time, a playlist is at most being played in media services, and it is by one Individual application is possessed;Via strategy, a media item from playlist can be played a time at most.Equally, it is specific The background proxy of playlist is hosted in identical background host computer.These constraints (taking together) are implied in such one kind In realization, may at most there is a movable backstage UX live load a time.They also imply that each backstage UX Live load all includes a background host computer.
Fig. 2 illustrates the life cycle of backstage UX live loads.As represented by frame 220, after startup agency creates activity Platform UX live loads, or alternatively have activated inactive backstage UX live loads.The agency's (frame 222) cancelled in main frame makes Obtain backstage UX live loads and be changed into inactive.When the agency in main frame completes, main frame can be changed into dormancy (frame 224;Dormancy should It is described in one or more related applications).Main frame quilt in inactive backstage UX live loads is not required Allow to successfully complete cancellation.
When the background host computer in the UX live loads of backstage terminates, backstage UX live loads terminate.Background host computer is usual Only after its all of background proxy is completed, when which it is employed just to terminate when model is informed and will be exited.
Another type of background work load is background process live load, and it includes working together to represent using execution One group of background host computer of some background process;(different from backstage UX live loads, background process live load does not provide any use Family is experienced, and user is generally unaware of the live load and exists).The example of background process live load is included periodically from rear Platform to server update customer location, when call screen is closed downloads of media etc..Note, no system process needs to be included In background process live load.
In one implementation, each background process live load all includes a background host computer.Backstage master comprising activity The background process live load of machine is referred to as the background process live load of activity;The backstage of inactive background host computer is included only It is considered as inactive to process live load.
It is multiple using registrable background process, but a kind of realize allowing at time most movable backstage Reason live load.If multiple background process live loads are scheduled to perform in the same time, serialization their execution Can be acceptance, or if resource is allowed, be performed in parallel their (for example, less batteries of this consumption).Should not The main frame in inactive background process live load is asked to successfully complete cancellation;The life cycle of background process live load It is similar with the lifetimes and status conversion of backstage UX live loads with State Transferring.
A kind of other kinds of live load is opportunistic live load, and it is not required to have and successfully completes its work Any main frame made.Inactive live load (inactive UI, inactive backstage UX and the work of inactive background process Load) be opportunism workload type example.
As described herein, a part for policy in resource management is supporting reality only enough resources are known a priori by This feature is supported when now there is the feature of suitable user experience;If new live load may cause equipment itself or existing Live load stop normally working, then without the new live load.In other words, only when knowing (in typical situation Under) just offer is propped up to the particular job load when having enough resources to perform well for the process of particular job load Hold.A kind of exception of such case is for opportunism live load, i.e. opportunism live load successfully need not run Finish, and therefore need not guarantee there are enough resources.
For this purpose, in terms of specification resource requirement, " normally working "/" health with regard to live load can be predefined ".For each workload type, the reality well write of the workload type for example, is predefined by analyzing The amount of each resource needed for example is to provide good Consumer's Experience.Note, determine each money needed for system workload The amount in source needs to arouse attention, because system workload can represent other live loads to complete work, and therefore system Process needs to consider to its client computer the amount for providing the resource needed for service and includes needing in their resource by the resource requirement In asking.
Operationally, if particular job load is just at least obtaining the amount of the resource needed for its workload type, should Particular job load is considered as health.As an example, it is considered to (for example, via experiment) nearly all UI work in activity The CPU of the needs at most 75% per 16ms is loaded to work well.Operationally, as long as the UI live loads of current active can 75% CPU is obtained per 16ms, it is regarded as (i.e. in CPU uses) of health.
In the case where the live load of behavioral deficiency needs to compare the more resources desired by its type, such work Make load to be not qualified as normally working in the constraint of the resource requirement for being distributed.To avoid interference other live loads, In one implementation, such live load is not allocated more resources to attempt to make them become health.
Fig. 3 illustrates the conceptual view of live load and its bounding box, wherein hatched frame represents idling-resource.Note Meaning, for the frame for being marked as 330, " from the main frame of a certain inactive live load " is noted from inactive work The main frame of load is only allowed to survival in the case where resource is the free time.
Can considered to be in bounding box corresponding to each live load for retaining, the size of bounding box is by its live load Type wants the amount of the resource needed for health to determine;(note, the not of uniform size of the live load in shown frame is representational surely And/or relevant with size).For example, background audio live load need the memorizer of a certain amount, a certain CPU time etc. so as to Glitch or other interference that audio frequency is could be noted without user are played smoothly.Conceptually, for can be in live load Between the resource of each type that divides there may be different bounding boxes.
To decide whether to allow new background work to load, system distributed based on any other Current resource come for this Scape checks whether the bounding box (for example, each resource) of the live load meets equipment.If it is, system allows the scene; If it is not, then the scene is not allowed to (retain request failure).Alternatively, the resource requirement of existing scene can be ejected or be repaiied Just, so that resource becomes available to new scene.Negotiation is also feasible, for example, after it have rejected reservation, retain request Can be resubmited to require a certain less amount of resource, so that be for example written as can be with the operator scheme of a certain reduction The background work load of operation can be realized.
In order that live load (except opportunism live load) is operationally kept fit, application resource manager is true Guarantor's process has the access right of limit priority to the resource of the border inframe of their own.In other words, application resource manager is true Protect for each bounding box X, the resource request from the process for belonging to X is only when any process for being not belonging to X is ejected from X And still there is no enough resources and can just fail during the request to meet.Therefore, system workload can for example be used and be protected The resource (such as memory cache) stayed and/or use more CPU, however system do not possess the reservation and It is encoded as understanding that the cache may need to be released and it may receive or may not receive extra CPU.
Note there is physical constraint to universal resource management strategy, because the process of system workload is limited to border Frame and when the bounding box is full, their resource request failure there is uncertain result and/or may be led Cause equipment becomes unstable.In one implementation, when system process needs more resources, the bounding box of system workload It is allowed to increase.Such growth may imply that the bounding box of a certain other live loads shrinks in size, and this causes the work Become unhealthy as load, but this is than allowing system workload (it provides prior function, such as call experience) Become unhealthy more preferable.Therefore, the resource " guarantee " made to nonsystematic live load has an accident, including for such as when The bounding box of system workload has become full and has needed abnormal conditions when increasing.
Fig. 4 also illustrates that additional in the framework of the example implementation that application resource manager 106 is integrated into application model Details.In one implementation, during application resource manager 106 includes the process 440 for reside in system shell (TelShell) Static library.Application resource manager 106 is operated and is retained for safeguarding, wherein retain Frame, and including one group of resource quota.Resource quota can be in the form of (resource type, size) tuple, and it is described to protect Stay and how many resources remained.For example, following to retain comprising two resource quota/tuples, which can be set as:(CPU, 10% Every five seconds for example), (memorizer, 10MB) }, its every five seconds for example retains the memorizer of CPU and 10 Mbytes of 10%.
When retaining with live load associated there, application resource manager 106 operates to ensure that the work The process of load has the access right of limit priority to the resource for retaining.Therefore, if the backstage UX live load quilts of activity The reservation being assigned in above example, then application resource manager guarantee that the main frame in the movable backstage UX live loads can be total to With the CPU of memorizer and every five seconds for example 10% using 10MB.
Retain comprising one or more resource quotas.Live load includes one or more main frames.When any given Between, reservation is associated with a live load.Live load can be associated with a reservation a time.Each main frame is in office How preset time is in a live load;(technically, main frame the same time can in multiple live loads, although this May not be allowed by model).Main frame different time can different operating load in, although may can not possibly by main frame from compared with Big bounding box moves to less bounding box, because some resources (such as memorizer) for currently consuming may not be to return Receive.
As an example of the typical case's interaction between system component described herein, in one example using backstage media Playback.Note, for the backstage for being related to position tracking, data syn-chronization, voip call, the application code such as turning guide one by one Other scenes for performing, generally there are same pattern.
As depicted in fig. 5, it is considered to which user starts foreground application 552 to initiate audio experience.Using foreground application 552, user selects the parameter (the music track list that for example, will be played on backstage) of required backstage experience.
Fig. 5 illustrates the fundamental block diagram of the scene for media playback and data/controlling stream graph.Note, as illustrated, application 552 storages 560 with agency 558 with the isolation of themselves, and media services have the data storage 562 of their own, it May include queue.The step of following institute's labelling the numeral corresponding to zone circle in Fig. 5:
1. application create service request (" play this song and when you need next song callback me ")
2. service request system retains resource for agency's experience
3. system retains resource to guarantee that agency can perform its work in future
4. service commences play out song
5. user closes application
6. current title terminates
7. service request system calling is acted on behalf of to obtain next song
8. system starts new process and calls agency
9. background proxy execution logic next song information is provided
10. system is hung up or destroys the agency
11. current titles terminate ... (being back to step 5)
12. playback are completed
13. service to notifications no longer need retain
14. systems are abandoned retaining.
As can be seen, foreground application 552 (via API Calls) creates background service 554, and to media playback backstage Service request is submitted in service 554 to, it is desirable to which it represents foreground application and performs audio playback.Media playback background service 554 requires system 556 (explorers 106 of Fig. 1 and 4) of system retain some resources for background proxy 558, so that it can be in time in the future Point is performed and there is high deterministic success rate (to note, such as the exception of failure of operating system etc itself can prevent this The execution of sample).It is assumed that it is successful to retain, then media playback background service 554 starts audio playback experience.
When media playback background service 554 determines that it needs the participation of application code and (for example, to continue to provide to experience The URL of the next song played), work item is submitted to 556 (for example, the application example pipe in Fig. 1 and 4 of system by background service Reason device is 126).Application example manager 126 attempts to find the suitable proxy for running background proxy 558 wherein.If There is no such main frame, a new main frame is created using the resource for previously having been retained by explorer 106.Now should The suitable resource constraint such as the memorizer that can be used with agency and the amount of CPU.
Work item is assigned to background proxy 558, and it performs the logic of the application specific for needed for meeting it, for example, even It is connected to web services 564 to download track metadata and the data are supplied to media playback background service 554.
Once background proxy 558 has been completed its work item, application example manager 126 freely reclaims its money on demand Source (for example, is performed or termination completely by hanging up which).However, agency still can keep dormancy in memory, for example, in case Agency 558 was required again in future.
If background service 554 has more work do, it is returned to obtain the participation of application code, as above institute State.Otherwise, once having met service request (or user explicitly or implicitly indicates to stop experience), release resource is protected Stay and the request is considered as completing.
Note, at any time point, user can return to the example of foreground application 552, and further directly or indirectly Ground is interacted with background service 554 via system event etc. or itself is interacted with background proxy 558.In addition, user can use system UX (such as general Playback controls), to affect background service (for example, jumping to next song), this can further call background proxy To complete work item.
Used as general introduction, Fig. 6 is to illustrate retain request flow process about exemplary step for what background work was loaded with processing Figure, receives request in step 602 and starts.Step 604 represents strategy of the system searching for the background work load of this type Criterion, for example, which resource is allowed to, and in these resources for the restriction of each resource what is (if there is Words).For example, background audio agency need a certain (predetermined, rational) memorizer for measuring and a certain amount CPU and can Other resources of energy, but do not need screen display.Turning guide background proxy needs a certain memorizer and CPU one by one, and right The access of GPS sensor data, but also without screen display.
Step 606 selects resource, step 608 to assess to determine whether requested resource is allowed to use from reservation tuple In the live load of this type.If it is not, then process is terminated in step 618 by making request failure.
If permitted to, then whether whether step 610 assessment requested resource amount (if desired) can use and in strategy In constrained, for example, the CPU of only so many percentage ratios, only so many memorizeies etc..Note, some resources or permitted Perhaps access or be denied access to, for example, Memory-limited, but gps data is unrestricted (or can not visit because it may have access to Ask), and therefore step 610 is not suitable for these resources.Note, as whether meeting a part of considering resource of policy criteria Availability or as the separate condition for needing to meet in addition to policy criteria to consider Resource Availability be usually of equal value.
If the amount asked is in the restriction of any predetermined amount of being allowed for and be currently available, in step Rapid 612 retain the resource.If requested resource is unavailable or has exceeded the predetermined amount of being allowed for (if there is), Step 610 is branched off into step 618, and there process is terminated by making request unsuccessfully.
Other resources that step 614 pair retains in tuple repeat the process, for example, assess each resource in order.When for When retaining request reservation requested resource, ask successfully in step 616.Now, background proxy can be activated;It can quilt afterwards Refuse to the access beyond those resources for initially retaining, for example, in one implementation, background proxy is not allocated beyond initial The more memorizeies for retaining (if requested while in operation).
Illustrative Operating Environment
Fig. 7 illustrates the example of the suitable mobile device 700 of each side that can realize theme described herein thereon. Mobile device 700 is only an example of equipment, it is not intended that use range to each side of theme described herein or Function proposes any restriction.Mobile device 700 was also not construed as appointing shown in EXEMPLARY MOBILE DEVICE 700 One component or its combination have any dependence or requirement.
With reference to Fig. 7, for realizing that the example devices of each side of subject matter described herein include mobile device 700. In some embodiments, mobile device 700 include cell phone, allow with the handheld device of the voice communication of other handheld devices, A certain other voice communication apparatus etc..In these embodiments, mobile device 700 can match somebody with somebody the camera for being ready for use on shooting photo, though So this may not be required in other embodiments.In other embodiments, mobile device 700 includes personal digital assistant (PDA) electricity of, handheld gaming devices, notebook, printer, including Set Top Box, media center or other electrical equipment etc. Device, other mobile devices etc..In other embodiment, mobile device 700 may include generally to be construed to non-moving equipment, such as Personal computer, server etc..
The component of mobile device 700 can including but not limited to, processing unit 705, system storage 710 and will be including being System memorizer 710 is coupled to the bus 715 of processing unit 705 in interior various system components.Bus 715 may include several types Any one of bus structures, including memory bus, storage control, peripheral bus and use various total wire bodies Local bus of any one in architecture etc..Bus 715 allows to transmit data between the various assemblies of mobile device 700.
Mobile device 700 can include various computer-readable mediums.Computer-readable medium can be set by movement Standby 700 any usable mediums for accessing, and include volatibility and non-volatile media and removable, irremovable medium. Unrestricted as an example, computer-readable medium may include computer-readable storage medium and communication media.Computer-readable storage medium Including for any of storage such as computer-readable instruction, data structure, program module or information as other data Method or technique is come the volatibility realized and non-volatile, removable and irremovable medium.Computer-readable storage medium include but It is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other CDs Storage, cartridge, tape, disk storage or other magnetic storage apparatus or can be used for store information needed and can be by moving Any other medium that equipment 700 is accessed.
Communication media embodies computer-readable generally with the modulated message signal such as carrier wave or other transmission mechanisms Instruction, data structure, program module or other data, and including any information-delivery media.Term " modulated message signal " Refer to the signal that one or more feature is set or changed in the way of coding information in the signal.As an example and Unrestricted, communication media includes wire medium, and such as cable network or direct line connect, and wireless medium, such as acoustics, RF, bluetoothWireless USB, infrared, WiFi, WiMAX and other wireless mediums.Above-mentioned combination in any should also be included in calculating In the range of machine computer-readable recording medium.
System storage 710 includes the computer-readable storage medium of volatibility and/or nonvolatile memory form, and can wrap Include read only memory (ROM) and random access memory (RAM).On the mobile devices such as cell phone, operating system generation Code 720 is included in ROM sometimes, although in other embodiments, what this was not required.Similarly, 725 usual position of application program In RAM, but equally in other embodiments, during application program can be located at ROM or in other computer-readable memories.Heap 730 provide the memorizer for the state being associated with operating system 720 and application program 725.For example, 720 He of operating system Application program 725 during its operation can be stored in variable and data structure in heap 730.
Mobile device 700 may also include other removable/nonremovable, volatile, nonvolatile memorizeies.As showing Example, Fig. 7 illustrate flash card 735, hard disk drive 736, and memory stick 737.For example, Miniaturizable hard disk drive 736 with Adapt to accumulator groove.Mobile device 700 can be deposited with the non-volatile removable of these types via removable memory interface 731 Memory interface, or can be via USB (universal serial bus) (USB), IEEE 7394, one or more cable ports 740, or antenna 765 Connection.In these embodiments, removable memory equipment 735-737 can be via communication module 732 and mobile device interface. In some embodiments, the memorizer of not all these types can be all included on single mobile device.In other embodiment In, one or more in the removable memory of these and other types can be included on single mobile device.
In certain embodiments, hard disk drive 736 can be connected in the way of mobile device 700 is more permanently attached to. For example, hard disk drive 736 may be connected to such as parallel advanced technology annex (PATA), Serial Advanced Technology Attachment (SATA) or Other may be connected to the interfaces such as the adnexa of bus 715.In such embodiment, remove hard disk drive and can relate to remove mobile setting Standby 700 shell simultaneously to be removed and be connected to the screw of the supporting structure in mobile device 700 by hard disk drive 736 or other are tight Firmware.
Above description and the movable memory equipment 735-737 that figure 7 illustrates and its associated Computer Storage are situated between Matter provides the storage to the computer-readable instruction for mobile device 700, program module, data structure and other data.Example Such as, removable memory equipment 735-737 can store shot by mobile device 700 image, voice recording, associated person information, Program, for the data etc. of program.
User can be input into order in mobile device 700 by the input equipment such as keypad 741 and microphone 742 and believe Breath.In certain embodiments, display 743 can be touch sensitive screen and user can be allowed to be input into order and information thereon.Key Area 741 and display 743 can be connected to processing unit 705 by being coupled to the user input interface 750 of bus 715, but also may be used Connected by other interfaces and bus structures, such as communication module 732 and cable port 740.Motion detection 752 can be used to determine to setting Standby 700 postures made.
For example, user can talk via microphone 742 and via being input on keypad 741 or touch-sensitive display 743 Text message to communicate with other users.Audio unit 755 can provide the signal of telecommunication with drive the speaker 744 and receive and numeral Change is received from the audio signal of microphone 742.
Mobile device 700 may include to provide signal to drive the video unit 760 of camera 761.Video unit 760 can also connect The image that obtained by camera 761 of receipts and these images are supplied to including the processing unit 705 on mobile device 700 and/or Memorizer.The image obtained by camera 761 may include video, one or more images for not forming video or its a certain combination.
Communication module 732 can provide signal to one or more antenna 765 and receive from it signal.One of antenna 765 can Launch and receive the message for cellular phone network.Another antenna can be launched and receive bluetoothMessage.Another antenna (or altogether Enjoy antenna) can launch via wireless ethernet network standard and receive internet message.
Further, the location-based information such as such as gps signal is supplied to GPS interface and mechanism 772 by antenna.GPS Mechanism 772 makes corresponding gps data (such as time and coordinate) can be used to process again.
In certain embodiments, can be launched using single antenna and/or be received for more than a type of network Message.For example, voice and blocking message can be launched and be received to single antenna.
When operating in networked environment, mobile device 700 may be connected to one or more remote equipments.Remote equipment May include personal computer, server, router, network PC, cell phone, media-playback device, peer device or other are normal The network node seen, and generally comprise above with respect to many or whole elements described in mobile device 700.
The each side of subject matter described herein can be together with numerous other universal or special computing system environment or configuration Operation.Include suitable for the example of the known computing system, environment and/or configuration of each side of theme described herein, But it is not limited to, personal computer, server computer, hand-held or laptop devices, multicomputer system, based on microprocessor System, Set Top Box, programmable consumer electronics, network PC, minicomputer, mainframe computer, including said system or Distributed computing environment of any one in equipment etc..
The each side of theme described herein be able to can be held in computers such as the program modules performed by mobile device Described in the general context of row instruction.In general, program module includes performing particular task or realizes specific abstract data The routine of type, program, object, component, data structure etc..The each side of subject matter described herein can also be appointed wherein It is engaged in being realized by the distributed computing environment performed by the remote processing devices of communication network links.In distributed computing environment In, program module is may be located at including in the local and remote computer-readable storage medium including memory storage device.
In addition, although frequently use term server herein, it can be appreciated that the term can also be covered client computer, divide The set of cloth one or more processes on one or more computers, one or more independent storage devices, one or The set of multiple other equipments, more than the combination of one or more, etc..
Conclusion
Although the present invention is susceptible to various modifications and replacing structure, its some illustrative embodiment is shown in the drawings And be described in detail above.It is to be appreciated, however, that this is not intended to limit the invention to disclosed concrete form, but phase Instead, it is intended to all modifications, replacing structure and equivalents that covering falls within the spirit and scope of the present invention.

Claims (9)

1. a kind of method for performing at least one processor at least in part in a computing environment, methods described include:
Receiving (602) asks the reservation of the device resource for backstage code to be asked,
It is determined that (608,610) are described to retain whether request meets policy criteria, include whether that enough resources may be used to guarantee The backstage code can have the priority using just requested device resource, and
If it is, retain (612) described device resource so that the backstage code is used,
The life cycle of the backstage code is managed, including starts at least one of background proxy corresponding to the backstage code To enter the active state that the background proxy is performed wherein, and
The movement background proxy between the background proxy is not performed wherein resting state and the active state.
2. the method for claim 1, it is characterised in that determine and described retain whether request meets the policy criteria also Including at least some of resource, determining those requested resources whether corresponding to the backstage code for retaining request In the constrained of type, and if it is not, then make the request failure.
3. the method for claim 1, it is characterised in that determine and described retain whether request meets the policy criteria also Including at least one resource is determined the resource whether be allowed to by the backstage code use.
4. a kind of system in a computing environment, the system include:
Explorer (106), the explorer are configured to
The resource of constraint backstage code is used, including can by compareing resource reservation request (102) assessment strategy criterion and resource Determined whether to retain requested resource for the backstage code with property, and
If meeting policy criteria and resource being available, the explorer retains resource for the backstage code and indicates institute State reservation request be it is successful,
The life cycle of the backstage code is managed, including starts at least one of background proxy corresponding to the backstage code To enter the active state that the background proxy is performed wherein, and
The movement background proxy between the background proxy is not performed wherein resting state and the active state.
5. system as claimed in claim 4, it is characterised in that also including application example manager, the application example management Device is configured to the example for starting the backstage code when the reservation is asked successfully for performing.
6. system as claimed in claim 4, it is characterised in that the explorer be system code, foreground code and after Platform code retains resource, and the resource includes CPU, memorizer, the network bandwidth, non-volatile memories bandwidth, screen display, equipment Microphone, equipment camera, equipment accelerometer, equipment gyroscope, equipment GPS mechanism, or it is CPU, memorizer, the network bandwidth, non-volatile Property memory bandwidth, screen display, equipment microphone, equipment camera, equipment accelerometer, equipment gyroscope, equipment GPS mechanism it is any Combination.
7. a kind of method of the constrained execution of the background application code on mobile device, including:
(602) service request is received from application, the request includes the request to be background proxy reservation resource;
It is determined that whether (608,610) will retain resource for the background proxy, and if it is, retain the resource, including Start at least one of background proxy corresponding to the backstage code to enter the work that the background proxy is performed wherein Dynamic state;
The background proxy (558) is called to perform code;
It is determined that when (222) no longer need the background proxy and the resource for being retained;And
Discharge the resource (108) and abandon the reservation.
8. method as claimed in claim 7, it is characterised in that the background proxy communicates with performing at least with system service Individual background task or the background proxy perform code after application is closed, or the background proxy is led to system service Letter performs both codes to perform at least one background task and the background proxy after application is closed.
9. method as claimed in claim 7, it is characterised in that also including hanging up or terminate the background proxy.
CN201210031539.4A 2011-02-14 2012-02-13 Constrained Execution of Background Application Code on Mobile Devices Active CN103559080B (en)

Applications Claiming Priority (10)

Application Number Priority Date Filing Date Title
US201161442753P 2011-02-14 2011-02-14
US201161442713P 2011-02-14 2011-02-14
US201161442735P 2011-02-14 2011-02-14
US201161442701P 2011-02-14 2011-02-14
US61/442,713 2011-02-14
US61/442,735 2011-02-14
US61/442,753 2011-02-14
US61/442,701 2011-02-14
US13/162,936 2011-06-17
US13/162,936 US9060196B2 (en) 2011-02-14 2011-06-17 Constrained execution of background application code on mobile devices

Publications (2)

Publication Number Publication Date
CN103559080A CN103559080A (en) 2014-02-05
CN103559080B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9678797B2 (en) * 2014-03-10 2017-06-13 Microsoft Technology Licensing, Llc Dynamic resource management for multi-process applications
CN104268011A (en) * 2014-09-25 2015-01-07 北京网秦天下科技有限公司 Instruction processing method, device and system of mobile device
CN109714640B (en) * 2017-10-26 2022-01-21 创盛视联数码科技(北京)有限公司 Method for playing live video
CN112363836A (en) * 2020-11-12 2021-02-12 四川长虹电器股份有限公司 Android system camera resource control method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7058947B1 (en) * 2000-05-02 2006-06-06 Microsoft Corporation Resource manager architecture utilizing a policy manager

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN103559080A (en) 2014-02-05

Similar Documents

Publication Publication Date Title
US9060196B2 (en) Constrained execution of background application code on mobile devices
KR101672227B1 (en) Multimodal computing device
US9825877B2 (en) Method and system for policy based lifecycle management of virtual software appliances
KR101530104B1 (en) Multi-os(operating system) boot via mobile device
CN102866903B (en) Background work and foreground work are separated to coupling
US20140075029A1 (en) Virtual resource allocation and resource and consumption management
US9959426B2 (en) Method and apparatus for specifying time-varying intelligent service-oriented model
CN103049339A (en) Resuming applications and/or exempting applications from suspension
US20160150009A1 (en) Actionable souvenir from real-time sharing
CN103559080B (en) Constrained Execution of Background Application Code on Mobile Devices
US20100211680A1 (en) Apparatus and method to allocate limited resources
CN112199193A (en) Resource scheduling method and device, electronic equipment and storage medium
US9632897B2 (en) Monitoring components in a service framework
US20230033478A1 (en) Applying modern standby configurations on a per-application basis
US9641597B2 (en) Managing an application on a computing system
TWI525544B (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