java.lang.Object | +----Disk
You may not change this class.
This disk is slow and ornery. It contains a number of blocks, all BLOCK_SIZE bytes long. All operations occur on individual blocks. You can't modify any more or any less data at a time.
To read or write from the disk, call beginRead() or beginWrite(). Both of these functions will start the action and return immediately. When the action has been completed, a call to Kernel.interrupt() will occur to let you know the Disk is ready for more.
It may take a while for the disk to seek from one block to another. Seek time is proportional to the difference in block number.
Warning: Don't call beginRead() or beginWrite() while the disk is busy! If you don't treat the Disk gently, the system will crash! (Just like a real machine!)
public static final int BLOCK_SIZE
public Disk(int b)
public int getSize()
public synchronized void beginRead(int b, byte d[])
public synchronized void beginWrite(int b, byte d[])
public void run()