12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

280 Chap. 8 File Processing <strong>and</strong> External SortingMedium 1996 1997 2000 2004 2006 2008RAM $45.00 7.00 1.500 0.3500 0.1500 0.0339Disk 0.25 0.10 0.010 0.0010 0.0005 0.0001Flash drive – – – 0.1000 0.0900 0.0029Floppy 0.50 0.36 0.250 0.2500 – –Tape 0.03 0.01 0.001 0.0003 – –Figure 8.1 Price comparison table for some writeable electronic data s<strong>to</strong>ragemedia in common use. Prices are in US Dollars/MB.8.1 Primary versus Secondary S<strong>to</strong>rageComputer s<strong>to</strong>rage devices are typically classified in<strong>to</strong> primary or main memory<strong>and</strong> secondary or peripheral s<strong>to</strong>rage. Primary memory usually refers <strong>to</strong> R<strong>and</strong>omAccess Memory (RAM), while secondary s<strong>to</strong>rage refers <strong>to</strong> devices such as harddisk drives, removeable “flash” drives, floppy disks, CDs, DVDs, <strong>and</strong> tape drives.Primary memory also includes registers, cache, <strong>and</strong> video memories, but we willignore them for this discussion because their existence does not affect the principaldifferences between primary <strong>and</strong> secondary memory.Along with a faster CPU, every new model of computer seems <strong>to</strong> come withmore main memory. As memory size continues <strong>to</strong> increase, is it possible that relativelyslow disk s<strong>to</strong>rage will be unnecessary? Probably not, because the desire <strong>to</strong>s<strong>to</strong>re <strong>and</strong> process larger files grows at least as fast as main memory size. Prices forboth main memory <strong>and</strong> peripheral s<strong>to</strong>rage devices have dropped dramatically in recentyears, as demonstrated by Figure 8.1. However, the cost for disk drive s<strong>to</strong>rageper megabyte is about two orders of magnitude less than RAM <strong>and</strong> has been formany years.There is now a wide range of removable media available for transferring dataor s<strong>to</strong>ring data offline in relative safety. These include floppy disks (now largelyobsolete), writable CDs <strong>and</strong> DVDs, “flash” drives, <strong>and</strong> magnetic tape. Opticals<strong>to</strong>rage such as CDs <strong>and</strong> DVDs costs roughly half the price of hard disk drivespace per megabyte, <strong>and</strong> have become practical for use as backup s<strong>to</strong>rage withinthe past few years. Tape used <strong>to</strong> be much cheaper than other media, <strong>and</strong> was thepreferred means of backup. “Flash” drives cost the most per megabyte, but due <strong>to</strong>their s<strong>to</strong>rage capacity <strong>and</strong> flexibility, have now replaced floppy disks as the primarys<strong>to</strong>rage device for transferring data between computer when direct network transferis not available.Secondary s<strong>to</strong>rage devices have at least two other advantages over RAM memory.Perhaps most importantly, disk <strong>and</strong> tape files are persistent, meaning that

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!