Stage 18
We used loadi statement to load a disk block from a memory page. When the loadi statement is used for loading, machine will wait till the transfer is complete.
The LOAD instruction takes two arguments, a page number and a block number. The Disk Interrupt is the hardware mechanism to detect the completion of data transfer.
To initiate the disk transfer using load statement, first the process has to acquire the disk . This ensures that no other process uses the disk while process is loading the block to the memory page. eXpOS maintains a data structure called DISK STATUS TABLE. The Disk Status Table LOAD/STORE bit indicates whether the disk is in load or store operation.

When the load/store transfer is complete, the XSM machine raises the hardware interrupt called the disk interrupt. The interrupt releases the disk and changes the state of all the process from WAIT_DISK to READY.

We have to modify the exec system call by replacing the loadi with load statement.
Note - Readi is a polling based terminal operation that only works with debug statements