// a. The current implementation only works on one (local) disk at a // time, as specified by MAJOR (0x74 for IDE and 0xd for SCSI) and // UNIT (0, 1, 2, .. depending on drive number). If unsure of this, // chdir to the experimental disk and do "df .". /dev/ad0xxx // corresponds to (0x74,0) and /dev/da3xxx to (0xd,3). /* scheduler works only for one disk at a time, specified here: */ #define MAJOR 0x74 /* IDE:ad:0x74, SCSI:da:0xd */ #define UNIT 0x0 /* 0, 1, .. for ad0/da0, ad1/da1 */ // b. Set the scheduling policy to one of: // * SPTF - shortest positioning-time first. has potential starvation. // * SPTF and ASPTF_BOUND=1000 - Aged-SPTF, which forces SPTF to // switch to a request from some other process after 1000ms. // * CLOOK - same as CSCAN (i.e. bidirectional Elevator) // // * STRIDE - pure (simplified) proportional-share scheduler // * STRIDE and SPTF and ASPTF_BOUND=1000 - proportional scheduler // combined with seek reducing component. // * LOTTERY - a simplified lottery scheduler // // Default scheduling policy is Aged-SPTF, you can start with that. // // NOTE: some scheduling policies like Aged-SPTF and Stride are // rather simplified, but are sufficient to make the desired point. // // If using Stride, there's a PROP_RELAX_THRESH in milliseconds // that specifies the slack period granted for seek reduction. // // Also, the number of resource principals for proportional // schedulers is hardcoded here, and the proportions themselves are // fixed at 1:2:3:..:NRC. NRC *needs* to be correct; set it well. /* Which seek reducing scheduler? */ #define SPTF #define ASPTF_BOUND 1000 // define this bound (in ms) along with SPTF /* #define CLOOK */ /* #define SSTF */ /* or which proportional scheduler? */ /* #define STRIDE */ /* #define YFQ */ /* #define LOTTERY */ #define PROP_RELAX_THRESH 100 // relaxed scheduler for seek reduction (ms) #define NRC 2 // number of resource containers, and their shares, hardcoded // c. define NWCS to enable anticipatory scheduling; comment out to // disable. Default is enabled. /* choose: original scheduler or non work conserving? */ #define NWCS // d. Choose between i8254 PIT and on-chip APIC. PIT should work fine. /* which timer facility? */ #define PIT /* #define APIC */ /* (skip) */ /* cause the full NWCS overhead, but always schedule immediately */ /* #define noNWCS */ /* cause only the timer overhead */ /* #define onlyTIMER */ /* #define DEBUG */ /* #define DI_CAM_DEBUG */ /* application-aware blockedness reporting */ /* #define APP_NOTIFYBLOCKED */ #define DECAY decay10 #define BUCKETDECAY 90 #define MAXTIME 15000 // us #define TIMEGRAIN 500 // us #define FROM 5 // sec -- measurement.start #define TO 25 // sec -- measurement.end