brad@griffin.itc.gu.edu.au (Brad Rosser) (03/17/91)
Why do simple shell scripts access my hard drive so much? I have Xenix 2.3.2 running on a 24Mhz '386 AT with a 40Mb MFM drive and 8Mb of memory. I've got 2Mb for a /tmp ramdisk, and it boots with a self-configured 878 i/o buffers. When/if I run DOS with a 1Mb disk cache (say), a simple "show time" batch file: :loop <show_time> <sleep for 60 seconds> goto loop wouldn't access the hard disk after the first pass, where everything off the disk would be placed into the cache. Yet the equivalent shell script on xenix while true do clear date | <awk script> | banner sleep 60 done causes that disk access light to flash every minute. Indeed, if I just type the command sleep 1 at the keyboard, it causes a "disk flash" every time! I would've thought the text/program of /bin/sleep would be cached, the inode be in memory, etc. What does Xenix do which accesses the disk for each (shell) command? Bradley Rosser brad@griffin.itc.gu.edu.au