CN104834604B - A kind of IO addresses are to I/O object quick mapping method and system - Google Patents

A kind of IO addresses are to I/O object quick mapping method and system Download PDF

Info

Publication number
CN104834604B
CN104834604B CN201510193943.5A CN201510193943A CN104834604B CN 104834604 B CN104834604 B CN 104834604B CN 201510193943 A CN201510193943 A CN 201510193943A CN 104834604 B CN104834604 B CN 104834604B
Authority
CN
China
Prior art keywords
address
gap
addresses
array
block
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
CN201510193943.5A
Other languages
Chinese (zh)
Other versions
CN104834604A (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.)
Shanghai Engineering Center for Microsatellites
Original Assignee
Shanghai Engineering Center for Microsatellites
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 Shanghai Engineering Center for Microsatellites filed Critical Shanghai Engineering Center for Microsatellites
Priority to CN201510193943.5A priority Critical patent/CN104834604B/en
Publication of CN104834604A publication Critical patent/CN104834604A/en
Application granted granted Critical
Publication of CN104834604B publication Critical patent/CN104834604B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A kind of IO addresses comprise the following steps to I/O object quick mapping method and system, method:1) base address, size and the interval of all I/O blocks are gathered, and is arranged by sequence of addresses;2) minimum spacing value is chosen, so as to obtain gap value, wherein gap value is less than or equal to minimum spacing value;3) using the initial address of IO address spaces as original position t, IO address spaces are split again using gap value;4) tectonic gap and array, with record gap since original position in each gap value space corresponding to IO addresses and;5) I/O object array, I/O object of every IO address of cache one in the I/O object array at respective counts group index are constructed;6) according to the gap of construction and array and I/O object array, calculating of the IO addresses to corresponding array indexing is completed, so as to complete IO addresses to the fast mapping of I/O object.Search is converted into and tabled look-up, realize by the fast mapping of IO addresses to I/O object by repartitioning IO address spaces by the present invention.

Description

A kind of IO addresses are to I/O object quick mapping method and system
Technical field
The present invention relates to digital simulating computer technical field, more particularly to a kind of IO addresses based on gsMap are to IO pairs As quick mapping method and system.
Background technology
In digital simulating computer, virtual cpu is by reading and writing the completion of IO addresses and peripheral device communication.Generally, numeral is imitative Genuine computer exterior I O is distributed with some continuous IO block of address space (hereinafter referred to as I/O block).With reference to figure 1, the signal of I/O block model Figure.Fig. 1 illustrates I/O block (IO_BLOCK) base attribute, including base address base, size size;And in the I/O block IO addresses can use base address to be described with offset address offset.Numerous I/O blocks usually linear dispersed distribution in IO addresses In space, the IO addresses being only mapped just belong to access profile.With reference to figure 2, IO address spaces and I/O block schematic diagram.It is corresponding every One IO address, I/O object is constructed, both have mapping relations one by one.When emulation CPU accesses certain IO, with providing IO first Location, then inquires about I/O object, the operation such as is then written and read.
A kind of IO addresses are to the map locating implementation method of I/O object:Apply for one piece of foot in the internal memory of simulation computer The continuous caching of all I/O blocks is enough accommodated, comprising the space between I/O block, the entry address of I/O object is filled in caching;So, After obtaining IO addresses, the simple conversion of offset address is only carried out, can be to obtain I/O object.But due to IO block of address space point Cloth is more dispersed, and address span is big, and limited calculator memory space causes the program not realize.Another IO addresses are to IO The map locating implementation method of object is:Use std::Container similar map;Program internal memory uses relative efficiency, common Access the time operational efficiency also having to a certain extent, especially suitable Google::Sparsehash can obtain higher time fortune Line efficiency.But increasing with I/O object, search procedure will be in O (nlog (n)) increases, and in analogue system, due to I O access now or can become not conforming to very frequently and under the application scenario of the preferential guaranteed rate of needs because speed is too slow It is suitable.
Accordingly, it is desirable to provide digital simulating computer is improved in a kind of quick IO addresses to the map locating method of I/O object Simulation efficiency.
The content of the invention
It is an object of the present invention to the mapping for IO addresses to I/O object in prior art digital satellite modeling process is looked into Ask existing technical problem, there is provided a kind of IO addresses modeled to I/O object quick mapping method and system in digital satellite Cheng Zhong, quick lookup of the IO addresses to I/O object is realized, so as to improve simulation velocity.
To achieve the above object, the invention provides a kind of IO addresses to I/O object quick mapping method, including following step Suddenly:(1) the base address base of all I/O blocks is gatheredi, size sizeiAnd interval gapi, and arranged by sequence of addresses, wherein under Mark i and represent i-th of I/O block;(2) minimum spacing value min [gap are choseni], so as to obtain gap value space, wherein space≤ min[gapi];(3) using the initial address of IO address spaces as original position start, IO is split using gap value space again Address space;(4) tectonic gap and array gapSum_table, to record each gap value since original position start Gap in space spaces corresponding to IO addresses and, the size of the gap and array is:NgapSum_table≥(basen+ sizen)/space, wherein, basen+sizenFor the end address of last block I/O block;(5) I/O object array, every IO are constructed Address address one I/O objects in the I/O object array at respective counts group index index of mapping, the I/O object The size of array is all I/O block size sums;(6) according to the gap of construction and array and I/O object array, using following meter The calculating that formula completes IO address address to corresponding array indexing index is calculated, so as to complete address to IO pairs of IO addresses The fast mapping of elephant:Index=address-gapSum_table ((address-start)/space).
To achieve the above object, present invention also offers a kind of IO addresses to I/O object fast mapping system, including collection Unit, gap value acquiring unit, cutting unit, gap sum set constructor unit, I/O object array structural unit and mapping are single Member;The collecting unit, for gathering the base address base of all I/O blocksi, size sizeiAnd interval gapi, and it is suitable by address Sequence arranges, and wherein subscript i represents i-th of I/O block;The gap value acquiring unit, for choosing minimum spacing value min [gapi], So as to obtain gap value space, wherein space≤min [gapi];The cutting unit, for the starting of IO address spaces Address is original position start, splits IO address spaces again using gap value space;The gap sum set constructor unit, For tectonic gap and array gapSum_table, to record since original position start in each gap value space spaces Gap corresponding to IO addresses and, the size of the gap and array is:NgapSum_table≥(basen+sizen)/space, its In, basen+sizenFor the end address of last block I/O block;The I/O object array structural unit, for constructing I/O object number Group, one I/O object in the I/O object array at respective counts group index index of every IO addresses address mappings, The size of the I/O object array is all I/O block size sums;The map unit, for the gap according to construction and array And I/O object array, using be calculated as below formula complete IO address address to corresponding array indexing index calculating, from And IO addresses address is completed to the fast mapping of I/O object:
Index=address-gapSum_table ((address-start)/space).
The advantage of the invention is that:By repartitioning IO address spaces, search is converted into and tabled look-up, with extra increased Gap and array realize higher time execution efficiency, realize by the fast mapping of IO addresses to I/O object.
Brief description of the drawings
Fig. 1, I/O block model schematic;
Fig. 2, IO address space and I/O block schematic diagram;
Fig. 3, IO address space and the mapping relations schematic diagram of I/O object array;
Fig. 4, the schematic flow sheet of IO addresses of the present invention to I/O object quick mapping method;
Fig. 5, the selection of gap value space shown in one embodiment of the invention is with being spaced and filling schematic diagram;
Fig. 6, the selection of gap value space shown in another embodiment of the present invention is with being spaced and filling schematic diagram;
Fig. 7, IO address space schematic diagrames are divided shown in one embodiment of the invention again;
Fig. 8, IO addresses shown in one embodiment of the invention are to I/O object mapping process schematic diagram;
Fig. 9, IO addresses of the present invention to I/O object fast mapping system architecture schematic diagram.
Embodiment
IO addresses provided by the invention are elaborated to I/O object quick mapping method and system below in conjunction with the accompanying drawings.
The present invention be proposed on the basis of gsMap algorithms it is a kind of again split IO address spaces mode, realize by Fast mapping of the IO addresses to I/O object.In order to clearly describe the present invention, being briefly described for gsMap algorithms is provided first.gsMap The algorithm construction algorithm of a kind of O (1) time complexity, for quickly by IO allocation index I/O objects.GsMap algorithms only lead to Cross simple arithmetical operation to table look-up with array, complete O (1) time complexity IO addresses to the inquiry of I/O object, its algorithm core Thought is described as follows.
First, realize that IO addresses are searched to the O (1) of I/O object
I/O object (I/O object pointer, reference an etc.) array is constructed, the I/O object array size is all I/O block sizes Sum.The essential information of all I/O blocks, base address (base are gathered simultaneouslyi), size (sizei), interval (gapi), wherein subscript i Represent i-th of I/O block;Among it every gapiTerminate for current I/O block _ i addresses (and its first place is put) apart from a upper I/O block _ (i-1) IO address space sizes among address (and its tail position);Remember, 0 is designated as under first block of I/O block;The interval of first piece of I/O block _ 0 gap0It is taken with respect to the distance of 0 address, i.e. its base0Value.
Then have, IO addresses address maps positioned at corresponding subscript (array indexing index) place in I/O object array one by one I/O object.As shown in Equation 1:
Address~index formula 1
Assuming that certain IO address address, in n-th block of I/O block, it is relative to the offset address of the I/O block _ n offset.Reference picture 3, IO address spaces and the mapping relations schematic diagram of I/O object array.Then IO pairs of the IO addresses and its correspondence As the array indexing index in I/O object array is expressed by equation below 2, formula 3:
Formula 2
Formula 3
Formula 2,3 subtracts, and can now obtain IO addresses address and corresponding array indexing index relation, such as public Formula 4:
Formula 4
It can be seen that if can obtain gap corresponding to the address of each IO address andCan be with logical Cross first simple subtraction and realize calculating of the IO addresses to corresponding array indexing index, so as to realize IO addresses to IO pairs The mapping of elephant.
2nd, gap andIt is quick to search
Although gap andWhen can in advance obtain, but take IO addresses address merely, it can not know immediately Road n is how many, i.e. can not directly obtain IO addresses address and be located in which block I/O block.Now, one of them is optional Scheme is to reach out for the base address base corresponding to the address of the IO addresses, then searches for (dichotomy) base address base Corresponding gap and.2 drawbacks be present in the program:Although the 1, memory block negligible amounts, it is necessary to log in the case of the worst2 (n) can just find corresponding gap and;And in actual conditions, the frequency of I O access is simultaneously non-homogeneous, so worst-case often occurs Possibility be very big;If the 2nd, can not obtain base address base, this scheme just fails.
The present invention has found why search be present through analysis, is the size size because different I/O blocksiAnd interval gapi May be incomplete same, cause can not to calculate by way of simple division (divided by step-length) I/O object array index and, and then Need to realize by way of search.The present invention proposes a kind of IO address spaces of segmentation again on the basis of gsMap algorithms Mode, as the size size of all I/O blocksiAnd interval gapiWhen this two parameter is consistent, division meter can be passed through to eliminate search Array index (i.e. array indexing index) is calculated, and then searches I/O object, is realized by the fast mapping of IO addresses to I/O object.
With reference to figure 4, the schematic flow sheet of IO addresses of the present invention to I/O object quick mapping method, methods described bag Include following steps:S41:Gather the base address base of all I/O blocksi, size sizeiAnd interval gapi, and arranged by sequence of addresses Row, wherein subscript i represent i-th of I/O block;S42:Choose minimum spacing value min [gapi], so as to obtain gap value space, its Middle space≤min [gapi];S43:Using the initial address of IO address spaces as original position start, using gap value space Again IO address spaces are split;S44:Tectonic gap and array gapSum_table, it is every since original position start to record Gap corresponding to one IO addresses in gap value space spaces and, the size of the gap and array is:NgapSum_table≥ (basen+sizen)/space, wherein, basen+sizenFor the end address of last block I/O block;S45:Construct I/O object number Group, one I/O object in the I/O object array at respective counts group index index of every IO addresses address mappings, The size of the I/O object array is all I/O block size sums;S46:According to the gap of construction and array and I/O object number Group, using the calculating that formula completion IO address address to corresponding array indexing index are calculated as below, so as to complete IO addresses Fast mappings of the address to I/O object:
Index=address-gapSum_table ((address-start)/space).
S41:Gather the base address base of all I/O blocksi, size sizeiAnd interval gapi, and arranged by sequence of addresses.
S42:Choose minimum spacing value gapmin, so as to obtain gap value space, wherein space≤min [gapi]。
If existing in the range of the gap value space, any gap value space of such a size, two pieces are occurred without And the I/O block (occurring comprising part) of above quantity.Since some position of IO address spaces, every gap value space weights New division IO address spaces, then can pass through the gap corresponding to the I/O block where a certain IO addresses of division arithmetic fast positioning With.It is in foregoing description it is a key issue that IO address spaces can be divided again with the presence or absence of such gap value space Cut, and such segmentation should since IO address spaces where.
Gap value space values are got over hour, and memory space needed for tectonic gap and array gapSum_table is bigger;The limit Under situation, as gap value space=1, gap and array gapSum_table will entirely include all I/O blocks and its interval Required space size.Gap value space is bigger, then memory space needed for tectonic gap and array gapSum_table is smaller, More possess advantage, therefore, it is necessary to ask for gap value space maximum.
It is in view of the gap value space principles chosen:In same gap value space regions, should not occur two pieces and The I/O block of above quantity.Because I/O block is by being spaced gap segmentations, then, when gap value space selections are less than or equal in all I/O blocks During the value of minimum interval gap amount of capacity, be not just capable of violation of principle repartitions IO address spaces.
Prove as follows:Assuming that front and rear two blocks of I/O blocks, respective size is sizeiWith sizej(i, j characterize I/O block sequence number, they For adjacent I/O block), two pieces of existing interval gap in I/O blocks centreiFor minimum interval min [gapi].Contemplate a kind of limiting case, with When gap value space divides IO address spaces, current gap value space divided blocks just terminate in i block I/O block end positions; Then, next gap value space divided blocks are since the next address of i block I/O block end positions.By selected gap value Space meets space≤min [gapi], therefore, the end position of next gap value space divided blocks will not necessarily cover To the original position of jth block I/O block.With reference to figure 5, selection and the interval and filling of gap value space shown in one embodiment of the invention Schematic diagram.And if when dividing IO address spaces with gap value space, current gap value space divided blocks are in i-th piece of I/O block knot Terminate before beam position, then, the end position of next gap value space divided blocks will not more cover rising for jth block I/O block Beginning position, space≤min [gapi] more ensured.With reference to figure 6, gap value space shown in another embodiment of the present invention Choose with being spaced and filling schematic diagram.
S43:Using the initial address of IO address spaces as original position start, using gap value space with splitting IO again Location space.
With reference to figure 7, IO address space schematic diagrames are divided shown in one embodiment of the invention again.Due to above-mentioned gap value space In selection, considered critical gap value space does not divide the relative position started, space≤min [gapi] disclosure satisfy that; So can be since arbitrary address with gap value space division IO address space original positions start.Set original position Start can choose the initial address (i.e. 0 address) from IO address spaces, reduce by a subtraction.But usual I/O block all positions In address higher position, such optimization, although arithmetic speed can be improved, larger simulation computer internal memory is caused to waste. As preferred embodiment, step S43 further comprises:Original position start is set as the base address of initial I/O block base0, IO address spaces are repartitioned with gap value space, although subtraction be present, to the performance shadow of simulation computer Sound is very little, and can effectively save simulation computer internal memory.
S44:Tectonic gap and array gapSum_table, the gap and array are recorded since original position start, Gap in each gap value space spaces corresponding to IO addresses and.
Simultaneously to ensure that the gap of construction and array gapSum_table can cover all I/O blocks, its capacity Constrained; Namely the size of the gap and array is:NgapSum_table≥(basen+sizen)/space;Wherein, basen+sizenFor most The end address of latter block of I/O block.
In addition, it is necessary to consider special circumstances when tectonic gap and array gapSum_table:That is, if current gap value Space divided blocks bottom is next I/O block region, then gap corresponding to the current gap value space divided blocks and should be next IO The gap of block and;And if when being upper I/O block region at the top of current gap value space divided blocks, the current gap value space Gap corresponding to divided block and should be the gap of an I/O block with.Therefore as preferred embodiment, in tectonic gap and array During, since original position start, often increase by a gap value space, record and originated corresponding to current gap value space Address;Put or beyond previous I/O block tail position if the initial address is current I/O block first place, renewal gap and, with mark into Enter next I/O block region.
S45:I/O object array is constructed, every IO addresses address mappings one are in the I/O object array positioned at corresponding I/O object at array indexing index.
The size of the I/O object array is all I/O block size sums;I/O object array make is based on reference to foregoing The construction of gsMap I/O object (I/O object pointer, reference etc.) array.
S46:According to the gap of construction and array and I/O object array, IO address address are completed to corresponding array rope Draw index calculating, so as to complete IO addresses address to the fast mapping of I/O object.
Having due to the gap of construction and array gapSum_table records by original position start, per gap value In space spaces, gap corresponding to IO addresses and, with reference to aforementioned formula 4, draw formula 5:
... ... ... ... ... ... formula 5
After simple transposition, IO address address are just obtained to corresponding array indexing index calculation formula, formula 6:
Formula 6
As preferred embodiment, step S42 further comprises:Ask for the minimum spacing value gapminTo 2 index M, so as to obtain gap value space=2M, that is, gap value space size is set as 2 whole order side M.Step S43 is further Including:Set base address bases of the original position start as initial I/O block0.Then, formula 6 is further simplified as:
Index=address-gapSum_table [(address-start) > > M] formula 7
By setting gap value space size as 2 whole order side M, optimization division is shift right operation so that formula 7 Quick lookups of the IO addresses address to its gap sum is realized, and completes IO addresses address to corresponding array indexing Index quick calculating.Such as Fig. 8, shown in IO addresses shown in one embodiment of the invention to I/O object mapping process schematic diagram.
Now, the conversion by IO addresses address to corresponding array indexing index, it is only necessary to:Subtraction, address-start;Once shift (address-start) > > M;One time internal memory is read, gapSum_table ((address-start) > > M);And last time subtraction, address-gapSum_table ((address-start) > > M), the calculating of totally 4 step CPU execution speed can be completed.That is, as preferred embodiment, step S46 enters one Step includes:1) subtraction is carried out to IO addresses address and original position start:address-start;2) it is right The operation result of step 1) carries out a shift operation:(address-start) > > M;3) according to the shift result of step 2) Carry out lookups of the IO address address to respective clearance sum:GapSum_table ((address-start) > > M);4) to step Rapid lookup result 3) carries out a subtraction, completes IO address address to corresponding array indexing index calculating:
Address-gapSum_table ((address-start) > > M).
As gap value space=2MWhen, the size of the gap and array is further simplified as:
NgapSum_table=((basen+sizen+base0) > > M)+1
In summary, IO addresses provided by the invention are to I/O object quick mapping method, by repartitioning IO addresses sky Between, search is converted into and tabled look-up, higher time execution efficiency is realized with extra increased gap and array, realizes by IO Fast mapping of the location to I/O object.
After tested, on 2.4GHz dominant frequency computer, no matter the map in STL, or the sparsehash that provide of Google its Performance can not all reach required target;std::Map simulation velocities are 0.22 times;Sparsehash is 1.56 times;Similarity condition Under, the simulation velocity of method provided by the invention is 7.30 times, is realized by the fast mapping of IO addresses to I/O object.
With reference to figure 9, IO addresses of the present invention to I/O object fast mapping system architecture schematic diagram.The system includes Collecting unit 91, gap value acquiring unit 92, cutting unit 93, gap sum set constructor unit 94, I/O object array construction are single Member 95 and map unit 96.
The collecting unit 91, for gathering the base address base of all I/O blocksi, size sizeiAnd interval gapi, and Arranged by sequence of addresses, wherein subscript i represents i-th of I/O block.
The gap value acquiring unit 92, for choosing minimum spacing value min [gapi], so as to obtain gap value space, Wherein space≤min [gapi].When gap value space selections are less than or equal to minimum interval gap amount of capacity in all I/O blocks Be not in the I/O block of two pieces and above quantity in same gap value space regions during value.
The cutting unit 93, for using the initial address of IO address spaces as original position start, using gap value Space splits IO address spaces again.In being chosen due to above-mentioned gap value space, considered critical gap value space is not divided The relative position of beginning;So it can be opened with gap value space divisions IO address space original positions start from arbitrary address Begin.Setting original position start can choose the initial address (i.e. 0 address) from IO address spaces, reduce by a subtraction. But usual I/O block is all located at address higher position, such optimization, although arithmetic speed can be improved, causes larger emulation meter Calculation machine internal memory wastes.As preferred embodiment, the cutting unit 93 is further used for:Set original position start as The base address base of initial I/O block0, IO address spaces are repartitioned with gap value space, although subtraction be present, to imitative The performance impact of genuine computer is very little, and can effectively save simulation computer internal memory.
The gap sum set constructor unit 94, for tectonic gap and array gapSum_table, to record from starting Position start start gap in each gap value space spaces corresponding to IO addresses and.Simultaneously for ensure construction gap and Array gapSum_table can cover all I/O blocks, its capacity Constrained;Namely the size of the gap and array is: NgapSum_table≥(basen+sizen)/space;Wherein, basen+sizenFor the end address of last block I/O block.
In addition, it is necessary to consider special circumstances when tectonic gap and array gapSum_table:That is, if current gap value Space divided blocks bottom is next I/O block region, then gap corresponding to the current gap value space divided blocks and should be next IO The gap of block and;And if when being upper I/O block region at the top of current gap value space divided blocks, the current gap value space Gap corresponding to divided block and should be the gap of an I/O block with.Therefore as preferred embodiment, the gap and array structure Unit 94 is made to be further used for:During tectonic gap and array, since original position start, often increase by a gap value Space, record initial address corresponding to current gap value space;Put or exceed if the initial address is current I/O block first place Previous I/O block tail position, then update gap and next I/O block region is entered with mark.
The I/O object array structural unit 95, for constructing I/O object array, every IO addresses address mappings one exist I/O object in the I/O object array at respective counts group index index, the size of the I/O object array is all IO Block size sum.
The map unit 96, for the gap according to construction and array and I/O object array, complete IO addresses Address to corresponding array indexing index calculating, so as to complete IO addresses address to the fast mapping of I/O object.IO Location address to corresponding array indexing index calculation formula is with reference to above-mentioned formula 6.
As preferred embodiment, the gap value acquiring unit 92 is further used for:Ask for the minimum spacing value gapminTo 2 index M, so as to obtain gap value space=2M, that is, gap value space size is set as 2 whole order side M.By setting gap value space size as 2 whole order side M, optimization division is shift right operation, realizes IO addresses Address and completes IO addresses address to the quick of corresponding array indexing index to the quick lookup of its gap sum Calculate.Now, the conversion by IO addresses address to corresponding array indexing index, it is only necessary to:Subtraction, address- start;Once shift (address-start) > > M;One time internal memory is read, gapSum_table ((address-start) > > M);And last time subtraction, address-gapSum_table ((address-start) > > M), totally 4 step CPU are held Scanning frequency degree calculates can complete faster.
That is, as preferred embodiment, the map unit 96 further comprises:First subtraction module 961, Shift operation module 962, the subtraction module 964 of searching modul 963 and second.
The first subtraction module 961, for being carried out once to IO addresses address and original position start Subtraction:address-start.
The shift operation module 962, for once being moved to the operation result of the first subtraction module 961 Bit arithmetic:(address-start) > > M.
The searching modul 963, for carrying out IO addresses according to the shift result of the shift operation module 962 Lookups of the address to respective clearance sum:GapSum_table ((address-start) > > M).
The second subtraction module 964, for carrying out a subtraction fortune to the lookup result of the searching modul 963 Calculate, complete IO address address to corresponding array indexing index calculating:
Address-gapSum_table ((address-start) > > M).
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art Member, under the premise without departing from the principles of the invention, can also make some improvements and modifications, these improvements and modifications also should be regarded as Protection scope of the present invention.

Claims (10)

1. a kind of IO addresses are to I/O object quick mapping method, it is characterised in that comprise the following steps:
(1) the base address base of all I/O blocks is gatheredi, size sizeiAnd interval gapi, and arranged by sequence of addresses, wherein under Mark i and represent i-th of I/O block;
(2) minimum spacing value min [gap are choseni], so as to obtain gap value space, wherein space≤min [gapi];
(3) using the initial address of IO address spaces as original position start, IO addresses sky is split using gap value space again Between;
(4) tectonic gap and array gapSum_table, it is empty to record each gap value space since original position start Gap corresponding to interior IO addresses and, the size of the gap and array is:
NgapSum_table≥(basen+sizen)/space, wherein, basen+sizenFor the end address of last block I/O block;
(5) I/O object array is constructed, every IO addresses address mappings one are located at respective counts group rope in the I/O object array Draw the I/O object at index, the size of the I/O object array is all I/O block size sums;
(6) according to the gap of construction and array and I/O object array, arrived using formula completion IO address address are calculated as below Corresponding array indexing index calculating, so as to complete IO addresses address to the fast mapping of I/O object:Index= address-gapSum_table((address-start)/space)。
2. according to the method for claim 1, it is characterised in that step (4) further comprises:Opened from original position start Begin, often increase by a gap value space, record initial address corresponding to current gap value space;If the initial address is current I/O block first place is put or beyond previous I/O block tail position, then update gap and.
3. according to the method for claim 1, it is characterised in that step (2) further comprises:Ask for the minimum spacing value min[gapi] to 2 index M, so as to obtain gap value space=2M
4. according to the method for claim 3, it is characterised in that step (3) further comprises:Set original position start For the base address base of initial I/O block0
5. according to the method for claim 4, it is characterised in that step (6) further comprises:
(61) subtraction is carried out to IO addresses address and original position start:address-start;
(62) shift operation is carried out to the operation result of step (61):(address-start)>>M;
(63) lookups of the IO address address to respective clearance sum is carried out according to the shift result of step (62):gapSum_ table((address-start)>>M);
(64) subtraction is carried out to the lookup result of step (63), completes IO address address to corresponding array indexing Index calculating:address-gapSum_table((address-start)>>M).
6. a kind of IO addresses are to I/O object fast mapping system, it is characterised in that including collecting unit, gap value acquiring unit, Cutting unit, gap sum set constructor unit, I/O object array structural unit and map unit;The collecting unit, is used for Gather the base address base of all I/O blocksi, size sizeiAnd interval gapi, and arranged by sequence of addresses, wherein subscript i is represented I-th of I/O block;
The gap value acquiring unit, for choosing minimum spacing value min [gapi], so as to obtain gap value space, wherein space≤min[gapi];
The cutting unit, for using the initial address of IO address spaces as original position start, being weighed using gap value space New segmentation IO address spaces;
The gap sum set constructor unit, for tectonic gap and array gapSum_table, to record from original position Start start gap in each gap value space spaces corresponding to IO addresses and, the size of the gap and array is: NgapSum_table≥(basen+sizen)/space, wherein, basen+sizenFor the end address of last block I/O block;
The I/O object array structural unit, for constructing I/O object array, every IO addresses address mappings one are in the IO I/O object in object array at respective counts group index index, the size of the I/O object array is all I/O block sizes Sum;
The map unit, for the gap according to construction and array and I/O object array, completed using formula is calculated as below IO addresses address to corresponding array indexing index calculating, reflected so as to complete IO addresses address to the quick of I/O object Penetrate:
Index=address-gapSum_table ((address-start)/space).
7. system according to claim 6, it is characterised in that the gap sum set constructor unit is further used for:From Original position start starts, and often increases by a gap value space, records initial address corresponding to current gap value space;If institute Initial address is stated to put for current I/O block first place or beyond previous I/O block tail position, then update gap and.
8. system according to claim 6, it is characterised in that the gap value acquiring unit is further used for:Ask for institute State minimum spacing value min [gapi] to 2 index M, so as to obtain gap value space=2M
9. system according to claim 8, it is characterised in that the cutting unit is further used for:Set original position Start is the base address base of initial I/O block0
10. system according to claim 9, it is characterised in that the map unit further comprises:First subtraction Module, shift operation module, searching modul and the second subtraction module;
The first subtraction module, for carrying out a subtraction fortune to IO addresses address and original position start Calculate:address-start;
The shift operation module, for carrying out a shift operation to the operation result of the first subtraction module: (address-start)>>M;
The searching modul, for according to the shift result of the shift operation module carry out IO address address to accordingly between The lookup of gap sum:gapSum_table((address-start)>>M);
The second subtraction module, for carrying out a subtraction to the lookup result of the searching modul, complete IO Calculating of the address address to corresponding array indexing index:address-gapSum_table((address-start)>> M)。
CN201510193943.5A 2015-04-22 2015-04-22 A kind of IO addresses are to I/O object quick mapping method and system Active CN104834604B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510193943.5A CN104834604B (en) 2015-04-22 2015-04-22 A kind of IO addresses are to I/O object quick mapping method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510193943.5A CN104834604B (en) 2015-04-22 2015-04-22 A kind of IO addresses are to I/O object quick mapping method and system

Publications (2)

Publication Number Publication Date
CN104834604A CN104834604A (en) 2015-08-12
CN104834604B true CN104834604B (en) 2018-02-16

Family

ID=53812509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510193943.5A Active CN104834604B (en) 2015-04-22 2015-04-22 A kind of IO addresses are to I/O object quick mapping method and system

Country Status (1)

Country Link
CN (1) CN104834604B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533408A (en) * 2009-04-21 2009-09-16 北京四维图新科技股份有限公司 Processing method and processing device of mass data
CN103324466A (en) * 2013-05-24 2013-09-25 浪潮电子信息产业股份有限公司 Data dependency serialization IO parallel processing method
CN104462307A (en) * 2014-11-28 2015-03-25 深圳市中兴移动通信有限公司 Searching method and device for object in terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090113111A1 (en) * 2007-10-30 2009-04-30 Vmware, Inc. Secure identification of execution contexts
US8775773B2 (en) * 2011-08-26 2014-07-08 Vmware, Inc. Object storage system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533408A (en) * 2009-04-21 2009-09-16 北京四维图新科技股份有限公司 Processing method and processing device of mass data
CN103324466A (en) * 2013-05-24 2013-09-25 浪潮电子信息产业股份有限公司 Data dependency serialization IO parallel processing method
CN104462307A (en) * 2014-11-28 2015-03-25 深圳市中兴移动通信有限公司 Searching method and device for object in terminal

Also Published As

Publication number Publication date
CN104834604A (en) 2015-08-12

Similar Documents

Publication Publication Date Title
US9733094B2 (en) Hybrid road network and grid based spatial-temporal indexing under missing road links
Waldspurger et al. Efficient {MRC} construction with {SHARDS}
US9727308B2 (en) Sorting multiple records of data using ranges of key values
US10445022B1 (en) Optimization of log-structured merge (LSM) tree-based databases using object solid state drive (SSD) devices
CN108304484A (en) Key word matching method and device, electronic equipment and readable storage medium storing program for executing
CN104156321B (en) The method and device of a kind of data pre-fetching
CN106294815B (en) A kind of clustering method and device of URL
CN107533511A (en) The prediction of behaviour is cached using the real time high-speed of imaginary cache
CN108536692A (en) A kind of generation method of executive plan, device and database server
CN112100185B (en) Indexing system and method for block chain data balance load
CN106599040A (en) Layered indexing method and search method for cloud storage
CN112148217B (en) Method, device and medium for caching deduplication metadata of full flash memory system
CN108268969A (en) Regional Economic Development form analysis and Forecasting Methodology and device based on remotely-sensed data
CN103699534A (en) Display method and device for data object in system directory
JPH11154155A (en) File managing method
CN105359142B (en) Hash connecting method and device
CN104834604B (en) A kind of IO addresses are to I/O object quick mapping method and system
CN111126619B (en) Machine learning method and device
CN104778212B (en) Map datum generation method and device, map datum read method and device
CN109241207B (en) Method and device for displaying data on map
CN103995690A (en) Parallel time sequence mining method based on GPU
CN114168697A (en) Tile data publishing method and device
CN111723266A (en) Mass data processing method and device
CN106485915A (en) A kind of information processing method, device and MapReduce platform
CN114020754B (en) Non-hierarchical data structure abstracting method of data cube

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant