Pa2 batch disks back.


R. Clayton (rclayton@monmouth.edu)
Mon, 27 Nov 2000 15:19:47 -0500 (EST)


I've restored the pa2-disk* batch disk to the /export directory. It turns out
to have been a print-disk-block problem: over the weekend I changed
print-disk-block to use the getopts() standard c library function. Apparently,
the way getopts() works on solaris differs from the way it works on linux, and
print-disk-block was opening itself rather than the disk file to print blocks.

I've restored print-disk-blocks back to its previous state and everything seems
to be working:

  cl ../../../../test-pa1 ; ../../../../test-pa2

  ***

  Testing pa1-allsleep.dsk.

  ***

  Testing pa1-diskoverlap.dsk.

  ***

  Testing pa1-nosleep.dsk.

  ***

  Testing pa1-sleep.dsk.

  ***

  Testing pa2-bigpgms.dsk.

  ***

  Testing pa2-disk3rw.dsk.

  ***

  Testing pa2-diskrw.dsk.

  ***

  Testing pa2-diskw.dsk.

  cl

Just a few more points on this matter while I have your attention. The
pa2-disk* programs now print error messages when system calls go wrong. For
example, this program tries to open a non-existent device:

  cl pa3os -d bad.dsk
  * * * disk open failed with status code = 3.

  The system is halted.
  Total execution time: 55 ticks, idle time: 39 ticks (70%).

  cl

The other point is that because all process start at the same virtual address,
the three disk blocks written by pa2-disk3rw.dsk look the same. I've changed
pa2-disk3rw.dsk so that each block starts with its block number and goes up
from there:

  cl pa3os -d /export/opt/cs-438-505/devices/pa2-disk3rw.dsk

  The system is halted.
  Total execution time: 2726 ticks, idle time: 463 ticks (16%).

  cl /export/opt/cs-438-505/bin/print-disk-block results.dsk 61 62 63
  Block 61
          61 62 63 64
          65 66 67 68
          69 70 71 72
          73 74 75 76
          77 78 79 80
          81 82 83 84
          85 86 87 88
          89 90 91 92
  Block 62
          62 63 64 65
          66 67 68 69
          70 71 72 73
          74 75 76 77
          78 79 80 81
          82 83 84 85
          86 87 88 89
          90 91 92 93
  Block 63
          63 64 65 66
          67 68 69 70
          71 72 73 74
          75 76 77 78
          79 80 81 82
          83 84 85 86
          87 88 89 90
          91 92 93 94

  cl



This archive was generated by hypermail 2.0b3 on Mon Dec 18 2000 - 13:30:06 EST