CN107423123A - Method for scheduling task, device, storage medium and electronic equipment - Google Patents
Method for scheduling task, device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN107423123A CN107423123A CN201710612970.0A CN201710612970A CN107423123A CN 107423123 A CN107423123 A CN 107423123A CN 201710612970 A CN201710612970 A CN 201710612970A CN 107423123 A CN107423123 A CN 107423123A
- Authority
- CN
- China
- Prior art keywords
- cpu
- time
- operating system
- consuming operation
- occupancy
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3024—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/482—Application
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/484—Precedence
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Quality & Reliability (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention relates to a kind of method for scheduling task, device, storage medium and electronic equipment, method includes:When running background process needs to perform time-consuming operation, the time-consuming operation is registered in operating system;The run time of the time-consuming operation exceedes the cpu resource taken when given threshold or operation and is more than the first occupation value;The occupancy of the operating system monitoring CPU;The operating system adjusts the running status of the time-consuming operation according to the occupancy of the CPU.Above-mentioned method for scheduling task, device, storage medium and electronic equipment adjust the running status of time-consuming operation according to CPU occupancy, so as to optimize CPU service condition, avoid foreground application from the situation of interim card occur.
Description
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of method for scheduling task, device, storage medium and electronics
Equipment.
Background technology
Intelligent terminal is the most frequently used electronic equipment of many users.During Android Mobile operating system uses, have
Many service processes are in running background, and the service processes on these backstages are when performing time-consuming, consumption CPU work, easy because robbing
Accounting for cpu resource causes foreground application that Caton phenomenon occurs because resource is preempted, so as to cause bad usage experience to user.
The content of the invention
The present invention provides a kind of method for scheduling task, device, storage medium and electronic equipment, can improve foreground application because
Resource is preempted and the situation of interim card occurs.
A kind of method for scheduling task, including:
When running background process needs to perform time-consuming operation, the time-consuming operation is registered in operating system;The consumption
When the run time that operates exceed the cpu resource taken when given threshold or operation and be more than the first occupation value;
The occupancy of the operating system monitoring CPU;
The operating system adjusts the running status of the time-consuming operation according to the occupancy of the CPU.
In one of the embodiments, the step of occupancy of the operating system monitoring CPU includes:
The operating system gathers once the utilization rate of the CPU every setting time section.
In one of the embodiments, the operating system gathers once the utilization rate of the CPU every setting time section
The step of include:
The operating system gathers once the utilization rate of the CPU in bright screen every setting time section.
In one of the embodiments, the operating system adjusts the time-consuming operation according to the occupancy of the CPU
Running status the step of include:
When the operating system judges that the occupancy of the CPU is more than the second occupation value, the running background is forbidden to enter
Time-consuming operation described in Cheng Zhihang.
In one of the embodiments, the operating system adjusts the time-consuming operation according to the occupancy of the CPU
Running status the step of also include:
When the operating system judges that the occupancy of the CPU is less than three occupation value, it is allowed to which the running background enters
Time-consuming operation described in Cheng Zhihang.
In one of the embodiments, the time-consuming behaviour is adjusted according to the occupancy of the CPU in the operating system
Before the step of running status of work, methods described also includes:
The operating system obtains precedence information corresponding to the time-consuming operation;
Also, the operating system adjusts the step of the running status of the time-consuming operation according to the occupancy of the CPU
Suddenly also include:
The operating system judges that the occupancy of the CPU is more than the 3rd occupation value and taken less than described second
During value, the time-consuming operation is accordingly controlled to run according to the precedence information.
A kind of task scheduling apparatus, including:
Running background process, for when needing to perform time-consuming operation, the time-consuming operation to be registered in operating system;
The run time of the time-consuming operation exceedes the cpu resource taken when given threshold or operation and is more than the first occupation value;
Operating system, the time-consuming behaviour is adjusted for the occupancy of monitoring CPU, and according to the occupancy of the CPU
The running status of work.
In one of the embodiments, the operating system is used to gather once making for the CPU every setting time section
With rate.
A kind of storage medium, is stored thereon with computer program, it is characterised in that the computer program is held by processor
Described method is realized during row.
A kind of electronic equipment, including memory, processor and be stored on the memory and can be on the processor
The computer program of operation, it is characterised in that realize described method described in the computing device during computer program.
In above-mentioned method for scheduling task, device, storage medium and electronic equipment, when running background process needs to be taken
During operation, time-consuming operation is registered in operating system, the occupancy of operating system monitoring CPU, and according to CPU occupancy shape
Condition adjusts the running status of time-consuming operation, so as to optimize CPU service condition, avoids foreground application from the feelings of interim card occur
Condition.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
The accompanying drawing of other embodiment is obtained according to these accompanying drawings.
Fig. 1 is the flow chart for the method for scheduling task that an embodiment provides;
Fig. 2 is the internal junction of the electronic equipment for the method for scheduling task that Fig. 1 illustrated embodiments are performed in one embodiment
Structure schematic diagram;
Fig. 3 is one of embodiment flow chart of the method for scheduling task of Fig. 1 illustrated embodiments;
Fig. 4 is another embodiment flow chart of the method for scheduling task of Fig. 1 illustrated embodiments;
Fig. 5 is another embodiment flow chart of the method for scheduling task of Fig. 1 illustrated embodiments;
Fig. 6 is the block diagram for the task scheduling apparatus that another embodiment provides;
Fig. 7 is the block diagram of the part-structure of the mobile phone for the electronic equipment correlation that an embodiment provides.
Embodiment
For the ease of understanding the present invention, the present invention is described more fully below with reference to relevant drawings.In accompanying drawing
Give presently preferred embodiments of the present invention.But the present invention can realize in many different forms, however it is not limited to this paper institutes
The embodiment of description.On the contrary, the purpose for providing these embodiments is to make the understanding to the disclosure more thorough
Comprehensively.
Unless otherwise defined, the skill of technical field of all of technologies and scientific terms used here by the article with belonging to invention
The implication that art personnel are generally understood that is identical.Herein description is intended merely in the term used in the description of invention specifically
The purpose of embodiment, it is not intended that the limitation present invention.Term as used herein "and/or" includes one or more related institutes
The arbitrary and all combination of list of items.
One embodiment provides a kind of method for scheduling task, as shown in figure 1, can be by mobile phone, tablet personal computer, individual number
The electronic equipments such as word assistant, Wearable, camera are realized.Fig. 2 is the internal structure of electronic equipment in one embodiment
Schematic diagram.The electronic equipment includes processor, non-volatile memory medium, built-in storage and the network connected by system bus
Interface, voice collection device, loudspeaker, display screen and input unit.Wherein, the non-volatile memory medium storage of electronic equipment
There are operating system and computer-readable instruction.To realize a kind of task scheduling side when the computer-readable instruction is executed by processor
Method.The processor is used to provide calculating and control ability, supports the operation of whole electronic equipment.Built-in storage in electronic equipment
Operation for the computer-readable instruction in non-volatile memory medium provides environment.Network interface is used to carry out net with server
Network communicates.The display screen of electronic equipment can be LCDs or electric ink display screen etc., and input unit can be aobvious
The button, trace ball or the Trackpad that are set on the touch layer or electronic equipment casing covered in display screen or outer
Keyboard, Trackpad or mouse for connecing etc..The electronic equipment can be mobile phone, tablet personal computer or personal digital assistant or wearable
Equipment etc..It will be understood by those skilled in the art that the structure shown in Fig. 2, the only part related to application scheme knot
The block diagram of structure, does not form the restriction for the electronic equipment being applied thereon to application scheme, and specific electronic equipment can be with
Including than more or less parts shown in figure, either combining some parts or being arranged with different parts.
Next the method for scheduling task of Fig. 1 illustrated embodiments, including herein below will be introduced.
Step S100, when running background process needs to perform time-consuming operation, time-consuming operation is registered in operating system.Consumption
When the run time that operates exceed the cpu resource taken when given threshold or operation and be more than the first occupation value.
Wherein, running background process is, for example, that service processes (running the process for servicing Service) or backstage are entered
Journey (runs a movable Activity sightless to user).Time-consuming operation be, for example, network connection, database manipulation,
It is substantial amounts of to calculate the operation such as operation (such as bitmap processing).Operating system is, for example, Android, Linux, Windows etc..
Because running background process is when performing time-consuming, consumption cpu resource operation, easily because seizing before cpu resource causes
Using (such as wechat, king's honor) because resource is preempted Caton phenomenon occurs for platform, therefore, consumes these in present embodiment
When operation registration in an operating system, be available for operating system to these time-consuming operations carry out in real time monitoring and Optimized Operation mode.
Step S200, the occupancy of operating system monitoring CPU.
Wherein, CPU occupancy is, for example, CPU utilization rate.Such as:When CPU usage between 0 to 20% when, generation
Table CPU is in idle condition;When CPU usage is between 20% to 60%, represents CPU and be in moderate use state;When
When CPU usage is between 60% to 80%, represents CPU and be in busy state;When CPU usage is between 80% to 100%
Between when, represent CPU and be in serious high load condition.
Step S300, operating system adjust the running status of time-consuming operation according to CPU occupancy.
The concrete mode of running status of operating system adjustment time-consuming operation is, for example,:When operating system detects CPU's
During the occupied higher proportion of resource (such as CPU usage has been above 60%), it can forbid running the time-consuming operation on backstage.
Therefore, operating system adjusts the running status of time-consuming operation according to CPU occupancy, so as to be accounted in real time according to CPU
With situation, the running status of the time-consuming operation on backstage is adjusted flexibly, to control the higher limit of CPU usage, so as to keep away
Exempt from CPU usage it is too high and make foreground application occur interim card situation.
In summary, the above-mentioned method for scheduling task that present embodiment provides, can flexibly be adjusted according to CPU behaviour in service
The running status of the time-consuming operation on whole backstage, so as to avoid foreground application from the situation of interim card occur.
In one of the embodiments, Fig. 3 is refer to, above-mentioned steps S200 is:
Step S210, operating system gather CPU utilization rate every setting time section.
Operating system periodically gathers CPU utilization rate, can mitigate the operation burden of operating system.
Alternatively, operating system can be every the CPU of collection in 5 seconds utilization rate.
It is understood that the value size of setting time section can also be set according to actual conditions, such as:If it is determined that
CPU occupancy is relatively stable, and (frequency that i.e. CPU occupancy changes is relatively low, such as less than the first setpoint frequency
Value), then it can suitably increase the value of setting time section, equivalent to the number of the appropriate utilization rate for reducing operating system collection CPU,
It now both can further mitigate the operation burden of operating system, can ensure to remain able to the occupancy progress to CPU again
Accurate monitoring.If it is determined that CPU occupancy be not relatively very it is stable (frequency that i.e. CPU occupancy changes compared with
Height, such as less than the second setpoint frequency value), then it can reduce the value of setting time section, be adopted equivalent to appropriate increase operating system
Collect the number of CPU utilization rate, to ensure the accuracy to cpu monitor.Or if it is determined that foreground application belongs to concerned degree
Compare the application of high (such as the frequency that user uses is higher), or foreground application belongs to the application for being easier Caton phenomenon occur
When, it can also accordingly reduce the value of setting time section.Alternatively, above-mentioned setting time section can also be pushed away by Cloud Server
Send.
Specifically, above-mentioned steps S210 is herein below, refer to Fig. 4.
Step S211, operating system gather CPU utilization rate in bright screen every setting time section.
Wherein, bright screen refers to screen and is lit.If bright screen, representing foreground application may be in running order, now needs
Want the occupancy of monitoring CPU and the time-consuming operation to backstage is controlled, to ensure foreground application normal operation.
Further, operating system stops collection CPU utilization rate when ceasing and shielding.Wherein, breath screen refers to that screen is off.
If breath screen, represents that foreground application is out of service, now then without be monitored to CPU occupancy, so as to mitigate behaviour
Make the operation burden of system.
In one of the embodiments, above-mentioned steps S400 includes herein below, refer to Fig. 5.
Step S410, when operating system judges that CPU occupancy is more than the second occupation value, running background process is forbidden to hold
Row time-consuming operation.
When CPU occupancy is more than the second occupation value, if performing time-consuming operation on backstage, foreground may be caused
Using generation Caton phenomenon.Therefore, these time-consuming operations are forbidden, it is ensured that foreground application normal operation.Wherein, second take
Value is for example between 60% to 80%.Alternatively, the second occupation value can also be pushed by Cloud Server.
Further, step S400 also includes herein below, please continue to refer to Fig. 5.
Step S420, when operating system judges that CPU occupancy is less than three occupation value, it is allowed to which running background process is held
The row time-consuming operation.
When CPU occupancy is less than three occupation value, time-consuming operation is performed even in backstage, will not also cause foreground
Using the phenomenon that interim card occurs.Therefore, even if these time-consuming operations are being performed from the background in this case, before still can ensureing
Platform application normal operation.Wherein, the 3rd occupation value is for example between 0 to 20%.Alternatively, the 3rd occupation value can also be by cloud
Server is pushed.
Further, the above method also includes herein below before step S400, please continue to refer to Fig. 5.
Step S300, operating system obtain precedence information corresponding to time-consuming operation.
Precedence information, which can represent time-consuming operation, has the differentiation of priority.The determination method of priority is, for example,:Can
To set the priority of the short time-consuming operation of run time higher, and the priority of the time-consuming operation of long operational time is relatively low;Or
Person, the priority of more important time-consuming operation can also be set higher, the preferential of the relatively low time-consuming operation of significance level is set
Level is relatively low;Or many factors (such as run time and significance level) can also be integrated and come while consider each time-consuming operation
Priority, such as set the priority for the time-consuming operation that run time is shorter and significance level is higher higher.
Alternatively, the precedence information of time-consuming operation can voluntarily be set by each self-corresponding process, or should by other
For setting, at this moment, operating system directly obtains the precedence information of each time-consuming operation;Or can also be by operating system
The precedence information of each time-consuming operation is directly set.
Alternatively, can also be directly by the preferential of the process if the process for performing time-consuming operation has precedence information
Precedence information of the level information as time-consuming operation.
Based on above-mentioned steps S300 content, above-mentioned steps S400 also includes herein below, please continue to refer to Fig. 5.
Step S430, when operating system judges that CPU occupancy is more than the 3rd occupation value and is less than the second occupation value, root
Accordingly time-consuming operation is controlled to run according to the precedence information of time-consuming operation.
Operating system accordingly controls the embodiment example of time-consuming operation operation according to the precedence information of time-consuming operation
Such as it is:When CPU occupancy is more than the 3rd occupation value and is less than the second occupation value, if allowing for a small amount of take
Operation operation, then it can select the time-consuming operation operation that priority is higher.
Further, to ensure that CPU occupancy can not be more than the second occupation value after control time-consuming operation operation.It is false
If the second occupation value is 50%, and the current utilization rates of CPU are 30%, then can select the higher several time-consuming operations of priority
Operation, and ensure after controlling these time-consuming operations to run, CPU utilization rate is no more than 50%.
It should be noted that the schematic flow sheet of Fig. 1, Fig. 3 to the method that Fig. 5 is each embodiment of embodiment of the present invention.
It should be understood that although each step in Fig. 1, Fig. 3 to Fig. 5 flow chart is shown successively according to the instruction of arrow,
These steps are not that the inevitable order according to arrow instruction performs successively.Unless expressly state otherwise herein, these steps
The not strict order limitation of execution, it can be performed in the other order.Moreover, at least one in Fig. 1, Fig. 3 to Fig. 5
Part steps can include more sub-steps or multiple stages, and these sub-steps or stage are not necessarily in synchronization
Perform completion, but can perform different at the time of, its execution sequence is also not necessarily to be carried out successively, but can be with other
Either the sub-step of other steps or at least a portion in stage perform step in turn or alternately.
Another embodiment provides a kind of task scheduling apparatus, including herein below, refer to Fig. 6.
Running background process 100, for when needing to perform time-consuming operation, the time-consuming operation to be registered into operating system
In 200.The run time of the time-consuming operation exceedes the cpu resource taken when given threshold or operation and is more than the first occupation value.
Operating system 200, for the occupancy of monitoring CPU, and it is described time-consuming according to the adjustment of the occupancy of the CPU
The running status of operation.
In one of the embodiments, operating system 200 is used for the use that the CPU is gathered once every setting time section
Rate.
In one of the embodiments, operating system 200 is used for once described every the collection of setting time section in bright screen
CPU utilization rate.
In one of the embodiments, operating system 200 includes:
First module, when the occupancy for judging the CPU is more than the second occupation value, the running background is forbidden to enter
Journey 100 performs the time-consuming operation.
In one of the embodiments, operating system 200 also includes:
Second unit, when the occupancy for judging the CPU is less than three occupation value, it is allowed to which the running background enters
Journey 100 performs the time-consuming operation.
In one of the embodiments, task scheduling apparatus also includes:
Priority acquisition module, for obtaining precedence information corresponding to the time-consuming operation.
Also, operating system 200 also includes:
Third unit, the occupancy for judging the CPU are more than the 3rd occupation value and accounted for less than described second
During with value, the time-consuming operation is accordingly controlled to run according to the precedence information.
In above-mentioned task scheduling apparatus, when running background process 100 needs to carry out time-consuming operation, time-consuming operation is registered
Into operating system 200, the occupancy of the monitoring CPU of operating system 200, and time-consuming operation is adjusted according to CPU occupancy
Running status, so as to optimize CPU service condition, avoid foreground application from the situation of interim card occur.
The division of modules is only used for for example, in other embodiments, will can appoint in above-mentioned task scheduling apparatus
Business dispatching device is divided into different modules as required, to complete all or part of function of above-mentioned task scheduling apparatus.
It should be noted that a pair of the task scheduling apparatus that provides of above-mentioned embodiment and above-mentioned method for scheduling task 1
Should, just repeat no more here.
It is another embodiment further provides a kind of storage medium, be stored thereon with computer program, the computer program quilt
The method for scheduling task that above-mentioned embodiment provides is realized during computing device.Described storage medium can be magnetic disc, CD, only
Read storage memory (Read-Only Memory, ROM) etc..
The embodiment of the present invention additionally provides a kind of electronic equipment.As shown in fig. 7, for convenience of description, it illustrate only and this
The related part of inventive embodiments, particular technique details do not disclose, refer to present invention method part.The electronics is set
Standby can be to include mobile phone, tablet personal computer, PDA (Personal Digital Assistant, personal digital assistant), POS
Any mobile terminal device such as (Point of Sales, selling mobile terminal), vehicle-mounted computer, Wearable, is set with electronics
For for exemplified by mobile phone:
Fig. 7 is the block diagram of the part-structure of the mobile phone related to electronic equipment provided in an embodiment of the present invention.With reference to figure 7,
Mobile phone includes:Radio frequency (Radio Frequency, RF) circuit 710, memory 720, input block 730, display unit 740, biography
Sensor 750, voicefrequency circuit 760, Wireless Fidelity (wireless fidelity, WiFi) module 770, processor 780, Yi Ji electricity
The grade part of source 790., can be with it will be understood by those skilled in the art that the handset structure shown in Fig. 7 does not form the restriction to mobile phone
Including than illustrating more or less parts, either combining some parts or different parts arrangement.
Wherein, RF circuits 710 can be used for receive and send messages or communication process in, the reception and transmission of signal can be by base stations
After downlink information receives, handled to processor 780;Up data can also be sent to base station.Generally, RF circuits include but
Be not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier (Low Noise Amplifier,
LNA), duplexer etc..In addition, RF circuits 710 can also be communicated by radio communication with network and other equipment.Above-mentioned channel radio
Letter can use any communication standard or agreement, including but not limited to global system for mobile communications (Global System of
Mobile communication, GSM), general packet radio service (General Packet Radio Service,
GPRS), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code
Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE)), Email,
Short Message Service (Short Messaging Service, SMS) etc..
Memory 720 can be used for storage software program and module, and processor 780 is stored in memory 720 by operation
Software program and module, so as to perform the various function application of mobile phone and data processing.Memory 720 can mainly include
Program storage area and data storage area, wherein, program storage area can storage program area, the application journey needed at least one function
Sequence (such as the application program of sound-playing function, application program of image player function etc.) etc.;Data storage area can store root
Created data (such as voice data, address list etc.) etc. are used according to mobile phone.In addition, memory 720 can be included at a high speed
Random access memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or
Other volatile solid-state parts.
Input block 730 can be used for the numeral or character information for receiving input, and produces and set with the user of mobile phone 700
And the key signals input that function control is relevant.Specifically, input block 730 may include contact panel 731 and other inputs
Equipment 732.Contact panel 731, alternatively referred to as touch-screen, collect touch operation (such as user of the user on or near it
Use the operation of any suitable object such as finger, stylus or annex on contact panel 731 or near contact panel 731),
And corresponding attachment means are driven according to formula set in advance.In one embodiment, contact panel 731 may include to touch inspection
Survey two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation
The signal brought, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and will
It is converted into contact coordinate, then gives processor 780, and the order sent of reception processing device 780 and can be performed.In addition,
The polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be used to realize contact panel 731.Except touch surface
Plate 731, input block 730 can also include other input equipments 732.Specifically, other input equipments 732 can be included but not
The one or more being limited in physical keyboard, function key (such as volume control button, switch key etc.) etc..
Display unit 740 can be used for display by user input information or be supplied to user information and mobile phone it is various
Menu.Display unit 740 may include display panel 741.In one embodiment, liquid crystal display (Liquid can be used
Crystal Display, LCD), the form such as Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED)
To configure display panel 741.In one embodiment, contact panel 631 can cover display panel 741, when contact panel 731 is examined
After measuring the touch operation on or near it, processor 780 is sent to determine the type of touch event, is followed by subsequent processing device
780 provide corresponding visual output according to the type of touch event on display panel 741.Although in the figure 7, contact panel
731 and display panel 641 are the parts independent as two to realize the input of mobile phone and input function, but in some implementations
In example, contact panel 731 and display panel 741 can be integrated and realize input and the output function of mobile phone.
Mobile phone 700 may also include at least one sensor 750, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor may include ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 741, and proximity transducer can close display panel when mobile phone is moved in one's ear
741 and/or backlight.Motion sensor may include acceleration transducer, can detect by acceleration transducer and adds in all directions
The size of speed, size and the direction of gravity are can detect that when static, application (such as the horizontal/vertical screen available for identification mobile phone posture
Switching), Vibration identification correlation function (such as pedometer, tap) etc.;In addition, mobile phone can also configure gyroscope, barometer, humidity
Other sensors such as meter, thermometer, infrared ray sensor etc..
Voicefrequency circuit 760, loudspeaker 761 and microphone 762 can provide the COBBAIF between user and mobile phone.Audio-frequency electric
Electric signal after the voice data received conversion can be transferred to loudspeaker 761, sound is converted to by loudspeaker 761 by road 760
Signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 762, is turned after being received by voicefrequency circuit 760
Voice data is changed to, then after voice data output processor 780 is handled, another mobile phone can be sent to through RF circuits 710, or
Person exports voice data to memory 720 so as to subsequent treatment.
WiFi belongs to short range wireless transmission technology, and mobile phone can help user's transceiver electronicses postal by WiFi module 770
Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 7 is shown
WiFi module 770, but it is understood that, it is simultaneously not belonging to must be configured into for mobile phone 700, can omit as needed.
Processor 780 is the control centre of mobile phone, using various interfaces and the various pieces of connection whole mobile phone, is led to
Cross operation or perform the software program and/or module being stored in memory 720, and call and be stored in memory 720
Data, the various functions and processing data of mobile phone are performed, so as to carry out integral monitoring to mobile phone.In one embodiment, handle
Device 780 may include one or more processing units.In one embodiment, processor 780 can integrate application processor and modulation
Demodulation processor, wherein, application processor mainly handles operating system, user interface and application program etc.;Modulation /demodulation is handled
Device mainly handles radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 780.
Mobile phone 700 also includes the power supply 790 (such as battery) to all parts power supply, it is preferred that power supply can pass through electricity
Management system and processor 780 are logically contiguous, so as to realize management charging, electric discharge and power consumption by power-supply management system
The functions such as management.
In one embodiment, mobile phone 700 can also include camera, bluetooth module etc..
In embodiments of the present invention, the processor 780 included by the electronic equipment performs the meter being stored on memory 720
The method for scheduling task that above-mentioned embodiment provides is realized during calculation machine program, is just repeated no more here.
Each technical characteristic of embodiment described above can be combined arbitrarily, to make description succinct, not to above-mentioned reality
Apply all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, the scope that this specification is recorded all is considered to be.
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously
Can not therefore it be construed as limiting the scope of the patent.It should be pointed out that come for one of ordinary skill in the art
Say, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (10)
1. a kind of method for scheduling task, including:
When running background process needs to perform time-consuming operation, the time-consuming operation is registered in operating system;The time-consuming behaviour
The run time of work exceedes the cpu resource taken when given threshold or operation and is more than the first occupation value;
The occupancy of the operating system monitoring CPU;
The operating system adjusts the running status of the time-consuming operation according to the occupancy of the CPU.
2. according to the method for claim 1, it is characterised in that the step of the occupancy of the operating system monitoring CPU
Including:
The operating system gathers once the utilization rate of the CPU every setting time section.
3. according to the method for claim 2, it is characterised in that the operating system gathers once institute every setting time section
The step of utilization rate for stating CPU, includes:
The operating system gathers once the utilization rate of the CPU in bright screen every setting time section.
4. according to the method described in any one of claims 1 to 3 claim, it is characterised in that the operating system according to
The step of running status of the occupancy adjustment time-consuming operation of the CPU, includes:
When the operating system judges that the occupancy of the CPU is more than the second occupation value, the running background process is forbidden to hold
The row time-consuming operation.
5. according to the method for claim 4, it is characterised in that the operating system is adjusted according to the occupancy of the CPU
The step of running status of the whole time-consuming operation, also includes:
When the operating system judges that the occupancy of the CPU is less than three occupation value, it is allowed to which the running background process is held
The row time-consuming operation.
6. according to the method for claim 5, it is characterised in that the occupancy in the operating system according to the CPU
Before the step of adjusting the running status of the time-consuming operation, methods described also includes:
The operating system obtains precedence information corresponding to the time-consuming operation;
Also, the operating system adjusts the step of running status of the time-consuming operation according to the occupancy of the CPU also
Including:
The operating system judges that the occupancy of the CPU is more than the 3rd occupation value and is less than second occupation value
When, accordingly control the time-consuming operation to run according to the precedence information.
A kind of 7. task scheduling apparatus, it is characterised in that including:
Running background process, for when needing to perform time-consuming operation, the time-consuming operation to be registered in operating system;It is described
The run time of time-consuming operation exceedes the cpu resource taken when given threshold or operation and is more than the first occupation value;
Operating system, the time-consuming operation is adjusted for the occupancy of monitoring CPU, and according to the occupancy of the CPU
Running status.
8. task scheduling apparatus according to claim 7, it is characterised in that the operating system is used for every setting time
Section gathers once the utilization rate of the CPU.
9. a kind of storage medium, is stored thereon with computer program, it is characterised in that the computer program is executed by processor
Method described in any one of Shi Shixian claims 1 to 6 claim.
10. a kind of electronic equipment, including memory, processor and it is stored on the memory and can transports on the processor
Capable computer program, it is characterised in that realize in claim 1 to 6 and appoint during computer program described in the computing device
Method described in one claim.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710612970.0A CN107423123A (en) | 2017-07-25 | 2017-07-25 | Method for scheduling task, device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710612970.0A CN107423123A (en) | 2017-07-25 | 2017-07-25 | Method for scheduling task, device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107423123A true CN107423123A (en) | 2017-12-01 |
Family
ID=60430519
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710612970.0A Pending CN107423123A (en) | 2017-07-25 | 2017-07-25 | Method for scheduling task, device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107423123A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109343902A (en) * | 2018-09-26 | 2019-02-15 | Oppo广东移动通信有限公司 | Operation method, device, terminal and the storage medium of audio processing components |
CN113282390A (en) * | 2021-05-20 | 2021-08-20 | 北京达佳互联信息技术有限公司 | Task scheduling method and device, electronic equipment and readable storage medium |
CN111562973B (en) * | 2020-04-24 | 2024-02-06 | 蘑菇车联信息科技有限公司 | Map data task execution method and electronic equipment |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102968352A (en) * | 2012-12-14 | 2013-03-13 | 杨晓松 | System and method for process monitoring and multi-stage recovery |
CN103412793A (en) * | 2013-07-29 | 2013-11-27 | 北京奇虎科技有限公司 | Method, device and system for optimizing system resources |
CN104199669A (en) * | 2014-09-12 | 2014-12-10 | 北京奇虎科技有限公司 | Method and device for managing application program processes |
US8954979B1 (en) * | 2011-08-15 | 2015-02-10 | Netapp, Inc. | Method and system for managing resources in a network |
CN104375898A (en) * | 2014-11-20 | 2015-02-25 | 无锡悟莘科技有限公司 | Mobile terminal CPU occupancy rate optimization method |
CN104991816A (en) * | 2015-06-25 | 2015-10-21 | 浪潮(北京)电子信息产业有限公司 | Process scheduling method and apparatus |
CN105159776A (en) * | 2015-08-03 | 2015-12-16 | 中科创达软件股份有限公司 | Process handling method and apparatus |
CN106020984A (en) * | 2016-05-20 | 2016-10-12 | 青岛海信移动通信技术股份有限公司 | Creation method and apparatus of processes in electronic device |
CN106155802A (en) * | 2015-03-30 | 2016-11-23 | 阿里巴巴集团控股有限公司 | Method for scheduling task, device and control node |
CN106161145A (en) * | 2016-07-25 | 2016-11-23 | 天脉聚源(北京)传媒科技有限公司 | A kind of monitoring method and system of server system operation status information |
CN106598740A (en) * | 2016-12-15 | 2017-04-26 | 郑州云海信息技术有限公司 | System and method for limiting CPU (Central Processing Unit) occupancy rate of multi-thread program |
CN106708625A (en) * | 2016-12-08 | 2017-05-24 | 中国科学院软件研究所 | Minimum-cost maximum-flow based large-scale resource scheduling system and minimum-cost maximum-flow based large-scale resource scheduling method |
CN106776036A (en) * | 2016-12-30 | 2017-05-31 | 广东欧珀移动通信有限公司 | A kind of resource allocation methods and device |
-
2017
- 2017-07-25 CN CN201710612970.0A patent/CN107423123A/en active Pending
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8954979B1 (en) * | 2011-08-15 | 2015-02-10 | Netapp, Inc. | Method and system for managing resources in a network |
CN102968352A (en) * | 2012-12-14 | 2013-03-13 | 杨晓松 | System and method for process monitoring and multi-stage recovery |
CN103412793A (en) * | 2013-07-29 | 2013-11-27 | 北京奇虎科技有限公司 | Method, device and system for optimizing system resources |
CN104199669A (en) * | 2014-09-12 | 2014-12-10 | 北京奇虎科技有限公司 | Method and device for managing application program processes |
CN104375898A (en) * | 2014-11-20 | 2015-02-25 | 无锡悟莘科技有限公司 | Mobile terminal CPU occupancy rate optimization method |
CN106155802A (en) * | 2015-03-30 | 2016-11-23 | 阿里巴巴集团控股有限公司 | Method for scheduling task, device and control node |
CN104991816A (en) * | 2015-06-25 | 2015-10-21 | 浪潮(北京)电子信息产业有限公司 | Process scheduling method and apparatus |
CN105159776A (en) * | 2015-08-03 | 2015-12-16 | 中科创达软件股份有限公司 | Process handling method and apparatus |
CN106020984A (en) * | 2016-05-20 | 2016-10-12 | 青岛海信移动通信技术股份有限公司 | Creation method and apparatus of processes in electronic device |
CN106161145A (en) * | 2016-07-25 | 2016-11-23 | 天脉聚源(北京)传媒科技有限公司 | A kind of monitoring method and system of server system operation status information |
CN106708625A (en) * | 2016-12-08 | 2017-05-24 | 中国科学院软件研究所 | Minimum-cost maximum-flow based large-scale resource scheduling system and minimum-cost maximum-flow based large-scale resource scheduling method |
CN106598740A (en) * | 2016-12-15 | 2017-04-26 | 郑州云海信息技术有限公司 | System and method for limiting CPU (Central Processing Unit) occupancy rate of multi-thread program |
CN106776036A (en) * | 2016-12-30 | 2017-05-31 | 广东欧珀移动通信有限公司 | A kind of resource allocation methods and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109343902A (en) * | 2018-09-26 | 2019-02-15 | Oppo广东移动通信有限公司 | Operation method, device, terminal and the storage medium of audio processing components |
CN109343902B (en) * | 2018-09-26 | 2021-08-03 | Oppo广东移动通信有限公司 | Audio processing assembly operation method and device, terminal and storage medium |
CN111562973B (en) * | 2020-04-24 | 2024-02-06 | 蘑菇车联信息科技有限公司 | Map data task execution method and electronic equipment |
CN113282390A (en) * | 2021-05-20 | 2021-08-20 | 北京达佳互联信息技术有限公司 | Task scheduling method and device, electronic equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107800651B (en) | Application program closing method and device, storage medium and electronic equipment | |
CN107391259A (en) | Method for processing resource and device, computer-readable recording medium, mobile terminal | |
CN107256129A (en) | Switch method, device and its relevant device of application under span mode | |
WO2014086218A1 (en) | Interface adjustment method, device and terminal | |
US10663521B2 (en) | Method and device for ascertaining required charging time | |
CN107391198B (en) | Method for scheduling task and device, computer readable storage medium, mobile terminal | |
CN106991034A (en) | A kind of method and apparatus and mobile terminal for monitoring interim card | |
CN107368400A (en) | CPU monitoring methods, device, computer-readable recording medium and mobile terminal | |
CN107766139A (en) | Application management method and device | |
CN110597793A (en) | Data management method and device, electronic equipment and computer readable storage medium | |
CN103150248A (en) | Method and device for measuring and calculating startup time consumption | |
CN109523977A (en) | Backlight adjusting method, device, mobile terminal and storage medium | |
CN107103074A (en) | The processing method and mobile terminal of a kind of sharing information | |
CN107832375A (en) | Control method, terminal and the server that picture is shown | |
CN107423123A (en) | Method for scheduling task, device, storage medium and electronic equipment | |
CN106527666A (en) | Control method of central processing unit and terminal equipment | |
CN109107164A (en) | The method and apparatus that mobile terminal and its game performance are adjusted | |
CN107450984A (en) | Method for scheduling task, device, storage medium and electronic equipment | |
CN107977261A (en) | Method, equipment, mobile terminal and the computer-readable storage medium of limiting process | |
CN109688611B (en) | Frequency band parameter configuration method, device, terminal and storage medium | |
CN107368998A (en) | Agenda managing method and Related product | |
CN107066090A (en) | The method and mobile terminal of a kind of control fingerprint recognition module | |
CN107330867A (en) | Image combining method, device, computer-readable recording medium and computer equipment | |
CN107632985A (en) | Webpage preloads method and device | |
CN107341094A (en) | The time-consuming measuring method of startup item and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171201 |