CN110515751A - A kind of method and system of load operating VxWorks real-time guard process - Google Patents

A kind of method and system of load operating VxWorks real-time guard process Download PDF

Info

Publication number
CN110515751A
CN110515751A CN201810495580.4A CN201810495580A CN110515751A CN 110515751 A CN110515751 A CN 110515751A CN 201810495580 A CN201810495580 A CN 201810495580A CN 110515751 A CN110515751 A CN 110515751A
Authority
CN
China
Prior art keywords
executable code
file
memory
data storage
vxworks
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
Application number
CN201810495580.4A
Other languages
Chinese (zh)
Other versions
CN110515751B (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.)
CRRC Zhuzhou Institute Co Ltd
Original Assignee
CRRC Zhuzhou Institute 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 CRRC Zhuzhou Institute Co Ltd filed Critical CRRC Zhuzhou Institute Co Ltd
Priority to CN201810495580.4A priority Critical patent/CN110515751B/en
Publication of CN110515751A publication Critical patent/CN110515751A/en
Application granted granted Critical
Publication of CN110515751B publication Critical patent/CN110515751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/004Error avoidance
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of method and system of load operating VxWorks real-time guard process.Method includes: to construct a temporary file system based on memory;The executable code file of compiled VxWorks real-time guard process is write in the temporary file system;Call the relevant interface for starting the executable code file, executable code file described in start-up loading.Method according to the invention it is possible to which being detached from file system realizes that the start-up loading of VxWorks real-time guard process improves the operation stability of VxWorks real-time guard process to reduce the operation hardware requirement of VxWorks real-time guard process.

Description

A kind of method and system of load operating VxWorks real-time guard process
Technical field
Electronic technology field of the present invention, and in particular to a kind of method of load operating VxWorks real-time guard process and be System.
Background technique
VxWorks operating system is a kind of very widely used operating system in the prior art, traditional application journey Sequence is the .out program that DKM (Downloadable Kernel Module) is generated, task where .out program directly with System kernel is shared with a piece of memory headroom, can directly other if occurring the BUG such as RAM leakage etc in .out It is engaged in or causes system crash.
Since vxWorks 6.4, vxWorks operating system introduces real-time guard process (VxWorks realtime Process project, RTP) mode programming.Each RTP process is completely independent in RTP real-time process, and program is in RTP process Any mistake that portion occurs all is limited in inside RTP process, discharges all resources automatically when deleting RTP real-time process.RTP with Unlike other multi-process OS, the RTP real-time process of VxWorks has complete static certainty, provides protection against Highest real-time response certainty and rapidity are provided simultaneously, and complete storage error detection and storage report can be provided Function.Dynamic link library and sharing data area function also provide simultaneously.RTP real-time guard process and the original higher property of VWorks Energy real-time task constitutes the super equipment platform that protectiveness and real-time have both together.
The advantages of RTP real-time guard mode is that application program is mutually indepedent, is independent of each other, and increases the stabilization of kernel Property, the disadvantage is that the memory copying of " kernel state " and " User space ", execution efficiency decrease, keyed CPU speed is getting faster, The sacrifice of this point efficiency is more and more insignificant.But compared to traditional DKM (downloadble kernel Module project), RTP is suitble to multiple team's independent works, then summarizes debugging.
But that the generation of the RTP real-time process of vxWorks operating system is executable file .vxe, is similar to Exe executable file under Windows environment, file load depend on file system.However, embedded system under normal conditions Resource is limited, and not all embedded system has the storage chip of large capacity to establish file system, and is based on There is being easily damaged, the file being stored in file system is easy to lose the file system of vxWorks operating system building itself The problems such as losing or damaging.
Summary of the invention
The present invention provides a kind of methods of load operating VxWorks real-time guard process, which comprises
A temporary file system is constructed based on memory;
The executable code file of compiled VxWorks real-time guard process is write in the temporary file system;
Call the relevant interface for starting the executable code file, executable code file described in start-up loading.
In one embodiment, the executable code file of compiled VxWorks real-time guard process is write into described face When file system in, comprising:
The executable code file is stored in data storage;
The executable code file in the data storage is read to the memory;
The executable code file in the memory is write in the temporary file system.
In one embodiment, the executable code file in the data storage is read to memory, wherein with two The form of system reads the executable code file in the data storage to memory.
In one embodiment, the executable code file in the data storage is read to memory, wherein access Absolute address in the data storage reads the executable code file to memory.
In one embodiment, it accesses the absolute address in the data storage and reads the executable code file in Deposit, wherein obtain the executable code file in the offset and size relative to the data storage base address.
In one embodiment:
The executable code file in the data storage is read to memory, wherein generate in the memory One image file as the executable code file content;
The temporary file system is written into the image file in the memory, it is raw in the temporary file system At corresponding executable code program;
Call the relevant interface for starting the executable code program, executable code program described in start-up loading.
In one embodiment, the method also includes:
The executable code program is deleted after executable code program described in start-up loading.
The invention also provides a kind of storage medium, it is stored on the storage medium and method as described herein can be achieved Program code.
The invention also provides a kind of system of load operating VxWorks real-time guard process, the system comprises:
Memory;
Data storage;
Procedure load module is configured under vxworks operating system environment based on the memory and the data Memory realizes the method for the invention.
In one embodiment, the data storage is flash storage.
Method according to the invention it is possible to it is detached from the start-up loading that file system realizes VxWorks real-time guard process, from And the operation hardware requirement of VxWorks real-time guard process is reduced, improve the stable of VxWorks real-time guard process Property.
Other feature or advantage of the invention will illustrate in the following description.Also, Partial Feature of the invention or Advantage will be become apparent by specification, or be appreciated that by implementing the present invention.The purpose of the present invention and part Advantage can be realized or be obtained by step specifically noted in the specification, claims and drawings.
Detailed description of the invention
Attached drawing is used to provide further understanding of the present invention, and constitutes part of specification, with reality of the invention It applies example and is used together to explain the present invention, be not construed as limiting the invention.In the accompanying drawings:
Fig. 1 and Fig. 3 is the method flow diagram of different embodiments according to the present invention;
Fig. 2 is method partial process view according to an embodiment of the invention.
Specific embodiment
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and examples, implementation personnel of the invention whereby Can fully understand that how the invention applies technical means to solve technical problems, and reach technical effect realization process and according to The present invention is embodied according to above-mentioned realization process.As long as each embodiment it should be noted that do not constitute conflict, in the present invention And each feature in each embodiment can be combined with each other, be formed by technical solution protection scope of the present invention it It is interior.
VxWorks operating system is a kind of very widely used operating system in the prior art, traditional application journey Sequence is the .out program that DKM (Downloadable Kernel Module) is generated, task where .out program directly with System kernel is shared with a piece of memory headroom, can directly other if occurring the BUG such as RAM leakage etc in .out It is engaged in or causes system crash.
Since vxWorks 6.4, vxWorks operating system introduces real-time guard process (VxWorks real time Process project, RTP) mode programming.Each RTP process is completely independent in RTP real-time process, and program is in RTP process Any mistake that portion occurs all is limited in inside RTP process, discharges all resources automatically when deleting RTP real-time process.RTP with Unlike other multi-process OS, the RTP real-time process of VxWorks has complete static certainty, provides protection, protective function While highest real-time response certainty and rapidity are provided, and complete storage error detection and storage report can be provided Accuse function.Dynamic link library and sharing data area function also provide simultaneously.RTP real-time guard process is original higher with VWorks Performance real-time task constitutes the super equipment platform that protectiveness and real-time have both together.
The advantages of RTP real-time guard mode is that application program is mutually indepedent, is independent of each other, and increases the stabilization of kernel Property, the disadvantage is that the memory copying of " kernel state " and " User space ", execution efficiency decrease, keyed CPU speed is getting faster, The sacrifice of this point efficiency is more and more insignificant.But compared to traditional DKM (downloadble kernel Module project), RTP is suitble to multiple team's independent works, then summarizes debugging.
But that the generation of the RTP real-time process of vxWorks operating system is executable file .vxe, is similar to Exe executable file under Windows environment, file load depend on file system.However, embedded system under normal conditions Resource is limited, and not all embedded system has the storage chip of large capacity to establish file system, and is based on There is being easily damaged, the file being stored in file system is easy to lose the file system of vxWorks operating system building itself The problems such as losing or damaging.
In view of the above-mentioned problems, the invention proposes a kind of methods of load operating VxWorks real-time guard process.Specifically , the protection of the task of RTP is to go to realize based on MMU, the process scheme solve kernel protection and real-time and certainty it Between contradiction.User can according to need dynamic creation/deletion RTP real-time guard process or only operate in a part of program In RTP real-time guard process.Each RTP real-time process is completely independent, and the RTP real-time process under VxWorks has complete quiet Step response can be provided protection against in the case where ensureing real-time response certainty and rapidity.
The executable code that RTP engineering generates is .vxe, and similar exe file, entrance is main function.The RTP work of default Journey main function terminates, and just the main all tasks created are also all terminated.It can be using the interface of default for RTP process Function is called, if system starting operation vxWorks, it is necessary to which .vxe program, which is put under a file system, just can be carried out It calls, such as/TFFS.
Based on above-mentioned analysis, in the method for the invention, memory construction file system is not utilized, but structure based on memory Temporary file system (Ramdisk) is made, using the startup environment of the virtual .vxe file of temporary file system, to realize .vxe text The start-up loading of part.
Next the implementation process based on flow chart the present invention is described in detail embodiment.It is walked shown in the flow chart of attached drawing Suddenly it can be executed in the computer system comprising such as a group of computer-executable instructions.Although showing in flow charts each The logical order of step, but in some cases, it can be with the steps shown or described are performed in an order that is different from the one herein.
As shown in Figure 1, in one embodiment, constructing a temporary file system (S110) based on memory;It is needing to start When loading VxWorks real-time guard process, the executable code file of compiled VxWorks real-time guard process is write and is faced When file system in (S120);Call the relevant interface of the executable code file of starting VxWorks real-time guard process, starting Load the executable code file in temporary file system.
In above method step, due to not needing to establish file system, memory space is greatly saved, so that VxWorks real-time guard process can be using in the embedded product being limited with memory space.Also, due to not using file system System, caused file is lost or file corruption etc. when can be to avoid file system corruption, improves the entirety of embedded system Reliability.
Method according to the invention it is possible to it is detached from the start-up loading that file system realizes VxWorks real-time guard process, from And the operation hardware requirement of VxWorks real-time guard process is reduced, improve the stable of VxWorks real-time guard process Property.
Further, in one embodiment, the executable code file of VxWorks real-time guard process is stored in specifically In data storage.Specifically, as shown in Fig. 2, in one embodiment, method the following steps are included:
The executable code file of VxWorks real-time guard process is stored in data storage (S221);
The executable code file in data storage is read to memory (S222);
Executable code file in memory is write into temporary file system (S223).
Further, in one embodiment, data storage is flash storage.
Further, in one embodiment, in step S222, in the form of binary read data storage in can Code file is executed to memory.
Specifically, in one embodiment, vxWorks operating system constructs a temporary file system Ramdisk first;It will Compiled RTP real-time process .vxe file is stored in Flash, is then read the content of .vxe in the form of binary interior In depositing, then by file read-write interface, the file in memory is write in temporary file system, then starting .vxe is being called to connect Mouth starting .vxe program.
Further, in one embodiment, it in step S222, accesses described in the absolute address reading in data storage Executable code file is to memory.Further, in one embodiment, depositing relative to data for executable code file is obtained The offset and size of reservoir base address.
Specifically, in one embodiment, in step S222, generating one and executable code file content in memory The same image file;In step S223, temporary file system is written into the image file in memory, in temporary file system It is middle to generate corresponding executable code program;Finally, calling the relevant interface of starting executable code program, start-up loading can be held Line code program.
The method of the present invention passes through the .vxe file that will be stored in Flash chip, first reads memory, then in Ramdisk Interim .vxe file is constructed, the load operating of .vxe file is finally realized.Method And Principle is succinct, does not need to increase new connect Mouth function, complexity is low, and maintenance difficulties are low, good reliability.
Further, in one embodiment, method further include:
Executable code program is deleted after start-up loading executable code program.
Specifically, in one embodiment, the corresponding workflow of method is as shown in Figure 3.
S310 judges whether execution parameter is legal, if not conforming to rule terminates program.
S320 reads the .vxe file of flash storage weight to memory, since .vxe file is to be stored directly in Flash On storage chip, without using file system without directly opening file, pass through the .vxe being pointing directly in Flash memory chip The initial address of file, and it is obtained in the offset address and size of flash storage weight facing memory base address.
.vxe file map in memory is re-written in temporary file system Ramdisk, in Ramdisk by S330 Generate the identical .vxe file of a content.
S340, calls the function interface of starting .vxe, and the .vxe program in start-up loading Ramdisk realizes .vxe file Load operating.
S350 deletes the interim .vxe program in Ramdisk.
Method of the invention is not needed using file system, is directly read again from flash storage and is taken .vxe file to memory, And pour into memory file in Ramdisk again, the same image .vxe file of a content is generated, start-up loading is passed through .vxe file in Ramdisk realizes the load operating of .vxe file indirectly.For this method using simplicity, principle is flexibly understandable, Easily realize very much the load operating .vxe program from Flash.
Based on method of the invention, the invention also provides a kind of storage medium, it is stored on the storage medium achievable The program code of method as described herein.
Further, based on method of the invention, the invention also provides a kind of load operating VxWorks real-time guard into The system of journey.Specifically, in one embodiment, system includes:
Memory;
Data storage;
Procedure load module is configured under vxworks operating system environment based on memory and data storage is real Now method as described in the present invention.
While it is disclosed that embodiment content as above but described only to facilitate understanding the present invention and adopting Embodiment is not intended to limit the invention.Method of the present invention can also have other various embodiments.Without departing substantially from In the case where essence of the present invention, those skilled in the art make various corresponding changes or change in accordance with the present invention Shape, but these corresponding changes or deformation all should belong to scope of protection of the claims of the invention.

Claims (10)

1. a kind of method of load operating VxWorks real-time guard process, which is characterized in that the described method includes:
A temporary file system is constructed based on memory;
The executable code file of compiled VxWorks real-time guard process is write in the temporary file system;
Call the relevant interface for starting the executable code file, executable code file described in start-up loading.
2. the method according to claim 1, wherein holding compiled VxWorks real-time guard process Line code file is write in the temporary file system, comprising:
The executable code file is stored in data storage;
The executable code file in the data storage is read to the memory;
The executable code file in the memory is write in the temporary file system.
3. according to the method described in claim 2, it is characterized in that, reading the executable code in the data storage File is to memory, wherein the executable code file in the data storage is read in the form of binary to memory.
4. according to the method described in claim 3, it is characterized in that, reading the executable code in the data storage File is to memory, wherein accesses the absolute address in the data storage and reads the executable code file to memory.
5. according to the method described in claim 4, it is characterized in that, the absolute address accessed in the data storage reads institute Executable code file is stated to memory, wherein obtain the executable code file relative to the data storage base The offset and size of address.
6. the method according to any one of claim 2~5, it is characterised in that:
The executable code file in the data storage is read to memory, wherein generate one in the memory Image file as the executable code file content;
The temporary file system is written into the image file in the memory, the generation pair in the temporary file system The executable code program answered;
Call the relevant interface for starting the executable code program, executable code program described in start-up loading.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
The executable code program is deleted after executable code program described in start-up loading.
8. a kind of storage medium, which is characterized in that being stored on the storage medium can be achieved such as any one of claim 1-7 The program code of the method.
9. a kind of system of load operating VxWorks real-time guard process, which is characterized in that the system comprises:
Memory;
Data storage;
Procedure load module is configured under vxworks operating system environment store based on the memory and the data Device realizes such as method of any of claims 1-7.
10. system according to claim 9, which is characterized in that the data storage is flash storage.
CN201810495580.4A 2018-05-22 2018-05-22 Method and system for loading and running VxWorks real-time protection process Active CN110515751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810495580.4A CN110515751B (en) 2018-05-22 2018-05-22 Method and system for loading and running VxWorks real-time protection process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810495580.4A CN110515751B (en) 2018-05-22 2018-05-22 Method and system for loading and running VxWorks real-time protection process

Publications (2)

Publication Number Publication Date
CN110515751A true CN110515751A (en) 2019-11-29
CN110515751B CN110515751B (en) 2023-05-12

Family

ID=68621839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810495580.4A Active CN110515751B (en) 2018-05-22 2018-05-22 Method and system for loading and running VxWorks real-time protection process

Country Status (1)

Country Link
CN (1) CN110515751B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114964A (en) * 2020-08-17 2020-12-22 上海睿赛德电子科技有限公司 Application security kernel access method suitable for embedded system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135908A (en) * 2010-01-25 2011-07-27 研祥智能科技股份有限公司 Method, device and computer system for switching operating system
CN103309710A (en) * 2013-06-09 2013-09-18 南车株洲电力机车研究所有限公司 Method and system for loading OUT file through VXWORKS operating system
CN103677820A (en) * 2013-12-05 2014-03-26 上海斐讯数据通信技术有限公司 Embedded development software output method and system
CN104572224A (en) * 2015-02-04 2015-04-29 南车株洲电力机车研究所有限公司 Method, device and system for loading out file
US20170052779A1 (en) * 2014-02-27 2017-02-23 Zte Corporation Method and Device for Running Version File
CN107273370A (en) * 2016-04-06 2017-10-20 中兴通讯股份有限公司 Switching system method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135908A (en) * 2010-01-25 2011-07-27 研祥智能科技股份有限公司 Method, device and computer system for switching operating system
CN103309710A (en) * 2013-06-09 2013-09-18 南车株洲电力机车研究所有限公司 Method and system for loading OUT file through VXWORKS operating system
CN103677820A (en) * 2013-12-05 2014-03-26 上海斐讯数据通信技术有限公司 Embedded development software output method and system
US20170052779A1 (en) * 2014-02-27 2017-02-23 Zte Corporation Method and Device for Running Version File
CN104572224A (en) * 2015-02-04 2015-04-29 南车株洲电力机车研究所有限公司 Method, device and system for loading out file
CN107273370A (en) * 2016-04-06 2017-10-20 中兴通讯股份有限公司 Switching system method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨颖: "基于光纤通道的文件级数据共享系统的设计与实现", 《中国优秀硕士学位论文全文库》 *
轻蓝雨: "VxWorks开发板驱动程序学习之文件系统(一)", 《HTTPS://BLOG.CSDN.NET/OUYANGXIAYUN/ARTICLE/DETAILS/52915038》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112114964A (en) * 2020-08-17 2020-12-22 上海睿赛德电子科技有限公司 Application security kernel access method suitable for embedded system

Also Published As

Publication number Publication date
CN110515751B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
US9336018B2 (en) Mechanism for class data sharing using extension and application class-loaders
US9483396B2 (en) Control apparatus, storage device, and storage control method
US20150294113A1 (en) Method and system for performing a memory safety check of a program written in an unmanaged programming language
CN104598823A (en) Kernel level rootkit detection method and system in Andriod system
JP2013520744A (en) Method and apparatus for generating minimum boot image
CN106126423A (en) The method of testing of game application, Apparatus and system
KR20220125198A (en) Data additional writing method, apparatus, electronic device, storage medium and computer programs
CN105740413A (en) File movement method by FUSE on Linux platform
CN112559026A (en) API interface-based native capability expansion method, device and storage medium
CN114138549A (en) Data backup and recovery method based on kubernets system
CN111008022B (en) Relationship diagram generation method, device, computer equipment and storage medium
CN115407943A (en) Memory dump file generation method, device and equipment and readable storage medium
WO2022247300A1 (en) Sandbox initialization method, graphical interface and related apparatus
US20170004316A1 (en) Alternate clipboard for secure applications
CN110515751A (en) A kind of method and system of load operating VxWorks real-time guard process
JP2019204527A (en) Processing method and processing device of data position of storage equipment, computer equipment, and computer-readable storage medium
WO2017076244A1 (en) Method, device and related system for dynamically repairing application
US20230142948A1 (en) Techniques for managing context information for a storage device
KR102066580B1 (en) Program for injecting watermark into captured data and screen leak realisation service providing method
US9235349B2 (en) Data duplication system, data duplication method, and program thereof
CN115774701A (en) Data sharing method and device, electronic equipment and storage medium
CN115113798B (en) Data migration method, system and equipment applied to distributed storage
CN107305582B (en) Metadata processing method and device
CN113961485A (en) Memory optimization method, device, terminal and storage medium
US20210256134A1 (en) Apparatus for lan booting environment-based file security and centralization, method therefor, and computer-readable recording medium on which program for performing same method is recorded

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant