[go: up one dir, main page]

CN1773457A - Network program arrangement method - Google Patents

Network program arrangement method Download PDF

Info

Publication number
CN1773457A
CN1773457A CN 200410052099 CN200410052099A CN1773457A CN 1773457 A CN1773457 A CN 1773457A CN 200410052099 CN200410052099 CN 200410052099 CN 200410052099 A CN200410052099 A CN 200410052099A CN 1773457 A CN1773457 A CN 1773457A
Authority
CN
China
Prior art keywords
thread
network
priority
priority order
main
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
CN 200410052099
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.)
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 CN 200410052099 priority Critical patent/CN1773457A/en
Publication of CN1773457A publication Critical patent/CN1773457A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

A method for arranging network program includes generating an independent execution cause different from main execution cause at outside of main execution cause and setting operation program of arrangement according to their priorities when operation command relating to network program is received, setting operation program of arrangement according to main execution cause priority if no network operation command is received, deciding arrangement of network program operation based on priority sequence of each execution cause and priority sequence of execution cause in network program operation.

Description

The network program scheduling method
Technical field
The present invention is particularly to a kind of scheduling method of network program relevant for a kind of scheduling method.
Background technology
In an operating system, handled content can comprise a plurality of strokes (process), and in each stroke (process) Thread (thread) can be arranged, more than one Thread (thread) also can be arranged, there is the certain operations system all only to support single Thread (single thread), UNIX for example, DOS etc., WindowsNT and Windows 95 can support multi-threading (multi-thread), because of most of PC have only a processor, so can support the operating system of multi-threading, the processor time can be distributed to many sections executable program code (being above-mentioned alleged Thread), so that multitask function to be provided.A Thread can be represented a whole application program, but more normal representative is the part that can separately carry out in the application program, can say that also Thread is a section in the program, and program can be divided into several sections, each section all can independently be carried out, and is the smallest executable unit in the system.
The processing time that operating system disposes each Thread according to multinomial factor (for example the right of priority of Thread, after Thread is last time carried out through how long).But because a central processing unit once can only be done job, and may once not have only job to exist in the operating system, so the management of processor resource can be said so quite important.The related management problem that can meet in this respect, as run-length management (Process Management), Thread problem (Thread), the central processing unit stroke problem of (Scheduling) or the like of arranging an order according to class and grade.Different operating system has different solutions usually; With Windows operating system is example, and for the purpose of justice, it is configured to a kind of time-sharing system (Time Sharing), allows central processing unit constantly switch many work of carrying out between different strokes.
Above mentioned multi-threading method, because of can effectively applying flexibly the characteristic of multicomputer system, so widely various emerging operating system adopts, and regular meeting uses in general computing machine or fixed equipment.And in present palmtop computer or some embedded devices, because of considering the characteristic and the functional burdening of processor, some built-in operating system is to do the processing of every working routine with single main Thread, please refer to Fig. 1, for example when operating system receives the instruction of many working routines (step 100), such as handling simultaneously when carrying out as network and document, system just can (for example receive the network program instruction earlier according to the precedence that receives instruction, after receive the programmed instruction that document is handled) received work order is placed main Thread (step 101), and dispose the processing sequence (step 102) of each working routine according to the sequencing of its reception, therefore if ought wherein there be a certain work to occupy the too many processing time, just can have influence on ensuing work disposal.For example to finish the network work program; just can need the more time of multiprocessor than general working procedure; and because of system once can only handle job; so the running of system just probably holds because of the network work program; and have influence on the next reaction time of working routine; that is to say before network executes; other application program can't be carried out; therefore regular meeting has delayed the speed that other application program is handled; transmit and receive two kinds of main programs because of having comprised in the network work program in addition; as long as so when receiving the instruction that related network transmits or network receives; just can in main Thread, produce a working routine relevant with network; and when carrying out network program, just can have influence in the main Thread processing speed of other working routine next and reaction time that the user experienced sometimes greatly.So when using the online of palmtop computer or some embedded devices; regular meeting feels that the phenomenon that has delay when using other operation sometimes produces; for example when surfing the Net with palmtop computer; have desultory phenomenon when using music, or can feel the phenomenon that postpones etc. that responds when using document to handle.
According to the above, just need configuration network that a kind of method can be suitable and the resource between system's real time reaction on present palmtop computer or some embedded devices, make system can react user's demand, for example the user is when utilizing system to use some documents to handle, can not influence its reaction time because of network work, or the user is when using system is surfed the Net, and can not experience networking speed phenomenon slowly because of some backdrop procedures.
Summary of the invention
According to the above, the object of the invention promptly is to provide a kind of scheduling method of network program, be applied to carry out the portable information processing apparatus of every working routine with main Thread, the method can make this portable information processing apparatus adjust the shared system resource of network program, allows the usefulness of system can react user's demand.
For achieving the above object, the invention provides a kind of scheduling method of network program, be applied to carry out with main Thread the portable information processing apparatus of every working routine, and the method comprises the following step: this portable information processing apparatus receives a work order; Confirm this work order, when this work order belongs to the relevant working routine of network, in this main Thread outside, produce an independent Thread, and this independent Thread and this main Thread respectively there are its right of priority corresponding to this network related work program; According to the right of priority of this independent Thread and the right of priority of this main Thread, produce an independent Thread priority order and a main Thread priority order respectively; And according to this independent Thread priority order and this main Thread priority order, decision is corresponding to the scheduling of the network related work program of this independent Thread; This right of priority the higher person wherein, this priority order is positioned at than the front, and this priority order is than the front person, handles earlier corresponding to the work scheduling of this Thread of this priority order.
For achieving the above object, the present invention also provides a kind of scheduling method of network program, be applied to a portable information processing apparatus, this portable information processing apparatus carries out every working routine with a main Thread, and it is characterized in that this method comprises the following step: this portable information processing apparatus receives a work order; Confirm this work order, when this work order belongs to network reception program, outside this main Thread, produce a network and receive Thread, and this network reception Thread there is its right of priority; Confirm this work order, when this work order belongs to the network convey program, outside this main Thread, produce a network and transmit Thread, and this network transmission Thread there is its right of priority; Confirm this work order, when this work order does not belong to the relevant working routine of network, place this main Thread, and this main Thread has its right of priority; According to the right of priority of each this Thread, each this Thread is produced a priority order respectively; Reach this priority order according to each this Thread, decision is corresponding to the working routine scheduling of each this Thread; This right of priority the higher person wherein, this priority order system is positioned at than the front, and this priority order is than the front person, handles earlier corresponding to the work scheduling of this Thread of this priority order.
Therefore network program is separated in main Thread, become that network transmits and network receives two independently behind the Thread, just can transmit right of priority that Thread and network receive Thread by setting network respectively just comes Control Network to transmit and the proportion of network reception, also can distinguish Control Network transmission and network receives and the precedence of other application program on handling, the user just can make the demand optimization of the usefulness of system according to self because of the usefulness of the inventive method Adjustment System.
Description of drawings
Fig. 1 shows in the conventional art, the scheduling method of system handles working routine; And
Fig. 2 shows the method flow diagram of network program scheduling of the present invention.
Embodiment
The present invention is applied on palmtop computer or some embedded devices, and the operating system on the device can be supported more than one Thread, and this operating system can be carried out more than one application program at least simultaneously.Because present most of PC, palmtop computer or some embedded devices all have only a processor, so present operating system can be distributed to the processor time many sections executable program code (promptly being called Thread), so that multitask function to be provided.A Thread can be represented a whole application program, but more normal representative is the part that can separately carry out in the application program, can say that also Thread is a section in the program, and program can be divided into several sections, each section all can independently be carried out, and is the smallest executable unit in the system.The processing time that operating system disposes each Thread according to multinomial factor (for example the right of priority of Thread, after Thread is last time carried out through how long), when carrying out the work that archives are imported and the output equal time is intensive, multi-threading can significantly promote usefulness.
The notion of the inventive method is, when operating system receives many working routines simultaneously, the working routine that receives can be classified, a kind of is the working routine that network is correlated with, a kind of is not relevant with network working routine, and dispose its processing time and precedence thereof according to this two big class working routine, therefore after having cooperated the time scheduling notion of Thread right of priority, feature of the present invention is that promptly the working routine that network is relevant is independent in originally single main Thread, and formation differs from the Thread of main Thread, so system just can do the scheduling of precedence according to its priority settings between the Thread that mainly Thread and network work are relevant when the work of treatment program, for example the working routine that network is relevant has comprised the network transmission and network receives two major parts, this two major part can be independent from main Thread respectively, and independent Thread of each self-forming, just can form Thread and the Thread that responsible network receives that a responsible network transmits, and each Thread all can be set its right of priority, therefore according to the right of priority of each Thread, the Thread that network transmits, the Thread that network receives and main Thread all can have the order of a right of priority, and system just can determine the job order handled in proper order according to this.
That is to say, network transmits or network receives in the conventional art working routine and other working routine all are to carry out via same main Thread, and the processing sequence of its work is fully according to the sequencing that receives order, so can't make network according to the demand of self transmits, resource distribution between network reception and other working routine, and receive the work that two Threads of Thread reach network program with network transmission Thread and network respectively in the present invention, and other and the incoherent work of network are just finished by main Thread, the order of its work decides according to the sequencing between main Thread and other Thread fully, each Thread all can be set its right of priority size, therefore system just can be according to the priority settings of each Thread, allow each Thread that its priority order is arranged, and can decide the scheduling of related work according to this priority order, i.e. the processing time, processing opportunity etc.So the system that uses the inventive method is when handling multitask, just network can be transmitted Thread, the processing time that the right of priority of the indivedual Threads of Thread basis of network reception Thread and other application program disposes each Thread, wherein the scope of right of priority can be set between 1 to 10, can set the big more person of right of priority numeral preferentially carries out, for instance, be decided to be 2 if network is transmitted the right of priority of Thread, the right of priority that network receives Thread is decided to be 4, and main Thread is decided to be 6, then system is when handling the network convey program, when network receives program and document handling procedure, just can produce a priority order according to the right of priority of these Threads, each Thread all has its priority order, and can do the Thread scheduling according to this, for example in this example, if system receives only three above-mentioned instructions, then the priority order of network transmission Thread is the 3rd, the priority order that network receives Thread is second, and the priority order of main Thread is first, the priority order that is the main Thread of corresponding document work of treatment is first, so on the order of system handles, will be that document processing>network reception>network transmits, and when this system of use, just can feel that the speed that document is handled accelerates, and can not think that the transmission of network can have influence on the usefulness that total system is carried out the document processing.
Therefore network program is separated in main Thread, become that network transmits and network receives two independently behind the Thread, just can transmit right of priority that Thread and network receive Thread by setting network respectively just comes Control Network to transmit and the proportion of network reception, also can distinguish Control Network transmission and network receives and the precedence of other application program on handling, the user just can be because of the usefulness of the inventive method Adjustment System, make the demand optimization of the usefulness of system according to self, for instance, when the user has influence on normally general operation as if the use of not thinking network, network can be transmitted the right of priority of Thread and network reception Thread turns down, and the right of priority of main Thread is heightened, so system just can focus on the processing of general job and the processing of related network is put at the order than the back, the phenomenon that makes system just not have delay when handling general job produces, further specify, can think little of transmitting if wish the transmission of network to focus on reception, the right of priority than network transmission Thread that network can be received the right of priority accent of Thread is height, so the speed of system handles network reception data can be very fast, just can be slower and data is sent out via network.Therefore use the inventive method and can set the higher or lower right of priority of individual work, allow the system effectiveness optimization.
Please refer to Fig. 2, in Fig. 2, show the present invention's one preferable implementation method process flow diagram.Wherein when system receives work order (step 200), whether wherein can go to confirm received is network program work order (step 201), when instruction is the network program work order, outside main Thread, generate the independent Thread that differs from main Thread, receiving network for instance receives when instructing, the network that generation differs from main Thread receives Thread, and this network receives Thread has its priority settings to handle its relevant working routine to use the Thread scheduling, or when receiving the network move instruction, the network that generation differs from main Thread transmits Thread, this Thread also has its priority settings to handle its relevant working routine (step 202) to use the Thread scheduling, and when receiving non-network program work order, just non-network program work order can be placed main Thread and carry out the processing of this work with this main Thread, and this work just can use the Thread scheduling to handle its relevant working routine (step 203) with the priority settings of main Thread, therefore system just can be according to the priority settings of all Threads, each Thread is produced its priority order (step 204), and priority order according to each working routine correspondence, produce a work scheduling (step 205), so the network program related work just can deal with according to this scheduling, and the same scheduling thus of other work deals with (step 206).
And wherein above-mentioned Thread time scheduling includes dual mode, one for can capture right of priority (preemptive), represent all given fixing execution time of all Threads, execution time finishes using, just suspend the execution of Thread and scheduler (scheduler) can from etc. the pending Thread, choose the highest Thread of right of priority, it is recovered to carry out; Another is for can not capture right of priority (non-preemptive), and the expression Thread has the execution time of all CPU, its indivedual uses of leaving.Only wait and just can force scheduler (scheduler) to change the time of next Thread use processor calling out member method (yield).
Described person only is the present invention's preferred embodiment wherein, is not to be used for limiting practical range of the present invention; Be all, be all scope of patent protection of the present invention and contain according to equalization variation and modification that the present invention did.

Claims (17)

1. the scheduling method of a network program is applied to a portable information processing apparatus, and this portable information processing apparatus carries out every working routine with a main Thread, it is characterized in that this method comprises the following step:
This portable information processing apparatus receives a work order;
Confirm this work order, when this work order belongs to the relevant working routine of network, in this main Thread outside, produce an independent Thread, and this independent Thread and this main Thread respectively there are its right of priority corresponding to this network related work program;
According to the right of priority of this independent Thread and the right of priority of this main Thread, produce an independent Thread priority order and a main Thread priority order respectively; And
According to this independent Thread priority order and this main Thread priority order, decision is corresponding to the scheduling of the network related work program of this independent Thread;
This right of priority the higher person wherein, this priority order is positioned at than the front, and this priority order is than the front person, handles earlier corresponding to the work scheduling of this Thread of this priority order.
2. the scheduling method of network program according to claim 1, it is characterized in that: this independent Thread is that a network transmits Thread.
3. the scheduling method of network program according to claim 1, it is characterized in that: this independent Thread is that a network receives Thread.
4. the scheduling method of network program according to claim 1 is characterized in that: confirm in the step of this work order, when this work order does not belong to the relevant working routine of network, place this main Thread.
5. the scheduling method of a network program is applied to a portable information processing apparatus, and this portable information processing apparatus carries out every working routine with a main Thread, it is characterized in that this method comprises the following step:
This portable information processing apparatus receives a work order;
Confirm this work order, when this work order belongs to network reception program, outside this main Thread, produce a network and receive Thread, and this network reception Thread there is its right of priority;
Confirm this work order, when this work order belongs to the network convey program, outside this main Thread, produce a network and transmit Thread, and this network transmission Thread there is its right of priority;
Confirm this work order, when this work order does not belong to the relevant working routine of network, place this main Thread, and this main Thread has its right of priority;
According to the right of priority of each this Thread, each this Thread is produced a priority order respectively; And
According to this priority order of each this Thread, decision is corresponding to the working routine scheduling of each this Thread;
This right of priority the higher person wherein, this priority order system is positioned at than the front, and this priority order is than the front person, handles earlier corresponding to the work scheduling of this Thread of this priority order.
6. as the scheduling method of network program as described in the claim 5, it is characterized in that: each this Thread is produced in the step of this priority order, this network transmits the right of priority of the right of priority of Thread greater than this network reception Thread, the right of priority that this network receives Thread is during greater than the right of priority of this main Thread, this network transmits the priority order of the priority order of Thread prior to this network reception Thread, and this network receives the priority order of the priority order of Thread prior to this main Thread.
7. as the scheduling method of network program as described in the claim 6, it is characterized in that: in the step of decision corresponding to the working routine scheduling of each this Thread, this network transmits the priority order of the priority order of Thread prior to this network reception Thread, and the priority order that this network receives Thread is during prior to the priority order of this main Thread, this working routine scheduling transmits Thread, then handles this network reception Thread for handling this network earlier, handles this main Thread afterwards again.
8. as the scheduling method of network program as described in the claim 5, it is characterized in that: each this Thread is produced in the step of this priority order, this network receives the right of priority of the right of priority of Thread greater than this network transmission Thread, the right of priority that this network transmits Thread is during greater than the right of priority of this main Thread, this network receives the priority order of the priority order of Thread prior to this network transmission Thread, and this network transmits the priority order of the priority order of Thread prior to this main Thread.
9. as the scheduling method of network program as described in the claim 8, it is characterized in that: in the step of decision corresponding to the working routine scheduling of each this Thread, when the priority order of this network reception Thread transmits the priority order of Thread prior to this network, and this network transmits the priority order of the priority order of Thread prior to this main Thread, this working routine scheduling receives Thread, then handles this network transmission Thread for handling this network earlier, handles this main Thread afterwards again.
10. as the scheduling method of network program as described in the claim 5, it is characterized in that: each this Thread is produced in the step of this priority order, the right of priority of this main Thread transmits the right of priority of Thread greater than this network, when the right of priority of this network transmission Thread receives the right of priority of Thread greater than this network, the priority order of this main Thread is prior to the priority order of this network transmission Thread, and this network transmits the priority order of the priority order of Thread prior to this network reception Thread.
11. scheduling method as network program as described in the claim 10, it is characterized in that: in the step of decision corresponding to the working routine scheduling of each this Thread, the priority order of this main Thread transmits the priority order of Thread prior to this network, and when the priority order of this network transmission Thread receives the priority order of Thread prior to this network, this working routine scheduling is handled this network afterwards again and is received Thread for handling this main Thread earlier, then handling this network transmission Thread.
12. scheduling method as network program as described in the claim 5, it is characterized in that: each this Thread is produced in the step of this priority order, the right of priority of this main Thread receives the right of priority of Thread greater than this network, when the right of priority of this network reception Thread transmits the right of priority of Thread greater than this network, the priority order of this main Thread is prior to the priority order of this network reception Thread, and this network receives the priority order of the priority order of Thread prior to this network transmission Thread.
13. scheduling method as network program as described in the claim 12, it is characterized in that: in the step of decision corresponding to the working routine scheduling of each this Thread, the priority order of this main Thread receives the priority order of Thread prior to this network, and when the priority order of this network reception Thread transmits the priority order of Thread prior to this network, this working routine scheduling is handled this network afterwards again and is transmitted Thread for handling this main Thread earlier, then handling this network reception Thread.
14. scheduling method as network program as described in the claim 5, it is characterized in that: each this Thread is produced in the step of this priority order, this network receives the right of priority of the right of priority of Thread greater than this main Thread, when the right of priority of this main Thread transmits the right of priority of Thread greater than this network, this network receives the priority order of the priority order of Thread prior to this main Thread, and the priority order of this main Thread transmits the priority order of Thread prior to this network.
15. scheduling method as network program as described in the claim 14, it is characterized in that: in the step of decision corresponding to the working routine scheduling of each this Thread, this network receives the priority order of the priority order of Thread prior to this main Thread, and when the priority order of this main Thread transmits the priority order of Thread prior to this network, this working routine scheduling is to handle this network earlier to receive Thread, then handle this main Thread, handles this network afterwards again and transmits Thread.
16. scheduling method as network program as described in the claim 5, it is characterized in that: each this Thread is produced in the step of this priority order, this network transmits the right of priority of the right of priority of Thread greater than this main Thread, when the right of priority of this main Thread receives the right of priority of Thread greater than this network, this network transmits the priority order of the priority order of Thread prior to this main Thread, and the priority order of this main Thread receives the priority order of Thread prior to this network.
17. scheduling method as network program as described in the claim 16, it is characterized in that: in the step of decision corresponding to the working routine scheduling of each this Thread, this network transmits the priority order of the priority order of Thread prior to this main Thread, and when the priority order of this main Thread receives the priority order of Thread prior to this network, this working routine scheduling is to handle this network earlier to transmit Thread, then handle this main Thread, handles this network afterwards again and receives Thread.
CN 200410052099 2004-11-08 2004-11-08 Network program arrangement method Pending CN1773457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200410052099 CN1773457A (en) 2004-11-08 2004-11-08 Network program arrangement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200410052099 CN1773457A (en) 2004-11-08 2004-11-08 Network program arrangement method

Publications (1)

Publication Number Publication Date
CN1773457A true CN1773457A (en) 2006-05-17

Family

ID=36760453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200410052099 Pending CN1773457A (en) 2004-11-08 2004-11-08 Network program arrangement method

Country Status (1)

Country Link
CN (1) CN1773457A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8549525B2 (en) 2006-03-22 2013-10-01 Mediatek Inc. Method for tuning service performance of multi-task system and multi-task system thereof
CN103747339A (en) * 2013-12-23 2014-04-23 乐视致新电子科技(天津)有限公司 Method and apparatus for resolving no response condition of on-line video by using android device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8549525B2 (en) 2006-03-22 2013-10-01 Mediatek Inc. Method for tuning service performance of multi-task system and multi-task system thereof
CN103747339A (en) * 2013-12-23 2014-04-23 乐视致新电子科技(天津)有限公司 Method and apparatus for resolving no response condition of on-line video by using android device

Similar Documents

Publication Publication Date Title
Bettati et al. End-to-End Scheduling to Meet Deadlines in Distributed Systems.
CN104881320B (en) A kind of telescopic method for generating text
EP3092567B1 (en) System and method for isolating i/o execution via compiler and os support
WO2005069155A3 (en) Method and apparatus for task schedulin in a multi-processor system based on memory requirements
JP2004030663A (en) Device and method for integrating workload manager with system task scheduler
CN116541134B (en) Deployment method and device for containers in multi-architecture clusters
US20130219395A1 (en) Batch scheduler management of tasks
Liu et al. Supporting soft real-time parallel applications on multicore processors
Agrawal et al. Scheduling parallelizable jobs online to minimize the maximum flow time
CN108563494B (en) Thread scheduling system and method with adaptive dynamic adjustment
Xue et al. V10: Hardware-assisted npu multi-tenancy for improved resource utilization and fairness
CN111158875B (en) Multi-module-based multi-task processing method, device and system
Denninnart et al. Efficient task pruning mechanism to improve robustness of heterogeneous computing systems
CN1773457A (en) Network program arrangement method
KR100590764B1 (en) Large Data Processing Using Scheduler in Multiprocessor System
CN113485810A (en) Task scheduling execution method, device, equipment and storage medium
Jones et al. Second evaluation of job queuing/scheduling software: Phase 1 report
KR100790304B1 (en) Scheduling Execution of Java Virtual Machine and Operating System
CN111930485A (en) Job scheduling method based on performance expression
Khalil et al. Survey of Apache Spark optimized job scheduling in Big Data
CN109426556B (en) Process scheduling method and device
US8473662B2 (en) Interrupt-handling-mode determining method of embedded operating system kernel
CN114067917A (en) GATK super computer system based on tuning parameters
Liu et al. Uncertainty-aware online deadline-constrained scheduling of parallel applications in distributed heterogeneous systems
Suranauwarat et al. The design, implementation and initial evaluation of an advanced knowledge-based process scheduler

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