User Tools

Site Tools


cdc:nos2.source:nam5871:oswapin

OSWAPIN

Table Of Contents

Source Code

OSWAPIN.txt
  1. *DECK OSWAPIN
  2. IDENT OSWAPIN
  3. ENTRY OSWAPIN
  4. EXT OTIME
  5. SST
  6. *#
  7. *1DC OSWAPIN
  8. *
  9. * 1. PROC NAME AUTHOR DATE
  10. * OSWAPIN A. M. PRATT 76/04/20
  11. *
  12. * 2. FUNCTIONAL DESCRIPTION.
  13. * THIS ROUTINE MAKES AN -SFCALL- TO THE OPERATING SYSTEM
  14. * REQUESTING THE SWAP-IN OF A CERTAIN APPLICATION.
  15. *
  16. * 3. METHOD USED.
  17. * SET UP
  18. * DO -SFCALL-
  19. *
  20. * 4. ENTRY PARAMETERS.
  21. * A1 = ADDRESS OF -SFCALL- PARAMETER WORDS
  22. *
  23. * 5. EXIT PARAMETERS. NONE
  24. *
  25. * 6. COMDECKS CALLED.
  26. * INPARU MACDEF STATTAB
  27. *
  28. * 7. ROUTINES CALLED.
  29. * OTIME GET SYSTEM RTIME
  30. * SFCALL SYS-CTL-PT CALL
  31. * XTRACE TRACES CALLS
  32. *
  33. * 8. DAYFILE MESSAGES. NONE
  34. *
  35. *#
  36.  
  37. *CALL MACDEF
  38. *CALL INPARU
  39.  
  40. STAT1 IFEQ STAT,1
  41. *CALL STATTAB
  42. STAT1 ENDIF
  43.  
  44. OSWAPIN BSSZ 1
  45. DEBUG1 IFEQ DEBUG,1
  46. SX6 A1
  47. SA6 TEMP
  48.  
  49. STAT2 IFEQ STAT,1
  50. SA1 STIMEP PARAMETER BLOCK FOR CALLING OTIME
  51. RJ OTIME GET RTIME VALUE BEFORE CALL
  52. STAT2 ENDIF
  53.  
  54. SX1 XOSWAP
  55. RJ XTRACE
  56. SA1 TEMP
  57. SA1 X1
  58. DEBUG1 ELSE
  59.  
  60. STAT3 IFEQ STAT,1
  61. SX6 A1 SAVE ADDRESS OF PARAMETER BLOCK IN TEMP
  62. SA6 TEMP
  63. SA1 STIMEP PARAMETER BLOCK FOR CALLING OTIME
  64. RJ OTIME GET RTIME VALUE BEFORE CALL
  65. SA1 TEMP RESTORE ADDRESS OF PARAMETER BLOCK IN A1
  66. SA1 X1
  67. STAT3 ENDIF
  68.  
  69. DEBUG1 ENDIF
  70. SA1 X1 GET ADDRESS OF CALL PARAMETER
  71. SA4 SWAPIN
  72. MX3 -6
  73. BX1 X3*X1
  74. BX6 X4+X1
  75. SA6 A1
  76. SFCALL A1
  77.  
  78. STAT4 IFEQ STAT,1
  79. SA1 ETIMEP PARAMETER BLOCK FOR CALLING OTIME
  80. RJ OTIME GET RTIME VALUE AFTER CALL
  81. SA1 STIME STARTING RTIME VALUE
  82. MX0 24D MASK FOR RTIME MILLESECOND VALUE
  83. BX1 -X0*X1 CLEAR SECONDS FIELD
  84. SA2 ETIME ENDING RTIME VALUE
  85. BX2 -X0*X2 CLEAR SECONDS FIELD
  86. IX6 X2-X1 ELAPSED TIME FOR SWAPIN
  87. SA1 ST$LSI LARGEST TIME SPENT IN OSWAPIN
  88. IX5 X1-X6 DETERMINE IF LATEST TIME INTERVAL IS LARGER
  89. PL X5,OSW01 IF PREVIOUS TIME INTERVAL WAS LARGER
  90. SA6 ST$LSI SAVE NEW LARGEST TIME INTERVAL
  91. OSW01 SA3 ST$TSI PREVIOUS CUMULATIVE VALUE
  92. IX6 X3+X6 NEW CUMULATIVE VALUE
  93. SA6 ST$TSI
  94. MX6 -1 (X6)=-1
  95. SA1 ST$NSI INCREMENT TOTAL NUMBER OF CALLS TO OSWAPIN
  96. IX6 X1-X6 (X6)=(X1)+1
  97. SA6 ST$NSI
  98. STAT4 ENDIF
  99.  
  100. EQ OSWAPIN
  101.  
  102. EXT XTRACE
  103. SWAPIN VFD 60/SF.SWPI
  104. XOSWAP DATA L*SWAPI*
  105. TEMP BSS 1
  106.  
  107. STAT5 IFEQ STAT,1
  108. EXT OTIME
  109. STIMEP VFD 60D/STIME
  110. ETIMEP VFD 60D/ETIME
  111. STIME BSS 1 START TIME FOR COMPARING SWAPIN TIME DELAY
  112. ETIME BSS 1 END TIME FOR COMPARING SWAPIN TIME DELAY
  113. STAT5 ENDIF
  114.  
  115. END
cdc/nos2.source/nam5871/oswapin.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator