CN111722942A - Transformation method of distributed real-time operating system - Google Patents

Transformation method of distributed real-time operating system Download PDF

Info

Publication number
CN111722942A
CN111722942A CN202010478360.8A CN202010478360A CN111722942A CN 111722942 A CN111722942 A CN 111722942A CN 202010478360 A CN202010478360 A CN 202010478360A CN 111722942 A CN111722942 A CN 111722942A
Authority
CN
China
Prior art keywords
port
information
module
semaphore
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010478360.8A
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.)
Tianjin University
CERNET Corp
Original Assignee
Tianjin University
CERNET Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin University, CERNET Corp filed Critical Tianjin University
Priority to CN202010478360.8A priority Critical patent/CN111722942A/en
Publication of CN111722942A publication Critical patent/CN111722942A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Multi Processors (AREA)

Abstract

The invention relates to a method for reconstructing a distributed real-time operating system, which mainly comprises the following two aspects: the improvement of network transparency and the improvement of process communication real-time performance: (1) and (3) modifying network transparency, namely, using a global information table management module, a global information broadcasting module and a function call interface module, broadcasting related information to other nodes when each node creates or cancels a message queue, a semaphore and a thread, and immediately updating the global information table and sending successful updating information to a source node by the other nodes. (2) The real-time transformation of process communication is realized by adding a port control module, a port dynamic management module, a port receiving service module and a message queue management module in a process communication module in RTLinux.

Description

Transformation method of distributed real-time operating system
Technical Field
The invention relates to a distributed real-time operating system.
Background
With the rapid development of information technology, the current society has become an information-oriented society. As a result, real-time information processing systems have been widely used in various fields, such as industrial control fields, defense fields, business fields, and the like. A feature of such systems is that a large amount of data is required to be processed correctly within a specified time. The distributed real-time operating system provides a good platform for the distributed real-time operating system, so that the performance of the distributed real-time operating system directly affects the information processing efficiency, and therefore the operating system needs to be modified in real time so as to be capable of correctly processing information within a short preset time.
In recent years, many scientific research institutes at home and abroad are dedicated to research and development of a distributed real-time operating system. RTAI is one of the experimental systems that has been successfully developed. RTAI provides a distributed real-time process communication module that supports remote threading, remote message queuing, and remote semaphore operations based on a remote procedure call model. Ports are the main objects of operation of the module, each port corresponding to a real-time network interface, but a port can only contain one communication entity, i.e. either a semaphore or a message queue. RTLinux is a real-time operating system transformed on the basis of Linux, but only provides a mechanism of single-node internal process communication, and the mechanism cannot meet the real-time communication among processes on different node machines, so that distributed real-time transformation of the process communication mechanism of RTLinux is necessary.
Disclosure of Invention
The invention provides a method for improving the performance of a distributed real-time operating system, which is used for improving the real-time performance of the distributed operating system from the aspect of process communication and enabling a user to develop a real-time application program quickly and efficiently. The technical scheme is as follows:
a method for improving a distributed real-time operating system mainly comprises the following two aspects: the improvement of network transparency and the improvement of process communication real-time performance:
(1) modification of network transparency
Using a global information table management module, a global information broadcasting module and a function calling interface module, when each node creates or cancels a message queue, a semaphore and a thread, broadcasting related information to other nodes, immediately updating a global information table by other nodes and sending updating success information to a source node, adding 1 to the count of the source node after receiving the successful updating information of one node, and indicating that all nodes are successfully updated if the value is n-1 in a preset time, otherwise, rebroadcasting;
adding a broadcast function in the local semaphore, message queue and thread creating and canceling functions of RTLinux to broadcast corresponding information to other nodes, when a source node creates the semaphore, firstly judging the initial value of the semaphore, if the initial value is less than 0, returning an error mark, if the initial value and the type of the semaphore are filled and a queue pointer is set to wait for transmission, then judging whether the transmission is successful, if the transmission is successful, ending, and if the transmission is unsuccessful, circularly broadcasting;
when the thread operates the semaphore or the message queue, the thread firstly inquires in the global information table of the local node according to the identifier, if the semaphore and the message queue are in the local node, a local process communication function is called, otherwise, a sending port is applied and relevant execution information is sent to a corresponding port of the remote node.
(2) Transformation of process communication real-time performance
Adding a port control module, a port dynamic management module, a port receiving service module and a message queue management module in a process communication module in RTLinux;
executing different works according to different ports, and if the port is an information sending port, communicating with an external node; if the service port is the service port, calling a related function to create an entity port according to the request information; if the port is an entity port, the port comprises a semaphore or information queue, and when other nodes send requests, the service function in the queue provides corresponding services;
the port dynamic management module ensures that a certain number of idle ports exist in the system, if the idle ports are not enough, the idle ports are added, and if the idle ports are redundant, the idle ports are deleted; the port receiving service module monitors an execution request of a service port, and calls a local related function to operate a related entity according to the received request information after receiving the execution information;
the message sending function in the system is changed from a first-in first-out mode to a mode that the earliest deadline is firstly entered into a message queue.
The invention has the following beneficial effects:
1. the invention carries out real-time transformation on the distributed operating system, and as for the buffer area required by sending the message, as a certain number of buffer areas are pre-distributed for the message queue when the port is generated, the required time is approximate to 0 at the moment, and only the time required by adding the message head is needed, thus meeting the requirement of real-time property.
2. The invention provides a communication interface transparent to users, realizes the process communication function among a plurality of machines, and enables users to feel that one machine is used instead of a plurality of machines. Users write applications by invoking these interfaces without having to consider too much network detail.
Drawings
FIG. 1 Global information Table update procedure
FIG. 2 is a block diagram of process communication
Detailed Description
The invention is suitable for a distributed real-time operating system. Among the biggest features are real-time and a communication interface that is transparent to the user.
A method for modifying a distributed real-time operating system is provided. By adopting the method, the RTLinux operating system is transformed in a distributed and real-time manner, a large amount of information can be stably processed in a short time, a transparent interface is provided for a user, and the user can conveniently develop an application program. The following sections describe the implementation of distributed real-time process communication in detail.
1 network transparency
In order to realize transparency of a programming interface, a global information table management module, a global information broadcasting module and a function call interface module are used.
When each node creates or cancels the message queue, the semaphore and the thread, relevant information is broadcasted to other nodes, and the other nodes update the global information table and send successful updating information to the source node. And after receiving the successful updating information of one node, the source node counts and adds 1, if the value is n-1 in preset time, the updating of all nodes is successful, and if not, the node is broadcasted again.
And adding a broadcast function inside semaphore, message queue and thread creating and canceling functions local to RTLinux to broadcast corresponding information to other nodes. If the source node creates the semaphore, firstly judging the initial value of the semaphore, if the initial value of the semaphore is smaller than 0, returning an error mark, if the initial value of the semaphore is larger than 0, filling the initial value and the type of the semaphore and setting a queue pointer to wait for transmission, then judging whether the transmission is successful, if the transmission is successful, ending, and if the transmission is unsuccessful, circularly broadcasting.
When a thread operates on a semaphore or a message queue, the thread firstly queries the global information table of the node according to the identifier. If the semaphore and message queue are in the local node, the local process communication function is called, otherwise, a sending port is applied and relevant execution information is sent to the corresponding port of the remote node.
2-process communication real-time
In order to realize the real-time performance of process communication, a port manipulation module, a port dynamic management module, a port receiving service module and a message queue management module are added in a process communication module in RTLinux.
Different jobs are performed according to different ports. If the port is an information sending port, communicating with an external node; if the service port is the service port, calling a related function to create an entity port according to the request information; if the port is an entity port, a semaphore or information queue is included, and when other nodes send requests, the service function in the port provides corresponding services.
The dynamic port management module ensures that a certain number of idle ports exist in the system, and if the idle ports are not enough, the idle ports are added, and if the idle ports are redundant, the idle ports are deleted. The port receiving service module monitors an execution request of the service port, and calls a local related function to operate a related entity according to the received request information after receiving the execution information.
The message sending function in the system is changed from a first-in first-out mode to a mode that the earliest deadline is firstly entered into a message queue.
Distributed real-time process communication is based on a modified local process communication module, and simultaneously performs operations of remote threads, semaphores and message queues. The real-time performance of the distributed operating system is improved from the view point of process communication, so that the efficiency of related information processing is also improved. Additionally, providing a communication interface to the user allows the user to develop real-time applications quickly and efficiently.
The invention has the characteristics that: 1) network transparency. The user can directly carry out various operations by the names of the operation objects without knowing specific details during programming. 2) And (4) real-time performance. The real-time performance of message communication is improved.

Claims (1)

1. A method for improving a distributed real-time operating system mainly comprises the following two aspects: the improvement of network transparency and the improvement of process communication real-time performance:
(1) modification of network transparency
Using a global information table management module, a global information broadcasting module and a function calling interface module, when each node creates or cancels a message queue, a semaphore and a thread, broadcasting related information to other nodes, immediately updating a global information table by other nodes and sending updating success information to a source node, adding 1 to the count of the source node after receiving the successful updating information of one node, and indicating that all nodes are successfully updated if the value is n-1 in a preset time, otherwise, rebroadcasting;
adding a broadcast function in the local semaphore, message queue and thread creating and canceling functions of RTLinux to broadcast corresponding information to other nodes, when a source node creates the semaphore, firstly judging the initial value of the semaphore, if the initial value is less than 0, returning an error mark, if the initial value and the type of the semaphore are filled and a queue pointer is set to wait for transmission, then judging whether the transmission is successful, if the transmission is successful, ending, and if the transmission is unsuccessful, circularly broadcasting;
when the thread operates the semaphore or the message queue, the thread firstly inquires in the global information table of the local node according to the identifier, if the semaphore and the message queue are in the local node, a local process communication function is called, otherwise, a sending port is applied and relevant execution information is sent to a corresponding port of the remote node.
(2) Transformation of process communication real-time performance
Adding a port control module, a port dynamic management module, a port receiving service module and a message queue management module in a process communication module in RTLinux;
executing different works according to different ports, and if the port is an information sending port, communicating with an external node; if the service port is the service port, calling a related function to create an entity port according to the request information; if the port is an entity port, the port comprises a semaphore or information queue, and when other nodes send requests, the service function in the queue provides corresponding services;
the port dynamic management module ensures that a certain number of idle ports exist in the system, if the idle ports are not enough, the idle ports are added, and if the idle ports are redundant, the idle ports are deleted; the port receiving service module monitors an execution request of a service port, and calls a local related function to operate a related entity according to the received request information after receiving the execution information;
the message sending function in the system is changed from a first-in first-out mode to a mode that the earliest deadline is firstly entered into a message queue.
CN202010478360.8A 2020-05-29 2020-05-29 Transformation method of distributed real-time operating system Pending CN111722942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010478360.8A CN111722942A (en) 2020-05-29 2020-05-29 Transformation method of distributed real-time operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010478360.8A CN111722942A (en) 2020-05-29 2020-05-29 Transformation method of distributed real-time operating system

Publications (1)

Publication Number Publication Date
CN111722942A true CN111722942A (en) 2020-09-29

Family

ID=72565513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010478360.8A Pending CN111722942A (en) 2020-05-29 2020-05-29 Transformation method of distributed real-time operating system

Country Status (1)

Country Link
CN (1) CN111722942A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486702A (en) * 2020-11-27 2021-03-12 中船重工(武汉)凌久电子有限责任公司 Global message queue implementation method based on multi-core multi-processor parallel system
CN115098220A (en) * 2022-06-17 2022-09-23 西安电子科技大学 Large-scale network node simulation method based on container thread management technology

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486702A (en) * 2020-11-27 2021-03-12 中船重工(武汉)凌久电子有限责任公司 Global message queue implementation method based on multi-core multi-processor parallel system
CN112486702B (en) * 2020-11-27 2024-02-13 中船重工(武汉)凌久电子有限责任公司 Global message queue implementation method based on multi-core multi-processor parallel system
CN115098220A (en) * 2022-06-17 2022-09-23 西安电子科技大学 Large-scale network node simulation method based on container thread management technology
CN115098220B (en) * 2022-06-17 2024-04-16 西安电子科技大学 Large-scale network node simulation method based on container thread management technology

Similar Documents

Publication Publication Date Title
US7549151B2 (en) Fast and memory protected asynchronous message scheme in a multi-process and multi-thread environment
CA2200929C (en) Periodic process scheduling method
US5448734A (en) Selective distribution of messages using named pipes
US7640549B2 (en) System and method for efficiently exchanging data among processes
US20030182464A1 (en) Management of message queues
CN111722942A (en) Transformation method of distributed real-time operating system
JPH0563821B2 (en)
JPH03126158A (en) Method and apparatus for scheduling
CN110321120A (en) Data processing method, data processing apparatus, and computer-readable storage medium
CN108197263A (en) Method of data synchronization
CN116866427B (en) Unified pushing method and system for heterogeneous messages
CN103914286A (en) Management method and manager for tab page in user interface
CN104572315B (en) Realize method, communication entity and the distributed communication system of intersubsystem communication
JPH11212818A (en) Decentralized simulation system
US6314462B1 (en) Sub-entry point interface architecture for change management in a computer network
CN1630853A (en) Method for constructing distributed software components
JPS62126457A (en) Distributed data processing system
CN115002121B (en) Method for realizing one-master multi-slave Git cluster based on preemption lock
CN113032010B (en) Command transmission control method, terminal and computer readable storage medium
CN107634916B (en) Data communication method and device
CN116755868B (en) Task processing system and method
EP0436561A1 (en) Data processing network
CN113867991B (en) Method and device for processing events among threads based on signal slots and storage medium
EP0114357A2 (en) Controlling multiple distributed computations in a multi cpu environnment from a single port
CN118193233A (en) Hybrid system task asynchronous communication method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200929

WD01 Invention patent application deemed withdrawn after publication