CN101887383B - Process real-time scheduling method - Google Patents

Process real-time scheduling method Download PDF

Info

Publication number
CN101887383B
CN101887383B CN 201010215050 CN201010215050A CN101887383B CN 101887383 B CN101887383 B CN 101887383B CN 201010215050 CN201010215050 CN 201010215050 CN 201010215050 A CN201010215050 A CN 201010215050A CN 101887383 B CN101887383 B CN 101887383B
Authority
CN
China
Prior art keywords
value
task
priority
time
close
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.)
Expired - Fee Related
Application number
CN 201010215050
Other languages
Chinese (zh)
Other versions
CN101887383A (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.)
Guangdong star Intelligent Technology Co., Ltd.
GUANGZHOU XINGYA GAOXIN PLASTIC TECHNOLOGY CO., LTD.
Original Assignee
National Sun Yat Sen University
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 National Sun Yat Sen University filed Critical National Sun Yat Sen University
Priority to CN 201010215050 priority Critical patent/CN101887383B/en
Publication of CN101887383A publication Critical patent/CN101887383A/en
Application granted granted Critical
Publication of CN101887383B publication Critical patent/CN101887383B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention discloses a process real-time scheduling method. The method comprises the following steps of: A, presetting a value of a process task, wherein the value of a task is selected from a priority value of a process and the maximal priority values of all current processes according to the value of the task per se; and B, when the priority levels of process tasks are close or equal to each other, comparing the values of the process tasks, and executing the task with a maximal value preferentially; or comparing the values of all current tasks when a system is overloaded, and executing the process task with the maximal value so as to ensure overall value maximization of the system and maintain the system at an acceptable level. In the process real-time scheduling method of the embodiment of the invention, by introducing a value-based preemptive threshold value, timely completion of a key task of the system can be ensured and the system performance is maintained and degraded gracefully without a system failure or even collapse when the system is overloaded, so as to achieve the maximization of the overall system finally; and resource waste caused by a trashing phenomenon can be reduced.

Description

A kind of process real-time scheduling method
Technical field
The present invention relates to computer processes scheduling field, be specifically related to a kind of process real-time scheduling method.
Background technology
Be widely used in fields such as embedded system, control in real time along with linux system, the real-time that strengthens linux kernel becomes particularly important, and the core of linux kernel is scheduling strategy, the optimization of scheduling strategy and real-time are improved to be dispatching algorithm at all, is an important field of research of real-time domain to real-time scheduling's research.The priority type of drive is that real-time system is dispatched modal a kind of mode, customizing messages according to task is given priority of each task, select next will moving of task according to priority when system need dispatch, assurance system justice, effective response are finished the work.
The Real-Time Scheduling strategy can be divided into three kinds: based on the scheduling strategy of priority, based on the scheduling strategy of time driving and the scheduling strategy of sharing based on ratio.Dispatching algorithm based on priority can be divided into two types: static priority dispatching algorithm and dynamic priority scheduling algorithm.Preferential (the Least Slack First) dispatching algorithm of smallest margin is dynamic priority scheduling algorithm more common in the real-time system, and it is to the earliest by the preferentially improvement of (EDF) dispatching algorithm of phase.Preferential (EDF) algorithm is to use maximum a kind of dynamic priority scheduling algorithms time limit the earliest, this algorithm each task in the ready queue of giving is distributed priority according to their deadline (Deadline), and the task with nearest deadline has the highest priority.
LSF is each task setting slack time in system, and preferential execution of system has the task of minimum slack time.Although EDF algorithm and LSF algorithm table are understood its optimality under normal system load, but under the situation of overload, system can not guarantee that all tasks can both satisfy the off period, at this moment EDF or LSF algorithm performance can occur and sharply descend, and may cause unstable owing to miss the vital task deadline date.Moreover, off period or free time task most critical not necessarily, system can't guarantee in time finishing of mission critical under the situation of overload, thereby system performance can not demote grazioso, cause occurring thrashing even collapse.In addition, in the LSF algorithm, when system has above smallest margin close or equal and be when having the task of smallest margin in the system, task can take place frequently in system switches, and the phenomenon of namely jolting can cause resource waste.
Summary of the invention
The object of the present invention is to provide a kind of process real-time scheduling method, this algorithm can guarantee under the situation of overload, the back-up system performance is demoted grazioso, unlikely thrashing even collapse appear, entire system is worth is maximized and is maintained on the acceptable level, reduce the system resource waste that the phenomenon of jolting causes simultaneously.
In order to achieve the above object, the embodiment of the invention provides a kind of process real-time scheduling method, comprising:
Steps A, set in advance the value value of process task, the value value of task should be got a value according to the value of task itself between the priority value of process and current all process greatest priority values;
Step B, when the priority of process task is close or equal, the value value of process task relatively, preferential operation is worth big task; Perhaps, the also value value of more current all tasks when system overload, the process task of operation value value maximum guarantees the entire system value maximization and is maintained on the acceptable level.
The described value value that sets in advance process task is specially:
In process control block (PCB) task_struct, increase the priority association attributes: task residue execution time Ct, task submission time Et, task is relatively by time limit Dt, priority value St, current time in system T is got by the priority value defined formula: St=(Et+Dt)-Ct-T;
Keep the mode of choosing and the real-time task priority attribute of operation queue structure, candidate's task of Linux2.6 kernel constant, according to priority be arranged in order the real-time task of same priority attribute from small to large;
In the clock interruption subroutine, increase the real-time update of priority value St is handled, namely along with clock period increase task residue execution time Ct, reduce the priority value St of waiting process, also in the clock interruption subroutine, revise the selection operation of value value as candidate's task of seizing threshold values;
Improve the preferential LSF algorithm of smallest margin, revise kernel code and recompility, finish and improve the realization of algorithm in system.
Described step B comprises:
B11, the priority time of obtaining each process task, forward task priority is more high the off period when priority is identical;
B12: judge whether current system exists a task that above priority is close or identical, if do not exist, show the system task phenomenon of can not jolting, then carry out step B18;
B13, judge that whether close or identical priority be the minimum priority of current system, if not, show that then this task is not hot job, then carries out step B18;
B14, whether judge close or identical priority greater than 0, eliminate this task when priority less than 0 the time, nargin participates in scheduling more than or equal to 0.
B15, obtain close or identical and its value of these priority values more than or equal to the value value of 0 task;
B16, these priority of comparison are close or identical and its value more than or equal to the value value of 0 task;
B17, according to the size of task value value, seize execution successively;
B18, the preferential LSF scheduling of execution smallest margin.
Described step B comprises:
B21, when dormant state, certain process allow to be seized CPU or from interrupting or system call turns back to situation such as user's attitude and occurs, scheduling occasion brings because process initiatively enters, system enters dispatch state;
B22, carry out system call by dispatching algorithm;
B23, judge whether system transships, if there is not the execution of maintaining the statusquo; If then undertaken by B24;
B24, the comparison priority value is close or identical and its value more than or equal to the value value of 0 task;
B25, according to the value value size of task, the CPU right to use of current task is seized in the priority of task with maximum value value, and the like execution;
B26, judge whether system recovers normal condition, if then do not jump to B24, to obtain the value value of entire system maximum, if normally jump to B22, system normally moves.The present invention is by introducing based on the threshold values of seizing that is worth, both can be under the system overload situation, system can guarantee in time finishing of mission critical, keeping system performance demotes grazioso, unlikely thrashing even collapse appear, finally reach just total system value maximization, can also reduce the wasting of resources that causes because of the phenomenon of jolting.
The embodiment of the invention is by introducing based on the threshold values of seizing that is worth, both can be under the system overload situation, system can guarantee in time finishing of mission critical, keeping system performance demotes grazioso, unlikely thrashing even collapse appear, finally reach just total system value maximization, can also reduce the wasting of resources that causes because of the phenomenon of jolting.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process real-time scheduling method process flow diagram in the embodiment of the invention;
Fig. 2 is the value value method flow diagram that sets in advance process task in the embodiment of the invention;
Real-time scheduling's process flow diagram that Fig. 3 will realize for the improvement in the embodiment of the invention;
Another process flow diagram of real-time scheduling that Fig. 4 will realize for the improvement in the embodiment of the invention.
Embodiment
A kind of process real-time scheduling method is provided in the embodiment of the invention, and it is at first determined by the value value of task: task is worth, and namely task is key, and this task is with respect to the significance level of other tasks in the task-set.As seizing threshold values, be the value value of task the key of improving algorithm.Seize threshold values and directly have influence on the frequency that task is switched, also have influence on the miss rate of task off period, also have influence on the effective rate of utilization of CPU.If the value value of task is greater than current all process greatest priority values, then dispatching algorithm deteriorates to the non-model of seizing.If the value value of task less than the nargin (priority value) of process, has then lost the meaning that the task of giving is worth way.Concrete 1 can consult process flow diagram among Fig. 1, comprising:
S101: set in advance the value value of process task, the value value of task should be got a value according to the value of task itself between the priority value of process and current all process greatest priority values;
S102: when the priority of process task is close or equal, the value value of process task relatively, preferential operation is worth big task; Perhaps, the also value value of more current all tasks when system overload, the process task of operation value value maximum guarantees the entire system value maximization and is maintained on the acceptable level.
In sum, the value value of task should be got a value according to the value of task itself between the nargin (priority value) of process and current all process greatest priority values.Each task also has a value value, thereby constitutes a dual priority system except distributing priority by nargin.Dual priority system namely when the rich degree of task is close or equal, the value value of comparison task, preferential operation is worth big task, it can reduce the system resource waste that the phenomenon of jolting causes.The also value value of more current all tasks when system overload, the task of operation value value maximum guarantees the entire system value maximization and is maintained on the acceptable level;
Concrete, consult Fig. 2, as follows about the value value performing step that sets in advance process task:
S201, in process control block (PCB) task_struct, increase " nargin " association attributes: task residue execution time ℃ t, task submission time Et, task is relatively by time limit Dt, margin value St, current time in system T.Got by the nargin defined formula: St=(Et+Dt)-Ct-T.
The mode of choosing and the real-time task priority attribute of S202, the operation queue structure that keeps the Linux2.6 kernel, candidate's task are constant, are arranged in order the same priority task from small to large by margin value.
S203, in the clock interruption subroutine, increase the real-time update of margin value is handled, namely along with clock period increase task residue execution time Ct, reduce the margin value St of waiting process, also in the clock interruption subroutine, revise the selection operation of value value as candidate's task of seizing threshold values.
The real-time scheduling that S204, improvement will realize revises kernel code and recompility, finishes and improves the realization of algorithm in system.
Consult Fig. 3, about improving the real-time scheduling that will realize among the S102, revise kernel code and recompility, finish and improve the realization of algorithm in system, the improvement algorithm concrete steps of mentioning are achieved as follows:
S301, the slack time of obtaining each task, i.e. " nargin ", forward task priority is more high the off period when nargin is identical.
S302 judges whether current system exists a task that above nargin is close or identical, if do not exist, shows the system task phenomenon of can not jolting, and jumps to S308, carries out the LSF scheduling.The purpose of this step is the anti-locking system phenomenon of jolting.
S303 judges whether this nargin is current system smallest margin, if not, show that then this task is not hot job, jump to S308, carry out the LSF scheduling.
Whether S304 judges this nargin greater than 0, eliminates this task less than 0 the time when nargin, and nargin participates in scheduling more than or equal to 0.
S305 obtains close or identical and its value of these nargin more than or equal to the value value of 0 task, and this value value is being determined as before told.
S306, relatively close or identical and its value of these nargin is more than or equal to the value value of 0 task, and the purpose of this step is to guarantee that entire system is worth the acceptable level that is maintained at.
S307 according to the size of task value value, seizes execution successively, guarantees the task that the value value is beaten, and namely mission critical is preferentially carried out.
S308 carries out the LSF scheduling.
Referring to Fig. 4, Fig. 4 improves the algorithmic dispatching applicating flow chart, and the scheduling step is as follows:
S401, when dormant state, certain process allow to be seized CPU or from interrupting or system call turns back to situation such as user's attitude and occurs, scheduling occasion brings because process initiatively enters, system enters dispatch state.
S402, above-mentioned improved dispatching algorithm is carried out system call, changes the generation that step can the assurance system reduces the phenomenon of jolting, and saves system resource.Can guarantee that also entire system is worth the acceptable level that is maintained at.
S403 judges whether system transships, if there is not the execution of maintaining the statusquo.If then carry out S404, the purpose of this step is that the assurance system develops towards the overall value maximization under the situation of system overload.
S404, relatively close or identical and its value of these nargin is more than or equal to the value value of 0 task, and the purpose of this step is to guarantee that entire system is worth the acceptable level that is maintained at.
S405, according to the value value size of task, the CPU right to use of current task is seized in the priority of task with maximum value value, and the like execution.
S406 judges whether system recovers normal condition, if then do not jump to S404, to obtain the value value of entire system maximum, if normally jump to S402, system normally moves.
To sum up, the embodiment of the invention is by introducing based on the threshold values of seizing that is worth, both can be under the system overload situation, system can guarantee in time finishing of mission critical, keeping system performance demotes grazioso, unlikelyly thrashing even collapse occur, finally reach just total system value maximization, can also reduce the wasting of resources that causes because of the phenomenon of jolting.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to instruct relevant hardware to finish by program, this program can be stored in the computer-readable recording medium, storage medium can comprise: ROM (read-only memory) (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
More than visual the listening method of geography information of a kind of digital home that the embodiment of the invention is provided, be described in detail, used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, the part that all can change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.

Claims (3)

1. a process real-time scheduling method is characterized in that, comprising:
Steps A, set in advance the value value of process task, the value value of task should be got a value according to the value of task itself between the priority value of process and current all process greatest priority values;
Step B, when the priority of process task is close or equal, the value value of process task relatively, preferential operation is worth big task; Perhaps, the also value value of more current all tasks when system overload, the process task of operation value value maximum guarantees the entire system value maximization and is maintained on the acceptable level;
The described value value that sets in advance process task is specially:
In process control block (PCB) task_struct, increase the priority association attributes: task residue execution time Ct, task submission time Et, task is relatively by time limit Dt, priority value St, current time in system T is got by the priority value defined formula: St=(Et+Dt)-Ct-T;
Keep the mode of choosing and the real-time task priority attribute of operation queue structure, candidate's task of Linux2.6 kernel constant, according to priority be arranged in order the real-time task of same priority attribute from small to large;
In the clock interruption subroutine, increase the real-time update of priority value St is handled, namely along with clock period increase task residue execution time Ct, reduce the priority value St of waiting process, also in the clock interruption subroutine, revise the selection operation of value value as candidate's task of seizing threshold values;
Improve the preferential LSF algorithm of smallest margin, revise kernel code and recompility, finish and improve the realization of algorithm in system.
2. the method for claim 1 is characterized in that, described step B comprises:
B11, the priority time of obtaining each process task, forward task priority is more high the off period when priority is identical;
B12: judge whether current system exists a task that above priority is close or identical, if do not exist, show the system task phenomenon of can not jolting, then carry out step B18;
B13, judge that whether close or identical priority be the minimum priority of current system, if not, show that then this task is not hot job, then carries out step B18;
B14, whether judge close or identical priority greater than 0, eliminate this task when priority less than 0 the time, nargin participates in scheduling more than or equal to 0;
B15, obtain close or identical and its value of these priority values more than or equal to the value value of 0 task;
B16, these priority of comparison are close or identical and its value more than or equal to the value value of 0 task;
B17, according to the size of task value value, seize execution successively;
B18, the preferential LSF scheduling of execution smallest margin.
3. the method for claim 1 is characterized in that, described step B comprises:
B21, when dormant state, certain process allow to be seized CPU or from interrupting or system call turns back to situation such as user's attitude and occurs, scheduling occasion brings because process initiatively enters, system enters dispatch state;
B22, carry out system call by dispatching algorithm;
B23, judge whether system transships, if there is not the execution of maintaining the statusquo; If then undertaken by B24;
B24, the comparison priority value is close or identical and its value more than or equal to the value value of 0 task;
B25, according to the value value size of task, the CPU right to use of current task is seized in the priority of task with maximum value value, and the like execution;
B26, judge whether system recovers normal condition, if then do not jump to B24, to obtain the value value of entire system maximum, if normally jump to B22, system normally moves.
CN 201010215050 2010-06-30 2010-06-30 Process real-time scheduling method Expired - Fee Related CN101887383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010215050 CN101887383B (en) 2010-06-30 2010-06-30 Process real-time scheduling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010215050 CN101887383B (en) 2010-06-30 2010-06-30 Process real-time scheduling method

Publications (2)

Publication Number Publication Date
CN101887383A CN101887383A (en) 2010-11-17
CN101887383B true CN101887383B (en) 2013-08-21

Family

ID=43073311

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010215050 Expired - Fee Related CN101887383B (en) 2010-06-30 2010-06-30 Process real-time scheduling method

Country Status (1)

Country Link
CN (1) CN101887383B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102834807B (en) * 2011-04-18 2015-09-09 华为技术有限公司 The method and apparatus of multicomputer system load balancing
CN102693156A (en) * 2012-05-07 2012-09-26 清华大学 Process scheduling method based on configurable strategy
CN103577301B (en) * 2012-07-20 2017-12-05 腾讯科技(深圳)有限公司 A kind of method and terminal of show process information
CN103365711B (en) * 2013-07-03 2017-06-30 南京邮电大学 It is applied to the task scheduling system and method for internet of things service platform
CN105677461B (en) * 2015-12-30 2019-03-01 西安工业大学 Mixing key task dispatching method based on criticality
CN106502778A (en) * 2016-10-26 2017-03-15 深圳市金立通信设备有限公司 A kind of terminal and its process scheduling optimization method
CN106775977B (en) * 2016-12-09 2020-06-02 北京小米移动软件有限公司 Task scheduling method, device and system
CN108563494B (en) * 2018-04-04 2021-09-21 吉林省星途科技有限公司 Thread scheduling system and method with adaptive dynamic adjustment
CN109165089B (en) * 2018-09-21 2021-10-29 成都理工大学 Non-preemptible scheduling method of overload real-time system based on MaxSAT optimal solution
CN109358954B (en) * 2018-09-21 2021-11-02 成都理工大学 Preemptive scheduling method of overload real-time system based on MaxSAT optimal solution
CN109684060B (en) * 2018-12-21 2023-05-23 中国航空工业集团公司西安航空计算技术研究所 Mixed scheduling method for multiple types of time-critical tasks
CN109800073B (en) * 2019-01-28 2021-06-18 Oppo广东移动通信有限公司 Real-time process scheduling method, device, terminal and storage medium
CN113570220B (en) * 2021-07-14 2024-01-12 深圳市创茶网络科技有限公司 Task management method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1475910A (en) * 2002-07-26 2004-02-18 松下电器产业株式会社 Program executio device
CN1577253A (en) * 2003-07-23 2005-02-09 Lg电子株式会社 EDF scheduling method
CN101216785A (en) * 2007-01-05 2008-07-09 三星电子株式会社 Multi-tasking method according to simple priority inheritance scheme and embedded system therefor
CN101246437A (en) * 2008-01-28 2008-08-20 中兴通讯股份有限公司 Built-in real-time system course equalization scheduling method
CN101266553A (en) * 2008-05-06 2008-09-17 无锡紫芯集成电路系统有限公司 Multitask management process based on embedded system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0423094D0 (en) * 2004-10-18 2004-11-17 Ttp Communications Ltd Interrupt control

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1475910A (en) * 2002-07-26 2004-02-18 松下电器产业株式会社 Program executio device
CN1577253A (en) * 2003-07-23 2005-02-09 Lg电子株式会社 EDF scheduling method
CN101216785A (en) * 2007-01-05 2008-07-09 三星电子株式会社 Multi-tasking method according to simple priority inheritance scheme and embedded system therefor
CN101246437A (en) * 2008-01-28 2008-08-20 中兴通讯股份有限公司 Built-in real-time system course equalization scheduling method
CN101266553A (en) * 2008-05-06 2008-09-17 无锡紫芯集成电路系统有限公司 Multitask management process based on embedded system

Also Published As

Publication number Publication date
CN101887383A (en) 2010-11-17

Similar Documents

Publication Publication Date Title
CN101887383B (en) Process real-time scheduling method
US8140876B2 (en) Reducing power consumption of components based on criticality of running tasks independent of scheduling priority in multitask computer
US8370846B2 (en) Task execution device and method
US9880875B2 (en) Apparatus and method for hardware-based task scheduling
US20200151005A1 (en) System on chip including a multi-core processor and task scheduling method thereof
US8516492B2 (en) Soft partitions and load balancing
EP1059582A2 (en) Virtual machine system
CN101719080B (en) Multi-core timer implementing method and system
EP3376381A1 (en) Resource management method and system, and computer storage medium
KR20130004502A (en) System and method of executing threads at a processor
CN107533479B (en) Power aware scheduling and power manager
CN111200541B (en) Network data processing method and device
WO2023246044A1 (en) Scheduling method and apparatus, chip, electronic device, and storage medium
US20170010992A1 (en) Power saving feature for storage subsystems
CN111090505B (en) Task scheduling method and system in multiprocessor system
US20120254822A1 (en) Processing optimization load adjustment
JP2008108075A (en) Task switch control method, and computer system
EP1892625B1 (en) Finer grained operating system scheduling
US20220291735A1 (en) Data scanning method, mobile terminal, and non-volatile computer-readable storage medium
CN113986497B (en) Queue scheduling method, device and system based on multi-tenant technology
CN116841739B (en) Data packet reuse system for heterogeneous computing platforms
CN105519075A (en) Resource scheduling method and apparatus
US9904582B2 (en) Method and apparatus for executing software in electronic device
JP6175980B2 (en) CPU control method, control program, and information processing apparatus
CN107797870A (en) A kind of cloud computing data resource dispatching 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
TR01 Transfer of patent right

Effective date of registration: 20161221

Address after: 510925 Guangdong city of Guangzhou province Conghua River Po Street from camphor Road No. 1088

Patentee after: GUANGZHOU XINGYA GAOXIN PLASTIC TECHNOLOGY CO., LTD.

Patentee after: Guangdong star Intelligent Technology Co., Ltd.

Patentee after: Yuan Bo

Patentee after: Lu Yang

Address before: 510006 teaching experiment center, east campus, Zhongshan University, Panyu District, Guangdong, C401, China

Patentee before: Zhongshan Univ.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130821

Termination date: 20190630

CF01 Termination of patent right due to non-payment of annual fee