Final Exam. May 8, 2001. Question 5

You are given the following type definition:
typedef struct {
  int block_number;
  char *buf;
  int readwrite;
  kt_sem sem;
} DT_struct;
You are writing the I/O portion of your subsystem. You are to implement two subroutines: And you have access to the following subroutine: Implement the two subroutines using any one of the disk scheduling algorithms from the book with the exeception of FIFO scheduling.

State which algorithm you implemented and what its drawbacks are, if there are any.

You may assume that your thread system uses Kthreads, and is not preemptive. You may use any global variables that you want.