Harddrive Related Terms and Tricks

Copyright (C) 1997 by Erik van Straten. All (registered) trademarks are recognized.
Last major change: 04/16/1997 by EvS. Last file modification:

TIP: having problems with hypertext jumps in frames? Then mark the following string: http://www.computercraft.com/docs/evsterms.shtml and copy it to the clipboard, paste into your browser's URL line and press Enter.

Contents:

Return to Quantum Data Loss page, to my tools page or to the COMPUTERCRAFT main menu

General Terms
  • Cache: generally a buffer between a slow and a fast device. Initially, data transfered from the slow device is passed to the fast device at the rate of the slow device, but meanwhile, the data that flows is also stored in the buffer. If the fast device requests the same data, before the buffer is flooded with other information, then the buffer can pass the requested data to the fast device, without accessing the slow device. If the buffer has filled up completely, typically the LRU (Least Recently Used) algorithm is used for deciding which part of the buffer can be overwritten with new data. Cache can be found in decicated RAM chips, but also in software algorithms exploiting normal DRAM in a PC for caching relatively slower devices like harddrives. Typical examples are SmartDrive or the built in VCache (32BFA) in WfW311. Most motherboards have cache RAM in between the CPU and normal RAM. must that the device and the cache are synchronized, i.e. contain the same data!
  • Write-Cache, Write-Back, LazyWrite, Write-Through: Usually when data is ment to be written to a device, this is done immediately. Mostly it is also written to cache, in order to have it in the buffer if a read-request for that same data is issued next. This technique is called write-through. However, if the data has been written to the buffer, it is also possible to delay the actual write of that data to the device. This technique is referred to as write-back, LazyWrite and Write-Caching. One advantage of this technique is that the CPU (read: user) does not have to wait for the actual write to the device, which can happen when the CPU has more time later, or in the form of a background process. Secondly, often some part of the just-written data will be modified again. For example, this happens to directory sectors when you copy a number of files to that directory. Having write-caching enabled saves a lot of time because updating the FAT's and directory sectors is suspended until all file-contents have been written, which also saves a lot of time because now much less head seeks have to take place (between the directory, FAT and the area on disk where the actual filecontents are written). Warning: one should realize, that data which was not physically written to a disk is lost forever when a power failure occurs, or when the user switches off the PC to soon. Some harddisks (mainly SCSI) allow internal write-caching, and if they do, it can often be switched off, which may be a smart thing to do if the PC is to be used by unexperienced users and is not backed up by an UPS (Uninteruptible Power Supply). Another problem related to write-caching is that bad sectors will not be noted immediately. Most Operating System (and BIOS) routines will return an error value to a program when a file-write was unsuccessful. However, with write-caching, that return-value will always be a "success" value, because the Operating System MUST assume that the diskwrite will succeed later! Should an error occurs later, when the data is actually being written to disk, then the Operating System has no means of informing the program that the data could not be written (in fact, the program may not be running anymore!). In that case, it usually halts the system with a "blue screen", and you will loose all unsaved data in all open applications. Fortunately, most harddrives are very reliable, and in addition, they have internal schemes to "remap" bad sectors to other physical locations on the drive without the Operating System (and user!) being aware of this. However. floppy drives do NOT have this feature. Therefore I strongly advise not to enable and use write-caching for floppy-drives.

Harddrive terminology


Chips

All hardware devices containing some kind of microprocessor need software to start-up, get running, or "boot" with. That software cannot be stored on a disk, since microprocessors do not know how to access them.. They need other chips and a program to tell them how to do that, in order to read the actual operating system from the disk. That program is usualy stored in ROM, EPROM or FLASH-ROM, and the other chips are usually in the chipset on your motherboard.


BIOS-Level Disk Access
Operating System Software

32-Bit Disk Access Warning

WARNING: Do NOT enable 32BDA if you are not absolutely sure that you have installed the proper driver. In contrary to what most people think, NOT having the entry "Use 32-Bits Disk Access" grayed is NOT a guarrantee that you are allowed to enable it! This "graylevel" depends on a line in SYSTEM.INI in section [386Enh] being there or not:

32BitDiskAccess=Off it's Off, but NOT grayed, thus can be enabled
32BitDiskAccess=On it's already On
-no such line- the entry in the Virtual Memory Settings will be grayed and thus cannot be enabled.

Only Windows SETUP determines whether your drive(s) conform to the WD1003 specification, the only spec. supported by the windows built-in driver WDCTRL. If any of them (including ATAPI CDROM drives and SCSI drives) does not, it will not add the line with the "32BitDiskAccess" parameter. Otherwise it will add the parameter, but set it's value to "Off". You'll have to switch it on manually through the Virtual Memory Settings dialogbox.

Therefore, if you copy your Windows setup from an old drive to a new and bigger drive (or just ADD an ATAPI CDROM or bigger harddrive) without adding an appropriate driver, then you WILL be able to check the entry "Use 32-Bit Disk Access" in the Virtual Memory Settings dialogbox, if you did not already. Windows will not automatically uncheck this for you if you change your hardware configuration, but usually it will detect the change, and refuse to load 32BDA while issuing an error message. But under some circumstances it will not detect the change, which typically causes you to corrupt data on your drive(s), including trashing the partition table, FAT's and rootdirectory sectors, rendering the entire drive inaccessible!


Disclaimer

This page is NOT intended to be a replacement for the excelent information in the various FAQ (Frequently Asked Questions) files and webpages around the world (see my tools page for some pointers). I only wanted to explain a number of terms related to the document that describes the problems with Quantum Fireball TM drives I experienced (although I admit it got longer than planned). I did my best to supply reliable and correct information here, but, since I'm only human, I may be wrong. Please let me know if you disagree or have any other remarks about this page. If I consider them relevant I may update this page.
If you have general questions about harddrives, diskmanagers, formatting, possible bugs and fixes etc., please ask those questions in one of the Usenet Newsgroups; for PC related storage devices this would be comp.sys.ibm.pc.hardware.storage. If you don't have a newsreader, most wwwbrowsers will accept the following URL: news://your.news.server/comp.sys.ibm.pc.hardware.storage where you must of course replace your.news.server by your favourite host. Before posting messages (asking questions) in any newsgroup, please read the newsgroup's FAQ to make sure that you are not asking a Frequently Asked Question; see my tools page for some pointers to FAQ's. When I have time, I will be reading some of the postings in the PC storage group, but lots of other, often much more experienced people do as well, and they often come up with answers I am not aware of. So check it out!
I cannot and will not take any responsibility if you experience damage or loss of data or any other inconvenience caused by anything written here by me. In other words, anything you do is your own responsibility, don't blame me!
Copyright (C) 1997 by Erik van Straten. I grant Computercraft the non-exclusive right to publish this page. All (registered) trademarks are recognized.
Erik van Straten.


Return to my Quantum Data Loss page, to my tools page or to the COMPUTERCRAFT main menu

- - -