Browse Prior Art Database

A Fast Algorithm for Calculating Offsets During CKD-Emulation

IP.com Disclosure Number: IPCOM000119454D
Original Publication Date: 1991-Jan-01
Included in the Prior Art Database: 2005-Apr-01
Document File: 1 page(s) / 55K

Publishing Venue

IBM

Related People

Menon, MJ: AUTHOR

Abstract

Disclosed is a fast algorithm for calculating offsets in a way which is commonly needed in control units that do CKD-Emulation. CKD-Emulation is typically executed in a disk control unit, and makes Fixed-Block Architecture (FBA) disks look like Count-Key-Data (CKD) disks to the host operating system.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 60% of the total text.

A Fast Algorithm for Calculating Offsets During CKD-Emulation

      Disclosed is a fast algorithm for calculating offsets in a way
which is commonly needed in control units that do CKD-Emulation.
CKD-Emulation is typically executed in a disk control unit, and makes
Fixed-Block Architecture (FBA) disks look like Count-Key-Data (CKD)
disks to the host operating system.

      CKD-Emulation requires each disk block to be prefixed with
control information; 2 bytes of control + 4094 bytes of data in a
4096 byte disk block is typical and will be assumed for exposition in
this paper.  A very common operation during CKD-Emulation is to
increment a pointer to a data byte in a 4096 byte block by some
offset.  The new pointer which is the result of the increment must
also point to a data byte in the same or a subsequent 4096 byte block
(intervening control bytes are skipped).  For example, if the current
pointer is 4096 (last data byte in first block), and the offset is 1,
the result of the update is that the new pointer is 4099 (first data
byte or third byte in second disk block).  4097 and 4098 which are
control bytes must be skipped over in the update process.  It is easy
to show that the exact solution for the value of the new pointer (NP)
following increment by Offset (OFF) is:
       NP = 4096 * (OFF DIV 4094) + (OFF REM 4094) + 2

      DIV stands for integer division and REM is the remainder from
integer division.  The assumption is that the pointer ori...