System and method for buffering data
First Claim
1. A method of buffering data in a system having a memory, organized into sectors, with a plurality of files of data stored therein, a processor connected to said memory, a buffer having a plurality of buffer storage locations organized in a chain, said buffer connected to said processor, and a plurality of counters wherein each said counter corresponds to one of said buffer storage locations, said method comprising:
- (a) selecting a said sector of said memory containing desired data associated with an open one of said files;
(b) scanning the buffer storage locations to determine whether said desired data is in said buffer;
(c) keeping track of a selected buffer storage location that is not allocated to a file;
(d) when the desired data is not found within a buffer storage location, reading the desired data from said selected sector of said memory into said selected unallocated buffer storage location;
(e) considering said buffer storage location into which data of said selected sector was just stored as a matching buffer storage location for said open file;
(f) pointing said processor to said matching buffer storage location; and
(g) retrieving said selected data from said matching buffer storage location for processing by said processor.
2 Assignments
0 Petitions
Accused Products
Abstract
A system for buffering data has a processor connected to a memory for storing mass data, connected to a single buffer having a plurality of buffer storage locations in a chain, and connected to a plurality of counters, wherein each counter corresponds to one of the buffer storage locations. The processor selects a sector of memory containing desired data associated with an open file, scans the buffer storage locations to determine whether the data is in the buffer and, when the data is not within the buffer, reads the data from the selected sector of memory into a selected buffer storage location that is unallocated to an open file. The processor then points to that allocated buffer storage location, so that the data can be retrieved from the buffer for processing. As additional data is desired that is not found in the buffer, the buffer storage location allocated to the open file is de-allocated and, if not allocated to any other open files, moved to the beginning of the chain of buffers. The sector of data containing the desired data is then read into a selected buffer that is not allocated to an open file, preferably the last unallocated buffer in the chain of buffers. In accordance with the present invention, a buffer storage location can be allocated to multiple open files. De-allocation of a buffer storage location from an open file will not cause the buffer storage location to be moved to the beginning of the chain when the buffer storage location is allocated to one or more other open files. When data within a buffer storage location has been modified, prior to de-allocation of that buffer storage location with respect to an open file, the processor writes the data, including the modifications, back to the associated sector in mass memory. In one embodiment, the system of the present invention is incorporated in a portable electronic device including a keyboard and a display, and a housing for housing the keyboard, display, processor, buffer, and memory. In a preferred embodiment, the portable electronic device is a navigation aid and selected data is map data.
-
Citations
19 Claims
-
1. A method of buffering data in a system having a memory, organized into sectors, with a plurality of files of data stored therein, a processor connected to said memory, a buffer having a plurality of buffer storage locations organized in a chain, said buffer connected to said processor, and a plurality of counters wherein each said counter corresponds to one of said buffer storage locations, said method comprising:
-
(a) selecting a said sector of said memory containing desired data associated with an open one of said files; (b) scanning the buffer storage locations to determine whether said desired data is in said buffer; (c) keeping track of a selected buffer storage location that is not allocated to a file; (d) when the desired data is not found within a buffer storage location, reading the desired data from said selected sector of said memory into said selected unallocated buffer storage location; (e) considering said buffer storage location into which data of said selected sector was just stored as a matching buffer storage location for said open file; (f) pointing said processor to said matching buffer storage location; and (g) retrieving said selected data from said matching buffer storage location for processing by said processor. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A system for buffering data associated with a plurality of files, said system comprising:
-
a mass data storage unit for storing said data, said mass data storage unit organized into a plurality of sectors; a single buffer having a plurality of buffer storage locations organized in a chain; a plurality of counters, each said counter corresponding to one of said buffer storage locations; a processor, having a pointer, said processor connected to said mass data storage unit, said buffer, and said counters, wherein said processor (a) selects a said sector of said mass data storage unit containing desired data associated with an open one of said files, (b) scans said buffer storage locations to determine whether said desired data is in said buffer, (c) reads said desired data from said selected sector of said mass data storage unit into a selected buffer storage location when said processor determines, as a result of scanning, that said desired data is not within said buffer and, (d) allocates said selected buffer storage location to said open file. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
-
Specification