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
order
Prior art date
Application number
CN 200410052099
Other languages
Chinese (zh)
Inventor
林良清
Original Assignee
佛山市顺德区顺达电脑厂有限公司
神达电脑股份有限公司
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 佛山市顺德区顺达电脑厂有限公司, 神达电脑股份有限公司 filed Critical 佛山市顺德区顺达电脑厂有限公司
Priority to CN 200410052099 priority Critical patent/CN1773457A/en
Publication of CN1773457A publication Critical patent/CN1773457A/en

Links

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

网络程序排程方法 Network program scheduling method

技术领域 FIELD

本发明有关于一种排程方法,特别有关于一种网络程序的排程方法。 There present invention relates to a scheduling method, particularly relates to a method of scheduling network program.

背景技术 Background technique

在一个操作系统中,所处理的内容会包含多个行程(process),而且每个行程(process)内可以有一个执行绪(thread),也可以有一个以上的执行绪(thread),有一些操作系统都只支持单执行绪(single thread),例如UNIX、DOS等,而WindowsNT与Windows 95则是能够支持多执行绪(multi-thread),因大多数个人电脑只有一颗处理器,所以能够支持多执行绪的操作系统,会将处理器时间分配给许多段的可执行程序代码(即上述所称的执行绪),以提供多任务功能。 In one operating system, the content comprising a plurality of processed will travel (process), and each stroke (process) can have a thread (Thread), there may be more than one thread (Thread), there are some operating system only supports single-threaded (single thread), such as UNIX, DOS, etc., and WindowsNT and Windows 95 is capable of supporting multi-threaded (multi-thread), because only a majority of PC processors, it is possible support for multi-threaded operating system, processor time will be allocated to a number of executable program code segment (that is referred to above thread), to provide multi-tasking capabilities. 一个执行绪可以代表一整个应用程序,不过更常代表的只是应用程序中能够分开执行的一部分,也可说执行绪是程序中的一个区段,而程序可以被划分成数个区段,每一个区段皆可以独立执行,即为系统中的最小执行单位。 A thread can represent an entire application, but only part of the application can be executed more often represented separately, it can be said thread is a section of the program, and the program may be divided into a number of segments, each a section can be performed are independent, that is, the smallest unit of execution in the system.

操作系统根据多项因素(例如执行绪的优先权、自执行绪前次执行后经过了多少时间)来配置每一个执行绪的处理时间。 Operating system based on a number of factors (such as thread priority, since the implementation of the previous execution thread after how much time has elapsed) to configure each thread of execution processing time. 但由于一个中央处理器一次只能做一件工作,而操作系统中可能一次不只有一件工作存在,因此处理器资源的管理可说是相当重要。 However, due to a central processor can only do one job, and once the operating system may not work there is only one, the management processor resources can be quite important. 在这方面会遇上的相关管理问题,如行程管理(Process Management),执行绪问题(Thread),中央处理器行程排班(Scheduling)的问题等等。 Related management problems in this area will encounter, such as travel management (Process Management), thread issues (Thread), the central processor stroke scheduling (Scheduling) issues and so on. 不同的操作系统通常有不同的解决方法;以Windows操作系统为例,为了公平起见,它被设计成为一种分时系统(Time Sharing),让中央处理器在不同行程间不断切换来执行许多工作。 Different operating systems typically have different solutions; to the Windows operating system, for example, to be fair, it was designed as a time-sharing system (Time Sharing), so that the central processing unit to perform a lot of work to constantly switch between different stroke .

以上所提到的多执行绪方法,因可以有效活用多处理器系统的特性,所以已广为各种新兴操作系统所采用,并常会使用在一般计算机或固定式的设备中。 Multithreading methods mentioned above, by effectively utilizing the characteristics of the multi-processor system, it has been widely used in a variety of new operating systems, and often will be used in a general computer or a stationary device. 而在目前的掌上型电脑或是一些嵌入式设备中,因考量处理器的特性及功能负荷,有些内建的操作系统是以单一主要执行绪作各项工作程序的处理,请参考图1,例如当操作系统接收到许多工作程序的指令时(步骤100),比如像网络及文书处理同时在进行时,系统便会根据接收指令的先后次序(例如先接收到网络程序指令,后接收到文书处理的程序指令)将所接收到的工作指令置于主要执行绪中(步骤101),并根据其接收的先后顺序来配置每一个工作程序的处理顺序(步骤102),因此若当其中有某项工作占据太多的处理时间,便会影响到接下来的工作处理。 In the current handheld computers or some embedded devices, due consideration the characteristics and function of load on the processor, and some built-in operating system based on a single main thread for processing the work program, please refer to Figure 1, For example, when (step 100) the operating system receives an instruction of a number of procedures, such as word processing and network during the same time, according to the order of the system will receive instructions (e.g., program instructions received first network, upon receiving the instrument instruction processing program) to the received work instruction in the main thread (step 101), and to profile the work order for each program (step 102) based on the reception of the order, so if there is something which when work items take up too much processing time, it will affect the next job processing. 例如要完成网络工作程序,便会比一般工作程序需要更多处理器的时间,且因系统一次只能处理一件工作,所以系统的运作便很有可能因网络工作程序而拖住,而影响到接下来工作程序的反应时间,也就是说在网络执行完之前,其它应用程序无法进行,因此常会延缓了其它应用程序处理的速度,另外因网络工作程序中包括了传送及接收两种主要程序,所以只要接收到有关网络传送或网络接收的指令时,便会在主要执行绪中产生出一个与网络相关的工作程序,而在执行到网络程序时,有时便会大大影响到主要执行绪中接下来其它工作程序的处理速度及使用者所感受到的反应时间。 For example, to complete the network work program, it will require more processor time than the general work program, and because the system can only handle a job, so the operation of the system will likely stall because of network work program, and the impact the reaction time to the next work procedure, that is to say prior to executing the network, other applications can not be, so often the slow speed of the other application processes, due to additional work processes included in the network transmit and receive two main proceeding , so long as the instructions related to receiving a network transmitted or received by the network, the main thread will produce a network-related procedures, and in the program execution to the network, sometimes it will greatly affect the main thread of Next, the processing speed of reaction time and working procedures of other users felt. 所以在使用掌上型电脑或是一些嵌入式设备上网时,常会感觉到使用其它操作时有时会有延迟的现象产生,例如像用掌上型电脑上网时,使用音乐播放时会有断断续续的现象,或是使用文书处理时会感觉到有反应延迟的现象等。 So there will be a delay phenomenon in the use of handheld computers or the Internet some embedded devices, often feel that sometimes occurs with other operations, such as when the Internet with handheld computers, there will be intermittent phenomenon when using the music player, or You will feel a response delay phenomenon when using word processing.

根据以上所述,目前的掌上型电脑或是一些嵌入式设备上便需要一种方法能够适当的配置网络与系统实时反应之间的资源,使系统能够反应使用者的需求,例如使用者在利用系统使用一些文书处理时,不会因网络工作影响其反应时间,或是使用者在使用系统上网时,不会因一些背景程序而感受到有上网速度缓慢的现象。 According to the above will be needed, the current palmtop or some embedded devices a method capable of appropriately allocating resources among network systems with real-time response, enabling the system to the reaction requirements of the user, such as the user using the system uses a number of instruments, and do not affect its reaction time depends on the work of the network, or the Internet users in the use of the system, will not feel there is some background programs and slow Internet phenomenon.

发明内容 SUMMARY

根据以上所述,本发明目的即在于提供一种网络程序的排程方法,应用于以主要执行绪进行各项工作程序的可携式信息处理装置,此方法可以使此可携式信息处理装置调整网络程序所占的系统资源,让系统的效能能够反应使用者的需求。 According to the above, an object of the present invention, i.e. to provide a network program scheduling method applied to a portable information processing apparatus to the main operating program thread, this method can make this portable information processing apparatus system resource adjustment program network share, so that the effectiveness of the system can react needs of users.

为达到上述目的,本发明提供一种网络程序的排程方法,应用于以主要执行绪进行各项工作程序之可携式信息处理装置,而此方法包含下列步骤:该可携式信息处理装置接收一工作指令;确认该工作指令,该工作指令属于网络相关的工作程序时,于该主要执行绪外产生对应于该网络相关工作程序的一独立执行绪,且该独立执行绪与该主要执行绪各有其优先权;根据该独立执行绪的优先权及该主要执行绪的优先权,分别产生一独立执行绪优先权顺序及一主要执行绪优先权顺序;及根据该独立执行绪优先权顺序及该主要执行绪优先权顺序,决定对应于该独立执行绪的网络相关工作程序的排程;其中该优先权较高者,该优先权顺序位于较前面,而该优先权顺序较前面者,对应于该优先权顺序之该执行绪的工作排程先处理。 To achieve the above object, the present invention provides a method of scheduling network programs, the main thread to be applied to the portable information processing apparatus of the work program, the method comprising the steps of: the portable information processing apparatus receiving a work order; confirming the work order, the work order belongs to the network-related procedures, to the main thread an outer generated corresponding to the network-related work procedures a separate thread, and the separate thread to the main executive each thread priority; the separate thread priority and the priority of the primary thread according to generate a separate thread priority order and a main thread execution priority order; thread priority and based on the independent the order and the main thread priority order is determined corresponding to the associated network independent thread scheduling procedures; wherein the higher the priority, the priority order is located relatively in front, and the priority order than by the foregoing , corresponding to the priority order of the work schedule of the first processing thread.

为达到上述目的,本发明还提供一种网络程序的排程方法,应用于一可携式信息处理装置,该可携式信息处理装置以一主要执行绪进行各项工作程序,其特征在于该方法包含下列步骤:该可携式信息处理装置接收一工作指令;确认该工作指令,该工作指令属于网络接收程序时,于该主要执行绪外产生一网络接收执行绪,且该网络接收执行绪有其优先权;确认该工作指令,该工作指令属于网络传送程序时,于该主要执行绪外产生一网络传送执行绪,且该网络传送执行绪有其优先权;确认该工作指令,该工作指令不属于网络相关的工作程序时,置于该主要执行绪中,且该主要执行绪有其优先权;根据每一该执行绪的优先权,对每一该执行绪分别产生一优先权顺序;及根据每一该执行绪的该优先权顺序,决定对应于每一该执行绪的工作程序排程;其中该 To achieve the above object, the present invention also provides a method of scheduling network program applied to a portable information processing apparatus, the portable information processing apparatus to a work program main thread, characterized in that the the method comprises the steps of: the portable information processing apparatus receives an operating command; confirming the work order, the work order reception program belongs to the network, generates a network receiving thread to the main thread, the thread and the network receives have priority; confirming the work order, the work order belongs to the network transfer program to the main thread an outer thread generates a transmission network, and the network transmission has priority thread; confirms the work order, the work when the instruction does not belong to the network-related procedures, placed in the primary thread and the main thread has priority; order of priority according to a priority of each of the thread, the thread is generated for each respective ; and according to the execution priority order of each of the thread, determines the thread corresponding to each work program schedule; wherein the 先权较高者,该优先权顺序系位于较前面,而该优先权顺序较前面者,对应于该优先权顺序之该执行绪的工作排程先处理。 Higher first incarnation, the priority order based located relatively in front, in front of which priority order than those corresponding to the work schedule of the priority order of the first processing thread.

因此将网络程序自主要执行绪中分离出来,成为网络传送及网络接收两个独立的执行绪后,便可以通过分别设定网络传送执行绪与网络接收执行绪的优先权高低来控制网络传送及网络接收的比重,也可以分别控制网络传送及网络接收与其它应用程序在处理上的先后次序,使用者便可因本发明方法调整系统的效能,使系统的效能根据自身的需求最佳化。 Thus the network from the main program after execution thread separated out to become two separate threads received network transmission network and can then transfer the thread and receives network control thread execution priority level are set through the network transmission network and receiving network specific gravity may be controlled separately network transmission network receives the order and with other applications in the process, the user can adjust the system because the effectiveness of the method of the present invention, the system performance optimization according to their own needs.

附图说明 BRIEF DESCRIPTION

图1显示传统技术中,系统处理工作程序的排程方法;及图2显示本发明网络程序排程的方法流程图。 Figure 1 shows the conventional art, the system processing program scheduling method; and FIG. 2 shows the network scheduling program flowchart of a method of the present invention.

具体实施方式 Detailed ways

本发明是应用于掌上型电脑或是一些嵌入式设备上,装置上的操作系统可支持一个以上的执行绪,且此操作系统至少能够同时执行一个以上的应用程序。 The present invention is applicable to handheld computers or on embedded devices in some operating systems, the device may support more than one thread, and the operating system is capable of performing at least one or more applications simultaneously. 因为目前大多数个人电脑、掌上型电脑或是一些嵌入式设备都只有一颗处理器,所以目前的操作系统会将处理器时间分配给许多段的可执行程序代码(即称为执行绪),以提供多任务功能。 Because most personal computers, handheld computers or some embedded devices have only one processor, so the current operating system, processor time will be allocated to the executable program code (ie, called threads) many segments, to provide multi-tasking capabilities. 一个执行绪可以代表一整个应用程序,不过更常代表的只是应用程序中能够分开执行的一部分,也可说执行绪是程序中的一个区段,而程序可以划分成数个区段,每一个区段皆可以独立执行,即为系统中的最小执行单位。 A thread can represent an entire application, but only part of the application can be executed more often represented separately, it can be said thread is a section of the program, and the program can be divided into a number of segments, each of all sections can be performed independently, is the smallest unit of execution in the system. 操作系统根据多项因素(例如执行绪的优先权、自执行绪前次执行后经过了多少时间)来配置每一个执行绪的处理时间,当执行档案输入与输出等时间密集的工作时,多执行绪可以大幅提升效能。 Operating system based on a number of factors (such as thread priority, since the thread last executed after how much time has elapsed) to configure each thread of execution processing time, when performing file input and output, time-intensive work, and more threads can significantly improve performance.

本发明方法的概念在于,当操作系统同时接收到许多的工作程序时,可以将接收到的工作程序作分类,一种为网络相关的工作程序,一种为不与网络相关的工作程序,并根据此两大类工作程序来配置其处理时间及其先后次序,因此在配合了执行绪优先权的时间排程概念后,本发明的特征即在于将网络相关的工作程序自原本单一的主要执行绪中独立出来,而形成异于主要执行绪的执行绪,如此系统在处理工作程序时便会在主要执行绪及网络工作相关的执行绪之间依其优先权设定作先后次序的排程,例如网络相关的工作程序包含了网络传送及网络接收两大部份,这两大部份可分别自主要执行绪独立出来,并各自形成一个单独的执行绪,也就是会形成一个负责网络传送的执行绪及一个负责网络接收的执行绪,而每一个执行绪都可设定其优先权,因此根据 Concept of the method of the present invention is that, when the operating system simultaneously receive many working procedures, you can be received as classification procedures, one for the network-related procedures, one for the network not associated with the work program, and according to this program to configure two types of work and the order processing time, so after line with the concept of time scheduling priority thread, according to the present invention is characterized in that, i.e. network related procedures performed from the original single major in independent thread, the main thread is formed different from the thread, in such a system will work the main thread and the network-related processing performed at the program according to its priority set for the thread between the order of the schedule such as network-related work program includes the transmission network and the network receives two parts, two parts which respectively independent from the main thread, and each form a separate thread, which is responsible for the formation of a network transmission thread of execution and a network responsible for receiving the thread, and the thread can be set for each priority, and therefore according to 一个执行绪的优先权,网络传送的执行绪、网络接收的执行绪及原先主要执行绪都会有一个优先权的顺序,系统便可根据此顺序决定处理的工作顺序。 A thread priority, thread network transmission, network receiving the thread and the main thread former will have a priority order, the system can work according to this order determines the order of processing.

也就是说,传统技术中网络传送或网络接收的工作程序与其它工作程序都是经由同一主要执行绪来进行,而其工作的处理顺序完全依接收命令的先后顺序,所以无法根据自身的需求作网络传送、网络接收与其它工作程序之间的资源配置,而在本发明中分别以网络传送执行绪及网络接收执行绪两个执行绪来达到网络程序的工作,而其它与网络不相关的工作便由主要执行绪来完成,其工作的顺序完全根据主要执行绪与其它执行绪之间的先后顺序来决定,每一个执行绪都可设定其优先权大小,因此系统便可根据每一个执行绪的优先权设定,让每一个执行绪有其优先权顺序,并且可根据此优先权顺序来决定相关工作的排程,即处理时间、处理时机等。 In other words, the conventional technology or network transmission network received work procedures and other procedures are the same through the main thread to perform, and its processing sequence work entirely in accordance with the order to receive commands, it is not possible according to their needs as network transmission, network receiving the resource allocation among other procedures, respectively to the network transmission network receiving thread and thread implementation to achieve the two threads in the network program according to the present invention, while other work not related to the network will be done by the main thread, the order is determined to work with full thread other thread execution order between each thread size can be set priority, so the system can be performed according to each of performing the primary thread priority setting, so that each thread has a priority order may be determined and related to work schedules, i.e., treatment time, treatment time and the like in accordance with this priority order. 所以应用本发明方法的系统在处理多任务时,便可以将网络传送执行绪、网络接收执行绪及其它应用程序的执行绪根据个别执行绪的优先权来配置每一个执行绪的处理时间,其中优先权的范围可设定在1到10之间,可设定优先权数字越大者优先执行,举例来说,若将网络传送执行绪的优先权定为2、网络接收执行绪的优先权定为4,而将主要执行绪定为6,则系统在处理网络传送程序时、网络接收程序及文书处理程序时,便可根据这些执行绪的优先权产生出一个优先权顺序,每一个执行绪都有其优先权顺序,并可依此作执行绪排程,例如在这个例子中,若系统只接收到上述的三项指令,则网络传送执行绪的优先权顺序为第三,网络接收执行绪的优先权顺序为第二,而主要执行绪的优先权顺序为第一,即对应文书处理工作的主要执行绪的优先权顺序为第一 Therefore, application of the method of the present invention system when multitasking, network transmission can be threads, thread execution network receives the thread and other applications configured to perform each of the processing time according to the individual threads of the thread priority, wherein priority can be set in the range between 1 and 10, may be set larger priority numbers are preferentially performed, for example, if the network transmission priority thread is set to 2, the network receiving thread priority as 4, the main thread will be designated as 6, the network transmission system, while processing a program, the network receives a program and word processing program, a priority order can produce these thread priority, performed for each thread has its priority order, and so as thread scheduling, for example, in this example, only if the system receives the three instructions, the network transmission priority order as a third thread, the network receiving the main priority order execution priority order for the second thread, the main thread priority order of the first, i.e., the corresponding word processing work for the first thread 所以系统处理的顺序上,将会是文书处理>网络接收>网络传送,而在使用此系统时,便会感觉到文书处理的速度变快,而不会觉得网络的传输会影响到整个系统进行文书处理的效能。 Therefore, the order of processing systems, word processing will be> network receives> network transmission, and in the use of this system, will feel the instrument becomes faster processing speed, without the transmission network that will affect the whole system the effectiveness of word processing.

因此将网络程序自主要执行绪中分离出来,成为网络传送及网络接收两个独立的执行绪后,便可以通过分别设定网络传送执行绪与网络接收执行绪的优先权高低来控制网络传送及网络接收的比重,也可以分别控制网络传送及网络接收与其它应用程序在处理上的先后次序,使用者便可因本发明方法调整系统的效能,使系统的效能根据自身的需求最佳化,举例来说,使用者若不想网络的使用影响到正常一般的作业时,可将网络传送执行绪及网络接收执行绪的优先权调低,而将主要执行绪的优先权调高,如此系统便会着重于一般作业的处理而把有关网络的处理摆在较后面的次序,使系统在处理一般作业时便不会有延迟的现象产生,进一步说明,若希望网络的传输着重于接收而可较不重视传递的话,可将网络接收执行绪的优先权调的较网络传送执行绪的优 Thus the network from the main program after execution thread separated out to become two separate threads received network transmission network and can then transfer the thread and receives network control thread execution priority level are set through the network transmission network and receiving network specific gravity may be controlled separately network transmission network receives the order and with other applications on the processing method of the present invention, because the user can adjust the system performance, the system performance optimization according to their own needs, for example, if the user does not want to use the network in general affect the normal operation, the network may transmit the received network thread and lower thread priority, but will increase the main thread priority, so the system will It will focus on the process and the general operation of the process about the network put in the back of a more orderly, and the system in dealing with general operations would not have delayed the phenomenon further explanation. If you want the transmission network can be more focused on the reception not attach importance to transfer, you can perform the network receives the network transmission priority than the thread adjusting thread of execution excellent 权为高,如此系统处理网络接收资料的速度会较快,而将资料经由网络传送出去便会较慢。 Right high, so the system processing speed of the network receiving the information will be faster, but the information will be sent out via the network is slow. 因此应用本发明方法可以设定个别工作较高或较低的优先权,让系统效能最佳化。 Thus process of the invention can be individually set higher or lower priority work, so that system performance is optimized.

请参考图2,在图2中显示本发明一较佳实施方法流程图。 Please refer to FIG 2, a preferred embodiment of the present invention is a method flowchart shown in FIG. 其中当系统接收到工作指令时(步骤200),其中会去确认所接收到是否为网络程序工作指令(步骤201),当指令为网络程序工作指令时,于主要执行绪外生成异于主要执行绪的独立执行绪,举例来说接收到网络接收指令时,生成异于主要执行绪的一个网络接收执行绪,并且此网络接收执行绪有其优先权设定以使用执行绪排程处理其相关的工作程序,或是接收到网络传送指令时,生成异于主要执行绪的一个网络传送执行绪,此执行绪也有其优先权设定以使用执行绪排程处理其相关的工作程序(步骤202),而接收到非网络程序工作指令时,便会将非网络程序工作指令置于主要执行绪中并以该主要执行绪来进行该工作的处理,而此工作便会以主要执行绪的优先权设定使用执行绪排程处理其相关的工作程序(步骤203),因此系统便可根据所有执行绪的优先权设定,对 Wherein when the system receives the work instruction (step 200), which will be received to confirm whether a network program of work instruction (step 201), when the work instruction program instructions for the network, the main thread to generate different from the outer main executive independent thread thread, for example, when receiving a network command receiver, generating different from the main thread of a thread receiving network, and the network receives this thread has its priority set to use the thread scheduling process its associated the procedures, the network, or when receiving a transfer instruction generating different from the main thread of a network transmission thread, this thread has its priority set to use the thread scheduling process their associated procedures (step 202 ), and upon receiving the non-working network program instructions, the non-network program will work instruction in the main thread and the main thread to process the work is performed, and this will work to the main thread priority use right is set thread scheduling process their associated procedures (step 203), so the system can be set according to priority of all the threads, of 一执行绪产生其优先权顺序(步骤204),并且根据每一个工作程序对应的优先权顺序,产生一个工作排程(步骤205),所以网络程序相关工作便可根据此排程作处理,而其它工作同样的可由此排程作处理(步骤206)。 A thread priority order is generated (step 204), and according to the priority order corresponding to each of the work program, a task scheduling is generated (step 205), the network program related work can be treated according to this schedule, and the same result may be other work schedule for processing (step 206).

而其中上述的执行绪时间排程包含有两种方式,一为可夺取优先权(preemptive),表示所有的执行绪皆被给定固定的执行时间,执行时间使用完毕,便暂停执行绪的执行而排程器(scheduler)会从等待执行的执行绪中,挑出优先权最高的执行绪,将其恢复执行;另一为不可夺取优先权(non-preemptive),表示执行绪拥有所有CPU的执行时间,任由其个别使用。 And wherein said thread comprises time scheduling in two ways, a priority to be captured (preemptive), indicates that all threads are being given fixed execution time, the execution time of use, the thread will suspend execution the scheduler (Scheduler) will be performed from the waiting thread, pick the highest priority thread, which resumes execution; shall not take precedence of the other (non-preemptive), represents all the thread has a CPU the execution time and let their individual use. 只有在呼叫成员方法(yield)等才可以强制排程器(scheduler)更换下一个执行绪使用处理器的时间。 Only members of the calling method (the yield) and the like can force the scheduler (Scheduler) the replacement of a thread using processor time to execute.

所述者,仅为本发明其中的较佳实施例而已,并非用来限定本发明的实施范围;即凡依本发明所作的均等变化与修饰,皆为本发明专利保护范围所涵盖。 The person, wherein only the preferred embodiments of the present invention only, not intended to limit the scope of embodiments of the present invention; i.e., where under this invention, modifications and alterations made by the patent scope of the present invention are all encompassed.

Claims (17)

1.一种网络程序的排程方法,应用于一可携式信息处理装置,该可携式信息处理装置以一主要执行绪进行各项工作程序,其特征在于该方法包含下列步骤:该可携式信息处理装置接收一工作指令;确认该工作指令,该工作指令属于网络相关的工作程序时,于该主要执行绪外产生对应于该网络相关工作程序的一独立执行绪,且该独立执行绪与该主要执行绪各有其优先权;根据该独立执行绪的优先权及该主要执行绪的优先权,分别产生一独立执行绪优先权顺序及一主要执行绪优先权顺序;及根据该独立执行绪优先权顺序及该主要执行绪优先权顺序,决定对应于该独立执行绪的网络相关工作程序的排程;其中该优先权较高者,该优先权顺序位于较前面,而该优先权顺序较前面者,对应于该优先权顺序之该执行绪的工作排程先处理。 1. A method of scheduling network program applied to a portable information processing apparatus, the portable information processing apparatus to a work program main thread, characterized in that the method comprises the steps of: This can be portable information processing apparatus receives an operating command; confirming the work order, the work order belongs to the network-related procedures, generated corresponding to the network-related work procedures a separate thread to the main thread outside, and the independent execution the main thread of each thread priority; the separate thread priority and the priority of the primary thread according to generate a separate thread priority order and a main thread execution priority order; and based on the independent thread priority order and the priority order of the primary thread, corresponding to the determined network independent thread scheduling related work procedures; wherein the higher the priority, the priority order is located relatively in front, which preferentially front right order than those corresponding to the thread of the work schedule to the priority order of the processing.
2.如权利要求1所述网络程序的排程方法,其特征在于:该独立执行绪为一网络传送执行绪。 1 the network program scheduling method as claimed in claim 2, characterized in that: the thread is an independent network transmission thread.
3.如权利要求1所述网络程序的排程方法,其特征在于:该独立执行绪为一网络接收执行绪。 1 the network program scheduling method as claimed in claim 3, wherein: the network is a separate thread receiving thread.
4.如权利要求1所述网络程序的排程方法,其特征在于:确认该工作指令的步骤中,该工作指令不属于网络相关的工作程序时,置于该主要执行绪中。 1 the network program scheduling method as claimed in claim 4, wherein: the step of confirmation when the work order, the work order is not part of the network-related procedures, is placed in the main thread.
5.一种网络程序的排程方法,应用于一可携式信息处理装置,该可携式信息处理装置以一主要执行绪进行各项工作程序,其特征在于该方法包含下列步骤:该可携式信息处理装置接收一工作指令;确认该工作指令,该工作指令属于网络接收程序时,于该主要执行绪外产生一网络接收执行绪,且该网络接收执行绪有其优先权;确认该工作指令,该工作指令属于网络传送程序时,于该主要执行绪外产生一网络传送执行绪,且该网络传送执行绪有其优先权;确认该工作指令,该工作指令不属于网络相关的工作程序时,置于该主要执行绪中,且该主要执行绪有其优先权;根据每一该执行绪的优先权,对每一该执行绪分别产生一优先权顺序;及根据每一该执行绪的该优先权顺序,决定对应于每一该执行绪的工作程序排程;其中该优先权较高者,该优先权顺序 5. A method of scheduling network program applied to a portable information processing apparatus, the portable information processing apparatus to a work program main thread, characterized in that the method comprises the steps of: This can be portable information processing apparatus receives an operating instruction; confirms the work order, the work order belongs to the network when the reception program, the main thread to generate a network receiving an outer thread, and the network receiving thread has priority; confirms the when the work order, the work order belongs to the network transfer program to the main thread an outer thread generates a transmission network, and the network transmission has priority thread; confirms the work order, the work order related to the network does not belong to the working when the program is placed in the main thread and the main thread has priority; according to the priority of each of the thread, the thread is generated for each a priority order, respectively; and each performed according to the the thread priority order decided corresponding to each of the thread scheduling procedures; wherein the higher the priority, the priority order 位于较前面,而该优先权顺序较前面者,对应于该优先权顺序之该执行绪的工作排程先处理。 Located further in front, and the front priority order than those corresponding to the work schedule of the priority order of the first processing thread.
6.如权利要求5所述网络程序的排程方法,其特征在于:对每一该执行绪产生该优先权顺序的步骤中,该网络传送执行绪的优先权大于该网络接收执行绪的优先权,该网络接收执行绪的优先权大于该主要执行绪的优先权时,该网络传送执行绪的优先权顺序先于该网络接收执行绪的优先权顺序,且该网络接收执行绪的优先权顺序先于该主要执行绪的优先权顺序。 5 6. The network program scheduling method as claimed in claim, wherein: the step of generating each of the thread in the priority order, the network transmission priority thread is greater than the thread's priority network receiving right, the network receives is greater than the priority of the thread when the main thread priority, the network transmission thread execution priority order of the received first thread execution priority order in the network, and the network receiving thread priority order of prior to the main thread of execution priority order.
7.如权利要求6所述网络程序的排程方法,其特征在于:决定对应于每一该执行绪的工作程序排程的步骤中,该网络传送执行绪的优先权顺序先于该网络接收执行绪的优先权顺序,且该网络接收执行绪的优先权顺序先于该主要执行绪的优先权顺序时,该工作程序排程为先处理该网络传送执行绪、接着处理该网络接收执行绪,之后再处理该主要执行绪。 6 7. The network program scheduling method as claimed in claim wherein: each of the decision steps corresponding to the thread scheduling procedures, the network transmission priority order is received first thread to the network when the thread execution priority order, and the network receiving thread priority order in the priority order before the main thread of the working program schedule for the first thread to process the transport network, then the network receives the processing thread, after reprocessing the main thread.
8.如权利要求5所述网络程序的排程方法,其特征在于:对每一该执行绪产生该优先权顺序的步骤中,该网络接收执行绪的优先权大于该网络传送执行绪的优先权,该网络传送执行绪的优先权大于该主要执行绪的优先权时,该网络接收执行绪的优先权顺序先于该网络传送执行绪的优先权顺序,且该网络传送执行绪的优先权顺序先于该主要执行绪的优先权顺序。 5 8. The network program scheduling method as claimed in claim, wherein: the step of generating each of the thread in the order of priority, the network receives priority thread is greater than the network transmission priority thread right, the network transmission is greater than the priority of the thread when the main thread priority, the network receives the first thread execution priority order of the order of thread execution priority transmission in the network, and the network transmission priority order of the thread prior to the main thread of execution priority order.
9.如权利要求8所述网络程序的排程方法,其特征在于:决定对应于每一该执行绪的工作程序排程的步骤中,该网络接收执行绪的优先权顺序先于该网络传送执行绪的优先权顺序时,且该网络传送执行绪的优先权顺序先于该主要执行绪的优先权顺序,该工作程序排程为先处理该网络接收执行绪、接着处理该网络传送执行绪,之后再处理该主要执行绪。 8 9. The network program scheduling method as claimed in claim wherein: each of the decision steps corresponding to the thread scheduling procedures, the network receives the order of priority of the thread prior to transmission network when the thread execution priority order, and the order of priority of the network prior to transfer of the thread is the main thread priority order of the working program schedule for the first thread to process the received network, then the network transmission processing thread, after reprocessing the main thread.
10.如权利要求5所述网络程序的排程方法,其特征在于:对每一该执行绪产生该优先权顺序的步骤中,该主要执行绪的优先权大于该网络传送执行绪的优先权,该网络传送执行绪的优先权大于该网络接收执行绪的优先权时,该主要执行绪的优先权顺序先于该网络传送执行绪的优先权顺序,且该网络传送执行绪的优先权顺序先于该网络接收执行绪的优先权顺序。 5 10. The network program scheduling method as claimed in claim, wherein: the step of generating each of the thread in the priority order, the main thread priority greater than the priority of the thread of the transmission network when the network transmission priority thread is greater than the network receives priority thread, the main thread execution priority order of transmission of the first thread execution priority order in the network, and the network transmission priority order of the first thread in the network receives the thread execution priority order.
11.如权利要求10所述网络程序的排程方法,其特征在于:决定对应于每一该执行绪的工作程序排程的步骤中,该主要执行绪的优先权顺序先于该网络传送执行绪的优先权顺序,且该网络传送执行绪的优先权顺序先于该网络接收执行绪的优先权顺序时,该工作程序排程为先处理该主要执行绪、接着处理该网络传送执行绪,之后再处理该网络接收执行绪。 10 11. The network program scheduling method as claimed in claim wherein: each of the decision steps corresponding to the thread scheduling procedures, the main thread execution priority order executed prior to the transmission network thread priority order, and the network transmission priority order of the first thread execution priority order when receiving the thread, the work schedule for the first processing program to the main thread to the network, then the network transmission processing thread, then after the network receiving processing thread.
12.如权利要求5所述网络程序的排程方法,其特征在于:对每一该执行绪产生该优先权顺序的步骤中,该主要执行绪的优先权大于该网络接收执行绪的优先权,该网络接收执行绪的优先权大于该网络传送执行绪的优先权时,该主要执行绪的优先权顺序先于该网络接收执行绪的优先权顺序,且该网络接收执行绪的优先权顺序先于该网络传送执行绪的优先权顺序。 5 12. The network program scheduling method as claimed in claim wherein: each of the step of generating the priority order of the thread, the main thread priority greater than the priority of the network receiving thread when the network receives priority thread is greater than the network transmission priority thread, the main thread execution priority order of the received first thread execution priority order in the network and the network receives the first thread priority order the network transmits to the thread execution priority order.
13.如权利要求12所述网络程序的排程方法,其特征在于:决定对应于每一该执行绪的工作程序排程的步骤中,该主要执行绪的优先权顺序先于该网络接收执行绪的优先权顺序,且该网络接收执行绪的优先权顺序先于该网络传送执行绪的优先权顺序时,该工作程序排程为先处理该主要执行绪、接着处理该网络接收执行绪,之后再处理该网络传送执行绪。 12 13. The network program scheduling method as claimed in claim wherein: each of the decision steps corresponding to the thread scheduling procedures, the main thread execution priority order of execution in the network before receiving thread priority order, and the network receiving thread execution priority order of transmission of the first thread execution priority order of the working schedule for the first processing program to the main thread to the network, then the network receives the processing thread, then after the network transmission processing thread.
14.如权利要求5所述网络程序的排程方法,其特征在于:对每一该执行绪产生该优先权顺序的步骤中,该网络接收执行绪的优先权大于该主要执行绪的优先权,该主要执行绪的优先权大于该网络传送执行绪的优先权时,该网络接收执行绪的优先权顺序先于该主要执行绪的优先权顺序,且该主要执行绪的优先权顺序先于该网络传送执行绪的优先权顺序。 5 14. The network program scheduling method as claimed in claim wherein: each of the thread step of generating the priority order, the network receives priority thread is greater than the priority of the main thread when the main thread priority thread is greater than the priority of the network transmission, the network receives the order of thread execution priority prior to the priority order of the main thread and the main thread execution priority order prior to the network transmission execution priority order of the thread.
15.如权利要求14所述网络程序的排程方法,其特征在于:决定对应于每一该执行绪的工作程序排程的步骤中,该网络接收执行绪的优先权顺序先于该主要执行绪的优先权顺序,且该主要执行绪的优先权顺序先于该网络传送执行绪的优先权顺序时,该工作程序排程为先处理该网络接收执行绪、接着处理该主要执行绪,之后再处理该网络传送执行绪。 14 15. The network program scheduling method as claimed in claim wherein: each of the decision steps corresponding to the thread scheduling procedures, the network receives a thread priority order is performed prior to the primary the thread priority order, and the main thread execution priority order of transmission of the first thread execution priority order of the working schedule for the first program to process the network receiving thread, the main thread is then processed in the network, after re-treatment the network transmission thread.
16.如权利要求5所述网络程序的排程方法,其特征在于:对每一该执行绪产生该优先权顺序的步骤中,该网络传送执行绪的优先权大于该主要执行绪的优先权,该主要执行绪的优先权大于该网络接收执行绪的优先权时,该网络传送执行绪的优先权顺序先于该主要执行绪的优先权顺序,且该主要执行绪的优先权顺序先于该网络接收执行绪的优先权顺序。 5 16. The network program scheduling method as claimed in claim, wherein: the step of generating each of the thread in the priority order, the network transmission priority thread is greater than the priority of the main thread when the main thread priority thread is greater than the received priority network, the network transfer thread execution priority order of the priority order before the main thread and the main thread execution priority order prior to the the network receives the thread execution priority order.
17.如权利要求16所述网络程序的排程方法,其特征在于:决定对应于每一该执行绪的工作程序排程的步骤中,该网络传送执行绪的优先权顺序先于该主要执行绪的优先权顺序,且该主要执行绪的优先权顺序先于该网络接收执行绪的优先权顺序时,该工作程序排程为先处理该网络传送执行绪、接着处理该主要执行绪,之后再处理该网络接收执行绪。 16 17. The network program scheduling method as claimed in claim wherein: each of the decision steps corresponding to the thread scheduling procedures, the network transfer thread execution priority order is performed prior to the primary the thread priority order, and the main thread execution priority order of the received first thread execution priority order of the working schedule for the first program to the network transmission processing thread, the main thread is then processed in the network, after re-treatment the network receiving thread.
CN 200410052099 2004-11-08 2004-11-08 Network program arrangement method 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 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
CN100504763C (en) Simultaneous multi-threaded (SMT) enabled system and its management method
US7296267B2 (en) System and method for binding virtual machines to hardware contexts
CN102282543B (en) The information processing apparatus and information processing method
US6732139B1 (en) Method to distribute programs using remote java objects
US8838801B2 (en) Cloud optimization using workload analysis
CN101160565B (en) Mechanism to schedule threads on os-sequestered without operating system intervention
US7448036B2 (en) System and method for thread scheduling with weak preemption policy
CN101896886B (en) Uniform synchronization between multiple kernels running on single computer systems
US20050229178A1 (en) Method and system for real time scheduler
US6658448B1 (en) System and method for assigning processes to specific CPU's to increase scalability and performance of operating systems
CN1152305C (en) Virtual machine system
TWI541725B (en) Method and apparatus for managing resources of the multi-core architecture
US20070106827A1 (en) Centralized interrupt controller
US8020161B2 (en) Method and system for the dynamic scheduling of a stream of computing jobs based on priority and trigger threshold
US8584138B2 (en) Direct switching of software threads by selectively bypassing run queue based on selection criteria
Baker An analysis of EDF schedulability on a multiprocessor
US20120198462A1 (en) Workflow control of reservations and regular jobs using a flexible job scheduler
US8544014B2 (en) Scheduling threads in multi-core systems
CN101539798B (en) Interrupt balancing for multi-core and power
US20050240924A1 (en) Prerequisite-based scheduler
CN101354661B (en) System and method to optimize OS scheduling decisions for power savings based on temporal characteristics of the scheduled entity and system workload
Kayıran et al. Neither more nor less: optimizing thread-level parallelism for GPGPUs
US9417918B2 (en) Computing session workload scheduling and management of parent-child tasks
US7318128B1 (en) Methods and apparatus for selecting processes for execution
US7467385B2 (en) Interrupt and exception handling for multi-streaming digital processors

Legal Events

Date Code Title Description
C06 Publication
C10 Request of examination as to substance
C02 Deemed withdrawal of patent application after publication (patent law 2001)