CN102547178A - Dynamic adjusting method of kernel module driven by application - Google Patents

Dynamic adjusting method of kernel module driven by application Download PDF

Info

Publication number
CN102547178A
CN102547178A CN2011103736367A CN201110373636A CN102547178A CN 102547178 A CN102547178 A CN 102547178A CN 2011103736367 A CN2011103736367 A CN 2011103736367A CN 201110373636 A CN201110373636 A CN 201110373636A CN 102547178 A CN102547178 A CN 102547178A
Authority
CN
China
Prior art keywords
application
kernel
system service
adjusting method
priority
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
CN2011103736367A
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.)
Institute of Acoustics CAS
Original Assignee
Institute of Acoustics CAS
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 Institute of Acoustics CAS filed Critical Institute of Acoustics CAS
Priority to CN2011103736367A priority Critical patent/CN102547178A/en
Publication of CN102547178A publication Critical patent/CN102547178A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a dynamic adjusting method of a kernel module driven by application. The method adjusts loaded kernel drive and system service into a working mode and a free mode or uninstalls the loaded kernel drive and the system service according to operation states. Priority of hardware interruption of various hardware devices of a television terminal is determined according to application priority, and interruption with high priority is processed preferentially.

Description

A kind of dynamic adjusting method of the kernel module by application drives
Technical field
The present invention relates to the dynamic development adjustment of television terminal operating system nucleus module, particularly a kind of dynamic adjusting method of the kernel module by application drives.
Background technology
In television terminal operating system, many application operation simultaneously are a trend at present.When using operation, relate to the operation of its relevant kernel driving and system service, kernel drives and the operation of system service all can consume certain resource.Move compared with single the application, the resource that many application operation simultaneously consumes is much higher.Therefore, reduce the resource consumption of kernel as far as possible, can support the operations simultaneously of using more better.In addition, from the consideration that reduces resource consumption, general kernel drives and system service can just not load when system start-up, but loads as required.And in a single day load, just can initiatively not unload.After the state of related application changes,, be very beneficial to reducing the kernel resource consumption if can adjust the mode of operation of kernel driving and system service even unload them.
In television terminal operating system, have many equipment and work simultaneously.During each equipment work, all can trigger interrupt event.Within a certain period of time, the interrupt event number of each equipment can be seldom, also a lot (such as the network interface card interrupt event of transfer of data).For each interrupt event, linux kernel all needs certain processing time; For a large amount of interrupt events, the required processing time of linux kernel just can not ignore, and this result who directly causes is the time-delay of application responds, and this can bring tangible influence to user experience.For this reason,, reduce the processing priority of other interrupt events, just can improve the response time-delay of application greatly, thereby guarantee the user experience of high-priority applications if can when high-priority applications is moved, improve and the processing priority that should use relevant interrupt event.
Summary of the invention
The objective of the invention is to; For addressing the above problem; The present invention proposes a kind of dynamic adjusting method of the kernel module by application drives; According to the running status of application, dynamically kernel driving that loads and system service are adjusted into mode of operation, idle pulley perhaps with kernel driving that loads and system service unloading.In this method, when said application was in the front stage operation state, the kernel of loading drove and system service is in mode of operation; When said application is switched to background operation state or operation suspension; Whether the kernel of judging described loading drives related by other application institutes with system service; And the kernel of judging described loading drives and whether system service supports idle pulley; If driving of the kernel of described loading and system service be not by other application managements and support idle pulley, then said kernel driving and system service are adjusted into idle pulley; After said application is out of service, judge that described kernel driving and system service whether by other associations, if not, then unload described kernel and drive and system service; When said application switches to the front stage operation state by background operation state or halted state, judge whether the kernel driving and the system service of said loading is in idle pulley, if then said kernel driving and system service are switched to normal mode of operation.
In television terminal operating system, typical application can relate to graphical display, reception incoming event, access hardware platform multimedia capabilities, visit peripheral hardware and calling system service.Driving and service that graphical display, input equipment and hardware platform multimedia are relevant are the basic functions of TV applications, generally load along with system start-up.Different application, the peripheral hardware of visit then can be different with the system service that needs.Therefore,, just can adjust the life cycle of kernel driving and system service, perhaps let kernel drive and system service entering idle condition, perhaps unload the kernel driving and the system service that no longer need when application pause or after withdrawing from.
After using loading, relevant kernel drives and system service will be by dynamic loading.Certainly, if adopted prestrain technology, the kernel of some application need drives with system service and also can load prior to the loading of application.Use in the running, kernel drives and system service provides service to application.After using unloading,, just can let kernel driving and system service be in idle condition, perhaps directly unload kernel and drive and system service if confirm that kernel drives and system service is no longer required by other operating application.
The present invention also proposes a kind of based on using priority, dynamically adjusts the method for the response priority of hardware interrupts incident.
For general hardware interrupts incident, application will be waited for usually and just continue to carry out after the interrupt event processing finishes.In the standard Linux kernel, form by four parts by the application time-delay that this interrupt event causes: interruption delay, Interrupt Process time, scheduler latency and scheduling duration.Interrupting time-delay is to be triggered to the invoked time interval of interruption routine from hardware interrupts; The Interrupt Process time is the duration that interruption routine is handled this interruption; Scheduler latency is to finish to reschedule time interval of current application to linux kernel from Interrupt Process; Scheduling is that linux kernel carries out context and switches and let current application continue the required time of operation the duration.Though the delay time that each hardware interrupts causes can be ignored, the time-delay that a large amount of interruptions causes just can not have been ignored.
According to the present invention, in order to guarantee user experience, for the application of high priority, can its relevant hardware interrupts incident of preferential answering.Typical hardware interrupts incident comprises input interruption, network interruption, wireless device interruption etc.The priority of certain application is confirmed in the several aspects of history run Information Statistics of the running status of integrated application, the statement of application and application.After high-priority applications loaded, system can know which hardware interrupts incident this application relates to.For these hardware interrupts incidents, let the operating system nucleus priority treatment; For other hardware event, then reduce the priority of operating system nucleus to its processing.Like this, just within a certain period of time, only respond the relevant hardware interrupts incident of high-priority applications, the response time of having improved high-priority applications.
Description of drawings
Fig. 1 is the integral frame figure of television terminal operating system;
Fig. 2 is for dynamically adjusting the flow chart of the method for kernel driving and system service according to of the present invention according to using running status; And
Fig. 3 is according to the real-time subsystem of the interruption of handling different application according to the different priorities of using according to the present invention and the logic relation picture between each parts among Fig. 2.
Embodiment
Below in conjunction with accompanying drawing and specific embodiment the present invention is carried out detailed explanation.
Figure is as shown in Figure 1 for television terminal operating system integral frame.Use by carrying out engine and explain execution, carry out engine and can also can visit kernel and drive and system service by the local ability of functional unit access terminal by java standard library.The management of each application and scheduling are responsible for by the system management framework, and the state of therefore using is also safeguarded by the system management framework.
After the user selected to move certain application, the system management framework will be suitable execution engine of application choice, started to carry out engine, after this used to bring into operation.At this moment, use be in " front stage operation state ".When the user switched to the foreground with other application, the state of the application of former front stage operation just became " background operation state ".When the user manually suspends application, perhaps to use because its accessed resources is limited by the system management framework and be scheduled to when suspending, its state just becomes " halted state ".When the user manually withdraws from application, perhaps use and withdrawed from by the suggestion of system management framework because its accessed resources is limited and after the user confirms, use and just withdraw from.
Dynamically adjust the flow chart of kernel driving and system service according to using running status, as shown in Figure 2.Suppose that the operation of using A1 needs kernel to drive D1 and system service S1, comprise following step according to the dynamic adjusting method of kernel driving of the present invention and system service:
(1) after application A1 starts, carry out engine, confirm that its needed kernel drives D1 and system service S1 according to the implementation status of using, and with relevant information reporting system Governance framework.For this reason, the system management framework safeguards that having each operation to use needed kernel drives and system service, safeguards driving and the system service institute application associated that each loading is arranged simultaneously;
(2) use A1 and switch to running background or operation suspension by front stage operation after, do not used institute's association if drive D1, and D1 support vacant working pattern by other, the system management framework will be notified D1 entering vacant working pattern so.For system service S1, to handle with the similar mode of D1.(,, suppose that certain kernel drives when perhaps system service is in normal mode of operation, carries out poll to detect the generation of certain incident with a typical example for the vacant working pattern; When being in the vacant working pattern, stop poll);
(3) use A1 and withdraw from after, if the system management framework be checked through D1 not by other application that moving association, the system management framework will unload D1 so.For system service S1, to handle with the similar mode of D1;
When (4) application A1 switched to the front stage operation state by background operation state or halted state, if D1 is in the vacant working pattern, then the system management framework notified it to get into normal mode of operation.For system service S1, to handle with the similar mode of D1.
Through drive the management with the dynamic life cycle of system service by the kernel of application drives, reduced unnecessary resource consumption as far as possible, for the operation energy consumption of the user experience that promotes television terminal, certain meaning is arranged with the reduction television terminal.
According to a further aspect in the invention, in order to guarantee the experience effect of application of user to oneself hobby, it is a kind of according to the priority of using that the present invention also provides, and dynamically adjusts the method for the response priority of hardware interrupts incident.
The priority of using is confirmed by the historical information statistics (HISTORY) of using running status (STATE), the statement (MANIFEST) of using and using, and is specific as follows:
(1) front stage operation, running background, suspend this three kinds of running statuses and in fact described the active degree of using.Use actively more, priority is high more;
In the statement of (2) using, have the priority of a statement; The priority of statement is high more, and the actual priority of application is high more;
(3) the system management framework can be added up based on the historical information of using, and more frequently by the application of user's operation, priority is high more.
Therefore, preferably, a kind of definite way of the priority of application, the weighted average of taking to use the statement priority of active degree, application and using the frequent degree of operation.
On the operating system of operation standard Linux kernel, after hardware interrupts took place, linux kernel can capture this interruption, and passed to corresponding interrupt handling program through after a series of processing.The front was described, and at short notice, linux kernel may be handled a large amount of interruptions, and a lot of interruption maybe it doesn't matter with current high-priority applications; And the linux kernel handling interrupt has also been introduced certain delay because of the complexity of linux system itself.If add a real-time subsystem, be used for the intercepting hardware interrupts, and come to send selectively hardware interrupts and give linux kernel based on using priority, just can reach the purpose that dynamic adjustment hardware interrupts responds priority.
The location drawing of above-mentioned real-time subsystem, as shown in Figure 3.One of major function of subsystem is truncated to hardware interrupts prior to the standard Linux kernel exactly in real time, as required hardware interrupts is done further processing then.The main points of real-time subsystem when adjustment hardware interrupts response priority are described below.
(1) use when loading, the system management framework can be informed real-time subsystem with the initial priority of using and the hardware interrupts of association; The corresponding relation of subsystem maintenance application in real time and hardware interrupts.
(2) use in the running, if the running status of using changes, the priority of application will be definite by again, and through the system management framework, the application precedence information of safeguarding in the updating real-time subsystem; If discovery application need more equipment drives support, also can notify real-time subsystem to upgrade the corresponding relation of application and hardware interrupts.
(3) after real-time subsystem is intercepted and captured a hardware interrupts, determine whether related with the high-priority applications of current operation institute, if then directly send to linux kernel; If not, handle this interrupt event when then idle again.
(4) especially, when real-time subsystem is intercepted and captured the input equipment interruption, in order to guarantee favorable user experience, the upper strata will be directly given at the input equipment terminal, and not through the standard Linux kernel.
Come the dynamically method of the response time of adjustment interrupt event through such according to the priority of using, realized reasonable arrangement, thereby can guarantee the experience of user better the own application of liking to the processing sequence of different interrupt events.
It should be noted last that above embodiment is only unrestricted in order to technical scheme of the present invention to be described.Although the present invention is specified with reference to embodiment; Those of ordinary skill in the art is to be understood that; Technical scheme of the present invention is made amendment or is equal to replacement, do not break away from the spirit and the scope of technical scheme of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.

Claims (8)

1. dynamic adjusting method by the kernel module of application drives; It is characterized in that:, dynamically kernel driving that loads and system service are adjusted into mode of operation, idle pulley perhaps with kernel driving that loads and system service unloading according to the running status of application.
2. the dynamic adjusting method of the kernel module by application drives according to claim 1 is characterized in that: when said application was in the front stage operation state, the kernel of loading drove and system service is in mode of operation; When said application is switched to background operation state or operation suspension; Whether the kernel of judging described loading drives related by other application institutes with system service; And the kernel of judging described loading drives and whether system service supports idle pulley; If driving of the kernel of described loading and system service be not by other application managements and support idle pulley, then said kernel driving and system service are adjusted into idle pulley; After said application is out of service, judge that described kernel driving and system service whether by other associations, if not, then unload described kernel and drive and system service; When said application switches to the front stage operation state by background operation state or halted state, judge whether the kernel driving and the system service of said loading is in idle pulley, if then said kernel driving and system service are switched to normal mode of operation.
3. the dynamic adjusting method of the kernel module by application drives according to claim 1; It is characterized in that also comprising: when the hardware interrupts incident takes place, respond the hardware interrupts incident that said application relates to according to the order from high to low of the priority of using.
4. the dynamic adjusting method of the kernel module by application drives according to claim 3 is characterized in that the priority of said application is confirmed by the statement of the running status of using, application and history run Information Statistics several respects of application.
5. the dynamic adjusting method of the kernel module by application drives according to claim 3 is characterized in that comprising: when the running status of using changed, the priority of this application was confirmed again.
6. the dynamic adjusting method of the kernel module by application drives according to claim 3 is characterized in that also comprising: prior to linux kernel intercepting hardware interrupts incident, as required hardware interrupts is done further processing then.
7. described by the dynamic adjusting method of using the kernel module that drives based on claim 6; It is characterized in that also comprising: after intercepting and capturing a hardware interrupts; Determine whether related with the high-priority applications of current operation institute, if then directly send to linux kernel; If not, then treat to handle again when it is idle this interrupt event.
8. the dynamic adjusting method of the kernel module by application drives according to claim 6 is characterized in that also comprising: when intercepting and capturing input equipment and interrupt, the upper strata will directly be given and through the standard Linux kernel in the input equipment terminal.
CN2011103736367A 2010-12-08 2011-11-22 Dynamic adjusting method of kernel module driven by application Pending CN102547178A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103736367A CN102547178A (en) 2010-12-08 2011-11-22 Dynamic adjusting method of kernel module driven by application

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN201010590412.7 2010-12-08
CN201010590412 2010-12-08
CN2011103736367A CN102547178A (en) 2010-12-08 2011-11-22 Dynamic adjusting method of kernel module driven by application

Publications (1)

Publication Number Publication Date
CN102547178A true CN102547178A (en) 2012-07-04

Family

ID=46353002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103736367A Pending CN102547178A (en) 2010-12-08 2011-11-22 Dynamic adjusting method of kernel module driven by application

Country Status (1)

Country Link
CN (1) CN102547178A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984743A (en) * 2014-05-23 2014-08-13 北京金山网络科技有限公司 Method and device for managing memory resources
CN107643897A (en) * 2016-07-20 2018-01-30 阿里巴巴集团控股有限公司 The update method and device of backend driver
CN109543400A (en) * 2017-09-21 2019-03-29 华为技术有限公司 A kind of method and apparatus of dynamic management core nodes
CN112543375A (en) * 2019-09-20 2021-03-23 青岛海信传媒网络技术有限公司 Television energy consumption management method and related equipment
CN112650591A (en) * 2021-01-05 2021-04-13 上海擎昆信息科技有限公司 Method, device and system for adjusting interrupt priority

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737766A (en) * 2005-08-31 2006-02-22 上海海尔集成电路有限公司 Interrupt system realizing method
WO2007022481A2 (en) * 2005-08-19 2007-02-22 Stephanian Robert Tethered digital butler consumer electronic device and method
CN101968678A (en) * 2010-08-10 2011-02-09 东莞环亚高科电子有限公司 Low-power consumption power supply management equipment for embedded Linux equipment
CN101986694A (en) * 2010-10-29 2011-03-16 广东星海数字家庭产业技术研究院有限公司 Linux system-based digital television system
CN102104522A (en) * 2011-01-14 2011-06-22 徐立中 Real-time communication optimizing method and equipment orienting to cyber-physical system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007022481A2 (en) * 2005-08-19 2007-02-22 Stephanian Robert Tethered digital butler consumer electronic device and method
CN1737766A (en) * 2005-08-31 2006-02-22 上海海尔集成电路有限公司 Interrupt system realizing method
CN101968678A (en) * 2010-08-10 2011-02-09 东莞环亚高科电子有限公司 Low-power consumption power supply management equipment for embedded Linux equipment
CN101986694A (en) * 2010-10-29 2011-03-16 广东星海数字家庭产业技术研究院有限公司 Linux system-based digital television system
CN102104522A (en) * 2011-01-14 2011-06-22 徐立中 Real-time communication optimizing method and equipment orienting to cyber-physical system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984743A (en) * 2014-05-23 2014-08-13 北京金山网络科技有限公司 Method and device for managing memory resources
CN103984743B (en) * 2014-05-23 2018-03-09 北京猎豹网络科技有限公司 A kind of method and device of managing internal memory resource
CN107643897A (en) * 2016-07-20 2018-01-30 阿里巴巴集团控股有限公司 The update method and device of backend driver
CN107643897B (en) * 2016-07-20 2021-04-16 阿里巴巴集团控股有限公司 Method and device for updating back-end driver
CN109543400A (en) * 2017-09-21 2019-03-29 华为技术有限公司 A kind of method and apparatus of dynamic management core nodes
CN109543400B (en) * 2017-09-21 2022-08-09 华为技术有限公司 Method and equipment for dynamically managing kernel nodes
US11579899B2 (en) 2017-09-21 2023-02-14 Huawei Technologies Co., Ltd. Method and device for dynamically managing kernel node
CN112543375A (en) * 2019-09-20 2021-03-23 青岛海信传媒网络技术有限公司 Television energy consumption management method and related equipment
CN112650591A (en) * 2021-01-05 2021-04-13 上海擎昆信息科技有限公司 Method, device and system for adjusting interrupt priority

Similar Documents

Publication Publication Date Title
US8504753B2 (en) Suspendable interrupts for processor idle management
CN102341780B (en) Real-time multithread scheduler and dispatching method
CN102547178A (en) Dynamic adjusting method of kernel module driven by application
CA2795489C (en) Opportunistic multitasking
US20060010446A1 (en) Method and system for concurrent execution of multiple kernels
EP1698972A2 (en) Processor and information processing method
US9858115B2 (en) Task scheduling method for dispatching tasks based on computing power of different processor cores in heterogeneous multi-core processor system and related non-transitory computer readable medium
CN103279331A (en) Multi-task concurrent processing method and device for Android system
JPWO2009133669A1 (en) Virtual machine control device, virtual machine control method, and virtual machine control program
US20080140896A1 (en) Processor and interrupt controlling method
CN111580949B (en) Automatic regulating method for network packet receiving mode
CN112486642B (en) Resource scheduling method, device, electronic equipment and computer readable storage medium
JP4609113B2 (en) Processor
JP4910067B1 (en) Electronic device and power saving control method for electronic device
CN101968678A (en) Low-power consumption power supply management equipment for embedded Linux equipment
EP2490100A1 (en) Suspendable interrupts for processor idle management
CN103257894A (en) Program management method and electronic terminal
KR20120065097A (en) Apparatus for processing input device interrupt and method thereof
CN100498714C (en) Method for constituting television software system using mode machine
JP2008234116A (en) Virtual computer control device
CN101707653A (en) Intelligent mobile terminal of single processor and realizing method thereof
CN111813531B (en) Clock scheduling method and system for operating system
CN112470125A (en) Interrupt processing method, computer system and program product
CN107239417B (en) System and method for processing low-speed peripheral access based on asynchronous event framework mechanism
CN116302379A (en) Microkernel architecture, scheduling method, microkernel system and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120704