1460709623-2be0b2c9-979d-47a3-a78e-5993d86985b9

What is claimed is:

1. A magnetic sensor comprising:
a plurality of rows including a plurality of magnetoresistive elements, in each of the plurality of rows the plurality of magnetoresistive elements are aligned in a direction which intersects at a predetermined angle a passing direction of an object including magnetic patterns to be detected, said plurality of rows of the magnetoresistive elements being staggered in the passing direction of the object to be detected;
wherein each of the magnetoresistive elements includes a magnetic sensitive region, and each of the magnetoresistive elements in one of the rows of elements is aligned so that the magnetic sensitive region overlaps the magnetic sensitive region of the magnetoresistive element in another row in the passing direction of the object to be detected.
2. The magnetic sensor according to claim 1, wherein the plurality of rows of elements include two rows of elements, and the magnetic sensitive region of each of the magnetoresistive elements in one of the two rows of elements overlaps the magnetic sensitive region of each of the magnetoresistive elements in the other of the two rows of elements in the passing direction of the object to be detected.
3. The magnetic sensor according to claim 1, further comprising a housing, wherein the housing is provided with a plurality of accommodating grooves for individually accommodating the plurality of magnetoresistive elements aligned in each of the rows, and each of the individual magnetoresistive elements is accommodated in each of the accommodating grooves.
4. The magnetic sensor according to claim 1, further comprising a housing, wherein the housing is provided with a plurality of common accommodating grooves for accommodating the plurality of magnetoresistive elements aligned in each of the rows, and each of the rows including the plurality of magnetoresistive elements is accommodated in each of the common accommodating grooves.
5. The magnetic sensor according to claim 1, wherein the alignment direction of the magnetoresistive elements intersects the passing direction of the object to be detected perpendicularly.
6. The magnetic sensor according to claim 1, wherein the alignment direction of the magnetoresistive elements intersects the passing direction of the object to be detected substantially perpendicularly.
7. The magnetic sensor according to claim 3, wherein the housing is substantially rectangular and includes a metallic cover disposed thereon.
8. The magnetic sensor according to claim 4, wherein the housing is substantially rectangular and includes a metallic cover disposed thereon.
9. The magnetic sensor according to claim 3, wherein a depth of each of the grooves is larger than the thickness of each of the magnetoresistive elements.
10. The magnetic sensor according to claim 4, wherein a depth of each of the grooves is larger than the thickness of each of the magnetoresistive elements.
11. The magnetic sensor according to claim 3, wherein the housing includes a permanent-magnet-accommodating groove and a permanent magnet accommodated and fixed in the permanent-magnet-accommodating groove.
12. The magnetic sensor according to claim 4, wherein the housing includes a permanent-magnet-accommodating groove and a permanent magnet accommodated and fixed in the permanent-magnet-accommodating groove.
13. The magnetic sensor according to claim 3, wherein the grooves are arranged in a zigzag pattern.
14. The magnetic sensor according to claim 4, wherein the grooves are arranged in a zigzag pattern.
15. The magnetic sensor according to claim 1, wherein each of the magnetic sensitive regions includes a pair of magnetic sensitive portions.
16. The magnetic sensor according to claim 15, wherein the magnetic sensitive portions are arranged to be spaced from each other and facing each other.
17. The magnetic sensor according to claim 15, wherein the magnetic sensitive portions are aligned horizontally and are connected to each other.
18. The magnetic sensor according to claim 1, wherein the object to be detected is a magnetic card.

The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.

1. A method of presenting values of a storage set comprising:
at least one storage region respectively stored at a location in a location set;
a journal configured to store values to be written to the storage set; and
a usage bitmap,

the method performed on a computer having a processor and comprising:
executing on the processor instructions configured to:
upon receiving a read request for a value at a location:
if the usage bitmap indicates that values exist for the location set comprising the location, return the value stored at the location; and
if the usage bitmap indicates that values do not exist for the location set comprising the location, return a default value; and

before evicting at least one value from the journal, store the usage bitmap in the storage set.
2. The method of claim 1 the storage set comprising:
at least two storage regions, and
a usage bitmap array comprising usage bitmaps respectively storing indications of values existing in respective locations of a storage region.
3. The method of claim 1, the instructions configured to, upon receiving an allocation request to generate the storage region, refrain from initializing the storage region.
4. The method of claim 1, at least one location set comprising:
at least two data locations respectively storing a data value, and
at least one parity location respectively storing a parity value of the data values of the data locations.
5. The method of claim 4, the instructions configured to, upon receiving a write request to write at least one data value to respective locations of a location set:
write the data values to the data locations;
calculate a parity value for the location set;
store the parity value at the parity location for the location set; and
update the usage bitmap to indicate values existing at the locations of the location set.
6. The method of claim 5, calculating the parity value comprising:
if the usage bitmap indicates data values existing at locations of the location set:
reading stored data values that are stored at other data locations of the location set, and
calculating the parity value using the stored data values and the data values of the write request; and

if the usage bitmap does not indicate values existing at the location set, calculating the parity value using the data values of the write request and default values for other data locations of the location set.
7. The method of claim 5:
at least one unwritten location of the location set not having a data value specified in the write request; and
the instructions configured to, if the usage bitmap does not indicate values existing at the location set, write default values at respective unwritten locations of the location set.
8. The method of claim 5:
the write request specifying data values for all data locations of the location set; and
calculating the parity value comprising: calculating the parity value using the data values of the write request.
9. The method of claim 1, the instructions configured to, upon receiving a request to discard the values of a location set, update the usage bitmap to indicate that values do not exist at the locations of the location set.
10. The method of claim 1:
respective location sets comprising at least two resilient values; and
the instructions configured to, upon detecting a failure of a location of the location set:
if the usage bitmap indicates that values exist for the location set, using other resilient values of the location set, restore the value at the location set; and
if the usage bitmap indicates that values do not exist for the location set, refrain from restoring the value at the location set.
11. The method of claim 1, storing the usage bitmap comprising:
compressing the usage bitmap to generate a compressed usage bitmap, and
storing the compressed usage bitmap on the storage device.
12. The method of claim 11, compressing the usage bitmap comprising: run-length encoding the usage bitmap.
13. The method of claim 11, storing the usage bitmap comprising:
computing a compression ratio of the compressed usage bitmap;
if the compression ratio is below a compression ratio threshold, store the compressed usage bitmap in the storage set; and
if the compression ratio is not below the compression ratio threshold, store the usage bitmap in the storage set.
14. The method of claim 11:
storing the usage bitmap in the storage set comprising: storing a usage bitmap sequence of at least two usage bitmaps in at least two locations of the storage set; and
the instructions configured to, upon receiving a usage bitmap read request to read the usage bitmap, read a latest usage bitmap in the usage bitmap sequence.
15. The method of claim 14:
respective usage bitmaps stored with a sequence number; and
storing the usage bitmap comprising: storing the usage bitmap with a higher sequence number than the other usage bitmaps stored in the storage set.
16. The method of claim 14:
the storage set comprising a usage bitmap log comprising:
at least two usage bitmap slots, and
a latest usage bitmap pointer;

storing the usage bitmap comprising:
incrementing the latest usage bitmap pointer, and
storing the usage bitmap at the usage bitmap slot indicated by the latest usage bitmap pointer; and

reading the latest usage bitmap comprising: reading the usage bitmap in the usage bitmap slot indicated by the latest usage bitmap pointer.
17. A system for presenting values stored in location sets comprising at least two locations of a storage set, the system comprising:
a usage bitmap generating component configured to, upon receiving an allocation request to generate a storage region in the storage set, generate in the storage set a usage bitmap indicating, for respective location sets of the storage region, whether values exist in the locations of the location set; and
a storage set read component configured to, upon receiving a read request for a value at a location:
if the usage bitmap indicates that values exist for the location set comprising the location, return the value stored at the location; and
if the usage bitmap indicates that values do not exist for the location set comprising the location, return a default value; and

a journal updating component configured to, before evicting at least one value from the journal, store the usage bitmap in the storage set.
18. The system of claim 17, at least one location set comprising:
at least two data locations respectively storing a data value, and
at least one parity location respectively storing a parity value of the data values of the data locations.
19. The system of claim 18, further comprising: a parity value writing component configured to, upon receiving a write request to write at least one data value to respective locations of a location set:
write the data values to the data locations;
calculate a parity value for the location set;
store the parity value at the parity location for the location set; and
update the usage bitmap to indicate values existing at the locations of the location set.
20. A computer-readable storage medium comprising instructions that, when executed on a processor of a computer having access to a storage device, cause the storage device to present values stored in location sets comprising at least two locations of a storage set of a storage region comprising a usage bitmap and a usage bitmap log comprising slots and a latest usage bitmap pointer by:
upon receiving a read request for a value at a location:
if the usage bitmap indicates that values exist for the location set comprising the location, returning the value stored at the location;
if the usage bitmap indicates that values do not exist for the location set comprising the location, return a default value;

upon receiving the allocation request to generate the storage region, refrain from initializing the storage region;
upon receiving a write request to write at least one data value to respective locations of a location set:
writing the data values to the data locations by:
if the data locations include at least one unwritten location of the location set not having a data value specified in the write request;
\u2003writing default values at respective unwritten locations of the location set;
calculating a parity value for the location set by:
if the write request specifying data values for all data locations of the location set, calculating the parity value using the data values of the write request;
if the usage bitmap indicates data values existing at the location set:
reading stored data values that are stored at other data locations of the location set, and
calculating the parity value using the stored data values and the data values of the write request; and

if the usage bitmap does not indicate values existing at the location set, calculating the parity value using the data values of the write request and default values for other data locations of the location set;

storing the parity value at the parity location for the location set; and
updating the usage bitmap to indicate values existing at the locations of the location set;

upon receiving a request to discard the values of a location set, update the usage bitmap to indicate that values do not exist at the locations of the location set;
upon detecting a failure of a location of the location set comprising resilient values:
if the usage bitmap indicates that values exist for the location set, using other resilient values of the location set, restore the value at the location set; and
if the usage bitmap indicates that values do not exist for the location set, refraining from restoring the value at the location set;

store the usage bitmap in the storage set by:
compressing the usage bitmap using a run-length encoding algorithm to generate a compressed usage bitmap;
computing a compression ratio of the compressed usage bitmap;
incrementing the latest usage bitmap pointer, and
storing the usage bitmap at the usage bitmap slot indicated by
if the compression ratio is below a compression ratio threshold, storing the compressed usage bitmap in the storage set;
if the compression ratio is not below the compression ratio threshold, storing the usage bitmap in the storage set;

upon receiving a usage bitmap read request to read the usage bitmap, reading the latest usage bitmap comprising: reading the usage bitmap in the usage bitmap slot indicated by the latest usage bitmap pointer.