CN105468342A - Novel operating system handle management method - Google Patents

Novel operating system handle management method Download PDF

Info

Publication number
CN105468342A
CN105468342A CN201410409438.5A CN201410409438A CN105468342A CN 105468342 A CN105468342 A CN 105468342A CN 201410409438 A CN201410409438 A CN 201410409438A CN 105468342 A CN105468342 A CN 105468342A
Authority
CN
China
Prior art keywords
node
handle
thread
semaphore
chained list
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.)
Withdrawn
Application number
CN201410409438.5A
Other languages
Chinese (zh)
Inventor
何阳
米奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Huize Intellectual Property Operation Management Co Ltd
Original Assignee
Xi'an Huize Intellectual Property Operation Management Co Ltd
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 Xi'an Huize Intellectual Property Operation Management Co Ltd filed Critical Xi'an Huize Intellectual Property Operation Management Co Ltd
Priority to CN201410409438.5A priority Critical patent/CN105468342A/en
Publication of CN105468342A publication Critical patent/CN105468342A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a novel operating system handle management method. For each type of handle, a linked list is independently established, and handle management is carried out. The novel operating system handle management method is characterized in that each node of the linked list comprises a handle type, a process to which the node belongs, a thread to which the node belongs, the private data of the node, a pointer which points to the previous node of the current node, and the pointer which points to the next node of the current node, wherein the handle type comprises a process handle, a thread handle, a semaphore handle and an event handle. Information stored in the linked list is comprehensive, a user can quickly look up each thread, the semaphore distributed by each process and the event handle; and otherwise, the process and the thread to which the node belongs can be found via each semaphore and event so as to realize system handle management in a real sense and bring great convenience for an operating system to manage and access resources and processes.

Description

A kind of new method for managing OS handle
Technical field
The present invention relates to a kind of new method for managing OS handle.
Background technology
Along with department of computer science unifies developing rapidly of embedded OS, embedded OS has incorporated our life, except can see in daily life household appliances, industry except the stand-alone product of Military Application, many giant brain systems, are in fact also made up of various little embedded system.Use the product of embedded OS to get more and more, make how to develop high stability, high efficiency operating system and application program become very crucial problem.In an operating system, be no matter to synchronous, control of the access of system resource or process, thread etc., all will relate to the operation to handle.How to strengthen the handle management of system, improve handle access efficiency, improving travelling speed as much as possible, is the problem that researcher is concerned about.
No matter which kind of form is the resource of operating system adopt manage, and stability, the security of efficiency and performance are always in primary.By knowing that to the management of handle application program creates number, the number of thread, the number of semaphore, the number of event of process, parent process and the subprocess of certain process can be searched fast by handle, and the semaphore created wherein and event; Also father's thread of certain thread and sub-thread and the semaphore created and event can be found wherein.
Prior art generally adopts when carrying out handle management and sets up chained list respectively for the handle of each class variable as process, thread etc., and each node of chained list generally comprises the type of handle and points to the pointer of a upper node and point to the pointer of next node.The quantity of information that such data structure and data type comprise is less, is not easy to operating system and carries out resource management and Process flowchart.
Summary of the invention
For solving above-mentioned existing shortcoming, fundamental purpose of the present invention is the new method for managing OS handle providing a kind of practicality, is very easy to operating system to the management of resource and process and access.
For reaching above-described object, a kind of new method for managing OS handle of the present invention takes following technical scheme:
A kind of new method for managing OS handle, respectively chained list is set up to the handle of each type and carries out handle management, it is characterized in that, each node of described chained list comprises, the type of handle, process belonging to node, thread belonging to node, the private data of this node, points to the pointer of a upper node of this node, with the pointer of the next node of this node of sensing, the type of described handle comprises process handle, thread handle, semaphore handle and event handler.
Carry out handle management to comprise the following steps: initialize process, thread, semaphore and event chained list global variable; Establishment process, thread, semaphore and event chain gauge outfit node; Add the node of newly-increased process, thread, semaphore and event handler to corresponding chained list; The node of process, thread, semaphore and the event handler stopped is deleted from corresponding chained list.
During initialization chained list global variable, be zero by the initial value design of each chained list global variable.
Described establishment process, thread, semaphore and event chain gauge outfit node comprise the following steps:
Apply for a process global variable pointer head node;
Apply for a thread global variable pointer head node;
Apply for a semaphore global variable pointer head node;
Apply for an event global variable pointer head node.
The described node by newly-increased process, thread, semaphore and event handler adds corresponding chained list to and comprises the following steps:
According to the process that user creates, process handle node is added in process chained list;
According to the thread that user creates, thread handle node is added in thread chained list;
According to the semaphore that user creates, semaphore handle is added in semaphore linked list;
According to the event that user creates, event handler is added in event chained list.
The node of described deletion process, thread, semaphore and event handler from corresponding chained list comprises the following steps:
According to the process that user deletes, from process chained list, delete corresponding process handle node; According to the thread that user deletes, from thread chained list, delete corresponding thread handle node; According to the semaphore that user deletes, from semaphore linked list, delete corresponding signal amount node;
According to the event that user deletes, from event chained list, delete corresponding event handler node.
Adopt the present invention of as above technical scheme, there is following beneficial effect:
It is relatively more comprehensive that the present invention is kept at information in chained list, user can fast finding to each thread, the semaphore that each process is distributed, event handler; Otherwise, also can find affiliated process and thread by each semaphore, event, thus realize system handle management truly, be very easy to operating system to the management of resource and process and access.
Accompanying drawing explanation
Fig. 1 is structural representation of the present invention.
Fig. 2 is the node data type schematic diagram of handle chained list of the present invention.
Fig. 3 is the method flow schematic diagram that the present invention creates process, thread, semaphore, event node add chained list to.
Fig. 4 is the method flow schematic diagram that the present invention creates process, thread, semaphore, event node add chained list to.
Embodiment
In order to further illustrate the present invention, be described further below in conjunction with accompanying drawing:
The handle of method for managing OS handle of the present invention to each type sets up chained list respectively, and carries out handle management according to chained list.Wherein, the type of handle comprises process handle, thread handle, semaphore handle and event handler.The handle management system structural representation of the chained list composition of Four types handle as shown in Figure 1.A handle corresponding doubly linked list global variable respectively of every type, each node of chained list stores the corresponding information of handle.Then increase or delete respective nodes when new establishment or deletion handle.
The data type of each node of chained list as shown in Figure 2.As seen from Figure 2, each node comprises: the type of handle, the process belonging to node, the thread belonging to node, the private data of this node, points to the pointer of a upper node of this node, and the pointer of the next node of this node of sensing.Because the information be kept in chained list is more comprehensive, therefore user can fast finding to each thread, each course allocation how many semaphores, a how many event handler, also can find affiliated process and thread by each semaphore, event conversely, reach system handle management truly.
Carry out handle bookkeeping mainly to comprise: initialize process, thread, semaphore and event chained list global variable; Establishment process, thread, semaphore and event chain gauge outfit node; Add the node of newly-increased process, thread, semaphore and event handler to corresponding chained list; The node of process, thread, semaphore and the event handler stopped is deleted from corresponding chained list.
Such as, during initialization chained list global variable, be zero by the initial value design of each chained list global variable.Establishment process, thread, semaphore and event chain gauge outfit node comprise the following steps: apply for a process global variable pointer head node, such as defining its relevant variable is peocessh; Apply for a thread global variable pointer head node, such as defining its relevant variable is threadh; Apply for a semaphore global variable pointer head node, such as defining its relevant variable is semah ;apply for an event global variable pointer head node, such as defining its relevant variable is eventh.
Then the initial value of each variable is: peocessh=0; Threadh=0; Eventh=0;
Add the node of newly-increased process, thread, semaphore and event handler the method flow diagram of corresponding chained list to as shown in Figure 3.Visible, newly-increased node is inserted into the head of corresponding chained list, comprises the following steps :distribute a node by process node size, and be inserted into the head of process chained list; Distribute a node according to thread node size, and be inserted into the head of thread chained list ;distribute a node according to semaphore node size, and be inserted into the head of semaphore linked list; Distribute a node according to event node size, and be inserted into the head of event chained list.Wherein the insertion of chained list is identical with the method for operating of prior art to linked list data structure.
When needing the node of deletion process, thread, semaphore and event handler from corresponding chained list, the process flow diagram of its method as shown in Figure 4, comprises the following steps: from process chained list, find corresponding node according to for deletion process and delete; From thread chained list, find corresponding node according to the thread for deleting and delete; From semaphore linked list, find corresponding node according to the semaphore node for deleting and delete; From event chained list, find corresponding node according to the event for deleting and delete.

Claims (6)

1. a new method for managing OS handle, respectively chained list is set up to the handle of each type and carries out handle management, it is characterized in that, each node of described chained list comprises, the type of handle, process belonging to node, thread belonging to node, the private data of this node, points to the pointer of a upper node of this node, with the pointer of the next node of this node of sensing, the type of described handle comprises process handle, thread handle, semaphore handle and event handler.
2. method for managing OS handle according to claim 1, is characterized in that, carries out handle management and comprises the following steps: initialize process, thread, semaphore and event chained list global variable; Establishment process, thread, semaphore and event chain gauge outfit node; Add the node of newly-increased process, thread, semaphore and event handler to corresponding chained list; The node of process, thread, semaphore and the event handler stopped is deleted from corresponding chained list.
3. method for managing OS handle according to claim 2, is characterized in that, during initialization chained list global variable, is zero by the initial value design of each chained list global variable.
4. method for managing OS handle according to claim 2, is characterized in that, described establishment process, thread, semaphore and event chain gauge outfit node comprise the following steps:
Apply for a process global variable pointer head node;
Apply for a thread global variable pointer head node;
Apply for a semaphore global variable pointer head node;
Apply for an event global variable pointer head node.
5. method for managing OS handle according to claim 2, is characterized in that, the described node by newly-increased process, thread, semaphore and event handler adds corresponding chained list to and comprises the following steps:
According to the process that user creates, process handle node is added in process chained list;
According to the thread that user creates, thread handle node is added in thread chained list;
According to the semaphore that user creates, semaphore handle is added in semaphore linked list;
According to the event that user creates, event handler is added in event chained list.
6. method for managing OS handle according to claim 2, is characterized in that, the node of described deletion process, thread, semaphore and event handler from corresponding chained list comprises the following steps:
According to the process that user deletes, from process chained list, delete corresponding process handle node; According to the thread that user deletes, from thread chained list, delete corresponding thread handle node; According to the semaphore that user deletes, from semaphore linked list, delete corresponding signal amount node;
According to the event that user deletes, from event chained list, delete corresponding event handler node.
CN201410409438.5A 2014-08-20 2014-08-20 Novel operating system handle management method Withdrawn CN105468342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410409438.5A CN105468342A (en) 2014-08-20 2014-08-20 Novel operating system handle management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410409438.5A CN105468342A (en) 2014-08-20 2014-08-20 Novel operating system handle management method

Publications (1)

Publication Number Publication Date
CN105468342A true CN105468342A (en) 2016-04-06

Family

ID=55606089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410409438.5A Withdrawn CN105468342A (en) 2014-08-20 2014-08-20 Novel operating system handle management method

Country Status (1)

Country Link
CN (1) CN105468342A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108279994A (en) * 2018-01-22 2018-07-13 北京仿真中心 A kind of connection Citrix has issued the automation solution of application exception
CN109739468A (en) * 2019-01-07 2019-05-10 Oppo广东移动通信有限公司 Running optimizatin method, apparatus, storage medium and terminal device
CN109976764A (en) * 2019-03-28 2019-07-05 深圳市创联时代科技有限公司 A kind of handle conversion method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108279994A (en) * 2018-01-22 2018-07-13 北京仿真中心 A kind of connection Citrix has issued the automation solution of application exception
CN109739468A (en) * 2019-01-07 2019-05-10 Oppo广东移动通信有限公司 Running optimizatin method, apparatus, storage medium and terminal device
CN109976764A (en) * 2019-03-28 2019-07-05 深圳市创联时代科技有限公司 A kind of handle conversion method

Similar Documents

Publication Publication Date Title
US10585691B2 (en) Distribution system, computer, and arrangement method for virtual machine
CN105900093B (en) A kind of update method of the tables of data of KeyValue databases and table data update apparatus
CN101673289B (en) Method and device for constructing distributed file storage framework
US10402316B2 (en) Tracing garbage collector for search trees under multi-version concurrency control
CN103744724A (en) Timed task clustering method and device thereof
US9921874B2 (en) Storage medium, information processing device, and information processing method
CN103703467A (en) Method and apparatus for storing data
CN104063361A (en) Report design method and system
CN105468342A (en) Novel operating system handle management method
CN104182487A (en) Unified storage method supporting various storage modes
CN104519072A (en) Authority control method and device
CN108021449A (en) One kind association journey implementation method, terminal device and storage medium
CN103294799B (en) A kind of data parallel batch imports the method and system of read-only inquiry system
Izsó et al. IncQuery-D: incremental graph search in the cloud.
CN101206586B (en) Method for managing OS handle
US10061697B2 (en) Garbage collection scope detection for distributed storage
CN104714983B (en) The generation method and device of distributed index
CN102855299A (en) Method for realizing iterative migration of distributed database without interrupting service
CN105574076A (en) Key value pair storage structure based on Bloom Filter and method
CN109271364A (en) Storage method and device
US10439897B1 (en) Method and apparatus for enabling customized control to applications and users using smart tags
CN106201655B (en) Virtual machine distribution method and virtual machine distribution system
CN105279166A (en) File management method and system
CN103617284A (en) Data field extension method
CN104317905B (en) A kind of method and system of information monitoring real time data caching process

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C04 Withdrawal of patent application after publication (patent law 2001)
WW01 Invention patent application withdrawn after publication

Application publication date: 20160406