CN1760843A - Method for controlling and raising efficiency of driver program by using software events - Google Patents

Method for controlling and raising efficiency of driver program by using software events Download PDF

Info

Publication number
CN1760843A
CN1760843A CN 200410051789 CN200410051789A CN1760843A CN 1760843 A CN1760843 A CN 1760843A CN 200410051789 CN200410051789 CN 200410051789 CN 200410051789 A CN200410051789 A CN 200410051789A CN 1760843 A CN1760843 A CN 1760843A
Authority
CN
China
Prior art keywords
hardware
driver
operating system
program
software
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200410051789
Other languages
Chinese (zh)
Other versions
CN100362500C (en
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.)
Mitac Computer Shunde Ltd
Shunda Computer Factory Co Ltd
Mitac International Corp
Original Assignee
Mitac Computer Shunde Ltd
Mitac International Corp
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 Mitac Computer Shunde Ltd, Mitac International Corp filed Critical Mitac Computer Shunde Ltd
Priority to CNB200410051789XA priority Critical patent/CN100362500C/en
Publication of CN1760843A publication Critical patent/CN1760843A/en
Application granted granted Critical
Publication of CN100362500C publication Critical patent/CN100362500C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

Under current architecture of driver program, the invention uses software thread generates software event to start up operating system for processes of hardware monitor programs. Using hardware control and data transmission of hardware driver programs as well as synchronous execution of hardware driver programs in operating system raise operating efficiency of driver programs between operating system and hardware devices effectively in assistant.

Description

The control of utilization software event promotes the method for driver program
[technical field]
The present invention is a kind of relevant for data processing method, refers in particular in the driver that is applied to the computing machine executable platform, can use software to carry out the method that line (thread) comes service hoisting driver operational paradigm between operating system and hardware unit.
[background technology]
The running of existing relevant driver as shown in fig. 1, when hardware unit 30 is desired when operating system 10 requires system resource, just can see through the driver 20 that is executed in the operating system 10 to operating system file a request (request).This moment, hardware unit 30 at first can send hardware interrupts (hardwareinterrupt) (S1), and sent operating system 10 (S2) to through driver 20; After operating system 10 is received hardware interrupts, just begin to prepare to dispose corresponding system resource, operating system 10 is just sent driver incident (driver event) to driver 20 (S3) after finishing the system resource configuration, driver 20 just begins to carry out corresponding hardware control and data transmission (S4) to hardware unit 30 after receiving, after driver 20 executes all programs, the more previous system resource that obtains is discharged also to change by operating system 10 again and be responsible for.
In driver 20, except the work of being responsible for above-mentioned hardware controls and data transmission, driver 20 is also born the responsibility of hardware monitoring sometimes, just can in the middle of carry out the process of running, hardware unit 30 can repay the situation of hardware unit 30 at any time and give operating system 10.Because in the past for the part of hardware monitoring, see through directly all that driver 20 carries out, therefore tend to cause following two problems:
(1) influences the execution operational effectiveness of driver 20.Can cause the reason of this problem to be that operating system 10 is congenital in driver incident (driver event) restriction that hardware had, this one is limited in can't provide simultaneously in the operating system 10 hardware monitoring in a plurality of drivers 20 is handled, therefore when a plurality of drivers 20 need to carry out the program of hardware monitoring, often all must be dependent on 20 other execution of driver and processing.Thus, driver 20 not only must be responsible for original hardware controls and data distributing program, and also the part of processing hardware monitoring simultaneously can make the overall operation usefulness of driver 20 significantly be affected certainly.
(2) cause 10 pairs of hardware monitoring management of operating system to be difficult for.Can cause the reason of this problem then to be responsible separately other hardware monitoring program of carrying out of driver 20, can't handle and monitor all hardware units 30 simultaneously so cause operating system 10, make operating system 10 can't effectively grasp the situation of each connection hardware device 30, cause ineffective in the system resource configuration management.
Therefore, to how to utilize the computer software design mode of present prosperity, break through on the existing operating system 10 congenital restriction to hardware, and can improve the operational effectiveness of existing driver 20, make driver 20 can promote operational effectiveness and allow operating system 10 can effectively carry out management hardware unit 30, propose a cover and can promote the method for driver at operating system 10 and 30 operational paradigms of hardware unit, should be engaged in future the driver related development research staff should actively make great efforts the direction studied.
[summary of the invention]
The object of the invention is to provide a kind of method of using software event control to promote driver program, can make driver can promote operational effectiveness thus and allows operating system can effectively carry out management to hardware unit.
For achieving the above object, the present invention uses software event control to promote to include the following step in the method for driver program: at first carry out line (thread) by the software in the driver and be responsible for receiving hardware interrupts (hardware interrupt) by hardware unit sent; Suspend other hardware interrupts of reception then, and send driver incident (driver event) to hardware drive program and operating system; When hardware drive program and operating system receive the driver incident, begin to carry out hardware controls, data transmission and hardware monitoring program simultaneously respectively; When hardware drive program is finished hardware controls and data transmission, then send hardware monitoring synchronous event and hardware synchronization incident simultaneously respectively, and make hardware drive program recover to wait for the state of reception driver, operating system then recovers to wait for the reception driver after receiving the hardware monitoring synchronous event state again; At last, after software execution line receives the hardware synchronization incident, then recover to wait for the state that receives hardware interrupts again.Finish whole utilization software event and control the process that promotes driver program.
The inventive method utilization software execution software event (software event) that line produced under existing driver framework starts the operating system and carries out the processing of hardware monitoring program, and makes hardware drive program originally can be devoted to the part of hardware controls and data transmission.See through this method and not only can effectively promote outside the efficient of driver, also can reach the effect that makes operating system be convenient to carry out the hardware monitoring management.
[description of drawings]
Fig. 1 is existing driver running synoptic diagram;
Fig. 2 promotes the inner working synoptic diagram of the method for driver program for the utilization software event control that the present invention carried;
Fig. 3 promotes the overall operation synoptic diagram of the method for driver program for the utilization software event control that the present invention carried;
Fig. 4 A promotes the software execution line operation workflow figure of the method for driver program for the utilization software event control that the present invention carried;
Fig. 4 B promotes the hardware drive program operation workflow figure of the method for driver program for the utilization software event control that the present invention carried; And
Fig. 4 C promotes the hardware monitoring procedure operation process flow diagram of the method for driver program for the utilization software event control that the present invention carried.
[embodiment]
The present invention proposes a kind of method that can use software event control to promote driver program.The inventive method sees through the indirect hardware event of a kind of what is called (Indirect Hardware Event, IHE) framework is reached the purpose that promotes driver program, inner working synoptic diagram shown in Fig. 2 as previously mentioned, software execution line 21 and hardware drive program 22 that utilization of the present invention is executed in the driver 20 come the control of synchronous processing related hardware, the matters of data transmission and hardware monitoring, comprise: send software event (software event) through software execution line (thread) 21 and require operating system 10 to carry out the processing of hardware monitoring program, and the hardware drive program 22 that sees through simultaneously in the driver 20 carries out the operation of hardware controls and data transmission, effectively the operational paradigm of service hoisting driver 20 between operating system 10 and hardware unit 30.
The part of Fig. 2 only is the inner working illustrative of the inventive method in single driver 20.In fact the process of a plurality of driver 20 overall operations simultaneously of the inventive method then can be represented by Fig. 3.At this moment, all can be at the many drivers 20 on the same computing machine executable platform through connecing the efficient that the hardware event framework promotes itself between the inventive method, all hardware controls and data transmission operation then do not come to be responsible for (as: driver a... driver n) by 22 of the hardware drive programs in the driver 20; As for the part of all hardware watchdog routine then by operating system 10 receive carry out the driver incident that line 21 sent from the software in indivedual drivers 20 after, seeing through the mode of sending hardware monitoring program 40 (as: hardware monitoring program a...n) carries out, with Windows CE operating system, this hardware monitoring program 40 can be realized by the default multiple object function of wait (Wait For Multiple Objects ()) that can carry out multitask program, also can see through the function that has similar function in other operating system 10 and carry out.
Fig. 4 A, Fig. 4 B and Fig. 4 C then are the relevant operation workflow figure of the inventive method, are described as follows.
At first the part of Fig. 4 A is to carry out the operation workflow of line 21 in the inventive method about software in the driver 20.After driver 20 started, then software was carried out line 21 and is performed thereupon and begins to wait for the hardware interrupts (step 100) of reception from hardware unit 30; Software is carried out line 21 can continue to wait for and judge whether to receive hardware interrupts (step 110), then do not continue to rest on step 100 place if receive, if when receiving, expression hardware unit 30 need require system resource to operating system 10, then enter next step, driver 20 will suspend other hardware interrupts (step 120) of reception this moment; After receiving the hardware interrupts of being sent from hardware unit 30, software is carried out line 21 will send driver incident (step 130) to operating system 10, wherein operating system will further be sent the driver incident to the hardware drive program in the driver 20 22 at one time, this is the part of steps A, and hardware drive program 22 and operating system 10 will be carried out the operation of hardware controls data transmission (being the part of Fig. 4 B) and hardware monitoring program (being the part of Fig. 4 C) respectively after receiving the driver incident of being sent from software execution line 21; Software is carried out the state (step 140) that line 21 just enters into wait hardware synchronization incident after entering steps A.
Fig. 4 B is the thin portion operation workflow of hardware drive program 22.When hardware drive program 22 starts in driver 20, just be initially located in the state (step 200) that receives the driver incident of waiting for; Continue to judge whether to receive in the process of driver incident (step 210), then do not rest on step 200 place if receive, if when receiving the driver incident that operating system 10 sent (being that software is carried out the driver incident that line 21 is produced), then enter next step, begin to carry out the operation (step 220) of hardware controls and data transmission, this technology contents partly belongs to existing driver running, seldom gives unnecessary details; Up to hardware controls and the data transmission operation is whole be finished after, then hardware drive program 22 can send the hardware monitoring synchronous event and give operating system 10 (step 230), require the operation of operating system 10, be the part that enters into step B with EOS hardware monitoring program; The same time, hardware drive program 22 also will send the hardware synchronization incident and carry out line 21 to software, require to suspend the program that receives other hardware interrupts with EOS, and this is the part of step C.
Fig. 4 C is the thin portion operation workflow that operating system is carried out the hardware monitoring program.During beginning, operating system 10 is in the state (step 300) that receives the driver incident of waiting for equally; Continue to judge whether to carry out the driver incident that line 21 is sent from software? (step 310) be not if then stay at step 300 place, if receive then enter into next step, begin to carry out corresponding hardware watchdog routine 40 (step 320), with Windows CE operating system, this hardware monitoring program 40 can be reached by the default multiple object function of wait (Wait For Multiple Objects ()) that can carry out multitask program, also can see through the function that has similar function in other operating system 10 and carry out; Operating system 10 enters into the state of waiting for the hardware monitoring synchronous event simultaneously, prepares when hardware drive program 22 is finished hardware controls and data transmission, can be with the program (step 330) of EOS hardware monitoring; Does operating system 10 continue to judge whether to receive the hardware monitoring synchronous event that is sent from hardware drive program 22? (step 340) be not if having, then rest on step 330 place, if when receiving the hardware monitoring synchronous event from hardware drive program 22 (step B), then operating system 10 will be recovered to wait for next time again and receive driver incident (step 300).
In addition, when hardware drive program 22 sends the hardware synchronization incident and carries out line 21 and require to suspend the program that receives other hardware interrupts with EOS to software (step C), please again with reference to the part of figure 4A, it is to be in the state (step 140) of waiting for the hardware synchronization incident after entering steps A that original software is carried out line 21, and continue to have judged whether to receive the hardware synchronization incident? (step 150), if not then rest on step 150 place, if (promptly transmitting hardware synchronization incident from hardware drive program 22 by step C place) arranged then enter next step, software is carried out line 21 will return to the state (step 160) that can receive other hardware interrupts again, and the process step that this moment, driver program was controlled and promoted to whole utilization software event comes to an end.
In fact, the inventive method can be applied to anyly have on the computing machine executable platform, particularly has the handheld apparatus (handheld device) of operating system 10, as: Smartphone (SmartPhone).

Claims (5)

1. one kind is used software event to control the method that promotes driver program, be applied between the operating system and hardware unit of a computing machine executable platform, see through driver and produce software event (software event) processing hardware that starts the operating system watchdog routine, and then the method for process auxiliary drive program lifting efficient, it is characterized in that this method comprises the following step:
See through a software and carry out the hardware interrupts (hardwareinterrupt) that line (thread) reception hardware unit sends;
Suspend other hardware interrupts of reception, and send driver incident (driver event) to a hardware drive program and operating system;
When this hardware drive program and operating system receive the driver incident, more comprise and carry out the following step simultaneously:
This hardware drive program begins to carry out hardware controls and data transmission; And
Operating system begins to carry out the hardware monitoring program;
When this hardware drive program is finished hardware controls and data transmission, more comprise and send hardware monitoring synchronous event and hardware synchronization incident simultaneously, carry out the following step:
This hardware drive program is recovered to wait for the state that receives the driver incident again;
After operating system receives the hardware monitoring synchronous event, operating system is recovered to wait for the state that receives the driver incident again; And
After this software execution line receives the hardware synchronization incident, software is carried out line recover to wait for the state that receives hardware interrupts again.
2. utilization software event control as claimed in claim 1 promotes the method for driver program, and it is characterized in that: this computing machine executable platform is handheld apparatus (handheld device).
3. utilization software event control as claimed in claim 2 promotes the method for driver program, and it is characterized in that: this computing machine executable platform is Smartphone (Smart Phone).
4. utilization software event control as claimed in claim 1 promotes the method for driver program, it is characterized in that: this software is carried out the execution in step of line and this hardware drive program, all is executed in driver.
5. utilization software event control as claimed in claim 1 promotes the method for driver program, it is characterized in that: this operating system begins to carry out the step of hardware monitoring program, is to carry out through the default multiple object function of wait (Wait For Multiple Objects ()) that can carry out multitask program in the operating system.
CNB200410051789XA 2004-10-11 2004-10-11 Method for controlling and raising efficiency of driver program by using software events Expired - Fee Related CN100362500C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200410051789XA CN100362500C (en) 2004-10-11 2004-10-11 Method for controlling and raising efficiency of driver program by using software events

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200410051789XA CN100362500C (en) 2004-10-11 2004-10-11 Method for controlling and raising efficiency of driver program by using software events

Publications (2)

Publication Number Publication Date
CN1760843A true CN1760843A (en) 2006-04-19
CN100362500C CN100362500C (en) 2008-01-16

Family

ID=36706926

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200410051789XA Expired - Fee Related CN100362500C (en) 2004-10-11 2004-10-11 Method for controlling and raising efficiency of driver program by using software events

Country Status (1)

Country Link
CN (1) CN100362500C (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020165999A1 (en) * 2001-03-07 2002-11-07 Ajile Systems, Inc. Apparatus and method for interfacing hardware events with software events
KR100425285B1 (en) * 2001-05-11 2004-03-30 김용희 Monitor driver install method and recording medium recorded the same method

Also Published As

Publication number Publication date
CN100362500C (en) 2008-01-16

Similar Documents

Publication Publication Date Title
CN103294533B (en) task flow control method and system
EP0709777B1 (en) Method of and apparatus for debugging multitask programs
CN1285030C (en) Personal handset terminal capable of alternating information with host machine and its method
US5550962A (en) System for selectively performing parallel or sequential drawing processing
CN101499041B (en) Method for preventing abnormal deadlock of main unit during access to shared devices
CN100382033C (en) Computer system
CN1832433A (en) Distribution structure test system and testing method of the test system
CN112559159A (en) Task scheduling method based on distributed deployment
CN114691407A (en) Method and device for acquiring vehicle log, electronic equipment and storage medium
CN1760843A (en) Method for controlling and raising efficiency of driver program by using software events
CN103631594A (en) Asynchronous scheduling method and asynchronous scheduling system for general flow
CN105159706A (en) Workflow program page configuration execution method and system
CN108228850A (en) A kind of cross-platform self-service device management method
CN110868448A (en) Vehicle-mounted data updating system and method
CN101349975B (en) Method for implementing interrupt bottom semi-section mechanism in embedded operation system
CN114115140B (en) System and method for synchronizing data between multi-core main controller and main and auxiliary multi-core controllers
KR20050057834A (en) Method for mass data processing through scheduler in multi processor system
CN1318166A (en) Software rewriting method and software rewriting device
JPH06348664A (en) Controller for computer system constituted of plural cpus provided with different instruction characteristics
CN112799618A (en) Control method, device and equipment of printer
CN113900911A (en) Health management system
CN100501706C (en) Method for avoiding command transmission conflict and electronic device
CN1176423C (en) Mainboard test program process system and method thereof
CN101364183B (en) Virtual machine monitor, virtual machine system and method for accessing true physical equipment
CN1414489A (en) Basic system connected with end-to-end joint bus and its control method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080116

Termination date: 20161011