SPC4.MAC/-BF=SHUFL.VGN \ -1,3,/;JMM001/ .TITLE SPC - Unconditional Core Shuffler .IDENT /5.08/ ; ;****************************************************************************** ; ; This software is provided on an "as is" basis only. Caterpillar Tractor Co., ; disclaims all warranties on the program, including without limitation, all ; implied warranties of merchantablity and fitness. ; ; Full permission and consent is hereby given to DECUS and to the DECUS ; special interest groups to reproduce, distribute, and publish and permit ; others to reproduce in whole or in part, in any form and without restriction ; this program and any information relating thereto ; ;****************************************************************************** ; ; ; Note: This is a modified version of the Core Shuffler Program ; distributed on the unpatched, RSX11M V4.0 distribution kit. ; No new code is added but various checks that are made to see ; if shuffling should continue, are commented out. This in ; effect will cause all of the shuffleable tasks in system ; controlled partitions, to shuffle down to the start of that ; partition as well as cause any stopped or blocked tasks to ; checkpoint. ; ; The primary use of this task is in conjunction with the COR ; program. If SPC is installed as ...SPC, COR will spawn MCR ; to execute SPC if a task happens to be sitting at the top ; of the partition in which COR is trying to obtain space. ; This program can also be used to help alleviate pool problems. ; If for example the pool has a enough space but is fragmented, ; forcing as many tasks to checkpoint as possible, will free up ; the pool used for their headers and then as they come back into ; memory, the headers will probably arrange themselves more ; efficiently. ; ;**************************************************************************** % -146,152,/;JMM001/ ; BEQ 10$ ;IF EQ THERE IS NONE - LOOK AT NEXT PARTITION ; BIT #TS.STP,T.STAT(R0) ;TASK EXTERNALLY BLOCKED? ;MSH122 ; BNE 15$ ;IF NE YES, NOT ELIGIBLE FOR MEMORY ;MSH122 ; BIT #T2.STP,T.ST2(R0) ;IS TASK STOPPED? ; BEQ 16$ ;IF EQ NO - ELIGIBLE TASK FOUND ; TST T.ASTL(R0) ;BUT DOES TASK HAVE AST QUEUED? ; BEQ 15$ ;IF EQ NO - LOOK AT NEXT TASK -172,172,/;JMM001/ ; MOV R4,RQSCH ;SET SCHEDULE REQUEST (THIS PARTITION) -342,344,/;JMM001/ ; MOV T.PCB(R4),R5 ;POINT TO PCB OF WAITING TASK ; CMP R0,P.SIZE(R5) ;WILL WAITING TASK FIT? ; BLO 70$ ;IF LO NO -354,354,/;JMM001/ ; MOV SP,RQSCH ;INSURE RESCHEDULING /