[613] | 1 | XUINTSK2 ;SFISC/RWF - Reschedule tasks in IO, JOB, LINK queues. ;11/18/94 08:00
|
---|
| 2 | ;;8.0;KERNEL;;Jul 10, 1995
|
---|
| 3 | ;
|
---|
| 4 | A L +^%ZTSCH
|
---|
| 5 | D IOQ,JOB,C
|
---|
| 6 | L -^%ZTSCH
|
---|
| 7 | Q
|
---|
| 8 | ;
|
---|
| 9 | IOQ ;Check the IO queue
|
---|
| 10 | S ZTSK="",%ZTIO="" I '$D(^%ZTSCH("IO")) Q
|
---|
| 11 | D I2
|
---|
| 12 | Q
|
---|
| 13 | ;
|
---|
| 14 | I2 S %ZTIO=$O(^%ZTSCH("IO",%ZTIO)),ZTDTH="0,0" I %ZTIO="" Q
|
---|
| 15 | I3 S ZTDTH=$O(^%ZTSCH("IO",%ZTIO,ZTDTH)),ZTSK="" I ZTDTH'["," G I2
|
---|
| 16 | I5 S ZTSK=$O(^%ZTSCH("IO",%ZTIO,ZTDTH,ZTSK)) I ZTSK="" G I3
|
---|
| 17 | L +^%ZTSK(ZTSK) G I7:$D(^%ZTSCH("IO",%ZTIO,ZTDTH,ZTSK))[0
|
---|
| 18 | S ZTQUEUED=.5 D DQ^%ZTM4
|
---|
| 19 | S ^%ZTSCH(ZTDTH,ZTSK)="",^%ZTSK(ZTSK,.1)="1^"_$H
|
---|
| 20 | I7 L -^%ZTSK(ZTSK) G I5
|
---|
| 21 | Q
|
---|
| 22 | ;
|
---|
| 23 | C ;GETTASK--On C type volume sets, get tasks from Cross-Volume Job List
|
---|
| 24 | S ZTCPU=""
|
---|
| 25 | F S ZTCPU=$O(^%ZTSCH("C",ZTCPU)) Q:ZTCPU="" D C3
|
---|
| 26 | Q
|
---|
| 27 | C3 S ZTSK="",ZTDTH="0,0"
|
---|
| 28 | F S ZTDTH=$O(^%ZTSCH("C",ZTCPU,ZTDTH)) Q:ZTDTH'["," D
|
---|
| 29 | . S ZTSK=0
|
---|
| 30 | . F S ZTSK=$O(^%ZTSCH("C",ZTCPU,ZTDTH,ZTSK)) Q:ZTSK="" D
|
---|
| 31 | .. K ^%ZTSCH("C",ZTCPU,ZTDTH,ZTSK)
|
---|
| 32 | .. I $D(^%ZTSK(ZTSK,0))[0!'ZTSK Q
|
---|
| 33 | .. S ^%ZTSCH(ZTDTH,ZTSK)=""
|
---|
| 34 | .. Q
|
---|
| 35 | . Q
|
---|
| 36 | Q
|
---|
| 37 | ;
|
---|
| 38 | JOB ;GETTASK--search Partition Waiting List
|
---|
| 39 | S ZTSK="",ZTDTH="0,0"
|
---|
| 40 | J2 S ZTDTH=$O(^%ZTSCH("JOB",ZTDTH)),ZTSK="" I ZTDTH'["," Q
|
---|
| 41 | J3 S ZTSK=$O(^%ZTSCH("JOB",ZTDTH,ZTSK)) I ZTSK="" G J2
|
---|
| 42 | L +^%ZTSK(ZTSK) I $D(^%ZTSCH("JOB",ZTDTH,ZTSK))[0 G J7
|
---|
| 43 | I $D(^%ZTSK(ZTSK,0))[0!'ZTSK G J7
|
---|
| 44 | S ZTQUEUED=.5 K ^%ZTSCH("JOB",ZTDTH,ZTSK)
|
---|
| 45 | S ^%ZTSCH(ZTDTH,ZTSK)=""
|
---|
| 46 | J7 L -^%ZTSK(ZTSK) G J3
|
---|
| 47 | ;
|
---|