home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDDISK / SKIP001.ZIP / SKIPMISC.001
Encoding:
Text File  |  1988-03-08  |  18.7 KB  |  333 lines

  1.  
  2.                           SKIP'S COMPUTER MISCELLANEA
  3.     
  4.                                       #1
  5.  
  6.                              (C) Copyright 1988 by
  7.                            C. F. "Skip" Mowery, Jr.
  8.                              Colonel, USAF (Ret.)
  9.                            406 Van Reed Manor Drive
  10.                                Brandon FL 33511
  11.                                  813-689-4212
  12.     
  13.     "Skip's Computer Miscellanea" is copyrighted material and  remains  the
  14.     property  of  the  author,  who reserves all rights to its publication,
  15.     reproduction and distribution, with the following single exception:  it
  16.     may  be  freely  copied and distributed electronically via computer for
  17.     personal non-commercial use, provided that the content is not modified,
  18.     that  it is not copied to or distributed on any form of print media and
  19.     that it is not copied or distributed by or for  any  type  of  business
  20.     endeavor without the prior written permission of the author.
  21.  
  22.                                      *****
  23.  
  24.     Your comments about this material and questions  about  any  aspect  of
  25.     computing  are  welcome.    This  material  originates  on the Computer
  26.     Archives BBS in Tampa, Florida, at 813-968-6220.
  27.  
  28.                                      *****
  29.     
  30.  
  31.  
  32.                       GETTING ORGANIZED WITH A HARD DISK
  33.     
  34.  
  35.          This article is  written  for  those  who  are  contemplating  the
  36.     purchase  of a hard disk or who just got one but aren't quite sure what
  37.     to do with it and, in either case, who need advice about hard disks but
  38.     don't want to get bogged down in technical information.  It's for those
  39.     who are pleading:  "Please, just tell me what to do -- tell me how, not
  40.     why."
  41.  
  42.          First we'll discuss the pros and  cons  of  having  a  hard  disk,
  43.     including some comments about backups.  Then we'll talk about the sizes
  44.     and types you should consider, and we'll briefly  discuss  installation
  45.     and configuration.  This part of the article will conclude with a brief
  46.     comment about the importance of organization.
  47.  
  48.          The article will continue in Issue #2 of "Skip's Computer  Miscel-
  49.     lanea"  with  a summary of the tools and terms you should understand in
  50.     order to get organized, plus a brief tutorial on paths.  Finally, we'll
  51.     discuss precisely what to do to organize  a  hard  disk,  step-by-step,
  52.     including  specific  suggestions  about directories, what to put in the
  53.     root directory, the content of key files, such as the Autoexec.Bat  and
  54.     Config.Sys  files, and a lot more.  We may not avoid all the why's, but
  55.     we'll try to emphasize the how's and keep the why's to a minimum and as
  56.     non-techincal as possible.
  57.  
  58.                            Do You Need a Hard Disk?
  59.  
  60.          If you're tired of swapping floppies during large applications and
  61.     tired  of  trying to keep your programs and data files organized across
  62.     several floppy disks, you need a hard disk.   If  you  think  it  takes
  63.     forever to boot up or for programs to load, or  if  some  programs  run
  64.     agonizingly  slow  because  of  frequent disk accesses, you need a hard
  65.     disk.  If you've ever seen "insufficient disk space" or "disk full"  on
  66.     your  screen  or encountered any of the error messages that result when
  67.     you put the wrong disk in the drive, or put a disk in the wrong  drive,
  68.     or forget to put a disk in the drive or forget to format the disk, then
  69.     you need a hard disk.
  70.  
  71.          Hard disk access is fast!  If you have any doubts about how much a
  72.     hard  disk  will  improve  program  speed, try this:  load and run from
  73.     a floppy disk the Basic test program at the end of  this  file.    Then
  74.     load  and run the same program from a RAM disk.  The program's reported
  75.     elapsed time via RAM disk should be about half of the time reported via
  76.     floppy disk.
  77.  
  78.          That substantial improvement in speed from using  a  RAM  disk  is
  79.     very  similar  to  what  you  would get with a hard disk.  The speed of
  80.     operation with a hard disk, of course, will be  a  little  slower  than
  81.     with  a  RAM  disk,  but the difference is so slight that, if you use a
  82.     hard disk, you may never use a RAM disk again.  Believe me,  it's  that
  83.     fast.  The difference is as noticeable and impressive as the difference
  84.     between running a Basic program under the Basic Interpreter and running
  85.     a compiled version of the same program.
  86.  
  87.          After speed, the next best thing about a hard  disk  is  its  huge
  88.     capacity.  No more worrying about whether all the files will fit on the
  89.     disk.  No more panic trips to the computer store  for  another  box  of
  90.     floppies.    No  more  waiting  for  yet another disk format.  Once you
  91.     format a 20 megabyte (MB) hard disk, it's like having over 50  floppies
  92.     already  formatted  and all mounted in one drive so that you never have
  93.     to touch them again.  Imagine getting on a BBS and downloading as  many
  94.     files  as  you  want, without every having to worry about disk space or
  95.     changing disks.  With a hard disk, your hands stay at the keyboard  and
  96.     aren't constantly reaching for floppies.  Get the picture?
  97.  
  98.                       Hard Disk Backups and Organization
  99.  
  100.          You can also say goodbye to floppy  disk  organizational  problems
  101.     when  you  have  a  hard disk.  Once you've organized the hard disk and
  102.     then do a complete backup, the backup program will  take  care  of  the
  103.     organization  on  the  floppies.  Also, re-organization is much simpler
  104.     and faster on a hard disk.
  105.  
  106.          And speaking of backups, having a hard disk also gives you  double
  107.     backup  protection  for  your commercial software:  the original copies
  108.     are on the distribution disks, the working  copies  are  on  your  hard
  109.     disk,  and  the backup copies are on floppies after you backup the hard
  110.     disk.
  111.  
  112.          Using a backup program regularly to copy files from the hard  disk
  113.     to  floppies is essential.  I do a complete backup of my hard disk once
  114.     a month.  I also keep a floppy in drive B and copy to it  one  or  more
  115.     times a day any programs or files that I've worked with that day.  (Ok,
  116.     ok  --  I  don't  do  it  every day, but I should, and I do the monthly
  117.     backups religiously.)
  118.  
  119.                               Hard Disk Problems
  120.  
  121.          The reason that backups are important is  that  hard  disks,  like
  122.     floppies,  are  susceptible  to the potential for accidental data loss.
  123.     Hard disks can incur some of the same problems  as  floppies,  such  as
  124.     those  caused  by  power  surges,  brownouts,  power  outages, bad disk
  125.     sectors and various types of system crashes, plus hard disks have  some
  126.     problems of their own.  For example, a hard disk is more likely to have
  127.     bad sectors when you buy it and/or later, and it has the potential  for
  128.     at  least  three  other  problems:    you can't take a hard disk out to
  129.     protect it when you  move  the  computer;  recovery  of  data  is  more
  130.     difficult  if something happens to the File Allocation Table (FAT) on a
  131.     hard disk; and sometimes a hard disk just  doesn't  want  to  cooperate
  132.     when you turn on the computer.
  133.  
  134.          I won't go into a lot of technical explanation about a hard disk's
  135.     occasional propensity for not wanting to cooperate (primarily because I
  136.     couldn't if I wanted to).  Suffice it to say that sometimes a hard disk
  137.     may experience a thermal reaction as a result of changes in temperature
  138.     in the computer room that could  cause  the  hard  disk  to  refuse  to
  139.     acknowledge its existence.  In other words, there may be times when the
  140.     darn thing just won't boot and, during those times, even  if  you  boot
  141.     from  a  floppy,  the  system  will tell you that you don't have a hard
  142.     disk.  If you keep trying to boot or just let  the  system  sit  there,
  143.     turned  on,  eventually  you'll  be  able to access it again.  Having a
  144.     complete backup at those times makes them  less  worrisome  (you  don't
  145.     know  if  it's  just a temporary thermal problem or if the hard disk is
  146.     really sick and will require reformatting and a total loss of data).
  147.  
  148.          As for moving your computer when it has  a  hard  disk  installed,
  149.     there  are  several  programs  available  to protect the hard disk from
  150.     damage.  The read/write head of a hard disk normally doesn't touch  the
  151.     disk surface.  If it does, e.g. because you jostle it when you move the
  152.     computer, it could damage the disk and/or destroy data recorded at that
  153.     location.  The programs designed  to  prevent  this  problem  move  the
  154.     read/write head to the center of the disk  where  no  data  is  stored.
  155.     Public  domain  programs  for  this  purpose  are  available  on BBS's.
  156.     Zenith's version of MS-DOS includes a  program  called  SHIP  and  your
  157.     version of MS-DOS may have one also.
  158.  
  159.          If the FAT gets damaged or garbled for any reason, there are  also
  160.     programs  designed  to  recover  as much as possible of your lost data.
  161.     (The data isn't really lost in these cases -- the computer just doesn't
  162.     know  where  it is  because the FAT can't be read.)  The MACE Utilities
  163.     include such a program.  Since there are two copies of the FAT  on  the
  164.     disk, and if you do regular backups, and if  you  buy  a  quality  hard
  165.     disk,  it's unlikely that you'll ever need such a recovery program, but
  166.     it's reassuring to have one.
  167.  
  168.          As for bad sectors, which are more likely to exist on a  new  hard
  169.     disk  or later occur, the configuration and formatting procedures for a
  170.     hard disk fix things so that no  data  is  written  to  identified  bad
  171.     sectors.  Also, there are programs available (e.g. MACE Utilities) that
  172.     can identify and lockout bad sectors that occur later, and  they  don't
  173.     require  reformatting  the  disk  (and  hence  don't require a complete
  174.     backup-reformat-restore procedure).
  175.  
  176.          On the other hand, the hard disk is  in  an  airtight  metal  case
  177.     where you can't touch it and where it's protected from the wide variety
  178.     of accidents that your floppies may be subjected to.    It's  virtually
  179.     impossible  to  fold, bend, spindle, mutilate or spill coffee on a hard
  180.     disk, and I've never heard of anyone dropping one on the floor and then
  181.     either stepping on it or running over it with a chair.
  182.  
  183.          In other words, even though hard disks may be susceptible to  more
  184.     or  different  problems,  remedies  exist  to  avoid  or  correct those
  185.     problems, one such preventive measure being regular backups.  Also, the
  186.     benefits of speed, organization and enlarged storage gained with a hard
  187.     disk far outweigh the potential for problems or  the  inconvenience  of
  188.     regular backups.
  189.     
  190.          I've been using a hard disk on almost a daily basis for  the  past
  191.     year and a half and I've never experienced  a  loss  of  data,  despite
  192.     frequent  power outages and brownouts and an occasional thermal problem
  193.     (which is my own fault for leaving the window open).
  194.  
  195.                              Choosing a Hard Disk
  196.     
  197.          If you insist on getting into a lot of  technical  considerations,
  198.     choosing  a  hard disk can boggle your mind -- and this is not supposed
  199.     to be a mind-boggling article.  So, here's my recommendation:   for  an
  200.     IBM  PC/XT  or  compatible  computer, look for a 20 MB name-brand unit,
  201.     such as the Seagate ST225.
  202.     
  203.          If you think you need more than 20 MB, I wouldn't go  over  40  MB
  204.     for  two  reasons:    first,  your  system  may have a 32 MB limit and,
  205.     second, if it does, you'll have to go through the added complication of
  206.     having more than one partition on the hard disk.
  207.  
  208.          Even if you don't think you'll need 20 MB because you don't have a
  209.     lot of software, I wouldn't recommend a 10 MB unit.  For most of you, a
  210.     10 MB unit will probably fill up too fast and  you'll  spend  too  much
  211.     time re-organizing, archiving, and trying to decide what to keep on the
  212.     hard disk and what to store on floppies.  Also, for reasons of  cluster
  213.     size, your small files (less than 2K bytes) on a 10 MB unit may waste a
  214.     lot  of  disk space, unless you create partitions smaller than about 4K
  215.     bytes each.  (If you know about partitions and plan to  use  more  than
  216.     one,  or  are familiar with cluster sizes, you may be wasting your time
  217.     reading this article.)
  218.  
  219.          I also would not advise using a high-density hard disk for  normal
  220.     personal computing.  High density hard disks use something  called  RLL
  221.     formatting.    Some software won't work properly with that type of hard
  222.     disk.
  223.  
  224.          There are other items that you could consider when choosing a hard
  225.     disk,  such  as  the  cluster factor (how much space your file occupies
  226.     regardless of its actual size) and interleaving  (every  nth  track  or
  227.     physical sector is used for sequential read/write), but we're trying to
  228.     keep it simple here.  I'll just say this:  4 sectors  per  cluster  (or
  229.     less)  and  interleave  3  (or at least less than 7).  A hard disk with
  230.     more than 4 sectors per cluster or with an interleave higher than 3  is
  231.     wasting  disk  space  and  seek  time, when compared to other available
  232.     drives.
  233.  
  234.                    Hard Disk Installation and Configuration
  235.     
  236.          There are too many different types of computers and hard disks  to
  237.     be  able  to  advise  you in this area, but I can give you a few hints.
  238.     Read the installation instructions carefully and take your time.   Plan
  239.     how  you  will  do  it  before you actually start.  If you have serious
  240.     doubts about your ability, get someone else to do it for you.
  241.  
  242.          Look for a bad-sector list and don't lose it.  It will be  a  list
  243.     of  cylinder  and  head  numbers.  You may find it attached to the hard
  244.     disk case and, if it is, be sure to copy it on a piece of paper  before
  245.     installation.  You may need the list  during  configuration.    By  all
  246.     means,  don't throw any pieces of paper away until you finish installa-
  247.     tion and configuration (and I'd still keep everything after that).
  248.  
  249.          The same goes for  configuration:    read  the  documentation  and
  250.     understand it before you begin.  If you have a choice about partitions,
  251.     I recommend using the whole disk as one DOS partition, i.e. one you can
  252.     boot  from.    A partition is like a separate drive.  Except in unusual
  253.     circumstances, why would you want to convert  one  drive  into  two  or
  254.     more?  (If you enjoy complicating your life, be my guest.)
  255.  
  256.                    Why Is Hard Disk Organization Important?
  257.     
  258.          I keep everything on my 20 MB hard disk -- every piece of software
  259.     in my possession:  all the programs, all the data files and all the DOS
  260.     files, even the ones that I never use and the ones that don't apply  to
  261.     my  system  --  and it's only half full.  But, that software is in over
  262.     700 files and, if I counted the files in archives, the file count would
  263.     exceed 1000.
  264.     
  265.          If I didn't use directories and  subdirectories  to  organize  the
  266.     files,  the  DIR command would take forever to scroll a list of all the
  267.     files on the screen (not to mention the fact that DOS wouldn't  let  me
  268.     have  that  many  files  in the root directory).  And since I'd have to
  269.     keep stopping the scrolling to be able to read the list, it would  take
  270.     an  equally  long  time  to  find  anything -- especially if I couldn't
  271.     remember the file name that I was looking for (a not infrequent problem
  272.     for my muddled brain).  It would be like having 25 floppy disks full of
  273.     files but with no labels on the disks.  (If you have 25  disks  without
  274.     labels but full of files, I don't think you'll understand the point I'm
  275.     trying to make here.)
  276.  
  277.          Using  directories  and  subdirectories  is  like  using  separate
  278.     floppies  for  different  applications  and different types of files --
  279.     except that you don't have to change disks and you don't have to  worry
  280.     about  wasting  disk  space  because some applications or categories of
  281.     files don't fill a disk.
  282.  
  283.          Perhaps the best reason for using directories  and  subdirectories
  284.     to  organize  a hard disk is that DOS will limit how many files you can
  285.     have in the root directory and, eventually, you'll have no  choice  but
  286.     to  get  organized.  (More about directories/subdirectories in the next
  287.     issue.)
  288.  
  289.                                      *****
  290.  
  291.     Part 2 of this article,  "Getting  Organized  With  a  Hard  Disk",  is
  292.     contained in issue #2 of "Skip's Computer Miscellanea".
  293.  
  294.                                      *****
  295.  
  296.                                  Test Program
  297.     
  298.          Below is a Basic program that you can use to compare the speed  of
  299.     operation  between  a  floppy  disk  and a RAM disk.  The difference in
  300.     speed is similar to the difference between a floppy and  a  hard  disk.
  301.     If  you  don't  know how to use a RAM disk, your MS-DOS manual probably
  302.     includes instructions for installing one.  (It may be called a  virtual
  303.     disk.) If not, download the file RAMDISK.ARC from a BBS and follow  the
  304.     instructions for setting up a small RAM disk.
  305.  
  306.          Run the test program under the Basic Interpreter from a floppy and
  307.     make  a  note  of the total elapsed time displayed.  Then run it from a
  308.     RAM disk.  On my system the test program completed  its  work  in  4.61
  309.     seconds  from  a  floppy  disk and 2.19 seconds from RAM disk.  From my
  310.     hard disk, the program finished in 2.75 seconds.  Thus, as you can see,
  311.     even  though  the  hard  disk is a little slower than the RAM disk, the
  312.     floppy/RAM comparison is still very similar and, hence, a valid way  to
  313.     make the floppy/hard disk comparison in the absence of a hard disk.
  314.  
  315.     10 CLS:DIM A$(100)
  316.     20 FOR Z=1 TO 100:A$(Z)="abcdefghijklmnopqrstuvwxyz":NEXT Z
  317.     30 PRINT "Opening TEST.DAT for output and copying 100 strings at ";TIME$
  318.     40 PRINT CHR$(7):X#=TIMER:OPEN "O",1,"TEST.DAT"
  319.     50 FOR Z=1 TO 100:PRINT #1,A$(Z):NEXT Z
  320.     60 CLOSE:Y#=TIMER
  321.     70 PRINT "TEST.DAT closed at ";TIME$;".  Elapsed time =";Y#-X#;"seconds."
  322.     80 PRINT:PRINT
  323.     90 PRINT "Opening TEST.DAT for input and reading 100 strings at ";TIME$
  324.     100 X1#=TIMER:OPEN "I",1,"TEST.DAT"
  325.     110 FOR Z=1 TO 100:INPUT #1,A$(Z):NEXT Z
  326.     120 CLOSE:Y#=TIMER
  327.     130 PRINT "TEST.DAT closed at ";TIME$;".  Elapsed time =";Y#-X1#;"seconds."
  328.     140 PRINT:PRINT
  329.     150 PRINT CHR$(7);"Total elapsed time =";Y#-X#;"seconds."
  330.     160 END
  331.  
  332.                                   **********
  333.