CN101174224A - Memory management method based on VxWorks operating system - Google Patents

Memory management method based on VxWorks operating system Download PDF

Info

Publication number
CN101174224A
CN101174224A CNA2007101965098A CN200710196509A CN101174224A CN 101174224 A CN101174224 A CN 101174224A CN A2007101965098 A CNA2007101965098 A CN A2007101965098A CN 200710196509 A CN200710196509 A CN 200710196509A CN 101174224 A CN101174224 A CN 101174224A
Authority
CN
China
Prior art keywords
task
management method
write
particular memory
attribute
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
CNA2007101965098A
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.)
ZTE Corp
Original Assignee
ZTE 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 ZTE Corp filed Critical ZTE Corp
Priority to CNA2007101965098A priority Critical patent/CN101174224A/en
Publication of CN101174224A publication Critical patent/CN101174224A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to a memory management method based on a VxWorks operating system, which comprises the following steps: a specific memory is allocated and the writing authorization table of the corresponding assignment of the specific memory is set; according to the writing authorization table, the writable or unwritable attribute of the specific memory is set when a specific assignment operates. According to the writing authorization table, the corresponding writable or unwritable attribute of the specific memory is set to the different operating assignments with the method, and the assignment without authorization is limited to unlawfully rewrite the specific memory, thus ensuring the security and the stabilization of the system. Further, the invention provides an interface function which can enable the system to close one or a plurality of writing authorization of the specific memory at any moment and also enable the system to be flexible and controllable when the system operates.

Description

A kind of EMS memory management process based on vxworks operating system
Technical field
The present invention relates to the VxWorks program development, be specifically related to a kind of EMS memory management process based on vxworks operating system.
Background technology
Vxworks operating system is a kind of embedded real-time operating system that U.S. WindRiver company designed and developed in nineteen eighty-three, is the key components of embedded-development environment.VxWorks employing user program, kernel are in the shared drive operating strategy of same memory headroom, and operating system is to not protection of memory headroom, and in fact each process or task share a memory headroom.A task is before execution, and system is necessary for it and distributes enough contiguous memory spaces, all is written into the continuous space of primary memory then.The software developer must guarantee not invade the memory headroom of other programs and kernel when development sequence, in order to avoid destroy the operate as normal of system or cause other program exceptions operations.
In the communications field, because what most of products adopted is the real-time system VxWorks, simultaneously in order to improve the general management mode of sharing the formula internal memory that adopts of interprocess communication efficient, but this has also introduced problem of unstable simultaneously, the characteristics of sharing the formula internal memory are exactly no matter to be which task or process can unrestricted access memory, without any interception, the probability that causes internal memory illegally to be rewritten increases greatly, thereby hides some dangers for for the stable of product for illegal operation.
Summary of the invention
The technical issues that need to address of the present invention are how a kind of EMS memory management process based on vxworks operating system is provided, and can only allow one or several task that there is write permission important memory field, thereby avoid internal memory illegally to be rewritten.
Above-mentioned technical matters of the present invention solves like this, and a kind of EMS memory management process based on vxworks operating system is provided, and may further comprise the steps:
1.1) distribute particular memory and the write permission table of the corresponding task of this particular memory is set;
1.2) writing maybe of described particular memory can not be write attribute when according to described write permission table the specific tasks operation being set.
Wherein, described particular memory is important or the internal memory that needs protection.
According to management method provided by the invention, it is a chained list node that described write permission table includes, but are not limited to, comprising one or more task number taskID.
struct?node
{
int taskID;
struct?node*next;
};
According to management method provided by the invention, when moving in system, described task number taskID can increase at any time by interface function.
According to management method provided by the invention, described interface function is included in searches new task taskID in the described chained list, finds then and directly returns, otherwise this new task taskID is added to the afterbody of chained list.
According to management method provided by the invention, when moving in system, described task number taskID can reduce at any time by interface function under a plurality of situations.
According to management method provided by the invention, described interface function is included in to search in the described chained list waits to delete task number taskID, finds then this to be waited to delete task number taskID and delete from chained list, otherwise directly returns.
According to management method provided by the invention, the number of described task number taskID is less than or equal to the corresponding sum of this vxworks operating system operation task constantly.
According to management method provided by the invention, step 1.2) specifically comprises: in the task handoff procedure, the task number taskID that wants task switching that writes down in the Hook Function searches described write permission table and basis is found the attribute write that the result is provided with described particular memory according to switching, otherwise described particular memory is set can not write attribute.
According to management method provided by the invention, when this management method also comprises task run, during at described particular memory write activity,, then normally carry out write operation according to the attribute write of this particular memory correspondence.
According to management method provided by the invention, when this management method also comprises task run, during at described particular memory write activity, according to this particular memory correspondence can not write attribute, then hang up this task.
According to management method provided by the invention, described particular memory comprises digital code memID, and described particular memory also can be expressed as the memID internal memory.
A kind of EMS memory management process provided by the invention based on vxworks operating system, the correspondence that different operation tasks is provided with particular memory according to the write permission table can be write maybe and can not write attribute, restriction does not have the task of authority illegally to rewrite particular memory, thereby has guaranteed the safety and stability of system's operation; Further returning the user provides interface function can enable or close the write permission of one or more tasks to particular memory at any time, also makes system move flexible and controllable more.
Description of drawings
Further the present invention is described in detail below in conjunction with the drawings and specific embodiments.
Fig. 1 is the memory management schematic flow sheet that the present invention is based on vxworks operating system.
Embodiment
At first, the principle of the invention is described:
(1) the memory field attribute allows you to describe the particular procedure request of sending from your region of memory of program.System's use attribute determine whether allowing some memory access type, whether use the access of specific width, and whether cushion the target internal memory.Can define some attribute of internal memory individually, system when using internal memory just according to previously defined property operations; When not having defined attribute, when access memory, just use default property.
(2) embedded system generally can provide some Hook Function interfaces to monitor some critical events of embedded system internal operation to the user, what we utilized for this patent is that task is switched the Hook Function interface, we switch the operation that Hook Function Rigen searches internal memory write permission table according to the task number execution that will cut in task, can judge according to the result who searches whether task can write internal memory.This patent requires us to provide an interface function for the user, the user can utilize this function to enable the write permission of certain task at particular memory easily, if the user worries particular memory and can unexpectedly be rewritten by certain task, then can close the write permission of task by the calling interface function in advance to particular memory.In case when certain not being authorized to of task attempted to rewrite internal memory like this, task will be suspended, situation that internal memory is illegally rewritten just can not appear yet.
Second step specified the inventive method, as shown in Figure 1, comprised following committed step:
1. in the system starting process, when particular memory region of definition (this region of memory can be a page that size is 4K), distributed the identification code memID of a numeric type to it, and the page attribute at its place is set to unwriteable (can not write);
2. the task number with system's operation task of setting up an acquiescence at the internal memory of memID sign is the write permission chained list of node, is about to authority and rewrites the task number taskID of the task of above-mentioned internal memory and insert in the chained list one by one as node.The number of tasks of the no more than system of the node number of chained list operation.The data structure of node is as follows:
struct?node
{
int taskID;
struct?node*next;
};
3. for providing interface function, the user enables the write permission of a task to the memID internal memory.Concrete operations are: search the write permission chained list, if find the task number of task correspondence in table, just directly return; If do not find, just task number is added to the afterbody of chained list;
4. for providing interface function, the user closes the write permission of a task to the memID internal memory.Concrete operations are: search the write permission chained list, if find the task number of task correspondence in table, just the chained list node at task number place is deleted from chained list; If do not find, just directly return;
5. system's operation phase,, call above-mentioned interface function, upgrade the write permission chained list at any time according to running situation;
6. system is normally in service, switch in the Hook Function record in the task of calling and will cut the taskID of task, and when switching at every turn we always the overriding of former record, the task of last operation just forever that records like this;
7. search the write permission chained list according to the task number of record, if in table, inquire the taskID of record in the step 6, show that task has write permission to the memID internal memory, just the access attribute with this page is changed to writeable (can write), otherwise the page or leaf access attribute of just putting this internal memory is unwriteable (can not write)
8. after the task finishing switching, carry out the operation function of incision task, when carrying out the programmed instruction of rewriting the memID internal memory, if the page attribute of memID internal memory is writeable, then can normally carry out write operation, if the page attribute of memID internal memory is unwriteable, then task can be hung up, thereby prevent that the memID internal memory from being rewritten by accident, influence the stability of system.

Claims (10)

1. the EMS memory management process based on vxworks operating system is characterized in that, may further comprise the steps:
1.1) distribute particular memory and the write permission table of the corresponding task of this particular memory is set;
1.2) writing maybe of described particular memory can not be write attribute when according to described write permission table the specific tasks operation being set.
2. according to the described management method of claim 1, it is characterized in that described write permission table is a chained list, comprises one or more task numbers.
3. according to the described management method of claim 2, it is characterized in that described task number can increase by interface function.
4. according to the described management method of claim 3, it is characterized in that described interface function is included in and searches new task number in the described chained list, find then and directly return, otherwise this new task number is added to the afterbody of chained list.
5. according to the described management method of claim 2, it is characterized in that, can reduce by interface function when described task number is a plurality of.
6. according to the described management method of claim 5, it is characterized in that described interface function is included in searches task number to be deleted in the described chained list, find and then this is waited to delete task number and from chained list, delete, otherwise directly return.
7. according to the described management method of claim 2, it is characterized in that the number of described task number is less than or equal to the corresponding sum of this vxworks operating system operation task constantly.
8. according to the described management method of claim 2, it is characterized in that, step 1.2) specifically comprises: in the task handoff procedure, the task number of wanting task switching that writes down in the Hook Function is searched described write permission table and basis is found the attribute write that the result is provided with described particular memory according to switching, otherwise described particular memory is set can not write attribute.
9. described according to Claim 8 management method, it is characterized in that, when this management method also comprises task run, during at described particular memory write activity, the attribute write according to this particular memory correspondence is normally carried out write operation, or hangs up this task according to the attribute of can not writing of this particular memory correspondence.
10. according to the described management method of claim 1, it is characterized in that described particular memory comprises digital code.
CNA2007101965098A 2007-11-28 2007-11-28 Memory management method based on VxWorks operating system Pending CN101174224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007101965098A CN101174224A (en) 2007-11-28 2007-11-28 Memory management method based on VxWorks operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007101965098A CN101174224A (en) 2007-11-28 2007-11-28 Memory management method based on VxWorks operating system

Publications (1)

Publication Number Publication Date
CN101174224A true CN101174224A (en) 2008-05-07

Family

ID=39422748

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007101965098A Pending CN101174224A (en) 2007-11-28 2007-11-28 Memory management method based on VxWorks operating system

Country Status (1)

Country Link
CN (1) CN101174224A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081710A (en) * 2010-12-14 2011-06-01 中国石油集团川庆钻探工程有限公司 Authority setting method and authority control method
CN102156675A (en) * 2010-02-12 2011-08-17 中兴通讯股份有限公司 Method and device for allocating memory
CN103440176A (en) * 2013-09-13 2013-12-11 北京经纬恒润科技有限公司 Protection method and device for memory in real-time operation system
CN106165367A (en) * 2014-12-31 2016-11-23 华为技术有限公司 A kind of access control method, storage device and control system storing device
CN107516052A (en) * 2017-08-14 2017-12-26 致象尔微电子科技(上海)有限公司 A kind of internal storage access partition method
CN107643943A (en) * 2016-07-20 2018-01-30 大唐移动通信设备有限公司 The management method and device of a kind of task stack
CN111261200A (en) * 2020-01-23 2020-06-09 奇安信科技集团股份有限公司 Burning equipment control method and device based on kernel and electronic equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156675A (en) * 2010-02-12 2011-08-17 中兴通讯股份有限公司 Method and device for allocating memory
CN102156675B (en) * 2010-02-12 2014-03-19 中兴通讯股份有限公司 Method and device for allocating memory
CN102081710A (en) * 2010-12-14 2011-06-01 中国石油集团川庆钻探工程有限公司 Authority setting method and authority control method
CN102081710B (en) * 2010-12-14 2013-06-12 中国石油集团川庆钻探工程有限公司 Authority setting method and authority control method
CN103440176A (en) * 2013-09-13 2013-12-11 北京经纬恒润科技有限公司 Protection method and device for memory in real-time operation system
CN103440176B (en) * 2013-09-13 2016-08-31 北京经纬恒润科技有限公司 The guard method of internal memory and device in a kind of real time operating system
CN106165367A (en) * 2014-12-31 2016-11-23 华为技术有限公司 A kind of access control method, storage device and control system storing device
CN106165367B (en) * 2014-12-31 2019-06-21 华为技术有限公司 A kind of access control method of storage device, storage device and control system
CN107643943A (en) * 2016-07-20 2018-01-30 大唐移动通信设备有限公司 The management method and device of a kind of task stack
CN107516052A (en) * 2017-08-14 2017-12-26 致象尔微电子科技(上海)有限公司 A kind of internal storage access partition method
CN111261200A (en) * 2020-01-23 2020-06-09 奇安信科技集团股份有限公司 Burning equipment control method and device based on kernel and electronic equipment

Similar Documents

Publication Publication Date Title
CN101174224A (en) Memory management method based on VxWorks operating system
CN102150105B (en) Deployment and management of virtual containers
CN109558211B (en) Method for protecting interaction integrity and confidentiality of trusted application and common application
US5796825A (en) System for automatic decryption of file data on a per-use basis and automatic re-encryption within context of multi-threaded operating system under which applications run in real-time
US7219369B2 (en) Internal memory type tamper resistant microprocessor with secret protection function
US8190917B2 (en) System and method for securely saving and restoring a context of a secure program loader
CN101403973B (en) Improve application program launching method and the system of security of embedded linux kernel
CN102207912B (en) Flash memory device and the access method thereof of sectoring function is realized in equipment end
US9275238B2 (en) Method and apparatus for data security reading
GB2398134A (en) Applying a data handing policy to predetermined system calls
US20120246420A1 (en) Interacting with data in hidden storage
EP2062191A1 (en) System and method for securely restoring a program context from a shared memory
WO2008031730A1 (en) System and method for securely saving a program context to a shared memory
US8635664B2 (en) Method and system for securing application program interfaces in unified extensible firmware interface
CN110162328B (en) Method and device for upgrading intelligent card operating system
CN102110059A (en) Access method and system for multi-user hard disk data
KR101207434B1 (en) System and Method for Preventing Collision Between Different Digital Documents Protection System
US9754121B2 (en) System and methods for live masking file system access control entries
Umar et al. A Comparative Study of Modern Operating Systems in terms of Memory and Security: A Case Study of Windows, iOS, and Android
KR20130027288A (en) Environment setting device and method according to the user account
CN102222185A (en) Method for preventing operating system starting file from being infected
CN100424652C (en) Had disk self-recovery protecting method based on embedded operation system
CN100465980C (en) Method for improving operation system safety through incompatiblity of process behavour
CN113302598A (en) Electronic data management device, electronic data management system, program used for the same, and recording medium
KR20200122014A (en) Data security method based on program protection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20080507