# US 11,442,659 B2 · Reading sequentially stored files based on read ahead groups

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,442,659 B2
- Document ID: US11442659B2
- Status: Granted
- Kind: B2
- Application number: 16/689,127
- Filed: 2019-11-20
- Published: 2021-05-20
- Granted: 2022-09-13
- Earliest claimed: 2019-11-20
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Tsuyoshi Miyamura; Hiroshi Itagaki; Shinsuke Mitsuma; Tohru Hasegawa; Noriko Yamamoto; Sosuke Matsui
- Web page: https://patentgrep.com/patent/US11442659B2

## CPC

- G06F 3/061: {Improving I/O performance}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0611: {in relation to response time}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0682: {Tape device}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A plurality of files are stored on magnetic tape having at least one wrap for storing data sets. Each data set includes one or more records. A number of data sets that will remain in a buffer memory after performing a read ahead operation is determined. A number of records that are likely to remain in the buffer memory after performing a read ahead operation is determined. For each record likely to remain in the buffer memory after performing a read ahead operation, positions of the records on the magnetic tape are determined. Each file of the plurality of files are classified into one group of a plurality of groups based on a position of a record corresponding with each respective file and the number of records that are likely to remain in the buffer memory after performing a read ahead operation.

## Claims

### Claim 1

A method for reading a plurality of files stored on a magnetic tape having at least one wrap for storing one or more data sets, each data set including one or more records, comprising:
determining a number of data sets that will remain in a buffer memory after performing a read ahead operation;
determining a number of records that are likely to remain in the buffer memory after performing a read ahead operation;
for each record likely to remain in the buffer memory after performing a read ahead operation, determining positions of the records on the magnetic tape; and
classifying each file of the plurality of files into one group of a plurality of groups based on a position of a record corresponding with each respective file and the number of records that are likely to remain in the buffer memory after performing a read ahead operation.

### Claim 2 (depends on 1)

The method of claim 1, wherein the determining a number of records that are likely to remain in the buffer memory after performing a read ahead operation further comprises:
calculating an average of the number of records per data set for a plurality of data sets;
selecting a minimum average number of records per data set, wherein the minimum average number is a minimum of the average of the number of records per data set for the plurality of data sets; and
multiplying the minimum average number of records per data set by the number of data sets determined to remain in the buffer memory after performing a read ahead operation by the determined number of data sets that will remain in a buffer memory after performing a read ahead operation.

### Claim 3 (depends on 1)

The method of claim 1, wherein the classifying each file of the plurality of files into one group of a plurality of groups based on a position of a record corresponding with each respective file and the number of records that are likely to remain in the buffer memory after performing a read ahead operation further comprises:
for each record likely to remain in the buffer memory after performing a read ahead operation, determining the positions of the records on the magnetic tape:
obtaining a quotient by dividing the determined record position of the file by the determined number of records that are likely to remain in the buffer memory after performing a read ahead operation; and
classifying the file into a group based on the quotient.

### Claim 4 (depends on 1)

The method of claim 1, storing a plurality of data sets in the buffer memory during a read ahead operation.

### Claim 5 (depends on 1)

The method of claim 1, storing a plurality of data sets in the buffer memory during a read ahead operation.

### Claim 6 (depends on 1)

The method of claim 1, wherein the method further comprises:
performing, subsequent to the classifying each file of the plurality of files into one group of a plurality of groups, a locate operation to reposition a head of a tape drive to a position where a first group to which a first file of the plurality of files is assigned and reading out records of a number of records of the first group; and
moving, subsequent to the performing of the locate operation, the head of the tape drive on the tape to read records of a number of records to be read ahead for storage in the buffer memory.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
obtaining a number of divisions per wrap from a tape directory.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
reading out one or more files included in the first group in an arbitrary order.

### Claim 9

A tape library system capable of reading a plurality of files stored on a magnetic tape having at least one wrap for storing one or more data sets, each data set including one or more records, the tape library system comprising:
a tape drive;
a buffer memory associated with the tape drive; and
a processing device for executing program instructions stored in memory, wherein the processing device performs operations to perform a method comp S determining a number of data sets that will remain in a buffer memory after performing a read ahead operation;
determining a number of records that are likely to remain in the buffer memory after performing a read ahead operation;
for each record likely to remain in the buffer memory after performing a read ahead operation, determining positions of the records on the magnetic tape; and
classifying each file of the plurality of files into one group of a plurality of groups based on a position of a record corresponding with each respective file and the number of records that are likely to remain in the buffer memory after performing a read ahead operation.

### Claim 10 (depends on 9)

The tape library system of claim 9, wherein the determining a number of records that are likely to remain in the buffer memory after performing a read ahead operation further comprises:
calculating an average of the number of records per data set for a plurality of data sets;
selecting a minimum average number of records per data set, wherein the minimum average number is a minimum of the average of the number of records per data set for the plurality of data sets; and
multiplying the minimum average number of records per data set by the number of data sets determined to remain in the buffer memory after performing a read ahead operation by the determined number of data sets that will remain in a buffer memory after performing a read ahead operation.

### Claim 11 (depends on 9)

The tape library system of claim 9, wherein the classifying each file of the plurality of files into one group of a plurality of groups based on a position of a record corresponding with each respective file and the number of records that are likely to remain in the buffer memory after performing a read ahead operation further comprises:
for each record likely to remain in the buffer memory after performing a read ahead operation, determining the positions of the records on the magnetic tape:
obtaining a quotient by dividing the determined record position of the file by the determined number of records that are likely to remain in the buffer memory after performing a read ahead operation; and
classifying the file into a group based on the quotient.

### Claim 12 (depends on 9)

The tape library system of claim 9, storing a plurality of data sets in the buffer memory during a read ahead operation.

### Claim 13 (depends on 9)

The tape library system of claim 9, storing a plurality of data sets in the buffer memory during a read ahead operation.

### Claim 14

A computer program product for reading a plurality of files stored on a magnetic tape having at least one wrap for storing one or more data sets, each data set including one or more records, the computer program product comprising one or more non-transitory computer readable storage media, and program instructions collectively stored on the one or more non-transitory computer readable storage media, the program instructions executable by processing logic in a tape library to cause a processor to perform a method, comprising:
determining a number of data sets that will remain in a buffer memory after performing a read ahead operation;
determining a number of records that are likely to remain in the buffer memory after performing a read ahead operation;
for each record likely to remain in the buffer memory after performing a read ahead operation,
determining positions of the records on the magnetic tape; and
classifying each file of the plurality of files into one group of a plurality of groups based on a position of a record corresponding with each respective file and the number of records that are likely to remain in the buffer memory after performing a read ahead operation.

### Claim 15 (depends on 14)

The computer program product of claim 14, wherein the determining a number of records that are likely to remain in the buffer memory after performing a read ahead operation further comprises:
calculating an average of the number of records per data set for a plurality of data sets;
selecting a minimum average number of records per data set, wherein the minimum average number is a minimum of the average of the number of records per data set for the plurality of data sets; and
multiplying the minimum average number of records per data set by the number of data sets determined to remain in the buffer memory after performing a read ahead operation by the determined number of data sets that will remain in a buffer memory after performing a read ahead operation.

### Claim 16 (depends on 14)

The computer program product of claim 14, wherein the classifying each file of the plurality of files into one group of a plurality of groups based on a position of a record corresponding with each respective file and the number of records that are likely to remain in the buffer memory after performing a read ahead operation further comprises:
for each record likely to remain in the buffer memory after performing a read ahead operation, determining the positions of the records on the magnetic tape:
obtaining a quotient by dividing the determined record position of the file by the determined number of records that are likely to remain in the buffer memory after performing a read ahead operation; and
classifying the file into a group based on the quotient.

### Claim 17 (depends on 14)

The computer program product of claim 14, storing a plurality of data sets in the buffer memory during a read ahead operation.

### Claim 18 (depends on 14)

The computer program product of claim 14, storing a plurality of data sets in the buffer memory during a read ahead operation.

### Claim 19 (depends on 14)

The computer program product of claim 14, wherein the method further comprises:
performing, subsequent to the classifying each file of the plurality of files into one group of a plurality of groups, a locate operation to reposition a head of a tape drive to a position where a first group to which a first file of the plurality of files is assigned and reading out records of a number of records of the first group; and
moving, subsequent to the performing of the locate operation, the head of the tape drive on the tape to read records of a number of records to be read ahead for storage in the buffer memory.

### Claim 20 (depends on 19)

The computer program product of claim 19, further comprising:
reading out one or more files included in the first group in an arbitrary order.
