CN105843693A - High-speed maglev transportation simulation oriented memory sharing method - Google Patents
High-speed maglev transportation simulation oriented memory sharing method Download PDFInfo
- Publication number
- CN105843693A CN105843693A CN201610164566.7A CN201610164566A CN105843693A CN 105843693 A CN105843693 A CN 105843693A CN 201610164566 A CN201610164566 A CN 201610164566A CN 105843693 A CN105843693 A CN 105843693A
- Authority
- CN
- China
- Prior art keywords
- shared drive
- drive block
- communication
- write
- computer
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multi Processors (AREA)
Abstract
The present invention relates to a high-speed maglev transportation simulation oriented memory sharing method. The oriented high-speed maglev transportation simulation comprises at least one computer, and maglev simulation equipment; each computer is communicated through a communication layer; an application layer is only communicated with the communication layer of a local computer; and both the communication layer and the application layer have communication nodes. The method comprises the following steps that (1) the communication layer in the computer establishes a communication program process, and the communication program process establishes shared memory blocks and a shared memory agent; (2) the shared memory agent stores the quantity, a network state, and address pointer information of the shared memory blocks in a window form; and (3) the application layer in the computer establishes an application program process, and the application program process provides the name, and send and receive addresses to the shared memory agent, calls the shared memory agent, and communicates with the corresponding shared memory block. Compared with the prior art, the method disclosed by the present invention has advantages of a fast read and write speed, good effect, and so on.
Description
Technical field
The invention belongs to multiprocess communication field, especially relate to a kind of interior towards sharing of high speed Maglev emulation
Deposit method.
Background technology
In order to realize the data that in high speed Maglev emulation, simulation computer or emulation server are internal transmit or
Information communicates, and floats, with the magnetic completing to be run the machine, the system merit that functional software carries out under environmental bug injection condition
Can need to use a kind of efficient communication technology that can switch between multi-process with the test and validation of performance.
Summary of the invention
Defect that the purpose of the present invention is contemplated to overcome above-mentioned prior art to exist and provide a kind of raising information to pass
Pass the shared drive method towards high speed Maglev emulation with direct fault location efficiency, multiple shared drive blocks are entered
Row division of functionality, and set up Initialization file and the shared drive agency safeguarding shared drive, use
Mutual exclusion mechanism and synchronization mechanism so that process provides a small amount of communication information, call the synchronization read-write behaviour of shared drive
Make, complete the communication between multi-process.
The purpose of the present invention can be achieved through the following technical solutions: a kind of being total to towards high speed Maglev emulation
Enjoy internal memory method, towards high speed Maglev emulation, described includes that at least one computer and magnetic float emulator,
Use P2P communication protocol to be communicated by communication layers as communication construction, every computer, and application layer is only
Can be with the communication layers communication of the machine, communication layers and application layer all have communication node, and the method uses " principal and subordinate " formula
Technical Architecture, comprise the following steps:
(1) communication layers in computer sets up signal procedure process, signal procedure process set up shared drive block and
Shared drive is acted on behalf of;
(2) the shared drive agency described in is with the window form storage quantity of shared drive block, network state and ground
Location pointer information;
(3) application layer in computer sets up program process, and program process is to described shared drive
Agency provides title and the transmitting-receiving address of communication node, calls shared drive agency and leads to corresponding shared drive block
Letter.
In high speed Maglev simulation computer, communication layers that shared drive is simultaneously supplied in computer and application
Program, is carried out the most newly-built and management by communication layers, and other application programs can only send request to obtain sharing
The access limit of internal memory.
Described step (1) sets up shared drive block method particularly includes: described signal procedure process according to
Communication node information in Initialization file, creates File Mapping, the twice of newly-built outgoing communication node quantity
Shared drive block, described Initialization file is the program code write by user, user by amendment
Described Initialization file thus revise shared drive block.
The described read-only evidence of shared drive block or write data.
Described shared drive block use mutual exclusion lock control multiple threads use to shared drive block in computer
Power, particularly as follows: when a thread carries out read or write to certain shared drive block, be set to mutual exclusion lock lock shape
State so that it is he calls the thread of this shared drive block and is set to blocked state, until this read or write terminates and mutual exclusion
Lock is released state, and other threads can use this shared drive block.
In described step (1), communication layers reads the title of communication node, distributes one for each communication node and " reads
Go out " shared drive block and " write " shared drive block, and each shared drive block uses
MapViewOfFile () or MapViewOfFileEx () function, by the address space of File Mapping to corresponding process
In.
Described shared drive proxy call event sends " read/write " request of process to shared drive block, changes
State of a process.
In each shared drive block, use event realizes the read-write synchronization mechanism of shared drive.When some " is write
Entering " mutual exclusion lock of shared drive block is that in released state and internal memory, content is for time empty, then by SetEvent () function
It is set to suspended state, waits calling and the signal of write operation of thread.
When some mutual exclusion lock " reading " shared drive block is released state and memory content is not empty, nothing
Thread dispatching is needed SetEvent () function to be set to signaling states automatically to carry out read operation.Until thread has read
Finish, release signaling states to realize read-write synchronization mechanism.
Shared drive is acted on behalf of Container and is used mutexes Mutex to control the multi-process read-write behaviour to shared drive block
Make.When one communication node is communicated by process, Mutex is set to lock status so that it is he calls same node point
Process be set to blocked state.Until this communication node uses complete, Mutex is set to released state.
Shared drive is acted on behalf of Container and is used event Event to safeguard the network state of shared drive block.When upper one
When the Mutex of step is lock status, Container sends Event signal to specific shared drive block, will share
Memory block is set to " read/write " state or return shared drive block does not exists or rub-out signal is to process.
Data in each shared drive block the most uni-directionally read or write.Shared drive is that each leads to
Letter node one " reading " shared drive block of distribution and " write " shared drive block.Share when process uses
During internal memory, need in the shared drive block of different communication node, carry out " read/write " operation, it is ensured that each internal memory
Data stream one-way transmission in block, it is to avoid the situation of " read/write conflict " occur, raising process calls shared drive
Efficiency.
Compared with prior art, the invention have the advantages that
(1) establishing Initialization file, such user need not amendment program, only revises text message
Just can reach additions and deletions and change the effect of shared drive, effective, the time that user needs is few;
(2) shared drive block can only be read, or writes data, can not two functions have both.So accelerate data
The speed of read-write, reads the data memory block by reading data, writes with write, prevent read/write conflict;
(3) set up shared drive agency, shared drive block need setting up when store name, ip address,
The whether various information such as log, but the pointer information of shared drive agency's stored memory block,
A small amount of information such as the state whether can read and write.So user has only to provide a small amount of information just can call altogether
Enjoying internal memory agents, allow agency go to process the problem of read-write, user only need to be fed back.So accelerate read-write
Speed.
Accompanying drawing explanation
Fig. 1 is the flow chart of the present invention.
Detailed description of the invention
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.
As it is shown in figure 1, a kind of shared drive method towards high speed Maglev emulation, towards high speed Maglev
Emulation includes that at least one computer and magnetic float emulator, and use P2P communication protocol is as communication construction, often
Platform computer is communicated by communication layers, and application layer can only be with the communication layers communication of the machine, communication layers and application
Layer all has communication node, and the method uses the Technical Architecture of " principal and subordinate " formula, comprises the following steps:
(1) communication layers in computer sets up signal procedure process, signal procedure process set up shared drive block and
Shared drive is acted on behalf of, and in high speed Maglev simulation computer, it is logical that shared drive is simultaneously supplied in computer
Letter layer and application layer, carried out the most newly-built and management by communication layers, and other application programs can only send request to obtain
Must be to the access limit of shared drive;Set up shared drive block method particularly includes: signal procedure process according to
Communication node information in Initialization file, uses CreateFileMapping () to create File Mapping, newly-built
The shared drive block of the twice of outgoing communication node quantity.User is total to by amendment Initialization file thus amendment
Enjoy memory block.Shared drive uses the Initialization file (.ini file) of Windows system to configure
And management.Communication layers reads the title of communication node, distributes " reading " shared drive for each communication node
Block and " write " shared drive block, and each shared drive block use MapViewOfFile () or
MapViewOfFileEx () function, by File Mapping to the address space of corresponding process.
(2) shared drive agency is with the window form storage quantity of shared drive block, network state and address pointer
Information;
(3) application layer in computer sets up program process, and program process carries to shared drive agency
For communication node title and transmitting-receiving address, call shared drive agency and with corresponding shared drive block communication.
Shared drive block use mutual exclusion lock control multiple threads right to use to shared drive block in computer, specifically
For: when a thread carries out read or write to certain shared drive block, mutual exclusion lock is set to lock status so that it is
He calls the thread of this shared drive block and is set to blocked state, until this read or write terminates and mutual exclusion lock is for unlocking
State, other threads can use this shared drive block.
Shared drive proxy call event sends " read/write " request of process to shared drive block, changes the shape of process
State.
In each shared drive block, use event realizes the read-write synchronization mechanism of shared drive.When some " is write
Entering " mutual exclusion lock of shared drive block is that in released state and internal memory, content is for time empty, then by SetEvent () function
It is set to suspended state, waits calling and the signal of write operation of thread.
When some mutual exclusion lock " reading " shared drive block is released state and memory content is not empty, nothing
Thread dispatching is needed SetEvent () function to be set to signaling states automatically to carry out read operation.Until thread has read
Finish, release signaling states to realize read-write synchronization mechanism.
Shared drive is acted on behalf of Container and is used mutexes Mutex to control the multi-process read-write behaviour to shared drive block
Make.When one communication node is communicated by process, Mutex is set to lock status so that it is he calls same node point
Process be set to blocked state.Until this communication node uses complete, Mutex is set to released state.
Shared drive is acted on behalf of Container and is used event Event to safeguard the network state of shared drive block.When upper one
When the Mutex of step is lock status, Container sends Event signal to specific shared drive block, will share
Memory block is set to " read/write " state or return shared drive block does not exists or rub-out signal is to process.
Data in each shared drive block the most uni-directionally read or write.Shared drive is that each leads to
Letter node one " reading " shared drive block of distribution and " write " shared drive block.Share when process uses
During internal memory, need in the shared drive block of different communication node, carry out " read/write " operation, it is ensured that each internal memory
Data stream one-way transmission in block, it is to avoid the situation of " read/write conflict " occur, raising process calls shared drive
Efficiency.
Claims (6)
1., towards a shared drive method for high speed Maglev emulation, described imitates towards high speed Maglev
Really including that at least one computer and magnetic float emulator, every computer is communicated by communication layers, and applies
Layer can only all have communication node with the communication layers communication of the machine, communication layers and application layer, it is characterised in that the method
Comprise the following steps:
(1) communication layers in computer sets up signal procedure process, signal procedure process set up shared drive block and
Shared drive is acted on behalf of;
(2) the shared drive agency described in is with the window form storage quantity of shared drive block, network state and ground
Location pointer information;
(3) application layer in computer sets up program process, and program process is to described shared drive
Agency provides title and the transmitting-receiving address of communication node, calls shared drive agency and leads to corresponding shared drive block
Letter.
A kind of shared drive method towards high speed Maglev emulation the most according to claim 1, it is special
Levy and be, described step (1) sets up shared drive block method particularly includes: described signal procedure process
According to the communication node information in Initialization file, create File Mapping, the two of newly-built outgoing communication node quantity
Shared drive block again, user is by the Initialization file described in amendment thus revises shared drive block.
A kind of shared drive method towards high speed Maglev emulation the most according to claim 1, it is special
Levy and be, the described read-only evidence of shared drive block or write data.
A kind of shared drive method towards high speed Maglev emulation the most according to claim 1, it is special
Levying and be, in using mutual exclusion lock to control computer in described shared drive block, shared drive block is made by multiple threads
By power, particularly as follows: when a thread carries out read or write to certain shared drive block, mutual exclusion lock is set to lock
State so that it is he calls the thread of this shared drive block and is set to blocked state, until this read or write terminates and mutually
Scolding lock is released state, and other threads can use this shared drive block.
A kind of shared drive method towards high speed Maglev emulation the most according to claim 1, it is special
Levying and be, in described step (1), communication layers reads the title of communication node, distributes one for each communication node
Individual " reading " shared drive block and " write " shared drive block, and the use of each shared drive block
MapViewOfFile () or MapViewOfFileEx () function, by the address space of File Mapping to corresponding process
In.
A kind of shared drive method towards high speed Maglev emulation the most according to claim 1, it is special
Levying and be, described shared drive proxy call event sends " read/write " request of process to shared drive block,
Change state of a process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610164566.7A CN105843693B (en) | 2016-03-22 | 2016-03-22 | A kind of shared drive method towards high speed Maglev emulation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610164566.7A CN105843693B (en) | 2016-03-22 | 2016-03-22 | A kind of shared drive method towards high speed Maglev emulation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105843693A true CN105843693A (en) | 2016-08-10 |
CN105843693B CN105843693B (en) | 2019-05-14 |
Family
ID=56587895
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610164566.7A Expired - Fee Related CN105843693B (en) | 2016-03-22 | 2016-03-22 | A kind of shared drive method towards high speed Maglev emulation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105843693B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108062252A (en) * | 2016-11-08 | 2018-05-22 | 阿里巴巴集团控股有限公司 | A kind of information interacting method, method for managing object and device and system |
CN108107750A (en) * | 2017-11-29 | 2018-06-01 | 国网宁夏电力有限公司电力科学研究院 | The real-time I/O data processing method and system of a kind of electric system simulation |
CN112991511A (en) * | 2020-10-13 | 2021-06-18 | 中国汽车技术研究中心有限公司 | Point cloud data display method |
CN114524007A (en) * | 2022-02-07 | 2022-05-24 | 北京交通大学 | Magnetic levitation running control digital twin system |
CN117097814A (en) * | 2023-09-21 | 2023-11-21 | 长沙科梁科技有限公司 | Asynchronous communication method between simulation model and terminal |
CN117408060A (en) * | 2023-10-13 | 2024-01-16 | 上海同星智能科技有限公司 | Whole vehicle model simulation performance optimization method, storage medium and electronic equipment |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106776060A (en) * | 2016-11-25 | 2017-05-31 | 江西洪都航空工业集团有限责任公司 | A kind of shared drive algorithm |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1199642A3 (en) * | 2000-10-03 | 2003-10-29 | Altima Communications, Inc. | Method and apparatus of sharing an inter-chip bus for message passing and memory access |
CN101382953A (en) * | 2008-09-19 | 2009-03-11 | 中兴通讯股份有限公司 | Interface system for accessing file system in user space and file reading and writing method |
CN101576912A (en) * | 2009-06-03 | 2009-11-11 | 中兴通讯股份有限公司 | System and reading and writing method for realizing asynchronous input and output interface of distributed file system |
CN103631936A (en) * | 2013-12-06 | 2014-03-12 | 北京首钢自动化信息技术有限公司 | Method for managing shared memory |
-
2016
- 2016-03-22 CN CN201610164566.7A patent/CN105843693B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1199642A3 (en) * | 2000-10-03 | 2003-10-29 | Altima Communications, Inc. | Method and apparatus of sharing an inter-chip bus for message passing and memory access |
CN101382953A (en) * | 2008-09-19 | 2009-03-11 | 中兴通讯股份有限公司 | Interface system for accessing file system in user space and file reading and writing method |
CN101576912A (en) * | 2009-06-03 | 2009-11-11 | 中兴通讯股份有限公司 | System and reading and writing method for realizing asynchronous input and output interface of distributed file system |
CN103631936A (en) * | 2013-12-06 | 2014-03-12 | 北京首钢自动化信息技术有限公司 | Method for managing shared memory |
Non-Patent Citations (1)
Title |
---|
李文明,叶笑春等: "BDSim:面向大数据应用的组件化高可配并行模拟框架", 《计算机学报》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108062252A (en) * | 2016-11-08 | 2018-05-22 | 阿里巴巴集团控股有限公司 | A kind of information interacting method, method for managing object and device and system |
CN108062252B (en) * | 2016-11-08 | 2022-02-01 | 斑马智行网络(香港)有限公司 | Information interaction method, object management method, device and system |
CN108107750A (en) * | 2017-11-29 | 2018-06-01 | 国网宁夏电力有限公司电力科学研究院 | The real-time I/O data processing method and system of a kind of electric system simulation |
CN108107750B (en) * | 2017-11-29 | 2023-10-20 | 国网宁夏电力有限公司电力科学研究院 | Real-time IO data processing method and system for power system simulation |
CN112991511A (en) * | 2020-10-13 | 2021-06-18 | 中国汽车技术研究中心有限公司 | Point cloud data display method |
CN114524007A (en) * | 2022-02-07 | 2022-05-24 | 北京交通大学 | Magnetic levitation running control digital twin system |
CN117097814A (en) * | 2023-09-21 | 2023-11-21 | 长沙科梁科技有限公司 | Asynchronous communication method between simulation model and terminal |
CN117097814B (en) * | 2023-09-21 | 2023-12-29 | 长沙科梁科技有限公司 | Asynchronous communication method between simulation model and terminal |
CN117408060A (en) * | 2023-10-13 | 2024-01-16 | 上海同星智能科技有限公司 | Whole vehicle model simulation performance optimization method, storage medium and electronic equipment |
CN117408060B (en) * | 2023-10-13 | 2024-05-14 | 上海同星智能科技有限公司 | Whole vehicle model simulation performance optimization method, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105843693B (en) | 2019-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105843693A (en) | High-speed maglev transportation simulation oriented memory sharing method | |
CN114363021B (en) | Network target range system, virtual network implementation method and device of network target range system | |
CN109194538A (en) | Test method, device, server and storage medium based on distributed coordination | |
CN109542611A (en) | Database, that is, service system, database dispatching method, equipment and storage medium | |
CN105242872B (en) | A kind of shared memory systems of Virtual cluster | |
CN107181679A (en) | A kind of port binding implementation method and device | |
CN104932364A (en) | OPC UA conversion apparatus of Modbus communication protocol, and method | |
CN104639361A (en) | Network service template management method and device | |
CN106331065A (en) | Proxy application for host system with service container and system | |
CN102854853A (en) | Cross-platform lightweight distributed control system | |
CN102937895B (en) | A kind of virtual test middleware system based on TAO | |
CN112035216A (en) | Communication method for Kubernetes cluster network and OpenStack network | |
CN104573428A (en) | Method and system for improving resource effectiveness of server cluster | |
CN106533961A (en) | Flow control method and device | |
CN111324425A (en) | Data access method, device, equipment and storage medium | |
KR20220104241A (en) | Network working methods, devices, equipment and storage media | |
CN106385330A (en) | Network function virtualization composer realization method and device | |
US20080195682A1 (en) | Multiple computer system with enhanced memory clean up | |
CN114615268A (en) | Service network, monitoring node, container node and equipment based on Kubernetes cluster | |
CN116800616A (en) | Management method and related device of virtualized network equipment | |
CN110543315A (en) | distributed operating system of kbroker, storage medium and electronic equipment | |
CN114510321A (en) | Resource scheduling method, related device and medium | |
CN109672618A (en) | Redundant interface processing method, device, server and storage medium | |
CN116016028B (en) | Method, system, medium and equipment for creating multiple network interfaces for Pod based on IPvlan | |
US20080151902A1 (en) | Multiple network connections for multiple computers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190514 |
|
CF01 | Termination of patent right due to non-payment of annual fee |