CN105843693B - A kind of shared drive method towards high speed Maglev emulation - Google Patents

A kind of shared drive method towards high speed Maglev emulation Download PDF

Info

Publication number
CN105843693B
CN105843693B CN201610164566.7A CN201610164566A CN105843693B CN 105843693 B CN105843693 B CN 105843693B CN 201610164566 A CN201610164566 A CN 201610164566A CN 105843693 B CN105843693 B CN 105843693B
Authority
CN
China
Prior art keywords
shared drive
drive block
high speed
communication
write
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
CN201610164566.7A
Other languages
Chinese (zh)
Other versions
CN105843693A (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.)
Tongji University
Original Assignee
Tongji 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 Tongji University filed Critical Tongji University
Priority to CN201610164566.7A priority Critical patent/CN105843693B/en
Publication of CN105843693A publication Critical patent/CN105843693A/en
Application granted granted Critical
Publication of CN105843693B publication Critical patent/CN105843693B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/544Buffers; Shared memory; Pipes

Abstract

The present invention relates to a kind of shared drive methods towards high speed Maglev emulation, it include that an at least computer and magnetic float emulator towards high speed Maglev emulation, every computer is communicated by communication layers, and application layer can only be communicated with the communication layers of the machine, communication layers and application layer have communication node, method includes the following steps: the communication layers in (1) computer establish signal procedure process, signal procedure process establishes shared drive block and shared drive agency;(2) the shared drive agency described in is with quantity, network state and the address pointer information of window form storage shared drive block;(3) application layer in computer establishes program process, and program process provides title and the transmitting-receiving address of communication node to the shared drive agency, calls shared drive agency and communicate with corresponding shared drive block.Compared with prior art, the present invention has many advantages, such as that read or write speed is fast, effect is good.

Description

A kind of shared drive method towards high speed Maglev emulation
Technical field
The invention belongs to multiprocess communication fields, more particularly, to a kind of shared drive towards high speed Maglev emulation Method.
Background technique
In order to realize data transmission or the letter in high speed Maglev emulation inside simulation computer or emulation server Message communication, to complete system function and performance under the floating functional software progress environmental bug injection condition of the magnetic run to the machine Test and validation, need using the efficient communication technology that can switch between multi-process of one kind.
Summary of the invention
It is an object of the present invention to overcome the above-mentioned drawbacks of the prior art and provide a kind of raising information to transmit With the shared drive method towards high speed Maglev emulation of direct fault location efficiency, multiple shared drive blocks are carried out functional It divides, and establishes Initialization file and the shared drive agency of maintenance shared drive, using mutual exclusion mechanism and together Step mechanism calls the synchronization read-write operation of shared drive so that process provides a small amount of communication information, logical between completion multi-process Letter.
The purpose of the present invention can be achieved through the following technical solutions: a kind of towards the shared of high speed Maglev emulation Memory method, it is described to float emulator including an at least computer and magnetic towards high speed Maglev emulation, it is logical using P2P Agreement is believed as communication construction, and every computer is communicated by communication layers, and application layer can only be logical with the communication layers of the machine Letter, communication layers and application layer have a communication node, this method using " main-from " formula Technical Architecture, comprising the following steps:
(1) communication layers in computer establish signal procedure process, and signal procedure process is established shared drive block and shared Internal memory agents;
(2) the shared drive agency described in is referred to quantity, network state and the address of window form storage shared drive block Needle information;
(3) application layer in computer establishes program process, and program process is acted on behalf of to the shared drive Title and the transmitting-receiving address of communication node are provided, shared drive agency is called and is communicated with corresponding shared drive block.
In high speed Maglev simulation computer, communication layers and apply journey that shared drive is supplied to simultaneously in computer Sequence uniformly create and manage by communication layers, and other applications can only send request to obtain the reading to shared drive Write permission.
Establish shared drive block in the step (1) method particularly includes: the signal procedure process according to Communication node information in Initialization file creates File Mapping, creates being total to for twice of outgoing communication node quantity Memory block is enjoyed, the Initialization file is the program code write by user, and user passes through described in modification Initialization file is to modify shared drive block.
The read-only evidence of shared drive block writes data.
Using multiple threads in mutual exclusion lock control computer to the right to use of shared drive block in the shared drive block, Specifically: when a thread carries out read or write to some shared drive block, mutual exclusion lock is set to lock status, makes other tune Be set to blocked state with the thread of the shared drive block, until the read or write terminate and mutual exclusion lock be unlocked state, other The shared drive block can be used in thread.
Communication layers read the title of communication node in the step (1), distribute one " reading " for each communication node Shared drive block and " write-in " shared drive block, and each shared drive block using MapViewOfFile () or MapViewOfFileEx () function, will be in the address space of File Mapping to corresponding process.
The shared drive proxy call event sends " read/write " request of process to shared drive block, changes process State.
In each shared drive block, the read-write synchronization mechanism of shared drive is realized using event.When some " is write Entering " SetEvent () function when being that content is sky in unlocked state and memory, is then set to extension by the mutual exclusion lock of shared drive block The state of rising, waits the calling of thread and the signal of write operation.
When the mutual exclusion lock of some " reading " shared drive block is unlocked state and memory content is not sky, it is not necessarily to line SetEvent () function is set to signaling states automatically to carry out read operation by journey calling.Until thread reading finishes, releasing is sent out Signal condition is to realize read-write synchronization mechanism.
Shared drive acts on behalf of read-write operation of the Container using mutexes Mutex control multi-process to shared drive block. When process communicates a communication node, Mutex is set to lock status, makes other that the process of same node point be called to be set to resistance Plug-like state.Until the communication node use finishes, Mutex is set to unlocked state.
Shared drive acts on behalf of Container and uses the network state of event Event maintenance shared drive block.When previous step When Mutex is lock status, Container sends Event signal to specific shared drive block, shared drive block is set to " read/ Write " it state or returns to shared drive block and is not present or error signal is to process.
Data in each shared drive block are only uni-directionally read or are written.Shared drive is each communication Node distributes " reading " shared drive block and " write-in " shared drive block.When process uses shared drive, need " read/write " operation is carried out in the shared drive block of different communication node, it is ensured that the data flow in each memory block unidirectionally passes Defeated, the case where avoiding the occurrence of " read/write conflict ", improves the efficiency that process calls shared drive.
Compared with prior art, the invention has the following advantages that
(1) Initialization file is established, such user does not need modification program, and only modifying text information can To achieve the effect that additions and deletions change shared drive, effect is good, and the time that user needs is few;
(2) shared drive block can only be read, or write data, can not two functions have both.Reading and writing data is accelerated in this way Speed reads the data memory block for reading data, writes with what is write, prevents read/write conflict;
(3) shared drive agency is established, shared drive block needs store name when establishing, the address ip, whether remembers It records the various information such as log, but the pointer information of shared drive agency's stored memory block, whether can read and write A small amount of information such as state.So user only needs to provide a small amount of information and shared drive can be called to act on behalf of, allows and act on behalf of place to go The problem of reason read-write, user need to only be fed back.The speed of read-write is accelerated in this way.
Detailed description of the invention
Fig. 1 is flow chart of the invention.
Specific embodiment
The present invention is described in detail with specific embodiment below in conjunction with the accompanying drawings.
As shown in Figure 1, a kind of shared drive method towards high speed Maglev emulation, emulates towards high speed Maglev Emulator is floated including an at least computer and magnetic, uses P2P communication protocol as communication construction, every computer passes through logical Letter layer is communicated, and application layer can only be communicated with the communication layers of the machine, and communication layers and application layer have communication node, this method Using the Technical Architecture of " main-from " formula, comprising the following steps:
(1) communication layers in computer establish signal procedure process, and signal procedure process is established shared drive block and shared Internal memory agents, in high speed Maglev simulation computer, shared drive is supplied to communication layers and application in computer simultaneously Layer uniformly create and manage by communication layers, and other applications can only send request to obtain the reading to shared drive Write permission;Establish shared drive block method particularly includes: signal procedure process is according to the communication in Initialization file Nodal information creates File Mapping using CreateFileMapping (), creates the shared of twice of outgoing communication node quantity Memory block.User modifies shared drive block by modification Initialization file.Shared drive uses Windows system The Initialization file (.ini file) of system is configured and is managed.Communication layers read the title of communication node, are every A communication node distributes " reading " shared drive block and " write-in " shared drive block, and each shared drive block makes It, will be in the address space of File Mapping to corresponding process with MapViewOfFile () or MapViewOfFileEx () function.
(2) shared drive agency is with quantity, network state and the address pointer information of window form storage shared drive block;
(3) application layer in computer establishes program process, and program process provides logical to shared drive agency Title and the transmitting-receiving address for believing node, call shared drive agency and communicate with corresponding shared drive block.
Using multiple threads in mutual exclusion lock control computer to the right to use of shared drive block in shared drive block, specifically Are as follows: when a thread carries out read or write to some shared drive block, mutual exclusion lock is set to lock status, calling other should The thread of shared drive block is set to blocked state, until the read or write terminate and mutual exclusion lock be unlocked state, other threads The shared drive block can be used.
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, the read-write synchronization mechanism of shared drive is realized using event.When some " is write Entering " SetEvent () function when being that content is sky in unlocked state and memory, is then set to extension by the mutual exclusion lock of shared drive block The state of rising, waits the calling of thread and the signal of write operation.
When the mutual exclusion lock of some " reading " shared drive block is unlocked state and memory content is not sky, it is not necessarily to line SetEvent () function is set to signaling states automatically to carry out read operation by journey calling.Until thread reading finishes, releasing is sent out Signal condition is to realize read-write synchronization mechanism.
Shared drive acts on behalf of read-write operation of the Container using mutexes Mutex control multi-process to shared drive block. When process communicates a communication node, Mutex is set to lock status, makes other that the process of same node point be called to be set to resistance Plug-like state.Until the communication node use finishes, Mutex is set to unlocked state.
Shared drive acts on behalf of Container and uses the network state of event Event maintenance shared drive block.When previous step When Mutex is lock status, Container sends Event signal to specific shared drive block, shared drive block is set to " read/ Write " it state or returns to shared drive block and is not present or error signal is to process.
Data in each shared drive block are only uni-directionally read or are written.Shared drive is each communication Node distributes " reading " shared drive block and " write-in " shared drive block.When process uses shared drive, need " read/write " operation is carried out in the shared drive block of different communication node, it is ensured that the data flow in each memory block unidirectionally passes Defeated, the case where avoiding the occurrence of " read/write conflict ", improves the efficiency that process calls shared drive.

Claims (6)

1. a kind of shared drive method towards high speed Maglev emulation, described emulate towards high speed Maglev includes extremely A few computer and magnetic float emulator, and every computer is communicated by communication layers, and application layer can only be with the machine Communication layers communication, communication layers and application layer have communication node, which is characterized in that method includes the following steps:
(1) communication layers in computer establish signal procedure process, and multiple shared drive blocks are carried out function by signal procedure process Property divide, establish shared drive block and shared drive agency;
(2) the shared drive agency described in is with the quantity of window form storage shared drive block, network state and address pointer letter Breath;
(3) application layer in computer establishes program process, and program process is acted on behalf of to the shared drive and provided The title of communication node and transmitting-receiving address are called shared drive agency and are communicated with corresponding shared drive block.
2. a kind of shared drive method towards high speed Maglev emulation according to claim 1, which is characterized in that institute The step of stating establishes shared drive block in (1) method particularly includes: the signal procedure process is according in initialization files Communication node information creates File Mapping, creates twice of shared drive block of outgoing communication node quantity, and user passes through modification institute The initialization files stated are to modify shared drive block.
3. a kind of shared drive method towards high speed Maglev emulation according to claim 1, which is characterized in that institute The read-only evidence of shared drive block stated writes data.
4. a kind of shared drive method towards high speed Maglev emulation according to claim 1, which is characterized in that institute Using multiple threads in mutual exclusion lock control computer to the right to use of shared drive block in the shared drive block stated, specifically: when When one thread carries out read or write to some shared drive block, mutual exclusion lock is set to lock status, other is made to call this shared The thread of memory block is set to blocked state, and until the read or write terminates and mutual exclusion lock is unlocked state, other threads can make With the shared drive block.
5. a kind of shared drive method towards high speed Maglev emulation according to claim 1, which is characterized in that institute Communication layers read the title of communication node in the step of stating (1), distribute " reading " shared drive block for each communication node With " write-in " shared drive block, and each shared drive block using MapViewOfFile () or MapViewOfFileEx () function, by the File Mapping of communication data into corresponding reading/write-in process address space.
6. a kind of shared drive method towards high speed Maglev emulation according to claim 1, which is characterized in that institute The shared drive proxy call event stated sends " read/write " request of process to shared drive block, changes state of a process.
CN201610164566.7A 2016-03-22 2016-03-22 A kind of shared drive method towards high speed Maglev emulation Expired - Fee Related CN105843693B (en)

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 CN105843693A (en) 2016-08-10
CN105843693B true 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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776060A (en) * 2016-11-25 2017-05-31 江西洪都航空工业集团有限责任公司 A kind of shared drive algorithm

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108062252B (en) * 2016-11-08 2022-02-01 斑马智行网络(香港)有限公司 Information interaction method, object management method, device and system
CN108107750B (en) * 2017-11-29 2023-10-20 国网宁夏电力有限公司电力科学研究院 Real-time IO data processing method and system for power system simulation
CN112991511B (en) * 2020-10-13 2023-03-24 中国汽车技术研究中心有限公司 Point cloud data display method
CN114524007B (en) * 2022-02-07 2023-03-21 北京交通大学 Magnetic levitation running control digital twin system
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

Citations (4)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
BDSim:面向大数据应用的组件化高可配并行模拟框架;李文明,叶笑春等;《计算机学报》;20151031;第38卷(第10期);第2-5页

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776060A (en) * 2016-11-25 2017-05-31 江西洪都航空工业集团有限责任公司 A kind of shared drive algorithm

Also Published As

Publication number Publication date
CN105843693A (en) 2016-08-10

Similar Documents

Publication Publication Date Title
CN105843693B (en) A kind of shared drive method towards high speed Maglev emulation
US20200241613A1 (en) Persistent reservations for virtual disk using multiple targets
CN103530118B (en) Method and device for loading user-defined DLL into target progress
US7904886B2 (en) Method for executing an application in a virtual container forming a virtualized environment session
US8433948B2 (en) Method and apparatus for realizing application high availability
CN109542611A (en) Database, that is, service system, database dispatching method, equipment and storage medium
US20110289514A1 (en) Sharing and synchronization of objects
CN101645020A (en) Virtual operating system creation method
CN103593225A (en) Method for multiplexing Binder IPC mechanism by multiple Android systems in mobile virtualization scene
CN107463369A (en) The access device control method and device of a kind of virtual desktop
CN108304269A (en) A kind of sending, receiving method of data, device and communications framework
CN110413595A (en) A kind of data migration method and relevant apparatus applied to distributed data base
CN105204863B (en) Unlawful data auditing system
CN111049686A (en) Safety protection virtual laboratory of power monitoring system and construction method thereof
CN107707986A (en) A kind of method and device that barrage message is simulated in the exploitation of live software
CN111324425B (en) Data access method, device, equipment and storage medium
CN108536833A (en) A kind of distributed, database and its construction method towards big data
US9501591B2 (en) Dynamically modifiable component model
CN105488047B (en) Metadata reading/writing method and device
CN112905332A (en) Method for realizing English PDF online rapid translation based on LVS load balancing Django architecture
CN113259475B (en) Distributed session processing system and method based on micro-service architecture
US20150154038A1 (en) Scriptable hierarchical emulation engine
CN109376135B (en) Cluster file system management method and system
CN102662774B (en) Inter-process structured document communication method
CN112083914A (en) Method and system for realizing soft bus of object model embedded operating system

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190514