Information Technology Reference
In-Depth Information
11. Write a program that creates three files, each of 100MB, and then measures
the time to do each of three things:
(a) fopen()/fwrite(). Open the first file using fopen() and issue 256,000
sequential four-byte writes using fwrite() .
(b) open()/write(). Open the second file using open() and issue 256,000
sequential four-byte writes using write() .
(c) mmap()/store. Map the third le into your program's memory us-
ing mmap() and issue 256,000 sequential four-byte writes by iterating
through memory and writing to each successive word of the mapped
le.
Explain your results.
12.2
Flash storage
Over the past decade, flash storage has become a widely used storage medium.
Flash storage is the dominent storage technology for handheld devices from
phones to cameras to thumb drives, and it is used in an increasing fraction of
laptop computers and machine room servers.
Flash storage is a type of solid state storage: it has no moving parts and
Definition: solid state
storage
stores data using electrical circuits. Because it has no moving parts, flash storage
can have much better random IO performance than disks, and it can use less
power and be less vulnerable to physical damage. On the other hand, flash
storage remains significantly more expensive per byte of storage than disks.
Each flash storage element is a floating gate transistor. As Figure 12.5
illustrates, an extra gate in such a transistor \oats"|it is not connected to
any circuit. Since the floating gate is entirely surrounded by an insulator, it
will hold an electrical charge for months or years without requiring any power.
Even though the floating gate is not electrically connected to anything, it can
be charged or discharged via electron tunneling by running a suciently high-
voltage current near it. The oating gate's state of charge aects the transistor's
threshold voltage for activation. Thus, the oating gate's state can be detected
by applying an intermediate voltage to the transitor's control gate that will only
be sucient to activate the transitor if the floating gate is chaged.
In single-level flash storage, the floating gate stores one bit (charge or not
charged); in multi-level flash storage, the floating gate stores multiple bits by
storing one of several different charge levels.
NOR flash storage is wired to allow individual words to be written and read.
NOR flash storage is useful for storing device firmware since it can be executed
 
Search WWH ::




Custom Search