EP0488501A2

Scheduling input/output operations in multitasking systems.

Abstract

In a multitasking data processing system, I/O requests to a disk drive are staged in holding queues from which they are transferred to a service queue. Requests in the latter queue are directly serviced on a FIFO basis by a device driver module running on the system. The system maintains a set of holding queues and an associated service queue separately for each physical drive in the system (hard file, floppy drive, etc.). Holding queues in each set are prioritised in accordance with base priorities of tasks, and I/O requests to disk drives are entered into associated holding queues having priorities corresponding to those of task threads for which such requests are originated. Prioritisation of the holding queues, and a starvation advancement process performed to advance "oldest" enqueued requests to higher priority holding queues, causes the requests to be presented to the disk drive in a sequence based in part on respective task priorities and in part on "fairness" servicing of "service starved" requests. A selection operation in respect to certain transfers from the holding queues to the service queues orders selection of transferred requests on the basis of relative proximity of disk addresses in the queued requests to current positions of the read/write head assembly in the associated disk drive. Foregoing operations serve to improve processing throughput of all tasks. A service kernel of the operating system, which maintains the holding queues, places each newly issued disk I/O request in a selected holding queue associated with a designated disk drive. The selected queue is one having a priority associated with the base priority of the task thread for which the request was issued. A request issued for a foreground task may be placed in a higher priority holding queue than requests of like priority issued for other tasks. When entering a new request into a holding queue, the kernel performs a "starvation" check relative to selected holding queues. If a starvation condition is detected, the kernel performs the above-mentioned starvation advancement operation to transfer requests in the affected queue to a higher priority queue.

EP0488501A2, drawing sheet 1
Sheet 1 of 7

Term

Term ended

Projected expiry passed 9 September 2011, 15 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

15 claims: 13 independent, 2 dependent

  1. 1
    A data processing system comprising a CPU, memory and disk storage subsystems, and means for scheduling I/O operations of said disk storage subsystem in accordance with I/O requests issued relative to tasks being processed by said CPU, characterised in that there are provided means to register    a set of queues associated uniquely with a single disk drive in said storage subsystem, said queues serving to store I/O requests designating I/O operations to be performed by said associated disk drive;said set of queues comprising a service queue and at least one holding queue;device driver means coupled to said service queue for servicing requests stored in said service queue on a FIFO basis and responsive to each serviced request for dispatching an I/O operation designated by the request to be performed by said associated disk drive;means coupled to said holding queue or queues for receiving I/O requests newly issued relative to said processed tasks, and for storing said requests in said holding queue or queues in a sorted positional sequence in which said requests are positionally ordered in association with priority classes of tasks relative to which they are issued;and    transfer means coupled to said holding queue or queues and said service queue for selectively transferring requests from said holding queue or queues to said service queue in an order based at least in part on the task ordering of said requests in said holding queue or queues, whereby requests associated with tasks having a given priority class are transferred to said service queue before requests associated with tasks having a priority class lower than said given priority class.
  2. 2
    A system in accordance with claim 1, wherein:said device driver means includes means for detecting when said service queue is empty and means for providing an empty indication associated with that condition;and    said transfer means includes means for detecting when a holding queue is not empty, and means responsive to said service queue empty indication when said holding queue is not empty for transferring at least one request from said holding queue to said service queue in said task priority based order.
  3. 3
    A system in accordance with claim 2, wherein said processed tasks have at least a first priority class and at least a second priority class representing a lower priority class than said first priority class; and there are holding queues including:a highest priority holding queue;at least one first priority holding queue;and    at least one second priority holding queue;and wherein:    said means for storing said received requests is adapted to store requests associated with tasks having said first and second priority classes respectively in said first priority holding queue or queues and said second priority holding queue or queues;and wherein:    said transfer means is responsive to each said service queue empty indication to transfer a request from said highest priority holding queue to said service queue if the highest priority holding queue is not empty, or to transfer a request from a first priority holding queue to the service queue if the highest priority queue is empty and the first priority queue is not empty, or to transfer a request from a second priority holding queue to the service queue if the highest priority and first priority queues are empty and the second priority queue is not empty.
  4. 4
    A system in accordance with claim 3, further including starvation processing means for detecting service starvation conditions in said second and first holding queues, said conditions occurring when a request has been held in the respective holding queue for more than a predetermined time and for transferring requests from the queue in which said condition is detected to a selected higher priority queue.
  5. 5
    A system in accordance with claim 2, wherein the priority classes of said processed tasks comprise at least first and second groups of time critical priority classes and at least first and second groups of regular priority class, said classes having the following relative priority ranking in descending order of priority:first time critical;second time critical;first regular;second regular;and wherein the holding queues comprise a highest priority holding queue, first and second time critical priority holding queues and first and second regular priority holding queues having the following relative priority rankings for service in descending order:    highest priority,    first time critical priority,    second time critical priority,    first regular priority,    second regular priority;and wherein said means for storing said received requests in said at least one holding queues is adapted to store said requests in accordance with the following schedule:    store requests associated with foreground tasks having priority classifications in either said first time critical or second time critical class groups in said first time critical holding queue;store requests associated with foreground tasks having priority classifications in either said first regular or second regular class groups in said first regular holding queue;and    store requests associated with non-foreground tasks having priority classifications in said first time critical, second time critical, first regular and second regular class groups respectively in said first time critical, second time critical, first regular and second regular holding queues;and wherein said transfer means is responsive to each said service queue empty indication to transfer a request from the highest priority non-empty holding queue to said service queue when at least one of said holding queues is not empty.
  6. 6
    A system in accordance with claim 5, wherein each of said time critical and regular holding queues is constructed as a double linked list queue.
  7. 7
    A system in accordance with claim 6, wherein:each of said requests contains RBA information denoting a relative block storage address in said associated disk drive relative to which an I/O operation is to be performed;said means for storing said received requests in said holding queues is operative when entering requests into said time critical and regular holding queues to position the entered request relative to other requests in the queue so as to maintain the RBA values of all the requests in the queue positionally ordered in a progressively ascending numerical sequence relative to one end of the respective queue;said device driver indicating means provides an RBA indication with said service queue empty indication, said RBA indication indicating the RBA value of the request last removed from said service queue and also indirectly indicating the current position of the read/write (R/W) head assembly in said associated disk drive;and    said means for transferring requests from said holding queues to said service queue is operative when removing a request for that purpose from any of said time critical or regular holding queues to select the request so removed from one or the other end of the respective queue, the selected request being chosen on the basis of a proximity calculation determination such that the request selected is the one having an RBA value closest to the current position of said R/W head assembly in said associated disk drive as indicated by said indication of said RBA value of the request last removed from said service queue.
  8. 8
    A data processing system comprising a CPU, memory and disk storage subsystems, and means for scheduling I/O operations of said disk storage subsystem in accordance with I/O requests issued relative to tasks being processed by said CPU, characterised in that there are provided means to register:a set of queues associated uniquely with a single disk drive in said storage subsystem, said queues serving to store I/O requests designating I/O operations to be performed by said associated disk drive;said set of queues comprising a single linked list service queue and plural double linked list holding queues having predetermined relative priorities for service, said holding queues including a plurality of queues having service priorities associated with priorities of tasks processed by said system and a FIFO holding queue having a service priority which is not associated with any task priority and is higher than the service priorities of the other holding queues;device driver means coupled to said service queue for servicing requests stored in said service queue on a FIFO basis and responsive to each serviced request for dispatching an I/O operation designated by the request to be performed by said associated disk drive;means coupled to said holding queues for receiving I/O requests newly issued relative to said processed tasks, each request containing a priority class indication of an associated task and an RBA (relative block address) value denoting a storage position on said disk drive relative to which a respective I/O operation is to be performed;means cooperative with said holding queue request receiving means for entering each said received request into a selected position in a holding queue other than said FIFO holding queue having a service priority corresponding to the task priority indicated in the respectively received request, said selected position being chosen as a function of RBA information in the respective received request and RBA information in requests presently held in the respective holding queue so as to maintain the requests in the respective queue positionally ordered with their RBA's forming a progressively increasing value sequence relative to one end of the respective holding queue;means coupled to said holding queues and said service queue, and responsive to an indication from the device driver that the service queue is presently empty, for selectively transferring one or more requests from a highest priority non-empty one of said holding queues to said service queue;said last mentioned means transferring all requests from said FIFO holding queue to said service queue if the FIFO holding queue is not empty, and otherwise transferring a single request from a next highest priority non-empty holding queue if the FIFO holding queue is empty and another holding queue is not empty;said single request so transferred being selected from either the head or tail end of the respective next highest priority non-empty holding queue on the basis of a proximity determination made by said transferring means;said proximity determination being based on a comparison of the RBA values in the requests at the head and tail ends of the respective next highest priority non-empty holding queue with the RBA value of the request last served by said device driver;and    starvation boosting means coupled to the means for entering said received requests for determining if a service starvation condition exists in either the holding queue into which said request is being entered or a lower priority holding queue, and for transferring all requests from the queue having said starvation condition to a selected higher priority holding queue;said selected higher priority queue being either the next highest priority empty one of said holding queues having priority less than said FIFO holding queue or being said FIFO holding queue if all holding queues of intermediate priority are not empty;said transferred requests when transferred to said FIFO holding queue being concatenated to the tail end of said queue if said FIFO holding queue is not empty when the transfer is made.
  9. 9
    A method of scheduling the handling of I/O requests relative to a disk drive in a multitasking data processing system comprising:entering said requests into a plurality of priority ordered holding queues associated with said disk drive;said holding queues having priorities for dequeueing service associated with classes of priority assignable to tasks processed by said system;said requests having indications of priority classes of related tasks and being entered into holding queues with associated priority;and    transferring requests from said holding queues to a service queue associated with said disk drive, in the priority order of said holding queues;and    dispatching requests from said service queue to said drive.
  10. 10
    A method in accordance with claim 9 including:intermittently performing a starvation check process relative to one or more of said holding queues;and    upon detecting a service starved condition in a checked holding queue, transferring all requests from said checked queue to a higher priority holding queue.
  11. 11
    A method in accordance with claim 9 including:favouring the handling of requests associated with foreground tasks over requests associated with non-foreground tasks of equal priority class by entering the requests associated with foreground tasks into higher priority said holding queues.
  12. 12
    A method in accordance with claim 10 including:organising said holding queues as double linked lists;arranging requests entered into said holding queues in a sorted sequence wherein RBA (relative block address) contained in said requests and designating storage locations on said disk drive are progressively ordered in an ascending sequence in each said holding queue;and    when transferring a request from one of said holding queues to said service queue, selecting a request from either the head end or tail end of the respective holding queue on the basis of the relative proximity of the RBA location designated by the selected request to the present RBA location of the read/write head of the disk drive.
  13. 13
    A method in accordance with claim 12 wherein:the present location of said read/write head is inferred from the RBA of a request last dispatched from said service queue.