CN103412779B - A kind of patch file network system realization of embedded real-time operating system - Google Patents

A kind of patch file network system realization of embedded real-time operating system Download PDF

Info

Publication number
CN103412779B
CN103412779B CN201310351780.XA CN201310351780A CN103412779B CN 103412779 B CN103412779 B CN 103412779B CN 201310351780 A CN201310351780 A CN 201310351780A CN 103412779 B CN103412779 B CN 103412779B
Authority
CN
China
Prior art keywords
patch
patch file
space
file
page space
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.)
Active
Application number
CN201310351780.XA
Other languages
Chinese (zh)
Other versions
CN103412779A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201310351780.XA priority Critical patent/CN103412779B/en
Publication of CN103412779A publication Critical patent/CN103412779A/en
Application granted granted Critical
Publication of CN103412779B publication Critical patent/CN103412779B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System (AREA)

Abstract

The invention discloses the patch file network system realization of a kind of embedded real-time operating system, comprise the steps: S10: set up patch system table, patch collection table and patch information table;S11: choose patch file and deposit base address;S12: distribute page space number according to the size of patch file;S13: after distribution page space counts up to into, check the positional information in page space;S14: write patch file in the space of distribution;S15: after write patch file, update the patch collection table of this patch respective modules.The present invention can be rapidly completed depositing and read operation of patch file by above-mentioned embedded real-time operating system patch file system;Wherein, patch file presses page size allocation space, drastically reduce the area the waste of memory space;And carry out block erasing as required, maximize the erasing times reducing Nand Flash, increase the service life.

Description

A kind of patch file network system realization of embedded real-time operating system
Technical field
The invention belongs to field of embedded technology, relate to the patch file system of a kind of embedded real-time operating system Implementation method.
Background technology
In embedded real-time operating system, if needing to realize dynamically more New function, patch file system will be related to The design of system and realization.Present embedded board outside storage major part is to use Nand Flash.Nand Flash has So one feature, the least unit writing data is page (page, 2KB), erasing data least unit be block (block, 128KB, a block is typically made up of 64 pages).
Traditional patch file system, in order to conveniently realize emptying of memory space before write patch data, uses one Individual block deposits single patch file, and this causes the waste of Flash memory space greatly.
Secondly, Nand Flash block erasing times is restricted, and exceeding maximum erasing times will scrap, traditional patch literary composition Part system relates to wiping frequently block, and system will be brought serious loss by this.
It addition, all patch files are according to write Nand Flash time sequencing storage, when needs use a certain patch, Need to travel through whole patch system table, cause time complexity high.
The defect existed for above-mentioned prior art, is necessary to develop research in fact, to provide a kind of scheme, overcomes biography The system shortcoming that patch file system space expense is big, system loss is big and time complexity is high.
Summary of the invention
For solving the problems referred to above, it is an object of the invention to provide the patch file system of a kind of embedded real-time operating system System implementation method, can be rapidly completed depositing and read operation of patch file, drastically reduce the area the waste of memory space, and Bigization reduces the erasing times of Nand Flash, increases the service life.
For achieving the above object, the technical scheme is that
The patch file network system realization of a kind of embedded real-time operating system, comprises the steps:
S10: set up patch system table according to refreshable module number, and set up benefit according to each module most patch release number Fourth collection table, sets up patch information table;
S11: choose patch file and deposit base address;
S12: distribute page space number according to the size of patch file;
S13: after distribution page space counts up to into, check the positional information in page space;
S14: write patch file in the space of distribution;
S15: after write patch file, update the patch collection table of this patch respective modules.
Further, in step S11, described patch file deposits the starting point that base address is mono-block of Nand Flash Location.
Further, in step S12, described page space number is the minimum number of pages that can deposit patch file.
Further, in step S13, if newly assigned page space is all at current block, now need not wipe next block; If front and back, space has in newly assigned page space, now need to wipe next block;If newly assigned page space all under One block, now needs to wipe next block.
Further, when needs use certain version patch, first pass through patch system table and quickly navigate to this patch pair Answer the patch collection table of module, quickly navigate to the patch information table of this version patch then according to patch collection table, then lead to Cross patch information table to get this version patch and deposit first address in Nand Flash, finally call read operation and read this benefit Fourth file
Compared to prior art, the patch file network system realization of a kind of embedded real-time operating system of the present invention passes through Above-mentioned embedded real-time operating system patch file system can be rapidly completed depositing and read operation of patch file;Wherein, Patch file presses page size allocation space, drastically reduce the area the waste of memory space;And carry out block erasing as required, Bigization reduces the erasing times of Nand Flash, increases the service life.
Accompanying drawing explanation
Fig. 1 is the flow process diagram of the present invention.
Fig. 2 is that the page space of the distribution of the present invention is all at the schematic diagram of current block.
Fig. 3 is the schematic diagram that former and later two blocks of page space of the distribution of the present invention have.
Fig. 4 is that the page space of the distribution of the present invention is all at the schematic diagram of later block.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, right The present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, and It is not used in the restriction present invention.
As it is shown in figure 1, the patch file network system realization of a kind of embedded real-time operating system of the present invention, including as follows Step:
S10: set up patch system table according to refreshable module number, and set up benefit according to each module most patch release number Fourth collection table, sets up patch information table;
S11: choose patch file and deposit base address, wherein, this address is the initial address of mono-block of Nand Flash;
S12: distribute the page space number of Nand Flash according to the size of patch file, this page of space number is for can deposit patch The minimum number of pages of file;
S13: after distribution page space counts up to into, check the positional information in page space;Wherein, when newly assigned page space all At current block, now need not wipe next block;If front and back, space has in newly assigned page space, now need under erasing One block;If newly assigned page space is all at next block, now need to wipe next block;
S14: write patch file in the Nand Flash space of distribution;
S15: after write patch file, update the patch collection table of this patch respective modules.
When needs use certain version patch, first pass through patch system table and quickly navigate to the benefit of this patch respective modules Fourth collection table, quickly navigates to the patch information table of this version patch, then passes through patch information then according to patch collection table Table gets this version patch and deposits first address in Nand Flash, finally calls read operation and reads this patch file.
As one embodiment of the invention, as shown in table 1, setting up patch system table according to refreshable module number, including can More new module numbering and this module patch collection table.
As shown in table 2, set up patch collection table according to each module most patch release number, include patch release number with And this version patch information.
As shown in table 3, set up patch information table, including field and the implication of this field.
Choosing patch file and deposit base address, this address is necessary for the initial address of a block.When patch literary composition deposited by needs During part, distributing the page space number of Nand Flash according to the size of patch file, this page of space number is to deposit patch file Minimum number of pages.Such as when patch file is 3.5KB, it is necessary to distribute 2 page spaces.After being assigned, check page space Positional information, wherein, point following three kinds of situations: as in figure 2 it is shown, newly assigned page space is all at current block, now need not The next block of erasing;As it is shown on figure 3, front and back, space has in newly assigned page space, now need to wipe next block;Such as figure Shown in 4, newly assigned page space, all at next block, now needs to wipe next block.
Writing patch file in the Nand Flash space of distribution, after write patch file data, needs update should The patch collection table of patch respective modules.If desired certain version patch, first patch system table is used quickly to navigate to this patch The patch collection table of respective modules, quickly navigates to the patch information table of this version patch, then then according to patch collection table Getting this version patch by patch information table and deposit first address in Nand Flash, finally calling that read operation reads should Patch file.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention Any amendment, equivalent and the improvement etc. made within god and principle, should be included within the scope of the present invention.

Claims (2)

1. the patch file network system realization of an embedded real-time operating system, it is characterised in that comprise the steps:
S10: set up patch system table according to refreshable module number, and set up patch collection according to each module most patch release number Close table, set up patch information table;
S11: choosing patch file and deposit base address, described patch file deposits the initial address that base address is a block;
S12: distributing page space number according to the size of patch file, described page space number is the minterm that can deposit patch file Number;
S13: after distribution page space counts up to into, check the positional information in page space, if newly assigned page space is all at current block, Now need not wipe next block;If front and back, space has in newly assigned page space, now need to wipe next block;If Newly assigned page space, all at next block, now needs to wipe next block;
S14: write patch file in the space of distribution;
S15: after write patch file, update the patch collection table of this patch respective modules.
2. the patch file network system realization of embedded real-time operating system as claimed in claim 1, it is characterised in that: when needing When using certain version patch, first pass through patch system table and quickly navigate to the patch collection table of this patch respective modules, connect The patch information table quickly navigating to this version patch according to patch collection table, then get this version by patch information table This patch deposits first address in Nand Flash, finally calls read operation and reads this patch file.
CN201310351780.XA 2013-08-14 2013-08-14 A kind of patch file network system realization of embedded real-time operating system Active CN103412779B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310351780.XA CN103412779B (en) 2013-08-14 2013-08-14 A kind of patch file network system realization of embedded real-time operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310351780.XA CN103412779B (en) 2013-08-14 2013-08-14 A kind of patch file network system realization of embedded real-time operating system

Publications (2)

Publication Number Publication Date
CN103412779A CN103412779A (en) 2013-11-27
CN103412779B true CN103412779B (en) 2016-12-28

Family

ID=49605792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310351780.XA Active CN103412779B (en) 2013-08-14 2013-08-14 A kind of patch file network system realization of embedded real-time operating system

Country Status (1)

Country Link
CN (1) CN103412779B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103645917B (en) * 2013-12-03 2016-09-14 北京中电华大电子设计有限责任公司 The Java code patch method of Java card
CN110333885B (en) * 2019-06-28 2022-11-01 兆讯恒达科技股份有限公司 Method for setting patch of embedded operating system
CN110888654A (en) * 2019-11-13 2020-03-17 重庆秦嵩科技有限公司 Method for upgrading embedded operating system
CN110928570A (en) * 2019-11-27 2020-03-27 北京知道创宇信息技术股份有限公司 Firmware upgrading method and device and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140586A (en) * 2007-09-30 2008-03-12 浙江大学 Method for building file systems on NAND flash memory in embedded system
CN102841851A (en) * 2012-07-19 2012-12-26 深圳市江波龙电子有限公司 Flash memory management method and flash memory device
CN102955741A (en) * 2011-08-30 2013-03-06 联咏科技股份有限公司 Memorizer device and writing method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140586A (en) * 2007-09-30 2008-03-12 浙江大学 Method for building file systems on NAND flash memory in embedded system
CN102955741A (en) * 2011-08-30 2013-03-06 联咏科技股份有限公司 Memorizer device and writing method thereof
CN102841851A (en) * 2012-07-19 2012-12-26 深圳市江波龙电子有限公司 Flash memory management method and flash memory device

Also Published As

Publication number Publication date
CN103412779A (en) 2013-11-27

Similar Documents

Publication Publication Date Title
CN103412779B (en) A kind of patch file network system realization of embedded real-time operating system
CN101923448B (en) Method for reading and writing conversion layer of NAND flash memory
CN103019814B (en) A kind of shear plate management system and method
DE102006003261A1 (en) Storage system and method for data fusion
CN102541851B (en) Page modularity generation method and page modularity generation system
RU2009133317A (en) SELECTIVE USE OF MANY DIFFERENT DOCUMENTS OF A SOLID MEMORY DEVICE
CN104407935A (en) Snapshot rollback method and storage equipment
CN102841851A (en) Flash memory management method and flash memory device
DE112010004667T5 (en) Storage device and storage controller
CN105468542A (en) Address distribution method and device
CN105302737A (en) Memory allocation management method and memory allocation management system
CN104252419A (en) Memory allocation method and device
CN102023843A (en) Function calling method and device as well as smart card
CN103365972A (en) Intelligent processing system for mass data
CN103699493B (en) The control system and method for smart card DTR memory headroom
CN103218305A (en) Distribution method of memory space
CN103823640A (en) High-efficiency storage method of Flash storage
CN106708422B (en) Data storage device and data maintenance method thereof
CN101719131A (en) Method, device and system for processing report data
CN101286146B (en) Typesetting method and system
CN103377686B (en) Nand Flash storer and realize the method for the continuous read operation of Nand Flash storer
CN109271247A (en) Memory Optimize Method, device, computer installation and storage medium
CN102103530B (en) Snapshot methods, snapshot device and snapshot system
CN106326132A (en) Storage system, storage management device, storage, hybrid storage device and storage management method
CN105335307A (en) ACL rule loading method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant