CN107450984A - Method for scheduling task, device, storage medium and electronic equipment - Google Patents

Method for scheduling task, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN107450984A
CN107450984A CN201710613807.6A CN201710613807A CN107450984A CN 107450984 A CN107450984 A CN 107450984A CN 201710613807 A CN201710613807 A CN 201710613807A CN 107450984 A CN107450984 A CN 107450984A
Authority
CN
China
Prior art keywords
cpu
occupancy
time
background process
running background
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
Application number
CN201710613807.6A
Other languages
Chinese (zh)
Inventor
王彬
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710613807.6A priority Critical patent/CN107450984A/en
Publication of CN107450984A publication Critical patent/CN107450984A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5022Workload threshold

Abstract

The present invention relates to a kind of method for scheduling task, device, storage medium and electronic equipment, method includes:Operating system statistics needs to perform the running background process of time-consuming operation;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 operating system monitoring CPU, and the occupancy of the CPU is sent to the running background process;The running background process adjusts the running status of the time-consuming operation according to the occupancy of the CPU.In above-mentioned method for scheduling task, device, storage medium and electronic equipment, running background process adjusts the running status of time-consuming operation according to CPU occupancy, so as to optimize CPU service condition, avoids foreground application from the situation of interim card occur.

Description

Method for scheduling task, device, storage medium and electronic equipment
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:
Operating system statistics needs to perform the running background process of time-consuming operation;The run time of the time-consuming operation exceedes The cpu resource taken when given threshold or operation is more than the first occupation value;
The occupancy of operating system monitoring CPU, and the occupancy of the CPU is sent to the running background Journey;
The running background process 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 occupancy by the CPU is sent to the step of the running background process Suddenly it is:
After judging that the occupancy of the CPU changes, newest CPU occupancy is sent to after described Platform runs process.
In one of the embodiments, the running background process is described time-consuming according to the adjustment of the occupancy of the CPU The step of running status of operation, includes:
When the running background process judges that the occupancy of the CPU is more than the second occupation value, pause performs the consumption When operate.
In one of the embodiments, the running background process adjusts the time-consuming operation according to the occupancy The step of running status, also includes:
When the running background process judges that the occupancy of the CPU is less than three occupation value, the time-consuming behaviour is performed Make.
In one of the embodiments, the running background process adjusts the time-consuming operation according to the occupancy The step of running status, also includes:
The running background process obtains the precedence information of time-consuming operation, also, in the occupancy for judging the CPU When more than the 3rd occupation value and being less than second occupation value, the time-consuming behaviour is accordingly controlled according to the precedence information Run.
A kind of task scheduling apparatus, including:
Operating system, for counting the running background process for needing to perform time-consuming operation, and for the occupancy shape of monitoring CPU Condition, and the occupancy of the CPU is sent to running background process;The run time of the time-consuming operation exceedes given threshold Or the cpu resource taken during operation is more than the first occupation value;
Running background process, for adjusting the running status of the time-consuming operation according to the occupancy of the CPU.
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, the occupancy of operating system monitoring CPU, And CPU occupancy is sent to running background process, running background process 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.
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 the block diagram for the task scheduling apparatus that another embodiment provides;
Fig. 6 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, operating system statistics need to perform the running background process of time-consuming operation.Wherein, the fortune of time-consuming operation The row time exceedes the cpu resource taken when given threshold or operation and is 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 time-consuming operation, easily led because seizing cpu resource Cause foreground application (such as wechat, king's honor) that Caton phenomenon occurs because resource is preempted, therefore, operated in present embodiment After running background process statistics of the system to needing to perform time-consuming operation, it can coordinate with these running background processes to optimize CPU occupancy.
Step S200, the occupancy of operating system monitoring CPU, and CPU occupancy is sent to running background Journey.
Wherein, CPU occupancy is, for example, CPU utilization rate.Such as:When CPU utilization rate between 0 to 20% when, Represent CPU and be in idle condition;When CPU utilization rate is between 20% to 60%, represents CPU and be in moderate and use shape State;When CPU utilization rate is between 60% to 80%, represents CPU and be in busy state;When CPU utilization rate between When between 80% to 100%, represent CPU and be in serious high load condition.
It is understood that the quantity for needing to perform the running background process of time-consuming operation can be multiple, according to reality Situation, operating system can send CPU occupancy to the running background process of whole, can also send to part backstage Operation process.Such as:If CPU surplus resources ratio is relatively low, at this moment CPU occupancy can be sent to whole Platform runs process;On the contrary, CPU occupancy can be then sent to the running background process of part.
Step S300, running background process adjust the running status of time-consuming operation according to CPU occupancy.
The concrete mode of running status of running background process adjustment time-consuming operation is, for example,:When CPU resource is occupied During higher proportion (such as CPU utilization rate has been above 60%), then it can forbid running time-consuming operation.Therefore, backstage is transported Traveling journey can be according to the real-time occupancy situations of CPU, the running status of time-consuming operation is adjusted flexibly, to control CPU use The higher limit of rate, make the situation of foreground application generation interim card so as to avoid CPU utilization rate too high.
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, it is the step of the occupancy of operating system monitoring CPU in above-mentioned steps S200:Behaviour Make the utilization rate that system gathers a CPU every setting time section.In other words, operating system periodically gathers CPU utilization rate, So as to 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 higher 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 when easily there is the application of Caton phenomenon, The value of setting time section can also accordingly be reduced.Alternatively, above-mentioned setting time section can also be pushed by Cloud Server.
Specifically, aforesaid operations system is every the step of CPU of setting time section collection utilization rate:Operating system CPU utilization rate is gathered every setting time section in bright screen.
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, Fig. 3 is refer to, above-mentioned steps S200 is:
Step S210, the occupancy of operating system monitoring CPU, and judge CPU occupancy change after, will most New CPU occupancy is sent to running background process.
In other words, operating system is only after CPU occupancy changes, just by CPU occupancy send to Running background process, so as to mitigate the operation burden of operating system.
Specifically, operating system can obtain CPU occupancy level information in advance.Occupancy level information the accounting for CPU It is multiple grades with partition of the level, such as is divided into 4 grades altogether, the occupancy degree that higher grade represents CPU is higher, specifically For:When CPU utilization rate between 0 to 20% when, occupancy level is grade 1;When CPU usage is between 20% to 60% When, occupancy level is grade 2;When CPU usage is between 60% to 80%, occupancy level is grade 3;When CPU is used When rate is between 80% to 100%, occupancy level is class 4.
Further, in above-mentioned steps S210, operating system can be by the CPU gathered in real time utilization rate and above-mentioned occupancy Class information is compared, and so as to calculate the occupancy level residing for current CPU, and current occupancy level is counted with last The occupancy level calculated is compared, to judge whether occupancy level changes.If operating system judges CPU occupancy level hair Given birth to change (such as:Grade 2 is changed into from grade 1), then CPU occupancy or occupancy level are sent to running background Journey.
In one of the embodiments, above-mentioned steps S300 includes herein below, refer to Fig. 4.
Step S310, when running background process judges that CPU occupancy is more than the second occupation value, pause performs time-consuming behaviour Make.
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 S300 also includes herein below, please continue to refer to Fig. 4.
Step S320, when running background process judges that CPU occupancy is less than three occupation value, start to perform the consumption When operate.
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.
Alternatively, when running background process judges that CPU occupancy is less than three occupation value, other can also be increased newly Business, or by greater number of thread come perform the task of high capacity (such as:If originally perform one using 4 threads The task of individual high capacity, it is replaced by now using 8 threads to perform the high capacity task, so as to improve the high capacity task Perform speed).
Further, above-mentioned steps S300 also includes herein below, please continue to refer to Fig. 4.
Step S330, running background process obtain the precedence information of time-consuming operation, also, are judging CPU occupancy shape When condition is more than the 3rd occupation value and is less than the second occupation value, accordingly time-consuming operation is controlled to run according to precedence information.
Above-mentioned precedence information, which represents 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, above-mentioned precedence information can voluntarily be set by running background process, or by operating system or other Using to set, and the precedence information set is sent to running background process.
Alternatively, can also be directly by after this if the running background process for performing time-consuming operation has precedence information Precedence information of the precedence information of platform operation process as time-consuming operation.
Specifically, the step of accordingly controlling the time-consuming operation to run according to the precedence information be:According to priority Information accordingly controls the number of threads that time-consuming operation operation, out of service or reduction use.Such as:When CPU occupancy is big In the 3rd occupation value and when being less than the second occupation value, if running background process judged according to CPU occupancy it is current most The time-consuming operation operation on 2 backstages can be allowed, then running background process takes according to corresponding to precedence information judges itself Whether the priority of operation is located at foremost 2, if it is, operation time-consuming operation, otherwise time-consuming operation out of service;Separately Outside, if current cpu status can only allow the time-consuming operation operation of a less number of threads of use, running background enters Journey then reduces the number of threads of time-consuming operation use if it is determined that corresponding to itself during the priority level highest of time-consuming operation, And the time-consuming operation is controlled to run.
It should be noted that Fig. 1, Fig. 3, Fig. 4 are the schematic flow sheet of the method for each embodiment of embodiment of the present invention.Should It should be appreciated that although each step in Fig. 1, Fig. 3, Fig. 4 flow chart is shown successively according to the instruction of arrow, these Step is not that the inevitable order according to arrow instruction performs successively.Unless expressly stating otherwise herein, these steps are held The not strict order limitation of row, it can be performed in the other order.Moreover, at least a portion in Fig. 1, Fig. 3, Fig. 4 Step can include more sub-steps or multiple stages, and these sub-steps or stage are performed in synchronization Complete, 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 steps Either the sub-step of other steps or at least a portion in stage perform in turn or alternately.
Another embodiment provides a kind of task scheduling apparatus, including herein below, refer to Fig. 5.
Operating system 100, for counting the running background process 200 for needing to perform time-consuming operation, and for monitoring CPU Occupancy, and the occupancy of the CPU is sent to running background process 200.The run time of the time-consuming operation surpasses Cross the cpu resource taken when given threshold or operation and be more than the first occupation value.
Running background process 200, for adjusting the running status of the time-consuming operation according to the occupancy of the CPU.
In one of the embodiments, operating system 100 is used for the use that the CPU is gathered once every setting time section Rate.
In one of the embodiments, operating system 100 is used for once described every the collection of setting time section in bright screen CPU utilization rate.
In one of the embodiments, will after operating system 100 is for judging that the occupancy of the CPU changes Newest CPU occupancy is sent to the running background process.
In one of the embodiments, running background process 200 includes:
First module, when the occupancy for judging the CPU is more than the second occupation value, pause performs the time-consuming behaviour Make.
In one of the embodiments, running background process 200 includes:
Second unit, when the occupancy for judging the CPU is less than three occupation value, perform the time-consuming operation.
In one of the embodiments, running background process 200 includes:
Third unit, for obtaining the precedence information of time-consuming operation, also, it is big in the occupancy for judging the CPU In the 3rd occupation value and when being less than second occupation value, the time-consuming operation is accordingly controlled according to the precedence information Operation.
In above-mentioned task scheduling apparatus, running background process 200 adjusts the operation of time-consuming operation according to CPU occupancy State, so as to optimize CPU service condition, foreground application is avoided 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. 6, 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. 6 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 6, Mobile phone includes:Radio frequency (Radio Frequency, RF) circuit 610, memory 620, input block 630, display unit 640, biography Sensor 650, voicefrequency circuit 660, Wireless Fidelity (wireless fidelity, WiFi) module 660, processor 680, Yi Ji electricity The grade part of source 690., can be with it will be understood by those skilled in the art that the handset structure shown in Fig. 6 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 610 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 680;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 610 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 620 can be used for storage software program and module, and processor 680 is stored in memory 620 by operation Software program and module, so as to perform the various function application of mobile phone and data processing.Memory 620 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 620 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 630 can be used for the numeral or character information for receiving input, and produces and set with the user of mobile phone 600 And the key signals input that function control is relevant.Specifically, input block 630 may include contact panel 631 and other inputs Equipment 632.Contact panel 631, 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 631 or near contact panel 631), And corresponding attachment means are driven according to formula set in advance.In one embodiment, contact panel 631 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 680, and the order sent of reception processing device 680 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 631.Except touch surface Plate 631, input block 630 can also include other input equipments 632.Specifically, other input equipments 632 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 640 can be used for display by user input information or be supplied to user information and mobile phone it is various Menu.Display unit 640 may include display panel 641.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 641.In one embodiment, contact panel 631 can cover display panel 641, when contact panel 631 is examined After measuring the touch operation on or near it, processor 680 is sent to determine the type of touch event, is followed by subsequent processing device 680 provide corresponding visual output according to the type of touch event on display panel 641.Although in figure 6, contact panel 631 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 631 and display panel 641 can be integrated and realize input and the output function of mobile phone.
Mobile phone 600 may also include at least one sensor 650, 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 641, and proximity transducer can close display panel when mobile phone is moved in one's ear 641 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 660, loudspeaker 661 and microphone 662 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 661, sound is converted to by loudspeaker 661 by road 660 Signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 662, is turned after being received by voicefrequency circuit 660 Voice data is changed to, then after voice data output processor 680 is handled, another mobile phone can be sent to through RF circuits 610, or Person exports voice data to memory 620 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 660 Part, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 6 is shown WiFi module 660, but it is understood that, it is simultaneously not belonging to must be configured into for mobile phone 600, can omit as needed.
Processor 680 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 620, and call and be stored in memory 620 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 680 may include one or more processing units.In one embodiment, processor 680 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 680.
Mobile phone 600 also includes the power supply 690 (such as battery) to all parts power supply, it is preferred that power supply can pass through electricity Management system and processor 680 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 600 can also include camera, bluetooth module etc..
In embodiments of the present invention, the processor 680 included by the electronic equipment performs the meter being stored on memory 620 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:
Operating system statistics needs to perform the running background process of time-consuming operation;The run time of the time-consuming operation exceedes setting The cpu resource taken when threshold value or operation is more than the first occupation value;
The occupancy of operating system monitoring CPU, and the occupancy of the CPU is sent to the running background process;
The running background process 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 accounting for the CPU Sent with situation to the step of running background process and be:
After judging that the occupancy of the CPU changes, newest CPU occupancy is sent to the backstage and transported Traveling journey.
5. according to the method described in any one of claims 1 to 3 claim, it is characterised in that the running background process The step of adjusting the running status of the time-consuming operation according to the occupancy of the CPU includes:
When the running background process judges that the occupancy of the CPU is more than the second occupation value, pause performs the time-consuming behaviour Make.
6. according to the method for claim 5, it is characterised in that the running background process adjusts according to the occupancy The step of running status of the time-consuming operation, also includes:
When the running background process judges that the occupancy of the CPU is less than three occupation value, the time-consuming operation is performed.
7. according to the method for claim 6, it is characterised in that the running background process adjusts according to the occupancy The step of running status of the time-consuming operation, also includes:
The running background process obtains the precedence information of time-consuming operation, also, is more than in the occupancy for judging the CPU 3rd occupation value and when being less than second occupation value, accordingly controls the time-consuming operation to transport according to the precedence information OK.
A kind of 8. task scheduling apparatus, it is characterised in that including:
Operating system, for counting the running background process for needing to perform time-consuming operation, and it is used for the occupancy of monitoring CPU, And the occupancy of the CPU is sent to running background process;The run time of the time-consuming operation exceed given threshold or The cpu resource taken during operation is more than the first occupation value;
Running background process, for adjusting the running status of the time-consuming operation according to the occupancy 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 7 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 7 and appoint during computer program described in the computing device Method described in one claim.
CN201710613807.6A 2017-07-25 2017-07-25 Method for scheduling task, device, storage medium and electronic equipment Pending CN107450984A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710613807.6A CN107450984A (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
CN201710613807.6A CN107450984A (en) 2017-07-25 2017-07-25 Method for scheduling task, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN107450984A true CN107450984A (en) 2017-12-08

Family

ID=60488227

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710613807.6A Pending CN107450984A (en) 2017-07-25 2017-07-25 Method for scheduling task, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107450984A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002377A (en) * 2018-07-26 2018-12-14 郑州云海信息技术有限公司 A kind of processor detection method, processor detection device and computer equipment
CN109324878A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of control method and relevant device of process CPU usage
CN110286961A (en) * 2019-06-27 2019-09-27 深圳市网心科技有限公司 Process based on physical host processor hangs up method and relevant device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150143381A1 (en) * 2013-11-20 2015-05-21 International Business Machines Corporation Computing session workload scheduling and management of parent-child tasks
CN106055408A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Application control method and mobile terminal
CN106155790A (en) * 2016-06-30 2016-11-23 宇龙计算机通信科技(深圳)有限公司 The management method of application program, managing device and terminal
CN106547640A (en) * 2016-11-23 2017-03-29 深圳市金立通信设备有限公司 A kind of method and terminal of backstage cleaning
CN106792165A (en) * 2016-12-02 2017-05-31 武汉斗鱼网络科技有限公司 A kind of resource dynamic regulation method and device
CN106776036A (en) * 2016-12-30 2017-05-31 广东欧珀移动通信有限公司 A kind of resource allocation methods and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150143381A1 (en) * 2013-11-20 2015-05-21 International Business Machines Corporation Computing session workload scheduling and management of parent-child tasks
CN106055408A (en) * 2016-05-31 2016-10-26 广东欧珀移动通信有限公司 Application control method and mobile terminal
CN106155790A (en) * 2016-06-30 2016-11-23 宇龙计算机通信科技(深圳)有限公司 The management method of application program, managing device and terminal
CN106547640A (en) * 2016-11-23 2017-03-29 深圳市金立通信设备有限公司 A kind of method and terminal of backstage cleaning
CN106792165A (en) * 2016-12-02 2017-05-31 武汉斗鱼网络科技有限公司 A kind of resource dynamic regulation method and device
CN106776036A (en) * 2016-12-30 2017-05-31 广东欧珀移动通信有限公司 A kind of resource allocation methods and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002377A (en) * 2018-07-26 2018-12-14 郑州云海信息技术有限公司 A kind of processor detection method, processor detection device and computer equipment
CN109324878A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of control method and relevant device of process CPU usage
CN110286961A (en) * 2019-06-27 2019-09-27 深圳市网心科技有限公司 Process based on physical host processor hangs up method and relevant device

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
CN108268366B (en) Test case execution method and device
JP6487044B2 (en) Power management method and power management apparatus for user equipment
CN105224556B (en) Waterfall stream interface display methods and device
CN107391198B (en) Method for scheduling task and device, computer readable storage medium, mobile terminal
US10663521B2 (en) Method and device for ascertaining required charging time
CN104834529A (en) Method and device for optimizing performance of application
WO2014086218A1 (en) Interface adjustment method, device and terminal
US20170109756A1 (en) User Unsubscription Prediction Method and Apparatus
CN107368400A (en) CPU monitoring methods, device, computer-readable recording medium and mobile terminal
CN106294168B (en) A kind of method and system carrying out Application testing
CN106453840B (en) The method for adjusting performance and mobile terminal of mobile terminal
CN103150248A (en) Method and device for measuring and calculating startup time consumption
CN108492837B (en) Method, device and storage medium for detecting audio burst white noise
CN110597793A (en) Data management method and device, electronic equipment and computer readable storage medium
CN107450984A (en) Method for scheduling task, device, storage medium and electronic equipment
CN108334345A (en) Applied program processing method, device, readable storage medium storing program for executing and mobile terminal
CN106527666A (en) Control method of central processing unit and terminal equipment
CN107103074A (en) The processing method and mobile terminal of a kind of sharing information
CN109107164A (en) The method and apparatus that mobile terminal and its game performance are adjusted
CN107423123A (en) Method for scheduling task, device, storage medium and electronic equipment
CN109164965A (en) Mobile terminal and its method, apparatus and readable storage medium storing program for executing for reducing screen interface
CN107766139A (en) Application management method and device
CN109688611B (en) Frequency band parameter configuration method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20171208

RJ01 Rejection of invention patent application after publication