11.07.2015 Views

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

eal-time processing 399• RAID 1—mirroring (data stored on at least two disks),data intact as long as one disk is still operating• RAID 3 <strong>and</strong> 4—striping plus a dedicated disk for parity(error checking)• RAID 5—striping with distributed parity; data can berestored automatically after a failed disk is replaced• RAID 6—like RAID 5 but with parity distributed sothat data remains intact unless more than two drivesfailIn actuality, RAID configurations can be very complex,where different levels can be “layered” above one another,with each treating the next as a virtual drive, until onegets down to the actual hardware. Although RAID is <strong>of</strong>tenimplemented using a physical (hardware) controller, operatingsystems can also create a virtual RAID structure ins<strong>of</strong>tware, interposed between the logical drive as seen bythe read/write routines <strong>and</strong> the physical drives.Although RAID is most commonly used with largeshared storage units (see file server <strong>and</strong> networkedstorage), with the drastic decline in hard drive prices,simple RAID configurations (such as two mirrored drives)are also appearing in higher-end desktop PCs.Further ReadingLeider, Joel. “How to Select a RAID Disk Array.” Enterprise StorageForum. Available online. URL: http://www.enterprisestorageforum.com/hardware/features/article.php/726491.AccessedNovember 8, 2007.“Redundant Array <strong>of</strong> Inexpensive Disks (RAID).” PC Guide. Availableonline. URL: http://pcguide.com./ref/hdd/perf/raid/index.htm. Accessed November 8, 2007.r<strong>and</strong>om number generation<strong>Computer</strong> applications such as simulations, games, <strong>and</strong>graphics applications <strong>of</strong>ten need the ability to generate oneor more r<strong>and</strong>om numbers (see simulation <strong>and</strong> computergames). R<strong>and</strong>om numbers can be defined as numbers thatshow no consistent pattern, with each number in the seriesneither affected in any way by the preceding number, norpredictable from it.One way to get r<strong>and</strong>om digits is to simply start with anarbitrary number with a specified number <strong>of</strong> digits, perhaps10. This first number is called the seed. Multiply the seed bya constant number <strong>of</strong> the same length, <strong>and</strong> take that number<strong>of</strong> digits <strong>of</strong>f the right end <strong>of</strong> the product. The result becomesthe new seed. Multiply it by the original constant to generatea new product, <strong>and</strong> repeat as <strong>of</strong>ten as desired. The result isa series <strong>of</strong> digits that appear r<strong>and</strong>omly distributed as thoughgenerated by throwing a die or spinning a wheel. This type<strong>of</strong> algorithm is called a congruential generator.The quality <strong>of</strong> a r<strong>and</strong>om number generator is proportionalto its period, or the number <strong>of</strong> numbers it can producebefore a repeating pattern sets in. The period for acongruential generator is approximately 2 32 , quite adequatefor many applications. However, for applications such asvery large-scale simulations, different algorithms (calledshift-register <strong>and</strong> lagged-Fibonacci) can be used, althoughthese also have some drawbacks. Combining two differenttypes <strong>of</strong> generators produces the best results. The widelyused McGill R<strong>and</strong>om Number Generator Super-Duper combinesa congruential <strong>and</strong> a shift-register algorithm.Generating a r<strong>and</strong>om number series from a single seedwill work fine with most simulations that rely upon generatingr<strong>and</strong>om events under the control <strong>of</strong> probabilities(Monte Carlo simulations). However, although the sequence<strong>of</strong> numbers generated from a given seed is r<strong>and</strong>omly distributed,it is always the same series <strong>of</strong> numbers for the sameseed. Thus, a computer poker game that simply used a givenseed would always generate the same h<strong>and</strong>s for each player.What is needed is a large collection <strong>of</strong> potential seeds fromwhich one can be more or less r<strong>and</strong>omly chosen. If thereare enough possible seeds, the odds <strong>of</strong> ever getting the sameseries <strong>of</strong> numbers become vanishingly small.One way to do this is to read the time (<strong>and</strong> perhaps date)from the computer’s system clock <strong>and</strong> generate a seed basedon that value. Since the clock value is in milliseconds, thereare millions <strong>of</strong> possible values to choose from. Anothercommon technique is to use the interval between the user’skeystrokes (in milliseconds). Although they are not perfect,these techniques are quite adequate for games.So-called true r<strong>and</strong>om number generators extract r<strong>and</strong>omnumbers from physical phenomena such as a radioactivesource (the HotBits service at Fourmilab in Switzerl<strong>and</strong>)or even atmospheric noise as detected by a radio receiver.For the ultimate in r<strong>and</strong>om numbers, researchers havelooked to quantum processes that are inherently r<strong>and</strong>om.In 2007 researchers at an institute in Zagreb, Croatia, beganto <strong>of</strong>fer the Quantum R<strong>and</strong>om Bit Generator Service, whichis keyed to unpredictable emissions <strong>of</strong> photons in a semiconductor.The output <strong>of</strong> most r<strong>and</strong>om number services canbe interfaced with MATLAB <strong>and</strong> other popular mathematicals<strong>of</strong>tware packages.Further ReadingGentle, James E. R<strong>and</strong>om Number Generation <strong>and</strong> Monte CarloMethods. 2nd ed. New York: Springer, 2004.HotBits: Genuine R<strong>and</strong>om Numbers, Generated by RadioactiveDecay. Available online. URL: http://www.fourmilab.ch/hotbits/. Accessed August 18, 2007.“Introduction to R<strong>and</strong>omness <strong>and</strong> R<strong>and</strong>om Numbers.” Availableonline. URL: http://www.r<strong>and</strong>om.org. Accessed August 18,2007.real-time processingThere are many computer applications (such as air trafficcontrol or industrial process control) that require that thesystem respond almost immediately to its inputs.In designing a real-time system there are always twoquestions to answer: Will it respond quickly enough most<strong>of</strong> the time? How much variation in response time can wetolerate? A system that responds to real-time environmentalconditions (such as the amount <strong>of</strong> traction or torque actingon a car’s wheels) needs to have a sampling rate <strong>and</strong> a rate<strong>of</strong> processing the sampled data that’s fast enough so thatthe system can correct a dangerous condition in time. Theresponsiveness required <strong>of</strong> course varies with the situation

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

Saved successfully!

Ooh no, something went wrong!