CN103412790B - The multinuclear concurrent scheduling method and system of mobile security middleware - Google Patents

The multinuclear concurrent scheduling method and system of mobile security middleware Download PDF

Info

Publication number
CN103412790B
CN103412790B CN201310341417.XA CN201310341417A CN103412790B CN 103412790 B CN103412790 B CN 103412790B CN 201310341417 A CN201310341417 A CN 201310341417A CN 103412790 B CN103412790 B CN 103412790B
Authority
CN
China
Prior art keywords
scheduling
queue
priority
grades
task
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
CN201310341417.XA
Other languages
Chinese (zh)
Other versions
CN103412790A (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.)
Nanjing Normal University
Original Assignee
Nanjing Normal 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 Nanjing Normal University filed Critical Nanjing Normal University
Priority to CN201310341417.XA priority Critical patent/CN103412790B/en
Publication of CN103412790A publication Critical patent/CN103412790A/en
Application granted granted Critical
Publication of CN103412790B publication Critical patent/CN103412790B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses the multinuclear concurrent scheduling method and system of a kind of mobile security middleware, relate to mobile security payment technical field.By between employing group according to priority scheduling, according to poll in group, inside same queue, the principle according to first in first out is scheduling.Specifically comprise the following steps that A, according to the number of queues comprised under the check figure configuration preference number of stages of multi-core CPU and each priority, and be each queue two grades of bitmaps of configuration, in conjunction with the function of task and to requirement of real-time by all task prioritization;B, detection terminate this scheduling after processing one-level bitmap and two grades of bitmaps.The multinuclear concurrent scheduling method of the mobile security middleware that the present invention proposes, each core of processor both participates in scheduling, it is in equal status, substantially increase the performance of Security Middleware, the performance of Security Middleware is without be overwhelmed by the performance of scheduling core, and simultaneity factor has higher stability and safety.

Description

The multinuclear concurrent scheduling method and system of mobile security middleware
Technical field
The present invention relates to mobile payment field, particularly relate to the multinuclear concurrent scheduling method and system of a kind of mobile security middleware.
Background technology
After the network commercial use started for 1994, formation of have swepting the globe for 2000 uses upsurge, even to this day estimate Web vector graphic population and reach more than 1,100,000,000 people, the popularizing in all trades and professions such as every commercial activity and public security, traffic, education, finance, oil along with economic development and network application, network application will still have sizable growing space future.Wherein most the network trading of commercial value, more from the multi-million dollar of 2000, is grown up and has been reached the surprising amount of money of 6,000,008 $ 100 billion so far.May exit off network almost without people now.Conventional internet changes the Payment System of banking, has expedited the emergence of Third-party payment platform, and mobile Internet then will make mobile payment become one of emerging main flow means of payment.Future, once the security performance of mobile-phone payment is ensured further, the competition of mobile-phone payment industrial chain all departments is specification more in order, large consumption such as car are even purchased in household electrical appliances, food and drink, can both being completed by mobile-phone payment, brush mobile phone is by the subway, Startbuck drunk by brush mobile phone, brush mobile phone is gone window-shopping, buying vegetables to food market even in the near future also can brush mobile phone.
Mobile terminal use in 2G network is owing to being a network closed, termination function is also simple, safety problem does not still highlight, security threat also only shows the safety of user profile and business information, namely ensures that the security informations such as the identity data of user, password, transmission content are not illegally accessed.Having arrived the 3G epoch, the development of data service can make mobile terminal no longer be operated in a network closed and directly be connected into the Internet, and some safety problems not exposed in enclosed environment will occur in 3G network.
The technical threshold of current security fields is high, ease for use is poor, put into the problems such as cost is big, interoperability is weak has become as the bottleneck solving safety problem, and in order to solve this problem, Security Middleware arises at the historic moment.Security Middleware is the security platform software between underlying operating system platform and high-level applications, it shields the complexity of some bottom software and hardware resources of accessible with application software operation, by public safety applications DLL simply and easily, provide general security service to application client.Which strongly simplifies the process of construction of safety applications system, shorten the construction cycle of safety applications system, improve the operational efficiency of safety applications system, reduce the various expenses of safety applications system.
As the middleware with security feature, safety middleware system includes encrypting-decrypting module, discriminating, and the control of authentication module, system administration, software dynamic load, load-balancing algorithm, network data communication, PKI manage control, the management of information resources, application input/output process etc..Now, PC has reached very high performance, even if Security Middleware to process multiple-task and operation, result also can return within the extremely short time, without influence on Consumer's Experience.But having arrived mobile terminal, the processor performance of mobile phone or panel computer is limited, it is corresponding that user needs to wait that the quite a while just can obtain mobile terminal, and the patience testing user is often fatal for product.In order to solve this problem, using a fixing core as scheduling core in NewSec concurrent scheduling algorithm, other cores can parallel processing under the scheduling of scheduling core.There is a significant defect in this algorithm: all of core all has to wait for scheduling core distribution task.It is to say, NewSec concurrent scheduling algorithm is limited by the performance of scheduling core;Meanwhile, if scheduling core is hung dead, then whole system will be hung extremely.Therefore, in order to promote Consumer's Experience, it is necessary to make full use of the polycaryon processor of mobile phone or panel computer at mobile terminal, adopts the mode of a kind of more reasonable, safe concurrent scheduling effectively to strengthen the performance of Security Middleware, reduce the time of user's wait-for-response.
Summary of the invention
It is an object of the invention to strengthen mobile terminal Security Middleware performance to promote Consumer's Experience, it is provided that the multinuclear concurrent scheduling method and system of a kind of mobile security middleware.
In order to realize goal of the invention, the technical solution used in the present invention is as follows:
The multinuclear concurrent scheduling method of mobile security middleware, comprises the steps:
A, according to the number of queues comprised under the check figure configuration preference number of stages of multi-core CPU and each priority, and be each queue two grades of bitmaps of configuration, in conjunction with the function of task and to requirement of real-time by all task prioritization;Wherein, queue adopts clog-free concurrent lock-free queue, and multi-core CPU can each queue of share and access;First order bitmap indicates whether each priority array has task to need scheduling, and priority is incremented by successively from low level to a high position, and second level bitmap indicates whether the queue under each priority has task to need scheduling;
B, when certain core of CPU is when scheduling, perform following process:
Whether detection one-level bitmap is empty, if being zero, representing that all tasks have all been scheduled, terminating scheduling;If one-level bitmap non-zero, take out the priority array of lowest order 1 correspondence in one-level bitmap, read two grades of bitmaps that this priority array is corresponding, the queue that nonzero digit in two grades of bitmaps is corresponding is polled scheduling taking-up and treats scheduler task;Wherein, schedule level one adopts strict priority scheduling, and second-level dispatching adopts polling dispatching;
The task of scheduling is deleted from queue, if queue is empty after deleting, then two grades of corresponding for this queue bitmap bits is reset;Detect whether two grades of bitmaps are zero, if it is, one-level bitmap bits corresponding for these two grades of bitmaps reset;This scheduling is terminated after one-level bitmap and two grades of bitmaps have been processed.
The multinuclear concurrent scheduling method of the mobile security middleware that the present invention proposes, the operation processed in Security Middleware that k core of mobile terminal processor is concurrent can be made, each core of processor both participates in scheduling, it is in equal status, substantially increase the performance of Security Middleware, the performance of Security Middleware, without be overwhelmed by the performance of scheduling core, decreases user's wait-for-response time.Simultaneity factor has higher stability and safety, even if certain core there occurs deadlock or hangs dead, it is also possible to recover to hang dead core with other cores by abnormality detection mechanism.
Accompanying drawing explanation
Fig. 1 is the concurrent scheduling method flow diagram of mobile security middleware;
Fig. 2 has shared queue's array that 16 priority are made up of clog-free concurrent lock-free queue;
Fig. 3 is a certain moment shared queue's array state;
Fig. 4 is the bitmap that Fig. 3 is corresponding;
Fig. 5 be polycaryon processor according to priority concurrent scheduling, performed in priority 0 queue shared queue's array state after operation;
Fig. 6 is the bitmap that Fig. 5 is corresponding;
Fig. 7 be polycaryon processor according to priority concurrent scheduling, performed in priority 1 queue shared queue's array state after operation;
Fig. 8 is the bitmap that Fig. 7 is corresponding.
Detailed description of the invention
Below in conjunction with embodiment and accompanying drawing, the inventive method is described in further detail.
Embodiment: as shown in Figure 1, the dispatching algorithm of Security Middleware is realized the concurrent scheduling method flow diagram of the present embodiment mobile security middleware by multinuclear concurrent scheduling algorithm, and the data structure used in dispatching algorithm is as shown in Figure 2.Dispatching algorithm is broadly divided into modeling preparatory stage and multinuclear concurrent scheduling stage.Assuming that total k (k >=1) the individual core of the processor of mobile terminal.
The modeling preparatory stage includes following four steps:
Step one, the thread in Security Middleware being appointed as k, and these k thread is on average tied on k processor, namely each processor is assigned to a thread specified.
Step 2, according to the order of importance and emergency of operation by encrypting-decrypting module, discriminating, controls of authentication module, system administration, software dynamic load, load-balancing algorithm, network data communication, PKI manage control, the management of information resources, application input/output process etc. and operate and arrange priority according to actual needs.The more little expression priority of numeral is more high, and the priority such as priority 0 is the highest, and the priority of priority 15 is minimum.
Step 3, establishment shared queue array Q, be divided into the group identical with priority quantity by Q, and often group has k queue and this k queue to have identical priority, and each queue adopts the concurrent lock-free queue of non-obstruction to improve performance.
Step 4, create one-level bitmap corresponding to priority groups, whether non-NULL in the priority groups that in bitmap, each instruction is corresponding.Create two grades of bitmaps in priority groups, the concurrent lock-free queue of non-obstruction that in bitmap, each instruction is corresponding whether non-NULL.
The multinuclear concurrent scheduling stage then comprises the steps:
According to priority scheduling between step 5, scheduling strategy employing group, according to poll in group, inside same queue, the principle according to first in first out is scheduling.Namely select, according to one-level bitmap, the non-empty queue that priority is the highest, select according to two grades of bitmap polls the concurrent lock-free queue of non-obstruction of non-NULL to be scheduling according to the principle of first in first out.
It is analyzed below in conjunction with embodiment:
The processor of mobile terminal adopts currently by four core processors that mobile phone and panel computer are widely used, then enable four threads in Security Middleware, and these four threads are on average tied on four cores of processor.The operation of certification, identification module is set to priority 0, application input/output operations is set to priority 1, and the control of encrypting-decrypting module, system administration, software dynamic load, load-balancing algorithm, network data communication, PKI management control, the operation of the management of information resources is set to priority 2.
Create shared queue array Q, this example adopts four core processors and 16 priority queries, so shared queue array Q has 16 groups, each group of concurrent lock-free queue of non-obstruction having 4 equal priority, namely have 4 × 16=64 queue as shown in Figure 2.In Fig. 2, each row represents a queue, and each little square frame can hold a task.In order to improve performance, it is possible to indicate the queue quickly positioning non-NULL with bitmap.The first order is the bitmap of 16, and whether the priority array of every instruction correspondence has element.If all queues in certain priority are for being sky, then the position of its correspondence is set to 0;Otherwise put 1.Two grades of bitmaps are used to refer to the quene state in same priority group.If queue not empty, corresponding position 1, otherwise set to 0.
Assuming that at a time quene state as it is shown on figure 3, in Fig. 3 the little box indicating of non-NULL have operation task team waiting in line, the bitmap of its correspondence is as shown in Figure 4.According to dispatching principle, operation that priority the highest is first carried out.Certain core of processor then can begin look for the position of first non-zero element from one-level bitmap lowest order (position on the most right side of bitmap).In the diagram, the position corresponding to lowest order priority 0 is 1, then this core can read two grades of bitmaps of priority 0 correspondence and find first non-empty queue of two grades of bitmap instructions by the method for poll.Can be quickly found out, from Fig. 4, first queue that the highest non-empty queue of priority is priority 0 queue array and be the target needing scheduling.In the present invention in the Concurrent Algorithms of design, each core is all in same status, it is possible to bitmap and scheduling process are searched in concurrent execution, improve efficiency.
Through scheduling, after all operations in priority 0 array has all been performed, the one-level bitmap of its correspondence and two grades of bitmaps are all set to 0.Scheduling process in, have again different operations to be inserted into queue tail, shared queue's array state as it is shown in figure 5, one-level bitmap and two grades of bitmaps as shown in Figure 6.According to the bitmap in Fig. 6, all non-empty queue arrays of the core meeting priority treatment priority 1 of processor.After polling dispatching, after in priority 1, all operations has all been performed, in one-level bitmap that priority 1 queue is corresponding and two grades of bitmaps, position is all set to 0, now quene state as it is shown in fig. 7, bitmap status as shown in Figure 8.
Relative to NewSec concurrent scheduling algorithm using a fixing core as scheduling core, the multinuclear all core of concurrent scheduling method of the mobile security middleware that the present invention proposes both participates in scheduling, make the performance of middleware Security Middleware without be overwhelmed by the performance of scheduling core, fully excavate the performance of processor;Enhance the safety of system simultaneously, system will be caused to hang extremely because scheduling core hangs dead.

Claims (2)

1. the multinuclear concurrent scheduling method of mobile security middleware, it is characterised in that comprise the steps:
A, according to the number of queues comprised under the check figure configuration preference number of stages of multi-core CPU and each priority, and be each queue two grades of bitmaps of configuration, in conjunction with the function of task and to requirement of real-time by all task prioritization;Wherein, queue adopts clog-free concurrent lock-free queue, and multi-core CPU can each queue of share and access;First order bitmap indicates whether each priority array has task to need scheduling, and priority is incremented by successively from low level to a high position, and second level bitmap indicates whether the queue under each priority has task to need scheduling;
B, when certain core of CPU is when scheduling, perform following process:
Whether detection one-level bitmap is zero, if being zero, represents that all tasks have all been scheduled, and terminates scheduling;If one-level bitmap non-zero, take out the priority array of lowest order 1 correspondence in one-level bitmap, read two grades of bitmaps that this priority array is corresponding, the queue that nonzero digit in two grades of bitmaps is corresponding is polled scheduling taking-up and treats scheduler task;Wherein, schedule level one adopts strict priority scheduling, and second-level dispatching adopts polling dispatching;
The task of scheduling is deleted from queue, if queue is empty after deleting, then two grades of corresponding for this queue bitmap bits is reset;Detect whether two grades of bitmaps are zero, if it is, one-level bitmap bits corresponding for these two grades of bitmaps reset;This scheduling is terminated after one-level bitmap and two grades of bitmaps have been processed.
2. realize the system of the multinuclear concurrent scheduling method of mobile security middleware as claimed in claim 1, comprise such as lower module: encrypting-decrypting module, differentiate and authentication module, system administration controls module, software dlm (dynamic loading module), load balancing module, network data communication module, PKI management control module, management of information resources module, application input/output processing module, wherein load balancing module is optimized for polycaryon processor, adopt described concurrent scheduling method, task is equally distributed to as far as possible on each core of polycaryon processor, then pass through bitmap and carry out quick concurrent scheduling.
CN201310341417.XA 2013-08-07 2013-08-07 The multinuclear concurrent scheduling method and system of mobile security middleware Expired - Fee Related CN103412790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310341417.XA CN103412790B (en) 2013-08-07 2013-08-07 The multinuclear concurrent scheduling method and system of mobile security middleware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310341417.XA CN103412790B (en) 2013-08-07 2013-08-07 The multinuclear concurrent scheduling method and system of mobile security middleware

Publications (2)

Publication Number Publication Date
CN103412790A CN103412790A (en) 2013-11-27
CN103412790B true CN103412790B (en) 2016-07-06

Family

ID=49605803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310341417.XA Expired - Fee Related CN103412790B (en) 2013-08-07 2013-08-07 The multinuclear concurrent scheduling method and system of mobile security middleware

Country Status (1)

Country Link
CN (1) CN103412790B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6773229B2 (en) 2016-12-29 2020-10-21 ホアウェイ・テクノロジーズ・カンパニー・リミテッド Storage controller and IO request processing method
CN109799956B (en) 2017-01-05 2023-11-17 华为技术有限公司 Memory controller and IO request processing method
CN107608784B (en) * 2017-06-28 2020-06-09 西安微电子技术研究所 Multi-mode scheduling method for mass data stream under multi-core DSP
CN108563495A (en) * 2018-04-08 2018-09-21 郑州云海信息技术有限公司 The cloud resource queue graded dispatching system and method for data center's total management system
CN110262905A (en) * 2019-05-31 2019-09-20 四川长虹电器股份有限公司 The method for pushing of the message-oriented middleware of priority query based on building high performance and scalability
CN111367652B (en) * 2020-01-07 2024-05-17 苏州大学 Task scheduling processing system and method of embedded real-time operating system
CN111897665B (en) * 2020-08-04 2024-09-27 北京泽石科技有限公司 Data queue processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7155716B2 (en) * 2002-03-08 2006-12-26 Intel Corporation Weighted and prioritized task scheduler
CN102053962A (en) * 2009-11-02 2011-05-11 清华大学深圳研究生院 Lightweight middleware-based networking RFID system and data interaction method
CN103019810A (en) * 2011-09-19 2013-04-03 辉达公司 Scheduling and management of compute tasks with different execution priority levels

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7155716B2 (en) * 2002-03-08 2006-12-26 Intel Corporation Weighted and prioritized task scheduler
CN102053962A (en) * 2009-11-02 2011-05-11 清华大学深圳研究生院 Lightweight middleware-based networking RFID system and data interaction method
CN103019810A (en) * 2011-09-19 2013-04-03 辉达公司 Scheduling and management of compute tasks with different execution priority levels

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于移动中间件抽象层调度策略研究;黄锦涛等;《杭州电子科技大学学报》;20101031;第30卷(第5期);第101-104页 *

Also Published As

Publication number Publication date
CN103412790A (en) 2013-11-27

Similar Documents

Publication Publication Date Title
CN103412790B (en) The multinuclear concurrent scheduling method and system of mobile security middleware
US11740935B2 (en) FPGA acceleration for serverless computing
US20180004568A1 (en) Distributed task system and service processing method based on internet of things
CN110825535B (en) Job scheduling method and system
Kaur et al. Analysis of job scheduling algorithms in cloud computing
CN106663021B (en) Intelligent GPU scheduling in virtualized environments
US20160154678A1 (en) Reverting tightly coupled threads in an over-scheduled system
CN108012156A (en) A kind of method for processing video frequency and control platform
US10148738B2 (en) System and method for equitable processing of asynchronous messages in a multi-tenant platform
US11422858B2 (en) Linked workload-processor-resource-schedule/processing-system—operating-parameter workload performance system
US20160275025A1 (en) Preventing software thread blocking due to interrupts
WO2019047441A1 (en) Communication optimization method and system
CN103927225A (en) Multi-core framework Internet information processing and optimizing method
CN111078436A (en) Data processing method, device, equipment and storage medium
US10037225B2 (en) Method and system for scheduling computing
CN109669773A (en) Finance data processing method, device, equipment and storage medium
US20210103468A1 (en) Performance biased scheduler extender
CN109241116A (en) A kind of methods of exhibiting and relevant device of service correlation information
CN115543577B (en) Covariate-based Kubernetes resource scheduling optimization method, storage medium and device
CN103294548A (en) Distributed file system based IO (input output) request dispatching method and system
CN101634953A (en) Method and device for calculating search space, and method and system for self-adaptive thread scheduling
CN111061511B (en) Service processing method and device, storage medium and server
CN109783242B (en) Overseas stock control estimation flow control method, device, computer equipment and storage medium
CN110968422A (en) Load distribution for integrated scenarios
CN112395062A (en) Task processing method, device, equipment and computer readable storage medium

Legal Events

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

Granted publication date: 20160706

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