<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Filitche</id>
	<title>Soma-notes - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Filitche"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/Filitche"/>
	<updated>2026-05-12T18:56:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6483</id>
		<title>COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6483"/>
		<updated>2010-12-02T19:04:30Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Virtualize Everything But Time =&lt;br /&gt;
Article written by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch. They are working for the Center for Ultra-Broadband Information Networks (CUBIN) Department of Electrical &amp;amp; Electronic Engineering at the University of Melbourne in Australia. Here is the link to the article: [http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
&lt;br /&gt;
The next time you notice one stranger ask another for the time and you see them check their watch, try this experiment: immediately ask too. Chances are the person will check their watch again. Why? Human internal clocks are notoriously unreliable. Our sense of time contracts and expands all day long. We seem to believe that a definitive report of time can only come from some mechanical or electronic source. So social norms require that the watch owner provides you with two things: 1) the time, and 2) a gesture of external authority, i.e. a glance at their watch.&lt;br /&gt;
&lt;br /&gt;
The story of time inside a virtual machine is almost as unreliable as our own internal clocks. How much time has elapsed since a VM client got the CPU&#039;s attention? At the best of times there&#039;s no way for it to guess because it wasn&#039;t actually running the whole time. If the VM was suspended and migrated from one physical host to another its concept of time is even worse. This paper is about how a computer glances at its metaphorical watch, and what kinds of timepieces it has at hand.&lt;br /&gt;
&lt;br /&gt;
To better understand this paper, it is very important to have a good understanding of the general concepts behind it. For example, we all know what clocks are in our day-to-day lives but how are they different in the context of computing? In this section, we will describe concepts like timekeeping, hardware/software clocks, explore the advantages and disadvantages of the different available counters and synchronization algorithms, and explain what a para-virtualized system is about.&lt;br /&gt;
&lt;br /&gt;
===Timekeeping===&lt;br /&gt;
&lt;br /&gt;
Computers typically measure time in one of two ways: tick counting and tickless timekeeping[2]. Tick counting is when the operating system sets up a hardware device, generally a CPU, to interrupt at a certain rate. A counter is updated each time one of these interrupts occurs. It is this counter that allows the system to keep track of the passage of time. &lt;br /&gt;
&lt;br /&gt;
In tickless timekeeping, instead of the OS keeping track of time through interrupts, a hardware device is used instead. This device has its own counter which starts when the system is booted. The OS simply reads the counter from it when needed. Tickless timekeeping seems to be the better way to keep track of time because it doesn’t hog the CPU with hardware interrupts, however its performance is very dependent on the type of hardware used. Another disadvantages is that they tend to drift (see below). But neither of these methods knows the actual time, they only know how long it has been since they last checked an authoritative source. Personal computers typically get their time from a battery-backed real-time clock (i.e. a CMOS clock). Networked machines often need a more precise time, with a resolution in the millisecond range or below. In these cases a machine can query another source such as one based on Network Time Protocol (NTP).&lt;br /&gt;
&lt;br /&gt;
===Clocks===&lt;br /&gt;
&lt;br /&gt;
Computer “clocks” or “timers” can be hardware based, software based or they can even be an hybrid. The most commonly found timer is the hardware timer. All of the hardware timers can be generally described by this diagram where some have either more or less features:&lt;br /&gt;
&lt;br /&gt;
Diagram1. Timer Abstraction&lt;br /&gt;
&lt;br /&gt;
[[File:Timerabstract.jpg]]&lt;br /&gt;
&lt;br /&gt;
This diagram nicely represents how tick counting works. The oscillator runs at a predetermined frequency. The operating system might have to measure it when the system boots. The counter starts with a predetermined value which can be set by software. For every cycle of the oscillator, the counter counts down one unit. When it reaches zero, its generates an output signal that might interrupt the CPU. That same interrupt will then allow the counter’s initial value to be reloaded into the counter and the process begins again. Not all hardware timers work exactly like that. For instance, some actually count up, others don&#039;t use interrupts, and yet others don&#039;t keep an initial counter. The general principle of hardware counters is the however the same. There is some kind of fixed interval at the end of which the current time is updated by an appropriate number of units (i.e. nanoseconds).&lt;br /&gt;
&lt;br /&gt;
===Timers===&lt;br /&gt;
# PIT is useful for generating interrupts at regular intervals through its three channels. Channel 0 is bound to IRQ0 which interrupts the CPU at regular intervals. Channel 1 is specific to each system and Channel 2 is connected to the speaker system. As such, we only need to concern ourselves with Channel 0. [3]&lt;br /&gt;
# CMOS RTC, also known as a CMOS battery, allows the CMOS chip to remain powered to keep track of things like time even while the physical PC unit has no source of power. If there is no CMOS battery on the motherboard, the computer would reset to its default time each restart. The battery itself can die, as expected, if the computer is powered off and not used for a long period of time. This can cause issues with the main OS as well as the VM. [4]&lt;br /&gt;
# Local APIC handles all external interrupts for the processor in the system. It can also accept and generate inter-processor interrupts between Local APICs. [5]&lt;br /&gt;
# ACPI establishes industry-standard interfaces configuration guided by the OS and power management. It is industry-standard through its creators, Intel, Microsoft, Phoenix, Hewlett Packard and Toshiba. Its power management includes all forms: notebooks, desktops, and servers. ACPI&#039;s goal is to improve current power and configuration standards for hardware devices by transitioning to ACPI-compliant hardware. This allows the OS as well as the VM to have control over power management. [9]&lt;br /&gt;
# RDTSC is based on the x86 P5 instruction set and perform high-resolution timing, however, it suffers from several flaws. Discontinuous values from the processor are caused as a result of not using the same thread to the processor each time, which can also be caused by having a multicore processor. This is made worse by ACPI which will eventually lead to the cores being completely out of sync. Availability of dedicated hardware: &amp;quot;RDTSC locks the timing information that the application requests to the processor&#039;s cycle counter.&amp;quot; With dedicated timing devices included on modern motherboards this method of locking the timing information will become obsolete. Lastly, the variability of the CPU&#039;s frequency needs to be taken into account. With modern day laptops, most CPU frequencies are adjusted on the fly to respond to the users demand when needed and to lower themselves when idle, this results in longer battery life and less heat generated by the laptop but regretfully affects RDTSC making it unreliable. [10]&lt;br /&gt;
# HPET defines a set of timers that the OS has access to and can assign to applications. Each timer can generate an interrupt when the least significant bits are equal to the equivalent bits of the 64-bit counter value. However, a race case can occur in which the target time has already passed. This causes more interrupts and more work even if the task is a simple one. It does produce less interrupts than its predecessors PIT and CMOS RTC giving it an edge. Despite its race condition, this modern timer is improvement upon old practices.  [11]&lt;br /&gt;
&lt;br /&gt;
==Guest Timekeeping==&lt;br /&gt;
&lt;br /&gt;
Guest timekeeping is done using the same general methods as any computer timekeeping: either tick counting or tickless systems. Where the two begin to differ, however, is that a host operating system is able to communicate directly with the physical hardware, while the guest operating system is unable to do so, having to communicate to the host system that it wants to communicate with the hardware. Having to do this is the greatest source of the guest operating system&#039;s clock losing accuracy, otherwise known as drifting.&lt;br /&gt;
&lt;br /&gt;
===Sources of Drift===&lt;br /&gt;
&lt;br /&gt;
When a guest operating system is started, its clock simply synchronizes with the host&#039;s – some virtual machines such as VMware also do this when they are resumed from a suspended state, or restored from a snapshot. It is easy to reason that, because the guest&#039;s clock starts off correctly, it will always be correct from then on. Unfortunately, this is not the case. The first source of drift is simply due to electronics. A clock is almost never entirely accurate, having a slight error due to the effects of ambient temperature on oscillator frequency, even on the host system. Since the guest communicates with the host in order to keep track of its time, an error in the host&#039;s time is not only passed on to the guest, but because the host is trying to correct its own time, the guest&#039;s request for a count is given slightly less priority, making it yet again lose accuracy. The larger the drift in the host, the larger the drift in the guest, as the host&#039;s drift simply compounds the issue.&lt;br /&gt;
&lt;br /&gt;
Aside from the host&#039;s own drift, the other cause of drift in the virtual environment is the fact that it is treated like a process by the host. In and of itself this does not seem like a problem, but the guest system can be suspended just before it tries to update its perception of time. With restricted CPU time, it is easy for the lost ticks to pile up and create a backlog. Even if the guest is checking over the network with a time server, its network conversation can be suspended before the answer comes back. When the process resumes the guest has a wildly inaccurate perception of the elapsed time (known as Round-Trip Time or RTT) and its incorrect adjustments for the network delay will throw off the clock. Problems can also come from memory swaps performed by the host. If the virtual environment does not have enough allocated to it by the host it can run into the problem of swapping out pages that are needed soon. Swapping the pages back in will momentarily bring the entire virtual environment to a halt, so ticks are missed and the clock falls behind. &lt;br /&gt;
&lt;br /&gt;
Clearly the errors in virtual machine timekeeping come from algorithms that were simply not designed for virtual environments. They assume a more stable physical world than they have.&lt;br /&gt;
&lt;br /&gt;
===Impact of Drift===&lt;br /&gt;
&lt;br /&gt;
The sources of drift essentially boil down to round-off errors and lost ticks. But the practical impact of drift is quite apparent in any automated system. For a real-world analogy consider a factory&#039;s assembly line, where the machinery is finely tuned to do its own specific part at certain intervals, and generally does this with impressive efficiency. If the clock in the system were to drift, however, a specific machine may move too soon or too late, bringing the line to a potentially catastrophic halt.&lt;br /&gt;
&lt;br /&gt;
In a virtual environment, drift is a bit more subtle, as one result of it could be skewed process scheduling – some schedulers give a certain amount of time to a process before moving on, but if the guest&#039;s time has drifted substantially, when it tries to correct its time it could give more or less time to the processes in the scheduler.&lt;br /&gt;
&lt;br /&gt;
The impacts of drift are even more apparent when virtual machines must communicate with one another. Consider the case of a farm of distributed gaming servers, where differences in timing can mean virtual characters suddenly warp at super-human speed across the landscape. Or for a more serious example consider investment trading, where missing the moment to bid can mean a difference of millions of dollars.&lt;br /&gt;
&lt;br /&gt;
===Compensation Strategies===&lt;br /&gt;
&lt;br /&gt;
There are a number of compensation strategies for dealing with drift, depending on the cause of it. If the problem is due to CPU management issues, then the host can give more CPU time to the virtual machine, or it can lower the timer interrupt rate – or simply use a tickless counter. If it is due to a  memory management issue, allocating more memory to the virtual environment should prevent the system from needing to swap out page files so often.&lt;br /&gt;
&lt;br /&gt;
If the issue is from neither of those, but simply due to the inevitable lag when the guest communicates with the hardware via the host, then there are other methods to correct the drift. Most systems natively have algorithms built in to correct the time if it gets too far ahead or behind real time, though they are not without their own faults; if the time is set ahead when catching up, the backlog of ticks it has built up may not be cleared, so it could potentially set itself ahead multiple times until the backlog is dealt with. Tools built into the virtual machine itself can also deal with drift to an extent, as VMware Tools does. This kind of tool checks to see if the clock&#039;s error is within a certain margin. If it exceeds the margin, then the backlog is set to zero – to prevent the issue mentioned with the native algorithms – and resynchronizes with the host clock before the guest goes back to keeping track of time as it normally would.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
Today, the use of the Network Time Protocol and of daemons like ntpd is the dominant solution for accurate timekeeping. In optimal conditions, the ntpd can be very good but these situations rarely happen. Network congestion, disconnections, lower quality networking hardware and unsuspected system events can create offsets errors in the order of 10‘s or even 100 milliseconds(ms). [6]&lt;br /&gt;
For demanding applications, this is neither robust nor reliable. One way to enhance the performance of ntpd would be to poll from the NTP server more often as this would reduce the offset error. Unfortunately, this would increase the network traffic which could cause network congestions which would raise the offset error. Thus, it would not work.&lt;br /&gt;
&lt;br /&gt;
Another problem with current system software clocks using NTP(like ntpd), is that they provide only an absolute clock.[7] Such clocks are unsuitable for applications that deal with network management and measurements. The reason for this is that NTP focuses on the offset and not on hardware clock&#039;s oscillator rate. For example, when calculating delay variations, the offset error does not change anything in the calculations but the clocks’ oscillator rate variation does affect it. So having a more accurate timestamp would make those calculation more precise. Which mean we would need another system software clock.&lt;br /&gt;
&lt;br /&gt;
In virtualization(in this case Xen), when migrating a running system from one system to another can cause issues and this is again caused by the ntpd daemon. By default, each guest OS runs its own instance of the ntpd daemon. So the synchronization algorithm keeps track of the reference wallclock time, rate-of-drift and current clock error, which are defined by the hardware clock on the system. So when migrating the virtualized OS to another system, the ntpd state is saved but when it is enabled again on the new system problems occur: because no two hardware clocks drift the same way or have the exact same wallclock time, all the information traced by the daemon are all of a sudden inaccurate. This consequences could prove disastrous to the system. These could range anywhere from slowly recoverable errors to ones where the ntpd might never recover and where the virtualized OS could become unstable. &lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
&lt;br /&gt;
The authors of this timekeeping paper have done previous work exploring the feed-forward and feedback mechanisms for clock algorithm adjustment in non-virtual systems [7][8]. The RADclock algorithm (Robust Absolute Difference) was originally explored to address the drift resulting from NTP&#039;s feedback algorithm, and how non-ideal network conditions (a circumstance that is quite common) can have serious effects. In their original paper they improved network synchronization using the TimeStamp Counter (TSC) register a system call introduced in Pentium class machines as a source for a CPU cycle count. The use of a more reliable timestamp and counter provided &amp;quot;GPS-like&amp;quot; reliability in networked environments.&lt;br /&gt;
&lt;br /&gt;
This new paper seeks to take a similar approach in a virtual machine setting where VM migration can cause much more severe disruption than simply lost UDP packets. Rather than use TSC calls (&#039;&#039;rdtsc()&#039;&#039; in [8]) they tried several clock sources, seeking to eliminate variability from power management and CPU load when setting &#039;&#039;raw&#039;&#039; timestamps for use in guest machines.&lt;br /&gt;
&lt;br /&gt;
The paper makes several references to &#039;&#039;feed-forward&#039;&#039; and &#039;&#039;feedback&#039;&#039; mechanisms, and so a quick discussion of these control theories is in order. In feed-forward mechanisms, inputs to a process or calculation may be modified in advance, but the resulting output plays no part in subsequent calculations. In feedback mechanisms (such as NTPd) inputs to a calculation can be modified by outputs from previous ones. As a result, feedback mechanisms carry state from one step to the next. Since the state of a virtual environment may be rendered inaccurate by so many sources a feedback mechanism as a bad idea. The statelessness of feed-forward mechanisms offers VM migrations a particular advantage since after migration a guest OS can simply discover the actual facts of timestamps rather than try to estimate them from their own invalid state information.&lt;br /&gt;
&lt;br /&gt;
The mechanism the authors used in the Xen environment was the XenStore, a filesystem structure like &#039;&#039;sysfs&#039;&#039; or &#039;&#039;procfs&#039;&#039; that permits communications between virtual domains using shared memory. Dom0 (Xen terminology for the hypervisor) takes sychronization from its own time server and saves the calculated clock parameters to the shared XenStore. On DomU (Xen for any guest OS) an application would simply use the shared information as a raw timestamp or a time difference. Their extensive testing showed a clear -- if not surprising -- advantage over NTPd.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
It is difficult to critique the authors&#039; work since they did a great job of finding a meaningful set of timestamps and counters and clearly demonstrated an advantage in their field of study. They also compared a number of time sources to ensure that their selection was meaningful and stable. And it&#039;s hard to argue with success. Their results approximate the variation that comes from CPU temperature. That&#039;s quite impressive.&lt;br /&gt;
&lt;br /&gt;
As a student, one criticism might be that they found quite an obscure way of describing what was at heart a very simple problem. Of course, to be fair to these academics, their paper wasn&#039;t written for students. But the problem can be summed up succinctly: If you can&#039;t trust your own perception of time, ask the closest agent you &#039;&#039;can&#039;&#039; trust -- and make sure they&#039;ve check their watch. There is no closer source to a VM than its host, so find the fastest way there.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. Broomhead, Cremean, Ridoux, Veitch. &amp;quot;Virtualize Everything But Time&amp;quot; . 2010. http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf&lt;br /&gt;
&lt;br /&gt;
2. &amp;quot;Timekeeping in Virtual Machines, Information Guide&amp;quot; from VMWare. Web. http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf Accessed: Nov. 2010. &lt;br /&gt;
&lt;br /&gt;
3. &amp;quot;Bran&#039;s Kernel Development Tutorial&amp;quot; from &#039;&#039;Bona Fide OS Developer&#039;&#039; . Web. http://www.osdever.net/bkerndev/Docs/pit.htm  . Accessed: Nov. 2010. &lt;br /&gt;
&lt;br /&gt;
4. &amp;quot;What is a CMOS battery, and why does my computer need one?&amp;quot;  &#039;&#039;Indiana University&#039;s Knowledge Base&#039;&#039;, 2010. Web. http://kb.iu.edu/data/adoy.html . Accessed: Nov. 2010. &lt;br /&gt;
&lt;br /&gt;
5. &amp;quot;Multiprocessor Specification version 1.4&amp;quot;. &#039;&#039;Intel&#039;&#039;. May 1997. http://developer.intel.com/design/pentium/datashts/24201606.pdf .  &lt;br /&gt;
&lt;br /&gt;
6. Pasztor and Veitch. &amp;quot;PC Based Precision Timing Without GPS&amp;quot;.  2002. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf .&lt;br /&gt;
&lt;br /&gt;
7. Veitch, Ridoux, Korada. &amp;quot;Robust Synchronization of Absolute and Difference Clocks over Networks&amp;quot;. 2009. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf&lt;br /&gt;
&lt;br /&gt;
8. Broomhead, T.; Ridoux, J.; Veitch, D.; , &amp;quot;Counter availability and characteristics for feed-forward based synchronization,&amp;quot; Precision Clock Synchronization for Measurement, Control and Communication, 2009. ISPCS 2009. International Symposium on , vol., no., pp.1-6, 12-16 Oct. 2009&lt;br /&gt;
&lt;br /&gt;
9. &amp;quot;Advanced Configuration and Power Interface Specification&amp;quot;. &#039;&#039;Intel Corporation&#039;&#039;. April 2010. http://www.acpi.info/DOWNLOADS/ACPIspec40a.pdf. &lt;br /&gt;
&lt;br /&gt;
10. &amp;quot;Game timing and Multicore Processors&amp;quot;. &#039;&#039;msdn&#039;&#039; . Dec 2005. Web. http://msdn.microsoft.com/en-us/library/ee417693%28VS.85%29.aspx . Accessed Nov. 2010.&lt;br /&gt;
&lt;br /&gt;
11. &amp;quot;IA-PC HPET (High Precision Event Timers) Specification. &#039;&#039;Intel Corporation&#039;&#039;. Oct. 2004. http://hackipedia.org/Hardware/HPET,%20High%20Performance%20Event%20Timer/IA-PC%20HPET%20%28High%20Precision%20Event%20Timers%29%20Specification.pdf .&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6481</id>
		<title>COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6481"/>
		<updated>2010-12-02T18:53:46Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Virtualize Everything But Time =&lt;br /&gt;
Article written by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch. They are working for the Center for Ultra-Broadband Information Networks (CUBIN) Department of Electrical &amp;amp; Electronic Engineering at the University of Melbourne in Australia. Here is the link to the article: [http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
&lt;br /&gt;
The next time you notice one stranger ask another for the time and you see them check their watch, try this experiment: immediately ask too. Chances are the person will check their watch again. Why? Human internal clocks are notoriously unreliable. Our sense of time contracts and expands all day long. We seem to believe that a definitive report of time can only come from some mechanical or electronic source. So social norms require that the watch owner provides you with two things: 1) the time, and 2) a gesture of external authority, i.e. a glance at their watch.&lt;br /&gt;
&lt;br /&gt;
The story of time inside a virtual machine is almost as unreliable as our own internal clocks. How much time has elapsed since a VM client got the CPU&#039;s attention? At the best of times there&#039;s no way for it to guess because it wasn&#039;t actually running the whole time. If the VM was suspended and migrated from one physical host to another its concept of time is even worse. This paper is about how a computer glances at its metaphorical watch, and what kinds of timepieces it has at hand.&lt;br /&gt;
&lt;br /&gt;
To better understand this paper, it is very important to have a good understanding of the general concepts behind it. For example, we all know what clocks are in our day-to-day lives but how are they different in the context of computing? In this section, we will describe concepts like timekeeping, hardware/software clocks, explore the advantages and disadvantages of the different available counters and synchronization algorithms, and explain what a para-virtualized system is about.&lt;br /&gt;
&lt;br /&gt;
===Timekeeping===&lt;br /&gt;
&lt;br /&gt;
Computers typically measure time in one of two ways: tick counting and tickless timekeeping[2]. Tick counting is when the operating system sets up a hardware device, generally a CPU, to interrupt at a certain rate. A counter is updated each time one of these interrupts occurs. It is this counter that allows the system to keep track of the passage of time. &lt;br /&gt;
&lt;br /&gt;
In tickless timekeeping, instead of the OS keeping track of time through interrupts, a hardware device is used instead. This device has its own counter which starts when the system is booted. The OS simply reads the counter from it when needed. Tickless timekeeping seems to be the better way to keep track of time because it doesn’t hog the CPU with hardware interrupts, however its performance is very dependent on the type of hardware used. Another disadvantages is that they tend to drift (see below). But neither of these methods knows the actual time, they only know how long it has been since they last checked an authoritative source. Personal computers typically get their time from a battery-backed real-time clock (i.e. a CMOS clock). Networked machines often need a more precise time, with a resolution in the millisecond range or below. In these cases a machine can query another source such as one based on Network Time Protocol (NTP).&lt;br /&gt;
&lt;br /&gt;
===Clocks===&lt;br /&gt;
&lt;br /&gt;
Computer “clocks” or “timers” can be hardware based, software based or they can even be an hybrid. The most commonly found timer is the hardware timer. All of the hardware timers can be generally described by this diagram where some have either more or less features:&lt;br /&gt;
&lt;br /&gt;
Diagram1. Timer Abstraction&lt;br /&gt;
&lt;br /&gt;
[[File:Timerabstract.jpg]]&lt;br /&gt;
&lt;br /&gt;
This diagram nicely represents how tick counting works. The oscillator runs at a predetermined frequency. The operating system might have to measure it when the system boots. The counter starts with a predetermined value which can be set by software. For every cycle of the oscillator, the counter counts down one unit. When it reaches zero, its generates an output signal that might interrupt the CPU. That same interrupt will then allow the counter’s initial value to be reloaded into the counter and the process begins again. Not all hardware timers work exactly like that. For instance, some actually count up, others don&#039;t use interrupts, and yet others don&#039;t keep an initial counter. The general principle of hardware counters is the however the same. There is some kind of fixed interval at the end of which the current time is updated by an appropriate number of units (i.e. nanoseconds).&lt;br /&gt;
&lt;br /&gt;
===Timers===&lt;br /&gt;
# PIT is useful for generating interrupts at regular intervals through its three channels. Channel 0 is bound to IRQ0 which interrupts the CPU at regular intervals. Channel 1 is specific to each system and Channel 2 is connected to the speaker system. As such, we only need to concern ourselves with Channel 0. [3]&lt;br /&gt;
# CMOS RTC, also known as a CMOS battery, allows the CMOS chip to remain powered to keep track of things like time even while the physical PC unit has no source of power. If there is no CMOS battery on the motherboard, the computer would reset to its default time each restart. The battery itself can die, as expected, if the computer is powered off and not used for a long period of time. This can cause issues with the main OS as well as the VM. [4]&lt;br /&gt;
# Local APIC handles all external interrupts for the processor in the system. It can also accept and generate inter-processor interrupts between Local APICs. [5]&lt;br /&gt;
# ACPI establishes industry-standard interfaces configuration guided by the OS and power management. It is industry-standard through its creators, Intel, Microsoft, Phoenix, Hewlett Packard and Toshiba. Its power management includes all forms: notebooks, desktops, and servers. ACPI&#039;s goal is to improve current power and configuration standards for hardware devices by transitioning to ACPI-compliant hardware. This allows the OS as well as the VM to have control over power management. [9]&lt;br /&gt;
# RDTSC is based on the x86 P5 instruction set and perform high-resolution timing, however, it suffers from several flaws. Discontinuous values from the processor are caused as a result of not using the same thread to the processor each time, which can also be caused by having a multicore processor. This is made worse by ACPI which will eventually lead to the cores being completely out of sync. Availability of dedicated hardware: &amp;quot;RDTSC locks the timing information that the application requests to the processor&#039;s cycle counter.&amp;quot; With dedicated timing devices included on modern motherboards this method of locking the timing information will become obsolete. Lastly, the variability of the CPU&#039;s frequency needs to be taken into account. With modern day laptops, most CPU frequencies are adjusted on the fly to respond to the users demand when needed and to lower themselves when idle, this results in longer battery life and less heat generated by the laptop but regretfully affects RDTSC making it unreliable. [10]&lt;br /&gt;
# HPET defines a set of timers that the OS has access to and can assign to applications. Each timer can generate an interrupt when the least significant bits are equal to the equivalent bits of the 64-bit counter value. However, a race case can occur in which the target time has already passed. This causes more interrupts and more work even if the task is a simple one. It does produce less interrupts than its predecessors PIT and CMOS RTC giving it an edge. Despite its race condition, this modern timer is improvement upon old practices.  [11]&lt;br /&gt;
&lt;br /&gt;
==Guest Timekeeping==&lt;br /&gt;
&lt;br /&gt;
Guest timekeeping is done using the same general methods as any computer timekeeping: either tick counting or tickless systems. Where the two begin to differ, however, is that a host operating system is able to communicate directly with the physical hardware, while the guest operating system is unable to do so, having to communicate to the host system that it wants to communicate with the hardware. Having to do this is the greatest source of the guest operating system&#039;s clock losing accuracy, otherwise known as drifting.&lt;br /&gt;
&lt;br /&gt;
===Sources of Drift===&lt;br /&gt;
&lt;br /&gt;
When a guest operating system is started, its clock simply synchronizes with the host&#039;s – some virtual machines such as VMware also do this when they are resumed from a suspended state, or restored from a snapshot. It is easy to reason that, because the guest&#039;s clock starts off correctly, it will always be correct from then on. Unfortunately, this is not the case. The first source of drift is simply due to electronics. A clock is almost never entirely accurate, having a slight error due to the effects of ambient temperature on oscillator frequency, even on the host system. Since the guest communicates with the host in order to keep track of its time, an error in the host&#039;s time is not only passed on to the guest, but because the host is trying to correct its own time, the guest&#039;s request for a count is given slightly less priority, making it yet again lose accuracy. The larger the drift in the host, the larger the drift in the guest, as the host&#039;s drift simply compounds the issue.&lt;br /&gt;
&lt;br /&gt;
Aside from the host&#039;s own drift, the other cause of drift in the virtual environment is the fact that it is treated like a process by the host. In and of itself this does not seem like a problem, but the guest system can be suspended just before it tries to update its perception of time. With restricted CPU time, it is easy for the lost ticks to pile up and create a backlog. Even if the guest is checking over the network with a time server, its network conversation can be suspended before the answer comes back. When the process resumes the guest has a wildly inaccurate perception of the elapsed time (known as Round-Trip Time or RTT) and its incorrect adjustments for the network delay will throw off the clock. Problems can also come from memory swaps performed by the host. If the virtual environment does not have enough allocated to it by the host it can run into the problem of swapping out pages that are needed soon. Swapping the pages back in will momentarily bring the entire virtual environment to a halt, so ticks are missed and the clock falls behind. &lt;br /&gt;
&lt;br /&gt;
Clearly the errors in virtual machine timekeeping come from algorithms that were simply not designed for virtual environments. They assume a more stable physical world than they have.&lt;br /&gt;
&lt;br /&gt;
===Impact of Drift===&lt;br /&gt;
&lt;br /&gt;
The sources of drift essentially boil down to round-off errors and lost ticks. But the practical impact of drift is quite apparent in any automated system. For a real-world analogy consider a factory&#039;s assembly line, where the machinery is finely tuned to do its own specific part at certain intervals, and generally does this with impressive efficiency. If the clock in the system were to drift, however, a specific machine may move too soon or too late, bringing the line to a potentially catastrophic halt.&lt;br /&gt;
&lt;br /&gt;
In a virtual environment, drift is a bit more subtle, as one result of it could be skewed process scheduling – some schedulers give a certain amount of time to a process before moving on, but if the guest&#039;s time has drifted substantially, when it tries to correct its time it could give more or less time to the processes in the scheduler.&lt;br /&gt;
&lt;br /&gt;
The impacts of drift are even more apparent when virtual machines must communicate with one another. Consider the case of a farm of distributed gaming servers, where differences in timing can mean virtual characters suddenly warp at super-human speed across the landscape. Or for a more serious example consider investment trading, where missing the moment to bid can mean a difference of millions of dollars.&lt;br /&gt;
&lt;br /&gt;
===Compensation Strategies===&lt;br /&gt;
&lt;br /&gt;
There are a number of compensation strategies for dealing with drift, depending on the cause of it. If the problem is due to CPU management issues, then the host can give more CPU time to the virtual machine, or it can lower the timer interrupt rate – or simply use a tickless counter. If it is due to a  memory management issue, allocating more memory to the virtual environment should prevent the system from needing to swap out page files so often.&lt;br /&gt;
&lt;br /&gt;
If the issue is from neither of those, but simply due to the inevitable lag when the guest communicates with the hardware via the host, then there are other methods to correct the drift. Most systems natively have algorithms built in to correct the time if it gets too far ahead or behind real time, though they are not without their own faults; if the time is set ahead when catching up, the backlog of ticks it has built up may not be cleared, so it could potentially set itself ahead multiple times until the backlog is dealt with. Tools built into the virtual machine itself can also deal with drift to an extent, as VMware Tools does. This kind of tool checks to see if the clock&#039;s error is within a certain margin. If it exceeds the margin, then the backlog is set to zero – to prevent the issue mentioned with the native algorithms – and resynchronizes with the host clock before the guest goes back to keeping track of time as it normally would.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
Today, the use of the Network Time Protocol and of daemons like ntpd is the dominant solution for accurate timekeeping. In optimal conditions, the ntpd can be very good but these situations rarely happen. Network congestion, disconnections, lower quality networking hardware and unsuspected system events can create offsets errors in the order of 10‘s or even 100 milliseconds(ms). [6]&lt;br /&gt;
For demanding applications, this is neither robust nor reliable. One way to enhance the performance of ntpd would be to poll from the NTP server more often as this would reduce the offset error. Unfortunately, this would increase the network traffic which could cause network congestions which would raise the offset error. Thus, it would not work.&lt;br /&gt;
&lt;br /&gt;
Another problem with current system software clocks using NTP(like ntpd), is that they provide only an absolute clock.[7] Such clocks are unsuitable for applications that deal with network management and measurements. The reason for this is that NTP focuses on the offset and not on hardware clock&#039;s oscillator rate. For example, when calculating delay variations, the offset error does not change anything in the calculations but the clocks’ oscillator rate variation does affect it. So having a more accurate timestamp would make those calculation more precise. Which mean we would need another system software clock.&lt;br /&gt;
&lt;br /&gt;
In virtualization(in this case Xen), when migrating a running system from one system to another can cause issues and this is again caused by the ntpd daemon. By default, each guest OS runs its own instance of the ntpd daemon. So the synchronization algorithm keeps track of the reference wallclock time, rate-of-drift and current clock error, which are defined by the hardware clock on the system. So when migrating the virtualized OS to another system, the ntpd state is saved but when it is enabled again on the new system problems occur: because no two hardware clocks drift the same way or have the exact same wallclock time, all the information traced by the daemon are all of a sudden inaccurate. This consequences could prove disastrous to the system. These could range anywhere from slowly recoverable errors to ones where the ntpd might never recover and where the virtualized OS might become unstable. &lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
&lt;br /&gt;
The authors of this timekeeping paper have done previous work exploring the feed-forward and feedback mechanisms for clock algorithm adjustment in non-virtual systems [7][8]. The RADclock algorithm (Robust Absolute Difference) was originally explored to address the drift resulting from NTP&#039;s feedback algorithm, and how non-ideal network conditions (a circumstance that is quite common) can have serious effects. In their original paper they improved network synchronization using the TimeStamp Counter (TSC) register a system call introduced in Pentium class machines as a source for a CPU cycle count. The use of a more reliable timestamp and counter provided &amp;quot;GPS-like&amp;quot; reliability in networked enviroments.&lt;br /&gt;
&lt;br /&gt;
This new paper seeks to take a similar approach in a virtual machine setting where VM migration can cause much more severe disruption than simply lost UDP packets. Rather than use TSC calls (&#039;&#039;rdtsc()&#039;&#039; in [8]) they tried several clock sources, seeking to eliminate variability from power management and CPU load when setting &#039;&#039;raw&#039;&#039; timestamps for use in guest machines.&lt;br /&gt;
&lt;br /&gt;
The paper makes several references to &#039;&#039;feed-forward&#039;&#039; and &#039;&#039;feedback&#039;&#039; mechanisms, and so a quick discussion of these control theories is in order. In feed-forward mechanisms, inputs to a process or calculation may be modified in advance, but the resulting output plays no part in subsequent calculations. In feedback mechanisms (such as NTPd) inputs to a calculation can be modified by outputs from previous ones. As a result, feedback mechanisms carry state from one step to the next. Since the state of a virtual environment may be rendered inaccurate by so many sources a feedback mechanism as a bad idea. The statelessness of feed-forward mechanisms offers VM migrations a particular advantage since after migration a guest OS can simply discover the actual facts of timestamps rather than try to estimate them from their own invalid state information.&lt;br /&gt;
&lt;br /&gt;
The mechanism the authors used in the Xen environment was the XenStore, a filesystem structure like &#039;&#039;sysfs&#039;&#039; or &#039;&#039;procfs&#039;&#039; that permits communications between virtual domains using shared memory. Dom0 (Xen terminology for the hypervisor) takes sychronization from its own time server and saves the calculated clock parameters to the shared XenStore. On DomU (Xen for any guest OS) an application would simply use the shared information as a raw timestamp or a time difference. Their extensive testing showed a clear -- if not surprising -- advantage over NTPd.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
It is difficult to critique the authors&#039; work since they did a great job of finding a meaningful set of timestamps and counters and clearly demonstrated an advantage in their field of study. They also compared a number of time sources to ensure that their selection was meaningful and stable. And it&#039;s hard to argue with success. Their results approximate the variation that comes from CPU temperature. That&#039;s quite impressive.&lt;br /&gt;
&lt;br /&gt;
As a student, one criticism might be that they found quite an obscure way of describing what was at heart a very simple problem. Of course, to be fair to these academics, their paper wasn&#039;t written for students. But the problem can be summed up succinctly: If you can&#039;t trust your own perception of time, ask the closest agent you &#039;&#039;can&#039;&#039; trust -- and make sure they&#039;ve check their watch. There is no closer source to a VM than its host, so find the fastest way there.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. &amp;quot;Virtualize Everything But Time&amp;quot; by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch, 2010. http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf&lt;br /&gt;
&lt;br /&gt;
2. &amp;quot;Timekeeping in Virtual Machines, Information Guide&amp;quot; from VMWare. http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf&lt;br /&gt;
&lt;br /&gt;
3. &amp;quot;Bran&#039;s Kernel Development Tutorial&amp;quot; from Bona Fide OS Developer website. http://www.osdever.net/bkerndev/Docs/pit.htm  &lt;br /&gt;
&lt;br /&gt;
4. &amp;quot;What is a CMOS battery, and why does my computer need one?&amp;quot; from the Indiana University&#039;s Knowledge Base, 2010. http://kb.iu.edu/data/adoy.html&lt;br /&gt;
&lt;br /&gt;
5. &amp;quot;Multiprocessor Specification version 1.4&amp;quot; from Intel, 1997. http://developer.intel.com/design/pentium/datashts/24201606.pdf&lt;br /&gt;
&lt;br /&gt;
6. Pasztor and Veitch. &amp;quot;PC Based Precision Timing Without GPS&amp;quot;.  2002. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf&lt;br /&gt;
&lt;br /&gt;
7. Veitch, Ridoux, Korada. &amp;quot;Robust Synchronization of Absolute and Difference Clocks over Networks&amp;quot;. 2009. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf&lt;br /&gt;
&lt;br /&gt;
8. Broomhead, T.; Ridoux, J.; Veitch, D.; , &amp;quot;Counter availability and characteristics for feed-forward based synchronization,&amp;quot; Precision Clock Synchronization for Measurement, Control and Communication, 2009. ISPCS 2009. International Symposium on , vol., no., pp.1-6, 12-16 Oct. 2009&lt;br /&gt;
&lt;br /&gt;
9. &amp;quot;Advanced Configuration and Power Interface Specification&amp;quot;. &#039;&#039;Intel Corporation&#039;&#039;. April 2010. http://www.acpi.info/DOWNLOADS/ACPIspec40a.pdf. Accessed Nov. 2010.&lt;br /&gt;
&lt;br /&gt;
10. &amp;quot;Game timing and Multiecore Processors&amp;quot;. &#039;&#039;msdn&#039;&#039; . Dec 2005. http://msdn.microsoft.com/en-us/library/ee417693%28VS.85%29.aspx . Accessed Nov. 2010.&lt;br /&gt;
&lt;br /&gt;
11. &amp;quot;IA-PC HPET (High Precision Event Timers) Specification. &#039;&#039;Intel Corporation&#039;&#039;. Dec. 2004. http://hackipedia.org/Hardware/HPET,%20High%20Performance%20Event%20Timer/IA-PC%20HPET%20%28High%20Precision%20Event%20Timers%29%20Specification.pdf . Accessed Nov. 2010.&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6480</id>
		<title>COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6480"/>
		<updated>2010-12-02T18:46:37Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Virtualize Everything But Time =&lt;br /&gt;
Article written by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch. They are working for the Center for Ultra-Broadband Information Networks (CUBIN) Department of Electrical &amp;amp; Electronic Engineering at the University of Melbourne in Australia. Here is the link to the article: [http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
&lt;br /&gt;
The next time you notice one stranger ask another for the time and you see them check their watch, try this experiment: immediately ask too. Chances are the person will check their watch again. Why? Human internal clocks are notoriously unreliable. Our sense of time contracts and expands all day long. We seem to believe that a definitive report of time can only come from some mechanical or electronic source. So social norms require that the watch owner provides you with two things: 1) the time, and 2) a gesture of external authority, i.e. a glance at their watch.&lt;br /&gt;
&lt;br /&gt;
The story of time inside a virtual machine is almost as unreliable as our own internal clocks. How much time has elapsed since a VM client got the CPU&#039;s attention? At the best of times there&#039;s no way for it to guess because it wasn&#039;t actually running the whole time. If the VM was suspended and migrated from one physical host to another its concept of time is even worse. This paper is about how a computer glances at its metaphorical watch, and what kinds of timepieces it has at hand.&lt;br /&gt;
&lt;br /&gt;
To better understand this paper, it is very important to have a good understanding of the general concepts behind it. For example, we all know what clocks are in our day-to-day lives but how are they different in the context of computing? In this section, we will describe concepts like timekeeping, hardware/software clocks, explore the advantages and disadvantages of the different available counters and synchronization algorithms, and explain what a para-virtualized system is about.&lt;br /&gt;
&lt;br /&gt;
===Timekeeping===&lt;br /&gt;
&lt;br /&gt;
Computers typically measure time in one of two ways: tick counting and tickless timekeeping[2]. Tick counting is when the operating system sets up a hardware device, generally a CPU, to interrupt at a certain rate. A counter is updated each time one of these interrupts occurs. It is this counter that allows the system to keep track of the passage of time. &lt;br /&gt;
&lt;br /&gt;
In tickless timekeeping, instead of the OS keeping track of time through interrupts, a hardware device is used instead. This device has its own counter which starts when the system is booted. The OS simply reads the counter from it when needed. Tickless timekeeping seems to be the better way to keep track of time because it doesn’t hog the CPU with hardware interrupts, however its performance is very dependent on the type of hardware used. Another disadvantages is that they tend to drift (see below). But neither of these methods knows the actual time, they only know how long it has been since they last checked an authoritative source. Personal computers typically get their time from a battery-backed real-time clock (i.e. a CMOS clock). Networked machines often need a more precise time, with a resolution in the millisecond range or below. In these cases a machine can query another source such as one based on Network Time Protocol (NTP).&lt;br /&gt;
&lt;br /&gt;
===Clocks===&lt;br /&gt;
&lt;br /&gt;
Computer “clocks” or “timers” can be hardware based, software based or they can even be an hybrid. The most commonly found timer is the hardware timer. All of the hardware timers can be generally described by this diagram where some have either more or less features:&lt;br /&gt;
&lt;br /&gt;
Diagram1. Timer Abstraction&lt;br /&gt;
&lt;br /&gt;
[[File:Timerabstract.jpg]]&lt;br /&gt;
&lt;br /&gt;
This diagram nicely represents how tick counting works. The oscillator runs at a predetermined frequency. The operating system might have to measure it when the system boots. The counter starts with a predetermined value which can be set by software. For every cycle of the oscillator, the counter counts down one unit. When it reaches zero, its generates an output signal that might interrupt the CPU. That same interrupt will then allow the counter’s initial value to be reloaded into the counter and the process begins again. Not all hardware timers work exactly like that. For instance, some actually count up, others don&#039;t use interrupts, and yet others don&#039;t keep an initial counter. The general principle of hardware counters is the however the same. There is some kind of fixed interval at the end of which the current time is updated by an appropriate number of units (i.e. nanoseconds).&lt;br /&gt;
&lt;br /&gt;
===Timers===&lt;br /&gt;
# PIT is useful for generating interrupts at regular intervals through its three channels. Channel 0 is bound to IRQ0 which interrupts the CPU at regular intervals. Channel 1 is specific to each system and Channel 2 is connected to the speaker system. As such, we only need to concern ourselves with Channel 0. [3]&lt;br /&gt;
# CMOS RTC, also known as a CMOS battery, allows the CMOS chip to remain powered to keep track of things like time even while the physical PC unit has no source of power. If there is no CMOS battery on the motherboard, the computer would reset to its default time each restart. The battery itself can die, as expected, if the computer is powered off and not used for a long period of time. This can cause issues with the main OS as well as the VM. [4]&lt;br /&gt;
# Local APIC handles all external interrupts for the processor in the system. It can also accept and generate inter-processor interrupts between Local APICs. [5]&lt;br /&gt;
# ACPI establishes industry-standard interfaces configuration guided by the OS and power management. It is industry-standard through its creators, Intel, Microsoft, Phoenix, Hewlett Packard and Toshiba. Its power management includes all forms: notebooks, desktops, and servers. ACPI&#039;s goal is to improve current power and configuration standards for hardware devices by transitioning to ACPI-compliant hardware. This allows the OS as well as the VM to have control over power management. [9]&lt;br /&gt;
# RDTSC is based on the x86 P5 instruction set and perform high-resolution timing, however, it suffers from several flaws. Discontinuous values from the processor are caused as a result of not using the same thread to the processor each time, which can also be caused by having a multicore processor. This is made worse by ACPI which will eventually lead to the cores being completely out of sync. Availability of dedicated hardware: &amp;quot;RDTSC locks the timing information that the application requests to the processor&#039;s cycle counter.&amp;quot; With dedicated timing devices included on modern motherboards this method of locking the timing information will become obsolete. Lastly, the variability of the CPU&#039;s frequency needs to be taken into account. With modern day laptops, most CPU frequencies are adjusted on the fly to respond to the users demand when needed and to lower themselves when idle, this results in longer battery life and less heat generated by the laptop but regretfully affects RDTSC making it unreliable. [10]&lt;br /&gt;
# HPET defines a set of timers that the OS has access to and can assign to applications. Each timer can generate an interrupt when the least significant bits are equal to the equivalent bits of the 64-bit counter value. However, a race case can occur in which the target time has already passed. This causes more interrupts and more work even if the task is a simple one. It does produce less interrupts than its predecessors PIT and CMOS RTC giving it an edge. Despite its race condition, this modern timer is improvement upon old practices.  [11]&lt;br /&gt;
&lt;br /&gt;
==Guest Timekeeping==&lt;br /&gt;
&lt;br /&gt;
Guest timekeeping is done using the same general methods as any computer timekeeping: either tick counting or tickless systems. Where the two begin to differ, however, is that a host operating system is able to communicate directly with the physical hardware, while the guest operating system is unable to do so, having to communicate to the host system that it wants to communicate with the hardware. Having to do this is the greatest source of the guest operating system&#039;s clock losing accuracy, otherwise known as drifting.&lt;br /&gt;
&lt;br /&gt;
===Sources of Drift===&lt;br /&gt;
&lt;br /&gt;
When a guest operating system is started, its clock simply synchronizes with the host&#039;s – some virtual machines such as VMware also do this when they are resumed from a suspended state, or restored from a snapshot. It is easy to reason that, because the guest&#039;s clock starts off correctly, it will always be correct from then on. Unfortunately, this is not the case. The first source of drift is simply due to electronics. A clock is almost never entirely accurate, having a slight error due to the effects of ambient temperature on oscillator frequency, even on the host system. Since the guest communicates with the host in order to keep track of its time, an error in the host&#039;s time is not only passed on to the guest, but because the host is trying to correct its own time, the guest&#039;s request for a count is given slightly less priority, making it yet again lose accuracy. The larger the drift in the host, the larger the drift in the guest, as the host&#039;s drift simply compounds the issue.&lt;br /&gt;
&lt;br /&gt;
Aside from the host&#039;s own drift, the other cause of drift in the virtual environment is the fact that it is treated like a process by the host. In and of itself this does not seem like a problem, but the guest system can be suspended just before it tries to update its perception of time. With restricted CPU time, it is easy for the lost ticks to pile up and create a backlog. Even if the guest is checking over the network with a time server, its network conversation can be suspended before the answer comes back. When the process resumes the guest has a wildly inaccurate perception of the elapsed time (known as Round-Trip Time or RTT) and its incorrect adjustments for the network delay will throw off the clock. Problems can also come from memory swaps performed by the host. If the virtual environment does not have enough allocated to it by the host it can run into the problem of swapping out pages that are needed soon. Swapping the pages back in will momentarily bring the entire virtual environment to a halt, so ticks are missed and the clock falls behind. &lt;br /&gt;
&lt;br /&gt;
Clearly the errors in virtual machine timekeeping come from algorithms that were simply not designed for virtual environments. They assume a more stable physical world than they have.&lt;br /&gt;
&lt;br /&gt;
===Impact of Drift===&lt;br /&gt;
&lt;br /&gt;
The sources of drift essentially boil down to round-off errors and lost ticks. But the practical impact of drift is quite apparent in any automated system. For a real-world analogy consider a factory&#039;s assembly line, where the machinery is finely tuned to do its own specific part at certain intervals, and generally does this with impressive efficiency. If the clock in the system were to drift, however, a specific machine may move too soon or too late, bringing the line to a potentially catastrophic halt.&lt;br /&gt;
&lt;br /&gt;
In a virtual environment, drift is a bit more subtle, as one result of it could be skewed process scheduling – some schedulers give a certain amount of time to a process before moving on, but if the guest&#039;s time has drifted substantially, when it tries to correct its time it could give more or less time to the processes in the scheduler.&lt;br /&gt;
&lt;br /&gt;
The impacts of drift are even more apparent when virtual machines must communicate with one another. Consider the case of a farm of distributed gaming servers, where differences in timing can mean virtual characters suddenly warp at super-human speed across the landscape. Or for a more serious example consider investment trading, where missing the moment to bid can mean a difference of millions of dollars.&lt;br /&gt;
&lt;br /&gt;
===Compensation Strategies===&lt;br /&gt;
&lt;br /&gt;
There are a number of compensation strategies for dealing with drift, depending on the cause of it. If the problem is due to CPU management issues, then the host can give more CPU time to the virtual machine, or it can lower the timer interrupt rate – or simply use a tickless counter. If it is due to a  memory management issue, allocating more memory to the virtual environment should prevent the system from needing to swap out page files so often.&lt;br /&gt;
&lt;br /&gt;
If the issue is from neither of those, but simply due to the inevitable lag when the guest communicates with the hardware via the host, then there are other methods to correct the drift. Most systems natively have algorithms built in to correct the time if it gets too far ahead or behind real time, though they are not without their own faults; if the time is set ahead when catching up, the backlog of ticks it has built up may not be cleared, so it could potentially set itself ahead multiple times until the backlog is dealt with. Tools built into the virtual machine itself can also deal with drift to an extent, as VMware Tools does. This kind of tool checks to see if the clock&#039;s error is within a certain margin. If it exceeds the margin, then the backlog is set to zero – to prevent the issue mentioned with the native algorithms – and resynchronizes with the host clock before the guest goes back to keeping track of time as it normally would.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
Today, the use of the Network Time Protocol and of daemons like ntpd is the dominant solution for accurate timekeeping. In optimal conditions, the ntpd can be very good but these situations rarely happen. Network congestion, disconnections, lower quality networking hardware and unsuspected system events can create offsets errors in the order of 10‘s or even 100 milliseconds(ms). [6]&lt;br /&gt;
For demanding applications, this is neither robust nor reliable. One way to enhance the performance of ntpd would be to poll from the NTP server more often as this would reduce the offset error. Unfortunately, this would increase the network traffic which could cause network congestions which would raise the offset error. Thus, it would not work.&lt;br /&gt;
&lt;br /&gt;
Another problem with current system software clocks using NTP(like ntpd), is that they provide only an absolute clock.[7]&lt;br /&gt;
So for applications that deals with network managements and measurements, this is unsuitable. Why? Because NTP focus on offset and not on hardware clock oscillator rate. For example, when calculating delay variations, the offset error doesn’t change anything to the calculations but the clocks’ oscillator rate variation does affect it. So having a more accurate timestamp would make those calculation more precise. Which mean we would need another system software clock.&lt;br /&gt;
&lt;br /&gt;
In virtualization(in this case Xen), when migrating a running system from one system to another can cause issues and this is again caused by the ntpd daemon. By default, each guest OS runs its own instance of the ntpd daemon. So the synchronization algorithm keeps track of the reference wallclock time, rate-of-drift and current clock error, which are defined by the hardware clock on the system. So when migrating the virtualized OS to another system, the ntpd state is saved and when it is enabled again on the new system, thats where the problems starts. Because no two hardware clocks drifts the same way or have the exact same wallclock time, all the information traced by the daemon are all of a sudden inaccurate. This could prove disastrous to the system. This could go from a slowly recoverable error to one where ntpd might never recover, making the virtualized OS unstable.&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
&lt;br /&gt;
The authors of this timekeeping paper have done previous work exploring the feed-forward and feedback mechanisms for clock algorithm adjustment in non-virtual systems [7][8]. The RADclock algorithm (Robust Absolute Difference) was originally explored to address the drift resulting from NTP&#039;s feedback algorithm, and how non-ideal network conditions (a circumstance that is quite common) can have serious effects. In their original paper they improved network synchronization using the TimeStamp Counter (TSC) register a system call introduced in Pentium class machines as a source for a CPU cycle count. The use of a more reliable timestamp and counter provided &amp;quot;GPS-like&amp;quot; reliability in networked enviroments.&lt;br /&gt;
&lt;br /&gt;
This new paper seeks to take a similar approach in a virtual machine setting where VM migration can cause much more severe disruption than simply lost UDP packets. Rather than use TSC calls (&#039;&#039;rdtsc()&#039;&#039; in [8]) they tried several clock sources, seeking to eliminate variability from power management and CPU load when setting &#039;&#039;raw&#039;&#039; timestamps for use in guest machines.&lt;br /&gt;
&lt;br /&gt;
The paper makes several references to &#039;&#039;feed-forward&#039;&#039; and &#039;&#039;feedback&#039;&#039; mechanisms, and so a quick discussion of these control theories is in order. In feed-forward mechanisms, inputs to a process or calculation may be modified in advance, but the resulting output plays no part in subsequent calculations. In feedback mechanisms (such as NTPd) inputs to a calculation can be modified by outputs from previous ones. As a result, feedback mechanisms carry state from one step to the next. Since the state of a virtual environment may be rendered inaccurate by so many sources a feedback mechanism as a bad idea. The statelessness of feed-forward mechanisms offers VM migrations a particular advantage since after migration a guest OS can simply discover the actual facts of timestamps rather than try to estimate them from their own invalid state information.&lt;br /&gt;
&lt;br /&gt;
The mechanism the authors used in the Xen environment was the XenStore, a filesystem structure like &#039;&#039;sysfs&#039;&#039; or &#039;&#039;procfs&#039;&#039; that permits communications between virtual domains using shared memory. Dom0 (Xen terminology for the hypervisor) takes sychronization from its own time server and saves the calculated clock parameters to the shared XenStore. On DomU (Xen for any guest OS) an application would simply use the shared information as a raw timestamp or a time difference. Their extensive testing showed a clear -- if not surprising -- advantage over NTPd.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
It is difficult to critique the authors&#039; work since they did a great job of finding a meaningful set of timestamps and counters and clearly demonstrated an advantage in their field of study. They also compared a number of time sources to ensure that their selection was meaningful and stable. And it&#039;s hard to argue with success. Their results approximate the variation that comes from CPU temperature. That&#039;s quite impressive.&lt;br /&gt;
&lt;br /&gt;
As a student, one criticism might be that they found quite an obscure way of describing what was at heart a very simple problem. Of course, to be fair to these academics, their paper wasn&#039;t written for students. But the problem can be summed up succinctly: If you can&#039;t trust your own perception of time, ask the closest agent you &#039;&#039;can&#039;&#039; trust -- and make sure they&#039;ve check their watch. There is no closer source to a VM than its host, so find the fastest way there.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. &amp;quot;Virtualize Everything But Time&amp;quot; by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch, 2010. http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf&lt;br /&gt;
&lt;br /&gt;
2. &amp;quot;Timekeeping in Virtual Machines, Information Guide&amp;quot; from VMWare. http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf&lt;br /&gt;
&lt;br /&gt;
3. &amp;quot;Bran&#039;s Kernel Development Tutorial&amp;quot; from Bona Fide OS Developer website. http://www.osdever.net/bkerndev/Docs/pit.htm  &lt;br /&gt;
&lt;br /&gt;
4. &amp;quot;What is a CMOS battery, and why does my computer need one?&amp;quot; from the Indiana University&#039;s Knowledge Base, 2010. http://kb.iu.edu/data/adoy.html&lt;br /&gt;
&lt;br /&gt;
5. &amp;quot;Multiprocessor Specification version 1.4&amp;quot; from Intel, 1997. http://developer.intel.com/design/pentium/datashts/24201606.pdf&lt;br /&gt;
&lt;br /&gt;
6. Pasztor and Veitch. &amp;quot;PC Based Precision Timing Without GPS&amp;quot;.  2002. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf&lt;br /&gt;
&lt;br /&gt;
7. Veitch, Ridoux, Korada. &amp;quot;Robust Synchronization of Absolute and Difference Clocks over Networks&amp;quot;. 2009. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf&lt;br /&gt;
&lt;br /&gt;
8. Broomhead, T.; Ridoux, J.; Veitch, D.; , &amp;quot;Counter availability and characteristics for feed-forward based synchronization,&amp;quot; Precision Clock Synchronization for Measurement, Control and Communication, 2009. ISPCS 2009. International Symposium on , vol., no., pp.1-6, 12-16 Oct. 2009&lt;br /&gt;
&lt;br /&gt;
9. &amp;quot;Advanced Configuration and Power Interface Specification&amp;quot;. &#039;&#039;Intel Corporation&#039;&#039;. April 2010. http://www.acpi.info/DOWNLOADS/ACPIspec40a.pdf. Accessed Nov. 2010.&lt;br /&gt;
&lt;br /&gt;
10. &amp;quot;Game timing and Multiecore Processors&amp;quot;. &#039;&#039;msdn&#039;&#039; . Dec 2005. http://msdn.microsoft.com/en-us/library/ee417693%28VS.85%29.aspx . Accessed Nov. 2010.&lt;br /&gt;
&lt;br /&gt;
11. &amp;quot;IA-PC HPET (High Precision Event Timers) Specification. &#039;&#039;Intel Corporation&#039;&#039;. Dec. 2004. http://hackipedia.org/Hardware/HPET,%20High%20Performance%20Event%20Timer/IA-PC%20HPET%20%28High%20Precision%20Event%20Timers%29%20Specification.pdf . Accessed Nov. 2010.&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=6474</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=6474"/>
		<updated>2010-12-02T18:34:12Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The guest time-keeping section is really good but requires citations. Does someone know where exactly the info came from? - Fedor&lt;br /&gt;
&lt;br /&gt;
Hi, I&#039;m making some cosmetic changes to style, grammar&amp;amp;citation-format.  - Fedor&lt;br /&gt;
&lt;br /&gt;
--[[User:Spanke|Spanke]] 00:19, 2 December 2010 (UTC) Finished Timers, I hate 3004...&lt;br /&gt;
&lt;br /&gt;
--[[User:Jjpwilso|Jjpwilso]] 00:03, 2 December 2010 (UTC) I&#039;ll check for some more references on the ACM and IEEE databases. In the meantime I thought I&#039;d mention what Anil said regarding critique. He suggested we should consider other approaches to the same solution, such as modifying NTP with a different heuristic. I&#039;ll see what I can dig up in other papers on NTP.&lt;br /&gt;
&lt;br /&gt;
--[[User:ScottG|ScottG]] 22:06, 1 December 2010 (UTC) I&#039;m assuming you meant for me to add my references, yes? I really only used the article, and &#039;Timekeeping in Virtual Machines&#039; which I went to add, but is already on there. I&#039;ve looked for other articles to try to get how others have looked at it that aren&#039;t VMware, but there really isn&#039;t a huge amount out there dealing &#039;&#039;specifically&#039;&#039; with guest timekeeping (unless I&#039;ve gone Google-blind, which has admittedly happened before). Mostly I ran into links pointing to that specific article.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 17:50, 1 December 2010 (UTC) I added stuf into the Research problems. I think I summarized most of them. If I forgot any, please add them in. I also added the missing references in the reference section. For Fedor, we seem to miss some content in 2 sections. Also, you could read through the other section and add/change some pertinent information that might&#039;ve been missed that would make this essay even better.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 15:11, 1 December 2010 (UTC) Would it be possible to add your references at the bottom please? Even if it is a link. I have added the article link at the top of the essay.&lt;br /&gt;
&lt;br /&gt;
Hey guys, sorry its taken me a while to post here. If there is a particular topic that needs researching, I could spend some hours doing that tomorrow - suggestions? Also, I intend to fix up the style&amp;amp;structure after everything is done as I am quite good with that. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
--[[User:ScottG|ScottG]] 21:36, 26 November 2010 (UTC) So I was a little (more than a little) behind on my initially estimated time for getting stuff up on Guest Timekeeping, but that&#039;s the gist of it there now. I&#039;m going to try to buff it up a bit before it&#039;s due, since what I put in is a bit rougher than I&#039;d like. If I seem to be missing something that should be pretty obvious, let me know and I&#039;ll work it in.&lt;br /&gt;
&lt;br /&gt;
--[[User:Jjpwilso|Jjpwilso]] 15:49, 23 November 2010 (UTC) I&#039;ve been completely swamped with COMP3004 stuff (among other things) and feeling guilty as hell about this essay. The good news, for those who might have missed today&#039;s lecture, is we have an extension of one week. Phew!!&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 21:29, 22 November 2010 (UTC) I have added a small part to the background section. I have created by hand a diagram explaining how it works. I tried to find an original way of doing it but it is the same diagram everywhere. Please feel free to comment here or by sending me an email.&lt;br /&gt;
&lt;br /&gt;
--[[User:AbsMechanik|AbsMechanik]] 19:46, 22 November 2010 (UTC) Here&#039;s what my research has led me to so far. I&#039;m trying to come up with good points for the research problem, contribution and critique part of this essay. Here&#039;s a bunch of links, I&#039;ve come across. I think there will be a few more tonight. Feel free to read through &#039;em: &lt;br /&gt;
&amp;lt;br&amp;gt;http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.xen.org/files/xen_interface.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.microsoft.com/whdc/system/sysinternals/mm-timer.mspx&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.intel.com/hardwaredesign/hpetspec_1.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.cubinlab.ee.unimelb.edu.au/radclock/&lt;br /&gt;
&lt;br /&gt;
--[[User:ScottG|ScottG]] 18:55, 22 November 2010 (UTC) I&#039;m good taking the Guest Timekeeping section. Hopefully I&#039;ll have some stuff up tonight or early tomorrow for it.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 17:14, 22 November 2010 (UTC) I will be working on the Background section. I will dedicate it to explain some of the key concepts that are used in the research paper that will allow the readers to have a better understanding on the rest of our essay. The structure you&#039;ve put in place looks good but it might get modified, depending on the text will flow. The diagram is a good idea. I will drawn a simple one and add it in. Feel free again to critique.&lt;br /&gt;
&lt;br /&gt;
--[[User:Jjpwilso|Jjpwilso]] 15:12, 16 November 2010 (UTC) I wanted to get a structure started, so I have stubbed out the first section. Note: some of the sub-sections might belong in the Research Problem section but we can easily move them if they fit there. Let&#039;s use this area to plan who is doing what. Feel free to critique any of my submissions. When you comment here, please put your comments at the very top so we can easily see recent posts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Participants=&lt;br /&gt;
(X) Blais   Sylvain sblais2 - Email: syl20blais@gmail.com&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Graham  Scott   sgraham6&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Ilitchev Fedor  filitche fedor dot ilitchev at gmail dot com &amp;lt;br&amp;gt; &lt;br /&gt;
(X) Panke   Shane   spanke&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Shukla  Abhinav ashukla2&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Wilson  Robert  jjpwilso&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6472</id>
		<title>COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6472"/>
		<updated>2010-12-02T18:33:02Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Virtualize Everything But Time =&lt;br /&gt;
Article written by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch. They are working for the Center for Ultra-Broadband Information Networks (CUBIN) Department of Electrical &amp;amp; Electronic Engineering at the University of Melbourne in Australia. Here is the link to the article: [http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
&lt;br /&gt;
The next time you notice one stranger ask another for the time and you see them check their watch, try this experiment: immediately ask too. Chances are the person will check their watch again. Why? Human internal clocks are notoriously unreliable. Our sense of time contracts and expands all day long. We seem to believe that a definitive report of time can only come from some mechanical or electronic source. So social norms require that the watch owner provides you with two things: 1) the time, and 2) a gesture of external authority, i.e. a glance at their watch.&lt;br /&gt;
&lt;br /&gt;
The story of time inside a virtual machine is almost as unreliable as our own internal clocks. How much time has elapsed since a VM client got the CPU&#039;s attention? At the best of times there&#039;s no way for it to guess because it wasn&#039;t actually running the whole time. If the VM was suspended and migrated from one physical host to another its concept of time is even worse. This paper is about how a computer glances at its metaphorical watch, and what kinds of timepieces it has at hand.&lt;br /&gt;
&lt;br /&gt;
To better understand this paper, it is very important to have a good understanding of the general concepts behind it. For example, we all know what clocks are in our day-to-day lives but how are they different in the context of computing? In this section, we will describe concepts like timekeeping, hardware/software clocks, explore the advantages and disadvantages of the different available counters and synchronization algorithms, and explain what a para-virtualized system is about.&lt;br /&gt;
&lt;br /&gt;
===Timekeeping===&lt;br /&gt;
&lt;br /&gt;
Computers typically measure time in one of two ways: tick counting and tickless timekeeping[2]. Tick counting is when the operating system sets up a hardware device, generally a CPU, to interrupt at a certain rate. A counter is updated each time one of these interrupts occurs. It is this counter that allows the system to keep track of the passage of time. &lt;br /&gt;
&lt;br /&gt;
In tickless timekeeping, instead of the OS keeping track of time through interrupts, a hardware device is used instead. This device has its own counter which starts when the system is booted. The OS simply reads the counter from it when needed. Tickless timekeeping seems to be the better way to keep track of time because it doesn’t hog the CPU with hardware interrupts, however its performance is very dependent on the type of hardware used. Another disadvantages is that they tend to drift (see below). But neither of these methods knows the actual time, they only know how long it has been since they last checked an authoritative source. Personal computers typically get their time from a battery-backed real-time clock (i.e. a CMOS clock). Networked machines often need a more precise time, with a resolution in the millisecond range or below. In these cases a machine can query another source such as one based on Network Time Protocol (NTP).&lt;br /&gt;
&lt;br /&gt;
===Clocks===&lt;br /&gt;
&lt;br /&gt;
Computer “clocks” or “timers” can be hardware based, software based or they can even be an hybrid. The most commonly found timer is the hardware timer. All of the hardware timers can be generally described by this diagram where some have either more or less features:&lt;br /&gt;
&lt;br /&gt;
Diagram1. Timer Abstraction&lt;br /&gt;
&lt;br /&gt;
[[File:Timerabstract.jpg]]&lt;br /&gt;
&lt;br /&gt;
This diagram nicely represents how tick counting works. The oscillator runs at a predetermined frequency. The operating system might have to measure it when the system boots. The counter starts with a predetermined value which can be set by software. For every cycle of the oscillator, the counter counts down one unit. When it reaches zero, its generates an output signal that might interrupt the CPU. That same interrupt will then allow the counter’s initial value to be reloaded into the counter and the process begins again. Not all hardware timers work exactly like that. For instance, some actually count up, others don&#039;t use interrupts, and yet others don&#039;t keep an initial counter. The general principle of hardware counters is the however the same. There is some kind of fixed interval at the end of which the current time is updated by an appropriate number of units (i.e. nanoseconds).&lt;br /&gt;
&lt;br /&gt;
===Timers===&lt;br /&gt;
# PIT is useful for generating interrupts at regular intervals through its three channels. Channel 0 is bound to IRQ0 which interrupts the CPU at regular intervals. Channel 1 is specific to each system and Channel 2 is connected to the speaker system. As such, we only need to concern ourselves with Channel 0. [3]&lt;br /&gt;
# CMOS RTC, also known as a CMOS battery, allows the CMOS chip to remain powered to keep track of things like time even while the physical PC unit has no source of power. If there is no CMOS battery on the motherboard, the computer would reset to its default time each restart. The battery itself can die, as expected, if the computer is powered off and not used for a long period of time. This can cause issues with the main OS as well as the VM. [4]&lt;br /&gt;
# Local APIC handles all external interrupts for the processor in the system. It can also accept and generate inter-processor interrupts between Local APICs. [5]&lt;br /&gt;
# ACPI establishes industry-standard interfaces configuration guided by the OS and power management. It is industry-standard through its creators, Intel, Microsoft, Phoenix, Hewlett Packard and Toshiba. Its power management includes all forms: notebooks, desktops, and servers. ACPI&#039;s goal is to improve current power and configuration standards for hardware devices by transitioning to ACPI-compliant hardware. This allows the OS as well as the VM to have control over power management. [9]&lt;br /&gt;
# RDTSC is based on the x86 P5 instruction set and perform high-resolution timing, however, it suffers from several flaws. Discontinuous values from the processor are caused as a result of not using the same thread to the processor each time, which can also be caused by having a multicore processor. This is made worse by ACPI which will eventually lead to the cores being completely out of sync. Availability of dedicated hardware: &amp;quot;RDTSC locks the timing information that the application requests to the processor&#039;s cycle counter.&amp;quot; With dedicated timing devices included on modern motherboards this method of locking the timing information will become obsolete. Lastly, the variability of the CPU&#039;s frequency needs to be taken into account. With modern day laptops, most CPU frequencies are adjusted on the fly to respond to the users demand when needed and to lower themselves when idle, this results in longer battery life and less heat generated by the laptop but regretfully affects RDTSC making it unreliable. [10]&lt;br /&gt;
# HPET defines a set of timers that the OS has access to and can assign to applications. Each timer can generate an interrupt when the least significant bits are equal to the equivalent bits of the 64-bit counter value. However, a race case can occur in which the target time has already passed. This causes more interrupts and more work even if the task is a simple one. It does produce less interrupts than its predecessors PIT and CMOS RTC giving it an edge. Despite its race condition, this modern timer is improvement upon old practices.  [11]&lt;br /&gt;
&lt;br /&gt;
==Guest Timekeeping==&lt;br /&gt;
&lt;br /&gt;
Guest timekeeping is done using the same general methods as any computer timekeeping: either tick counting or tickless systems. Where the two begin to differ, however, is that a host operating system is able to communicate directly with the physical hardware, while the guest operating system is unable to do so, having to communicate to the host system that it wants to communicate with the hardware. Having to do this is the greatest source of the guest operating system&#039;s clock losing accuracy, otherwise known as drifting.&lt;br /&gt;
&lt;br /&gt;
===Sources of Drift===&lt;br /&gt;
&lt;br /&gt;
When a guest operating system is started, its clock simply synchronizes with the host&#039;s – some virtual machines such as VMware also do this when they are resumed from a suspended state, or restored from a snapshot. It is easy to reason that, because the guest&#039;s clock starts off correctly, it will always be correct from then on. Unfortunately, this is not the case. The first source of drift is simply due to electronics. A clock is almost never entirely accurate, having a slight error due to the effects of ambient temperature on oscillator frequency, even on the host system. Since the guest communicates with the host in order to keep track of its time, an error in the host&#039;s time is not only passed on to the guest, but because the host is trying to correct its own time, the guest&#039;s request for a count is given slightly less priority, making it yet again lose accuracy. The larger the drift in the host, the larger the drift in the guest, as the host&#039;s drift simply compounds the issue.&lt;br /&gt;
&lt;br /&gt;
Aside from the host&#039;s own drift, the other cause of drift in the virtual environment is the fact that it is treated like a process by the host. In and of itself this does not seem like a problem, but the guest system can be suspended just before it tries to update its perception of time. With restricted CPU time, it is easy for the lost ticks to pile up and create a backlog. Even if the guest is checking over the network with a time server, its network conversation can be suspended before the answer comes back. When the process resumes the guest has a wildly inaccurate perception of the elapsed time (known as Round-Trip Time or RTT) and its incorrect adjustments for the network delay will throw off the clock. Problems can also come from memory swaps performed by the host. If the virtual environment does not have enough allocated to it by the host it can run into the problem of swapping out pages that are needed soon. Swapping the pages back in will momentarily bring the entire virtual environment to a halt, so ticks are missed and the clock falls behind. &lt;br /&gt;
&lt;br /&gt;
Clearly the errors in virtual machine timekeeping come from algorithms that were simply not designed for virtual environments. They assume a more stable physical world than they have.&lt;br /&gt;
&lt;br /&gt;
===Impact of Drift===&lt;br /&gt;
&lt;br /&gt;
The sources of drift essentially boil down to round-off errors and lost ticks. But the practical impact of drift is quite apparent in any automated system. For a real-world analogy consider a factory&#039;s assembly line, where the machinery is finely tuned to do its own specific part at certain intervals, and it generally does so with impressive efficiency. If the clock in the system were to drift, however, a specific machine may move too soon or too late, bringing the line to a potentially catastrophic halt.&lt;br /&gt;
&lt;br /&gt;
In a virtual environment, drift is a bit more subtle, as one result of it could be skewed process scheduling – some schedulers give a certain amount of time to a process before moving on, but if the guest&#039;s time has drifted substantially, when it tries to correct its time it could give more or less time to the processes in the scheduler.&lt;br /&gt;
&lt;br /&gt;
The impacts of drift are even more apparent when virtual machines must communicate with one another. Consider the case of a farm of distributed gaming servers, where differences in timing can mean virtual characters suddenly warp at super-human speed across the landscape. Or for a more serious example consider investment trading, where missing the moment to bid can mean a difference of millions of dollars.&lt;br /&gt;
&lt;br /&gt;
===Compensation Strategies===&lt;br /&gt;
&lt;br /&gt;
There are a number of compensation strategies for dealing with drift, depending on the cause of it. If the problem is due to CPU management issues, then the host can give more CPU time to the virtual machine, or it can lower the timer interrupt rate – or simply use a tickless counter. If it is due to a  memory management issue, allocating more memory to the virtual environment should prevent the system from needing to swap out page files so often.&lt;br /&gt;
&lt;br /&gt;
If the issue is from neither of those, but simply due to the inevitable lag when the guest communicates with the hardware via the host, then there are other methods to correct the drift. Most systems natively have algorithms built in to correct the time if it gets too far ahead or behind real time, though they are not without their own faults; if the time is set ahead when catching up, the backlog of ticks it has built up may not be cleared, so it could potentially set itself ahead multiple times until the backlog is dealt with. Tools built into the virtual machine itself can also deal with drift to an extent, as VMware Tools does. This kind of tool checks to see if the clock&#039;s error is within a certain margin. If it exceeds the margin, then the backlog is set to zero – to prevent the issue mentioned with the native algorithms – and resynchronizes with the host clock before the guest goes back to keeping track of time as it normally would.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
Today, the use of the Network Time Protocol and of daemons like ntpd is the dominant solution for accurate timekeeping. In optimal conditions, the ntpd can be very good but these situations rarely happen. Network congestion, disconnections, lower quality networking hardware and unsuspected system events can create offsets errors in the order of 10‘s or even 100 milliseconds(ms). [http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf]&lt;br /&gt;
For demanding applications, this is neither robust or reliable. One way to enhance the performance of ntpd would be to poll from the NTP server more often as this would reduced the offset error but unfortunately, this would increase the network traffic which could cause network congestions which would raise the offset error. So this won’t work. &lt;br /&gt;
&lt;br /&gt;
Another problem with current system software clocks using NTP(like ntpd), is that they provide only an absolute clock.[http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf]&lt;br /&gt;
So for applications that deals with network managements and measurements, this is unsuitable. Why? Because NTP focus on offset and not on hardware clock oscillator rate. For example, when calculating delay variations, the offset error doesn’t change anything to the calculations but the clocks’ oscillator rate variation does affect it. So having a more accurate timestamp would make those calculation more precise. Which mean we would need another system software clock.&lt;br /&gt;
&lt;br /&gt;
In virtualization(in this case Xen), when migrating a running system from one system to another can cause issues and this is again caused by the ntpd daemon. By default, each guest OS runs its own instance of the ntpd daemon. So the synchronization algorithm keeps track of the reference wallclock time, rate-of-drift and current clock error, which are defined by the hardware clock on the system. So when migrating the virtualized OS to another system, the ntpd state is saved and when it is enabled again on the new system, thats where the problems starts. Because no two hardware clocks drifts the same way or have the exact same wallclock time, all the information traced by the daemon are all of a sudden inaccurate. This could prove disastrous to the system. This could go from a slowly recoverable error to one where ntpd might never recover, making the virtualized OS unstable.&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
&lt;br /&gt;
The authors of this timekeeping paper have done previous work exploring the feed-forward and feedback mechanisms for clock algorithm adjustment in non-virtual systems [7][8]. The RADclock algorithm (Robust Absolute Difference) was originally explored to address the drift resulting from NTP&#039;s feedback algorithm, and how non-ideal network conditions (a circumstance that is quite common) can have serious effects. In their original paper they improved network synchronization using the TimeStamp Counter (TSC) register a system call introduced in Pentium class machines as a source for a CPU cycle count. The use of a more reliable timestamp and counter provided &amp;quot;GPS-like&amp;quot; reliability in networked enviroments.&lt;br /&gt;
&lt;br /&gt;
This new paper seeks to take a similar approach in a virtual machine setting where VM migration can cause much more severe disruption than simply lost UDP packets. Rather than use TSC calls (&#039;&#039;rdtsc()&#039;&#039; in [8]) they tried several clock sources, seeking to eliminate variability from power management and CPU load when setting &#039;&#039;raw&#039;&#039; timestamps for use in guest machines.&lt;br /&gt;
&lt;br /&gt;
The paper makes several references to &#039;&#039;feed-forward&#039;&#039; and &#039;&#039;feedback&#039;&#039; mechanisms, and so a quick discussion of these control theories is in order. In feed-forward mechanisms, inputs to a process or calculation may be modified in advance, but the resulting output plays no part in subsequent calculations. In feedback mechanisms (such as NTPd) inputs to a calculation can be modified by outputs from previous ones. As a result, feedback mechanisms carry state from one step to the next. Since the state of a virtual environment may be rendered inaccurate by so many sources a feedback mechanism as a bad idea. The statelessness of feed-forward mechanisms offers VM migrations a particular advantage since after migration a guest OS can simply discover the actual facts of timestamps rather than try to estimate them from their own invalid state information.&lt;br /&gt;
&lt;br /&gt;
The mechanism the authors used in the Xen environment was the XenStore, a filesystem structure like &#039;&#039;sysfs&#039;&#039; or &#039;&#039;procfs&#039;&#039; that permits communications between virtual domains using shared memory. Dom0 (Xen terminology for the hypervisor) takes sychronization from its own time server and saves the calculated clock parameters to the shared XenStore. On DomU (Xen for any guest OS) an application would simply use the shared information as a raw timestamp or a time difference. Their extensive testing showed a clear -- if not surprising -- advantage over NTPd.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
It is difficult to critique the authors&#039; work since they did a great job of finding a meaningful set of timestamps and counters and clearly demonstrated an advantage in their field of study. They also compared a number of time sources to ensure that their selection was meaningful and stable. And it&#039;s hard to argue with success. Their results approximate the variation that comes from CPU temperature. That&#039;s quite impressive.&lt;br /&gt;
&lt;br /&gt;
As a student, one criticism might be that they found quite an obscure way of describing what was at heart a very simple problem. Of course, to be fair to these academics, their paper wasn&#039;t written for students. But the problem can be summed up succinctly: If you can&#039;t trust your own perception of time, ask the closest agent you &#039;&#039;can&#039;&#039; trust -- and make sure they&#039;ve check their watch. There is no closer source to a VM than its host, so find the fastest way there.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. &amp;quot;Virtualize Everything But Time&amp;quot; by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch, 2010. http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf&lt;br /&gt;
&lt;br /&gt;
2. &amp;quot;Timekeeping in Virtual Machines, Information Guide&amp;quot; from VMWare. http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf&lt;br /&gt;
&lt;br /&gt;
3. &amp;quot;Bran&#039;s Kernel Development Tutorial&amp;quot; from Bona Fide OS Developer website. http://www.osdever.net/bkerndev/Docs/pit.htm  &lt;br /&gt;
&lt;br /&gt;
4. &amp;quot;What is a CMOS battery, and why does my computer need one?&amp;quot; from the Indiana University&#039;s Knowledge Base, 2010. http://kb.iu.edu/data/adoy.html&lt;br /&gt;
&lt;br /&gt;
5. &amp;quot;Multiprocessor Specification version 1.4&amp;quot; from Intel, 1997. http://developer.intel.com/design/pentium/datashts/24201606.pdf&lt;br /&gt;
&lt;br /&gt;
6. &amp;quot;PC Based Precision Timing Without GPS&amp;quot; by Attila Pa ́sztor and Darryl Veitch, 2002. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf&lt;br /&gt;
&lt;br /&gt;
7. &amp;quot;Robust Synchronization of Absolute and Difference Clocks over Networks&amp;quot; by Darryl Veitch, Julien Ridoux and Satish Babu Korada, 2009. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf&lt;br /&gt;
&lt;br /&gt;
8. Broomhead, T.; Ridoux, J.; Veitch, D.; , &amp;quot;Counter availability and characteristics for feed-forward based synchronization,&amp;quot; Precision Clock Synchronization for Measurement, Control and Communication, 2009. ISPCS 2009. International Symposium on , vol., no., pp.1-6, 12-16 Oct. 2009&lt;br /&gt;
&lt;br /&gt;
9. &amp;quot;Advanced Configuration and Power Interface Specification&amp;quot;. &#039;&#039;Intel Corporation&#039;&#039;. April 2010. http://www.acpi.info/DOWNLOADS/ACPIspec40a.pdf. Accessed Nov. 2010.&lt;br /&gt;
&lt;br /&gt;
10. &amp;quot;Game timing and Multiecore Processors&amp;quot;. &#039;&#039;msdn&#039;&#039; . Dec 2005. http://msdn.microsoft.com/en-us/library/ee417693%28VS.85%29.aspx . Accessed Nov. 2010.&lt;br /&gt;
&lt;br /&gt;
11. &amp;quot;IA-PC HPET (High Precision Event Timers) Specification. &#039;&#039;Intel Corporation&#039;&#039;. Dec. 2004. http://hackipedia.org/Hardware/HPET,%20High%20Performance%20Event%20Timer/IA-PC%20HPET%20%28High%20Precision%20Event%20Timers%29%20Specification.pdf . Accessed Nov. 2010.&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=6467</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=6467"/>
		<updated>2010-12-02T18:24:33Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hi, I&#039;m making some cosmetic changes to style, grammar&amp;amp;citation-format.  - Fedor&lt;br /&gt;
&lt;br /&gt;
--[[User:Spanke|Spanke]] 00:19, 2 December 2010 (UTC) Finished Timers, I hate 3004...&lt;br /&gt;
&lt;br /&gt;
--[[User:Jjpwilso|Jjpwilso]] 00:03, 2 December 2010 (UTC) I&#039;ll check for some more references on the ACM and IEEE databases. In the meantime I thought I&#039;d mention what Anil said regarding critique. He suggested we should consider other approaches to the same solution, such as modifying NTP with a different heuristic. I&#039;ll see what I can dig up in other papers on NTP.&lt;br /&gt;
&lt;br /&gt;
--[[User:ScottG|ScottG]] 22:06, 1 December 2010 (UTC) I&#039;m assuming you meant for me to add my references, yes? I really only used the article, and &#039;Timekeeping in Virtual Machines&#039; which I went to add, but is already on there. I&#039;ve looked for other articles to try to get how others have looked at it that aren&#039;t VMware, but there really isn&#039;t a huge amount out there dealing &#039;&#039;specifically&#039;&#039; with guest timekeeping (unless I&#039;ve gone Google-blind, which has admittedly happened before). Mostly I ran into links pointing to that specific article.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 17:50, 1 December 2010 (UTC) I added stuf into the Research problems. I think I summarized most of them. If I forgot any, please add them in. I also added the missing references in the reference section. For Fedor, we seem to miss some content in 2 sections. Also, you could read through the other section and add/change some pertinent information that might&#039;ve been missed that would make this essay even better.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 15:11, 1 December 2010 (UTC) Would it be possible to add your references at the bottom please? Even if it is a link. I have added the article link at the top of the essay.&lt;br /&gt;
&lt;br /&gt;
Hey guys, sorry its taken me a while to post here. If there is a particular topic that needs researching, I could spend some hours doing that tomorrow - suggestions? Also, I intend to fix up the style&amp;amp;structure after everything is done as I am quite good with that. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
--[[User:ScottG|ScottG]] 21:36, 26 November 2010 (UTC) So I was a little (more than a little) behind on my initially estimated time for getting stuff up on Guest Timekeeping, but that&#039;s the gist of it there now. I&#039;m going to try to buff it up a bit before it&#039;s due, since what I put in is a bit rougher than I&#039;d like. If I seem to be missing something that should be pretty obvious, let me know and I&#039;ll work it in.&lt;br /&gt;
&lt;br /&gt;
--[[User:Jjpwilso|Jjpwilso]] 15:49, 23 November 2010 (UTC) I&#039;ve been completely swamped with COMP3004 stuff (among other things) and feeling guilty as hell about this essay. The good news, for those who might have missed today&#039;s lecture, is we have an extension of one week. Phew!!&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 21:29, 22 November 2010 (UTC) I have added a small part to the background section. I have created by hand a diagram explaining how it works. I tried to find an original way of doing it but it is the same diagram everywhere. Please feel free to comment here or by sending me an email.&lt;br /&gt;
&lt;br /&gt;
--[[User:AbsMechanik|AbsMechanik]] 19:46, 22 November 2010 (UTC) Here&#039;s what my research has led me to so far. I&#039;m trying to come up with good points for the research problem, contribution and critique part of this essay. Here&#039;s a bunch of links, I&#039;ve come across. I think there will be a few more tonight. Feel free to read through &#039;em: &lt;br /&gt;
&amp;lt;br&amp;gt;http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.xen.org/files/xen_interface.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.microsoft.com/whdc/system/sysinternals/mm-timer.mspx&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.intel.com/hardwaredesign/hpetspec_1.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.cubinlab.ee.unimelb.edu.au/radclock/&lt;br /&gt;
&lt;br /&gt;
--[[User:ScottG|ScottG]] 18:55, 22 November 2010 (UTC) I&#039;m good taking the Guest Timekeeping section. Hopefully I&#039;ll have some stuff up tonight or early tomorrow for it.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 17:14, 22 November 2010 (UTC) I will be working on the Background section. I will dedicate it to explain some of the key concepts that are used in the research paper that will allow the readers to have a better understanding on the rest of our essay. The structure you&#039;ve put in place looks good but it might get modified, depending on the text will flow. The diagram is a good idea. I will drawn a simple one and add it in. Feel free again to critique.&lt;br /&gt;
&lt;br /&gt;
--[[User:Jjpwilso|Jjpwilso]] 15:12, 16 November 2010 (UTC) I wanted to get a structure started, so I have stubbed out the first section. Note: some of the sub-sections might belong in the Research Problem section but we can easily move them if they fit there. Let&#039;s use this area to plan who is doing what. Feel free to critique any of my submissions. When you comment here, please put your comments at the very top so we can easily see recent posts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Participants=&lt;br /&gt;
(X) Blais   Sylvain sblais2 - Email: syl20blais@gmail.com&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Graham  Scott   sgraham6&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Ilitchev Fedor  filitche fedor dot ilitchev at gmail dot com &amp;lt;br&amp;gt; &lt;br /&gt;
(X) Panke   Shane   spanke&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Shukla  Abhinav ashukla2&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Wilson  Robert  jjpwilso&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6466</id>
		<title>COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6466"/>
		<updated>2010-12-02T18:23:37Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Virtualize Everything But Time =&lt;br /&gt;
Article written by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch. They are working for the Center for Ultra-Broadband Information Networks (CUBIN) Department of Electrical &amp;amp; Electronic Engineering at the University of Melbourne in Australia. Here is the link to the article: [http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
&lt;br /&gt;
The next time you notice one stranger ask another for the time and you see them check their watch, try this experiment: immediately ask too. Chances are the person will check their watch again. Why? Human internal clocks are notoriously unreliable. Our sense of time contracts and expands all day long. We seem to believe that a definitive report of time can only come from some mechanical or electronic source. So social norms require that the watch owner provides you with two things: 1) the time, and 2) a gesture of external authority, i.e. a glance at their watch.&lt;br /&gt;
&lt;br /&gt;
The story of time inside a virtual machine is almost as unreliable as our own internal clocks. How much time has elapsed since a VM client got the CPU&#039;s attention? At the best of times there&#039;s no way for it to guess because it wasn&#039;t actually running the whole time. If the VM was suspended and migrated from one physical host to another its concept of time is even worse. This paper is about how a computer glances at its metaphorical watch, and what kinds of timepieces it has at hand.&lt;br /&gt;
&lt;br /&gt;
To better understand this paper, it is very important to have a good understanding of the general concepts behind it. For example, we all know what clocks are in our day-to-day lives but how are they different in the context of computing? In this section, we will describe concepts like timekeeping, hardware/software clocks, explore the advantages and disadvantages of the different available counters and synchronization algorithms, and explain what a para-virtualized system is about.&lt;br /&gt;
&lt;br /&gt;
===Timekeeping===&lt;br /&gt;
&lt;br /&gt;
Computers typically measure time in one of two ways: tick counting and tickless timekeeping[2]. Tick counting is when the operating system sets up a hardware device, generally a CPU, to interrupt at a certain rate. A counter is updated each time one of these interrupts occurs. It is this counter that allows the system to keep track of the passage of time. &lt;br /&gt;
&lt;br /&gt;
In tickless timekeeping, instead of the OS keeping track of time through interrupts, a hardware device is used instead. This device has its own counter which starts when the system is booted. The OS simply reads the counter from it when needed. Tickless timekeeping seems to be the better way to keep track of time because it doesn’t hog the CPU with hardware interrupts, however its performance is very dependent on the type of hardware used. Another disadvantages is that they tend to drift (see below). But neither of these methods knows the actual time, they only know how long it has been since they last checked an authoritative source. Personal computers typically get their time from a battery-backed real-time clock (i.e. a CMOS clock). Networked machines often need a more precise time, with a resolution in the millisecond range or below. In these cases a machine can query another source such as one based on Network Time Protocol (NTP).&lt;br /&gt;
&lt;br /&gt;
===Clocks===&lt;br /&gt;
&lt;br /&gt;
Computer “clocks” or “timers” can be hardware based, software based or they can even be an hybrid. The most commonly found timer is the hardware timer. All of the hardware timers can be generally described by this diagram where some have either more or less features:&lt;br /&gt;
&lt;br /&gt;
Diagram1. Timer Abstraction&lt;br /&gt;
&lt;br /&gt;
[[File:Timerabstract.jpg]]&lt;br /&gt;
&lt;br /&gt;
This diagram nicely represents how tick counting works. The oscillator runs at a predetermined frequency. The operating system might have to measure it when the system boots. The counter starts with a predetermined value which can be set by software. For every cycle of the oscillator, the counter counts down one unit. When it reaches zero, its generates an output signal that might interrupt the CPU. That same interrupt will then allow the counter’s initial value to be reloaded into the counter and the process begins again. Not all hardware timers work exactly like that. For instance, some actually count up, others don&#039;t use interrupts, and yet others don&#039;t keep an initial counter. The general principle of hardware counters is the however the same. There is some kind of fixed interval at the end of which the current time is updated by an appropriate number of units (i.e. nanoseconds).&lt;br /&gt;
&lt;br /&gt;
===Timers===&lt;br /&gt;
# PIT is useful for generating interrupts at regular intervals through its three channels. Channel 0 is bound to IRQ0 which interrupts the CPU at regular intervals. Channel 1 is specific to each system and Channel 2 is connected to the speaker system. As such, we only need to concern ourselves with Channel 0. [3]&lt;br /&gt;
# CMOS RTC, also known as a CMOS battery, allows the CMOS chip to remain powered to keep track of things like time even while the physical PC unit has no source of power. If there is no CMOS battery on the motherboard, the computer would reset to its default time each restart. The battery itself can die, as expected, if the computer is powered off and not used for a long period of time. This can cause issues with the main OS as well as the VM. [4]&lt;br /&gt;
# Local APIC handles all external interrupts for the processor in the system. It can also accept and generate inter-processor interrupts between Local APICs. [5]&lt;br /&gt;
# ACPI establishes industry-standard interfaces configuration guided by the OS and power management. It is industry-standard through its creators, Intel, Microsoft, Phoenix, Hewlett Packard and Toshiba. Its power management includes all forms: notebooks, desktops, and servers. ACPI&#039;s goal is to improve current power and configuration standards for hardware devices by transitioning to ACPI-compliant hardware. This allows the OS as well as the VM to have control over power management. [9]&lt;br /&gt;
# RDTSC is based on the x86 P5 instruction set and perform high-resolution timing, however, it suffers from several flaws. Discontinuous values from the processor are caused as a result of not using the same thread to the processor each time, which can also be caused by having a multicore processor. This is made worse by ACPI which will eventually lead to the cores being completely out of sync. Availability of dedicated hardware: &amp;quot;RDTSC locks the timing information that the application requests to the processor&#039;s cycle counter.&amp;quot; With dedicated timing devices included on modern motherboards this method of locking the timing information will become obsolete. Lastly, the variability of the CPU&#039;s frequency needs to be taken into account. With modern day laptops, most CPU frequencies are adjusted on the fly to respond to the users demand when needed and to lower themselves when idle, this results in longer battery life and less heat generated by the laptop but regretfully affects RDTSC making it unreliable. [http://msdn.microsoft.com/en-us/library/ee417693%28VS.85%29.aspx]&lt;br /&gt;
# HPET defines a set of timers that the OS has access to and can assign to applications. Each timer can generate an interrupt when the least significant bits are equal to the equivalent bits of the 64-bit counter value. However, a race case can occur in which the target time has already passed. This causes more interrupts and more work even if the task is a simple one. It does produce less interrupts than its predecessors PIT and CMOS RTC giving it an edge. Despite its race condition, this modern timer is improvement upon old practices.  [http://hackipedia.org/Hardware/HPET,%20High%20Performance%20Event%20Timer/IA-PC%20HPET%20%28High%20Precision%20Event%20Timers%29%20Specification.pdf]&lt;br /&gt;
&lt;br /&gt;
==Guest Timekeeping==&lt;br /&gt;
&lt;br /&gt;
Guest timekeeping is done using the same general methods as any computer timekeeping, using either tick counting or tickless systems. Where the two begin to differ, however, is that a host operating system is able to communicate directly with the physical hardware, while the guest operating system is unable to do so, having to communicate with the host system that it wants to communicate with the hardware. Having to do this is the greatest source of the guest operating system&#039;s clock losing accuracy, or more simply called drifting.&lt;br /&gt;
&lt;br /&gt;
===Sources of Drift===&lt;br /&gt;
&lt;br /&gt;
When a guest operating system is started, its clock simply synchronizes with the host&#039;s – some virtual machines such as VMware also do this when it is resumed from a suspended state, or restored from a snapshot – so it is easy to think that, since it starts off correctly the guest&#039;s clock will continue to be correct. That is, of course, incorrect. The first source of drift is simply due to electronics. A clock is almost never entirely accurate, having a slight error due to the effects of ambient temperature on oscillator frequency, even on the host system. Since the guest communicates with the host in order to keep track of its time, an error in the host&#039;s time is not only passed on to the guest, but because the host is trying to correct its own time the guest&#039;s request for a count is given slightly less priority, making it yet again lose accuracy. The larger the drift in the host, the larger the drift in the guest, as the host&#039;s drift simply compounds the issue.&lt;br /&gt;
&lt;br /&gt;
Aside from the host&#039;s own drift, the other cause of drift in the virtual environment is the fact that the it is treated like a process by the host. In and of itself this doesn&#039;t seem like a problem, but the guest system can be suspended just before it tries to update its perception of time. With restricted CPU time, it&#039;s easy for the lost ticks to pile up and create a backlog. Even if the guest is checking over the network with a time server, its network conversation can be suspended before the answer comes back. When the process resumes the guest has a wildly inaccurate perception of the elapsed time (known as Round-Trip Time or RTT) and its incorrect adjustments for the network delay will throw off the clock. Problems can also come from memory swaps performed by the host. If the virtual environment does not have enough allocated to it by the host it can run into the problem of swapping out pages that are needed soon. Swapping the pages back in will momentarily bring the entire virtual environment to a halt, so ticks are missed and the clock falls behind.&lt;br /&gt;
&lt;br /&gt;
Clearly the errors in virtual machine timekeeping come from algorithms that were simply not designed for virtual environments. They assume a more stable physical world than they have.&lt;br /&gt;
&lt;br /&gt;
===Impact of Drift===&lt;br /&gt;
&lt;br /&gt;
The sources of drift essentially boil down to round-off errors and lost ticks. But the practical impact of drift is quite apparent in any automated system. For a real-world analogy consider a factory&#039;s assembly line, where the machinery is finely tuned to do its own specific part at certain intervals, and it generally does so with impressive efficiency. If the clock in the system were to drift, however, a specific machine may move too soon or too late, bringing the line to a potentially catastrophic halt.&lt;br /&gt;
&lt;br /&gt;
In a virtual environment, drift is a bit more subtle, as one result of it could be skewed process scheduling – some schedulers give a certain amount of time to a process before moving on, but if the guest&#039;s time has drifted substantially, when it tries to correct its time it could give more or less time to the processes in the scheduler.&lt;br /&gt;
&lt;br /&gt;
The impacts of drift are even more apparent when virtual machines must communicate with one another. Consider the case of a farm of distributed gaming servers, where differences in timing can mean virtual characters suddenly warp at super-human speed across the landscape. Or for a more serious example consider investment trading, where missing the moment to bid can mean a difference of millions of dollars.&lt;br /&gt;
&lt;br /&gt;
===Compensation Strategies===&lt;br /&gt;
&lt;br /&gt;
There are a number of compensation strategies for dealing with drift, depending on the cause of it. If the problem is due to CPU management issues, then the host can give more CPU time to the virtual machine, or it can lower the timer interrupt rate – or simply use a tickless counter. If it is due to a  memory management issue, allocating more memory to the virtual environment should prevent the system from needing to swap out page files so often.&lt;br /&gt;
&lt;br /&gt;
If the issue is from neither of those, but simply due to the inevitable lag when the guest communicates with the hardware via the host, then there are other methods to correct the drift. Most systems natively have algorithms built in to correct the time if it gets too far ahead or behind real time, though they are not without their own faults; if the time is set ahead when catching up, the backlog of ticks it has built up may not be cleared, so it could potentially set itself ahead multiple times until the backlog is dealt with. Tools built into the virtual machine itself can also deal with drift to an extent, as VMware Tools does. This kind of tool checks to see if the clock&#039;s error is within a certain margin. If it exceeds the margin, then the backlog is set to zero – to prevent the issue mentioned with the native algorithms – and resynchronizes with the host clock before the guest goes back to keeping track of time as it normally would.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
Today, the use of the Network Time Protocol and of daemons like ntpd is the dominant solution for accurate timekeeping. In optimal conditions, the ntpd can be very good but these situations rarely happen. Network congestion, disconnections, lower quality networking hardware and unsuspected system events can create offsets errors in the order of 10‘s or even 100 milliseconds(ms). [http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf]&lt;br /&gt;
For demanding applications, this is neither robust or reliable. One way to enhance the performance of ntpd would be to poll from the NTP server more often as this would reduced the offset error but unfortunately, this would increase the network traffic which could cause network congestions which would raise the offset error. So this won’t work. &lt;br /&gt;
&lt;br /&gt;
Another problem with current system software clocks using NTP(like ntpd), is that they provide only an absolute clock.[http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf]&lt;br /&gt;
So for applications that deals with network managements and measurements, this is unsuitable. Why? Because NTP focus on offset and not on hardware clock oscillator rate. For example, when calculating delay variations, the offset error doesn’t change anything to the calculations but the clocks’ oscillator rate variation does affect it. So having a more accurate timestamp would make those calculation more precise. Which mean we would need another system software clock.&lt;br /&gt;
&lt;br /&gt;
In virtualization(in this case Xen), when migrating a running system from one system to another can cause issues and this is again caused by the ntpd daemon. By default, each guest OS runs its own instance of the ntpd daemon. So the synchronization algorithm keeps track of the reference wallclock time, rate-of-drift and current clock error, which are defined by the hardware clock on the system. So when migrating the virtualized OS to another system, the ntpd state is saved and when it is enabled again on the new system, thats where the problems starts. Because no two hardware clocks drifts the same way or have the exact same wallclock time, all the information traced by the daemon are all of a sudden inaccurate. This could prove disastrous to the system. This could go from a slowly recoverable error to one where ntpd might never recover, making the virtualized OS unstable.&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
&lt;br /&gt;
The authors of this timekeeping paper have done previous work exploring the feed-forward and feedback mechanisms for clock algorithm adjustment in non-virtual systems [7][8]. The RADclock algorithm (Robust Absolute Difference) was originally explored to address the drift resulting from NTP&#039;s feedback algorithm, and how non-ideal network conditions (a circumstance that is quite common) can have serious effects. In their original paper they improved network synchronization using the TimeStamp Counter (TSC) register a system call introduced in Pentium class machines as a source for a CPU cycle count. The use of a more reliable timestamp and counter provided &amp;quot;GPS-like&amp;quot; reliability in networked enviroments.&lt;br /&gt;
&lt;br /&gt;
This new paper seeks to take a similar approach in a virtual machine setting where VM migration can cause much more severe disruption than simply lost UDP packets. Rather than use TSC calls (&#039;&#039;rdtsc()&#039;&#039; in [8]) they tried several clock sources, seeking to eliminate variability from power management and CPU load when setting &#039;&#039;raw&#039;&#039; timestamps for use in guest machines.&lt;br /&gt;
&lt;br /&gt;
The paper makes several references to &#039;&#039;feed-forward&#039;&#039; and &#039;&#039;feedback&#039;&#039; mechanisms, and so a quick discussion of these control theories is in order. In feed-forward mechanisms, inputs to a process or calculation may be modified in advance, but the resulting output plays no part in subsequent calculations. In feedback mechanisms (such as NTPd) inputs to a calculation can be modified by outputs from previous ones. As a result, feedback mechanisms carry state from one step to the next. Since the state of a virtual environment may be rendered inaccurate by so many sources a feedback mechanism as a bad idea. The statelessness of feed-forward mechanisms offers VM migrations a particular advantage since after migration a guest OS can simply discover the actual facts of timestamps rather than try to estimate them from their own invalid state information.&lt;br /&gt;
&lt;br /&gt;
The mechanism the authors used in the Xen environment was the XenStore, a filesystem structure like &#039;&#039;sysfs&#039;&#039; or &#039;&#039;procfs&#039;&#039; that permits communications between virtual domains using shared memory. Dom0 (Xen terminology for the hypervisor) takes sychronization from its own time server and saves the calculated clock parameters to the shared XenStore. On DomU (Xen for any guest OS) an application would simply use the shared information as a raw timestamp or a time difference. Their extensive testing showed a clear -- if not surprising -- advantage over NTPd.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
It is difficult to critique the authors&#039; work since they did a great job of finding a meaningful set of timestamps and counters and clearly demonstrated an advantage in their field of study. They also compared a number of time sources to ensure that their selection was meaningful and stable. And it&#039;s hard to argue with success. Their results approximate the variation that comes from CPU temperature. That&#039;s quite impressive.&lt;br /&gt;
&lt;br /&gt;
As a student, one criticism might be that they found quite an obscure way of describing what was at heart a very simple problem. Of course, to be fair to these academics, their paper wasn&#039;t written for students. But the problem can be summed up succinctly: If you can&#039;t trust your own perception of time, ask the closest agent you &#039;&#039;can&#039;&#039; trust -- and make sure they&#039;ve check their watch. There is no closer source to a VM than its host, so find the fastest way there.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. &amp;quot;Virtualize Everything But Time&amp;quot; by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch, 2010. http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf&lt;br /&gt;
&lt;br /&gt;
2. &amp;quot;Timekeeping in Virtual Machines, Information Guide&amp;quot; from VMWare. http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf&lt;br /&gt;
&lt;br /&gt;
3. &amp;quot;Bran&#039;s Kernel Development Tutorial&amp;quot; from Bona Fide OS Developer website. http://www.osdever.net/bkerndev/Docs/pit.htm  &lt;br /&gt;
&lt;br /&gt;
4. &amp;quot;What is a CMOS battery, and why does my computer need one?&amp;quot; from the Indiana University&#039;s Knowledge Base, 2010. http://kb.iu.edu/data/adoy.html&lt;br /&gt;
&lt;br /&gt;
5. &amp;quot;Multiprocessor Specification version 1.4&amp;quot; from Intel, 1997. http://developer.intel.com/design/pentium/datashts/24201606.pdf&lt;br /&gt;
&lt;br /&gt;
6. &amp;quot;PC Based Precision Timing Without GPS&amp;quot; by Attila Pa ́sztor and Darryl Veitch, 2002. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf&lt;br /&gt;
&lt;br /&gt;
7. &amp;quot;Robust Synchronization of Absolute and Difference Clocks over Networks&amp;quot; by Darryl Veitch, Julien Ridoux and Satish Babu Korada, 2009. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf&lt;br /&gt;
&lt;br /&gt;
8. Broomhead, T.; Ridoux, J.; Veitch, D.; , &amp;quot;Counter availability and characteristics for feed-forward based synchronization,&amp;quot; Precision Clock Synchronization for Measurement, Control and Communication, 2009. ISPCS 2009. International Symposium on , vol., no., pp.1-6, 12-16 Oct. 2009&lt;br /&gt;
&lt;br /&gt;
9. &amp;quot;Advanced Configuration and Power Interface Specification&amp;quot;. &#039;&#039;Intel Corporation&#039;&#039;. April 2010. http://www.acpi.info/DOWNLOADS/ACPIspec40a.pdf. Accessed Nov. 2010.&lt;br /&gt;
&lt;br /&gt;
10. &amp;quot;Game timing and Multiecore Processors&amp;quot;. &#039;&#039;msdn&#039;&#039; . Dec 2005. http://msdn.microsoft.com/en-us/library/ee417693%28VS.85%29.aspx . Accessed Nov. 2010.&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6462</id>
		<title>COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_2_2010_Question_11&amp;diff=6462"/>
		<updated>2010-12-02T18:08:14Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Virtualize Everything But Time =&lt;br /&gt;
Article written by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch. They are working for the Center for Ultra-Broadband Information Networks (CUBIN) Department of Electrical &amp;amp; Electronic Engineering at the University of Melbourne in Australia. Here is the link to the article: [http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Background Concepts=&lt;br /&gt;
&lt;br /&gt;
The next time you notice one stranger ask another for the time and you see them check their watch, try this experiment: immediately ask too. Chances are the person will check their watch again. Why? Human internal clocks are notoriously unreliable. Our sense of time contracts and expands all day long. We seem to believe that a definitive report of time can only come from some mechanical or electronic source. So social norms require that the watch owner provides you with two things: 1) the time, and 2) a gesture of external authority, i.e. a glance at their watch.&lt;br /&gt;
&lt;br /&gt;
The story of time inside a virtual machine is almost as unreliable as our own internal clocks. How much time has elapsed since a VM client got the CPU&#039;s attention? At the best of times there&#039;s no way for it to guess because it wasn&#039;t actually running the whole time. If the VM was suspended and migrated from one physical host to another its concept of time is even worse. This paper is about how a computer glances at its metaphorical watch, and what kinds of timepieces it has at hand.&lt;br /&gt;
&lt;br /&gt;
To better understand this paper, it is very important to have a good understanding of the general concepts behind it. For example, we all know what clocks are in our day-to-day lives but how are they different in the context of computing? In this section, we will describe concepts like timekeeping, hardware/software clocks, explore the advantages and disadvantages of the different available counters and synchronization algorithms, and explain what a para-virtualized system is about.&lt;br /&gt;
&lt;br /&gt;
===Timekeeping===&lt;br /&gt;
&lt;br /&gt;
Computers typically measure time in one of two ways: tick counting and tickless timekeeping[2]. Tick counting is when the operating system sets up a hardware device, generally a CPU, to interrupt at a certain rate. A counter is updated each time one of these interrupts occurs. It is this counter that allows the system to keep track of the passage of time. &lt;br /&gt;
&lt;br /&gt;
In tickless timekeeping, instead of the OS keeping track of time through interrupts, a hardware device is used instead. This device has its own counter which starts when the system is booted. The OS simply reads the counter from it when needed. Tickless timekeeping seems to be the better way to keep track of time because it doesn’t hog the CPU with hardware interrupts, however its performance is very dependent on the type of hardware used. Another disadvantages is that they tend to drift (see below). But neither of these methods knows the actual time, they only know how long it has been since they last checked an authoritative source. Personal computers typically get their time from a battery-backed real-time clock (i.e. a CMOS clock). Networked machines often need a more precise time, with a resolution in the millisecond range or below. In these cases a machine can query another source such as one based on Network Time Protocol (NTP).&lt;br /&gt;
&lt;br /&gt;
===Clocks===&lt;br /&gt;
&lt;br /&gt;
Computer “clocks” or “timers” can be hardware based, software based or they can even be an hybrid. The most commonly found timer is the hardware timer. All of the hardware timers can be generally described by this diagram where some have either more or less features:&lt;br /&gt;
&lt;br /&gt;
Diagram1. Timer Abstraction&lt;br /&gt;
&lt;br /&gt;
[[File:Timerabstract.jpg]]&lt;br /&gt;
&lt;br /&gt;
This diagram nicely represents how tick counting works. The oscillator runs at a predetermined frequency. The operating system might have to measure it when the system boots. The counter starts with a predetermined value which can be set by software. For every cycle of the oscillator, the counter counts down one unit. When it reaches zero, its generates an output signal that might interrupt the CPU. That same interrupt will then allow the counter’s initial value to be reloaded into the counter and the process begins again. Not all hardware timers work exactly like that. For instance, some actually count up, others don&#039;t use interrupts, and yet others don&#039;t keep an initial counter. The general principle of hardware counters is the however the same. There is some kind of fixed interval at the end of which the current time is updated by an appropriate number of units (i.e. nanoseconds).&lt;br /&gt;
&lt;br /&gt;
===Timers===&lt;br /&gt;
# PIT is useful for generating interrupts at regular intervals through its three channels. Channel 0 is bound to IRQ0 which interrupts the CPU at regular intervals. Channel 1 is specific to each system and Channel 2 is connected to the speaker system. As such, we only need to concern ourselves with Channel 0. [http://www.osdever.net/bkerndev/Docs/pit.htm]&lt;br /&gt;
# CMOS RTC, also known as a CMOS battery, allows the CMOS chip to remain powered to keep track of things like time even while the physical PC unit has no source of power. If there is no CMOS battery on the motherboard, the computer would reset to its default time each restart. The battery itself can die, as expected, if the computer is powered off and not used for a long period of time. This can cause issues with the main OS as well as the VM. [http://kb.iu.edu/data/adoy.html]&lt;br /&gt;
# Local APIC handles all external interrupts for the processor in the system. It can also accept and generate inter-processor interrupts between Local APICs. [http://developer.intel.com/design/pentium/datashts/24201606.pdf]&lt;br /&gt;
# ACPI establishes industry-standard interfaces configuration guided by the OS and power management. It is industry-standard through its creators, Intel, Microsoft, Phoenix, Hewlett Packard and Toshiba. Its power management includes all forms: notebooks, desktops, and servers. ACPI&#039;s goal is to improve current power and configuration standards for hardware devices by transitioning to ACPI-compliant hardware. This allows the OS as well as the VM to have control over power management. [http://www.intel.com/technology/iapc/acpi/][http://www.acpi.info/][http://www.acpi.info/DOWNLOADS/ACPIspec40a.pdf]&lt;br /&gt;
# RDTSC is based on the x86 P5 instruction set and perform high-resolution timing, however, it suffers from several flaws. Discontinuous values from the processor are caused as a result of not using the same thread to the processor each time, which can also be caused by having a multicore processor. This is made worse by ACPI which will eventually lead to the cores being completely out of sync. Availability of dedicated hardware: &amp;quot;RDTSC locks the timing information that the application requests to the processor&#039;s cycle counter.&amp;quot; With dedicated timing devices included on modern motherboards this method of locking the timing information will become obsolete. Lastly, the variability of the CPU&#039;s frequency needs to be taken into account. With modern day laptops, most CPU frequencies are adjusted on the fly to respond to the users demand when needed and to lower themselves when idle, this results in longer battery life and less heat generated by the laptop but regretfully affects RDTSC making it unreliable. [http://msdn.microsoft.com/en-us/library/ee417693%28VS.85%29.aspx]&lt;br /&gt;
# HPET defines a set of timers that the OS has access to and can assign to applications. Each timer can generate an interrupt when the least significant bits are equal to the equivalent bits of the 64-bit counter value. However, a race case can occur in which the target time has already passed. This causes more interrupts and more work even if the task is a simple one. It does produce less interrupts than its predecessors PIT and CMOS RTC giving it an edge. Despite its race condition, this modern timer is improvement upon old practices.  [http://hackipedia.org/Hardware/HPET,%20High%20Performance%20Event%20Timer/IA-PC%20HPET%20%28High%20Precision%20Event%20Timers%29%20Specification.pdf]&lt;br /&gt;
&lt;br /&gt;
==Guest Timekeeping==&lt;br /&gt;
&lt;br /&gt;
Guest timekeeping is done using the same general methods as any computer timekeeping, using either tick counting or tickless systems. Where the two begin to differ, however, is that a host operating system is able to communicate directly with the physical hardware, while the guest operating system is unable to do so, having to communicate with the host system that it wants to communicate with the hardware. Having to do this is the greatest source of the guest operating system&#039;s clock losing accuracy, or more simply called drifting.&lt;br /&gt;
&lt;br /&gt;
===Sources of Drift===&lt;br /&gt;
&lt;br /&gt;
When a guest operating system is started, its clock simply synchronizes with the host&#039;s – some virtual machines such as VMware also do this when it is resumed from a suspended state, or restored from a snapshot – so it is easy to think that, since it starts off correctly the guest&#039;s clock will continue to be correct. That is, of course, incorrect. The first source of drift is simply due to electronics. A clock is almost never entirely accurate, having a slight error due to the effects of ambient temperature on oscillator frequency, even on the host system. Since the guest communicates with the host in order to keep track of its time, an error in the host&#039;s time is not only passed on to the guest, but because the host is trying to correct its own time the guest&#039;s request for a count is given slightly less priority, making it yet again lose accuracy. The larger the drift in the host, the larger the drift in the guest, as the host&#039;s drift simply compounds the issue.&lt;br /&gt;
&lt;br /&gt;
Aside from the host&#039;s own drift, the other cause of drift in the virtual environment is the fact that the it is treated like a process by the host. In and of itself this doesn&#039;t seem like a problem, but the guest system can be suspended just before it tries to update its perception of time. With restricted CPU time, it&#039;s easy for the lost ticks to pile up and create a backlog. Even if the guest is checking over the network with a time server, its network conversation can be suspended before the answer comes back. When the process resumes the guest has a wildly inaccurate perception of the elapsed time (known as Round-Trip Time or RTT) and its incorrect adjustments for the network delay will throw off the clock. Problems can also come from memory swaps performed by the host. If the virtual environment does not have enough allocated to it by the host it can run into the problem of swapping out pages that are needed soon. Swapping the pages back in will momentarily bring the entire virtual environment to a halt, so ticks are missed and the clock falls behind.&lt;br /&gt;
&lt;br /&gt;
Clearly the errors in virtual machine timekeeping come from algorithms that were simply not designed for virtual environments. They assume a more stable physical world than they have.&lt;br /&gt;
&lt;br /&gt;
===Impact of Drift===&lt;br /&gt;
&lt;br /&gt;
The sources of drift essentially boil down to round-off errors and lost ticks. But the practical impact of drift is quite apparent in any automated system. For a real-world analogy consider a factory&#039;s assembly line, where the machinery is finely tuned to do its own specific part at certain intervals, and it generally does so with impressive efficiency. If the clock in the system were to drift, however, a specific machine may move too soon or too late, bringing the line to a potentially catastrophic halt.&lt;br /&gt;
&lt;br /&gt;
In a virtual environment, drift is a bit more subtle, as one result of it could be skewed process scheduling – some schedulers give a certain amount of time to a process before moving on, but if the guest&#039;s time has drifted substantially, when it tries to correct its time it could give more or less time to the processes in the scheduler.&lt;br /&gt;
&lt;br /&gt;
The impacts of drift are even more apparent when virtual machines must communicate with one another. Consider the case of a farm of distributed gaming servers, where differences in timing can mean virtual characters suddenly warp at super-human speed across the landscape. Or for a more serious example consider investment trading, where missing the moment to bid can mean a difference of millions of dollars.&lt;br /&gt;
&lt;br /&gt;
===Compensation Strategies===&lt;br /&gt;
&lt;br /&gt;
There are a number of compensation strategies for dealing with drift, depending on the cause of it. If the problem is due to CPU management issues, then the host can give more CPU time to the virtual machine, or it can lower the timer interrupt rate – or simply use a tickless counter. If it is due to a  memory management issue, allocating more memory to the virtual environment should prevent the system from needing to swap out page files so often.&lt;br /&gt;
&lt;br /&gt;
If the issue is from neither of those, but simply due to the inevitable lag when the guest communicates with the hardware via the host, then there are other methods to correct the drift. Most systems natively have algorithms built in to correct the time if it gets too far ahead or behind real time, though they are not without their own faults; if the time is set ahead when catching up, the backlog of ticks it has built up may not be cleared, so it could potentially set itself ahead multiple times until the backlog is dealt with. Tools built into the virtual machine itself can also deal with drift to an extent, as VMware Tools does. This kind of tool checks to see if the clock&#039;s error is within a certain margin. If it exceeds the margin, then the backlog is set to zero – to prevent the issue mentioned with the native algorithms – and resynchronizes with the host clock before the guest goes back to keeping track of time as it normally would.&lt;br /&gt;
&lt;br /&gt;
=Research problem=&lt;br /&gt;
&lt;br /&gt;
Today, the use of the Network Time Protocol and of daemons like ntpd is the dominant solution for accurate timekeeping. In optimal conditions, the ntpd can be very good but these situations rarely happen. Network congestion, disconnections, lower quality networking hardware and unsuspected system events can create offsets errors in the order of 10‘s or even 100 milliseconds(ms). [http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf]&lt;br /&gt;
For demanding applications, this is neither robust or reliable. One way to enhance the performance of ntpd would be to poll from the NTP server more often as this would reduced the offset error but unfortunately, this would increase the network traffic which could cause network congestions which would raise the offset error. So this won’t work. &lt;br /&gt;
&lt;br /&gt;
Another problem with current system software clocks using NTP(like ntpd), is that they provide only an absolute clock.[http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf]&lt;br /&gt;
So for applications that deals with network managements and measurements, this is unsuitable. Why? Because NTP focus on offset and not on hardware clock oscillator rate. For example, when calculating delay variations, the offset error doesn’t change anything to the calculations but the clocks’ oscillator rate variation does affect it. So having a more accurate timestamp would make those calculation more precise. Which mean we would need another system software clock.&lt;br /&gt;
&lt;br /&gt;
In virtualization(in this case Xen), when migrating a running system from one system to another can cause issues and this is again caused by the ntpd daemon. By default, each guest OS runs its own instance of the ntpd daemon. So the synchronization algorithm keeps track of the reference wallclock time, rate-of-drift and current clock error, which are defined by the hardware clock on the system. So when migrating the virtualized OS to another system, the ntpd state is saved and when it is enabled again on the new system, thats where the problems starts. Because no two hardware clocks drifts the same way or have the exact same wallclock time, all the information traced by the daemon are all of a sudden inaccurate. This could prove disastrous to the system. This could go from a slowly recoverable error to one where ntpd might never recover, making the virtualized OS unstable.&lt;br /&gt;
&lt;br /&gt;
=Contribution=&lt;br /&gt;
&lt;br /&gt;
The authors of this timekeeping paper have done previous work exploring the feed-forward and feedback mechanisms for clock algorithm adjustment in non-virtual systems [7][8]. The RADclock algorithm (Robust Absolute Difference) was originally explored to address the drift resulting from NTP&#039;s feedback algorithm, and how non-ideal network conditions (a circumstance that is quite common) can have serious effects. In their original paper they improved network synchronization using the TimeStamp Counter (TSC) register a system call introduced in Pentium class machines as a source for a CPU cycle count. The use of a more reliable timestamp and counter provided &amp;quot;GPS-like&amp;quot; reliability in networked enviroments.&lt;br /&gt;
&lt;br /&gt;
This new paper seeks to take a similar approach in a virtual machine setting where VM migration can cause much more severe disruption than simply lost UDP packets. Rather than use TSC calls (&#039;&#039;rdtsc()&#039;&#039; in [8]) they tried several clock sources, seeking to eliminate variability from power management and CPU load when setting &#039;&#039;raw&#039;&#039; timestamps for use in guest machines.&lt;br /&gt;
&lt;br /&gt;
The paper makes several references to &#039;&#039;feed-forward&#039;&#039; and &#039;&#039;feedback&#039;&#039; mechanisms, and so a quick discussion of these control theories is in order. In feed-forward mechanisms, inputs to a process or calculation may be modified in advance, but the resulting output plays no part in subsequent calculations. In feedback mechanisms (such as NTPd) inputs to a calculation can be modified by outputs from previous ones. As a result, feedback mechanisms carry state from one step to the next. Since the state of a virtual environment may be rendered inaccurate by so many sources a feedback mechanism as a bad idea. The statelessness of feed-forward mechanisms offers VM migrations a particular advantage since after migration a guest OS can simply discover the actual facts of timestamps rather than try to estimate them from their own invalid state information.&lt;br /&gt;
&lt;br /&gt;
The mechanism the authors used in the Xen environment was the XenStore, a filesystem structure like &#039;&#039;sysfs&#039;&#039; or &#039;&#039;procfs&#039;&#039; that permits communications between virtual domains using shared memory. Dom0 (Xen terminology for the hypervisor) takes sychronization from its own time server and saves the calculated clock parameters to the shared XenStore. On DomU (Xen for any guest OS) an application would simply use the shared information as a raw timestamp or a time difference. Their extensive testing showed a clear -- if not surprising -- advantage over NTPd.&lt;br /&gt;
&lt;br /&gt;
=Critique=&lt;br /&gt;
&lt;br /&gt;
It is difficult to critique the authors&#039; work since they did a great job of finding a meaningful set of timestamps and counters and clearly demonstrated an advantage in their field of study. They also compared a number of time sources to ensure that their selection was meaningful and stable. And it&#039;s hard to argue with success. Their results approximate the variation that comes from CPU temperature. That&#039;s quite impressive.&lt;br /&gt;
&lt;br /&gt;
As a student, one criticism might be that they found quite an obscure way of describing what was at heart a very simple problem. Of course, to be fair to these academics, their paper wasn&#039;t written for students. But the problem can be summed up succinctly: If you can&#039;t trust your own perception of time, ask the closest agent you &#039;&#039;can&#039;&#039; trust -- and make sure they&#039;ve check their watch. There is no closer source to a VM than its host, so find the fastest way there.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
1. &amp;quot;Virtualize Everything But Time&amp;quot; by Timothy Broomhead, Laurence Cremean, Julien Ridoux and Darrel Veitch, 2010. http://www.usenix.org/events/osdi10/tech/full_papers/Broomhead.pdf&lt;br /&gt;
&lt;br /&gt;
2. &amp;quot;Timekeeping in Virtual Machines, Information Guide&amp;quot; from VMWare. http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf&lt;br /&gt;
&lt;br /&gt;
3. &amp;quot;Bran&#039;s Kernel Development Tutorial&amp;quot; from Bona Fide OS Developer website. http://www.osdever.net/bkerndev/Docs/pit.htm  &lt;br /&gt;
&lt;br /&gt;
4. &amp;quot;What is a CMOS battery, and why does my computer need one?&amp;quot; from the Indiana University&#039;s Knowledge Base, 2010. http://kb.iu.edu/data/adoy.html&lt;br /&gt;
&lt;br /&gt;
5. &amp;quot;Multiprocessor Specification version 1.4&amp;quot; from Intel, 1997. http://developer.intel.com/design/pentium/datashts/24201606.pdf&lt;br /&gt;
&lt;br /&gt;
6. &amp;quot;PC Based Precision Timing Without GPS&amp;quot; by Attila Pa ́sztor and Darryl Veitch, 2002. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/tscclock_final.pdf&lt;br /&gt;
&lt;br /&gt;
7. &amp;quot;Robust Synchronization of Absolute and Difference Clocks over Networks&amp;quot; by Darryl Veitch, Julien Ridoux and Satish Babu Korada, 2009. http://www.cubinlab.ee.unimelb.edu.au/~darryl/Publications/synch_ToN.pdf&lt;br /&gt;
&lt;br /&gt;
8. Broomhead, T.; Ridoux, J.; Veitch, D.; , &amp;quot;Counter availability and characteristics for feed-forward based synchronization,&amp;quot; Precision Clock Synchronization for Measurement, Control and Communication, 2009. ISPCS 2009. International Symposium on , vol., no., pp.1-6, 12-16 Oct. 2009&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=5902</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=5902"/>
		<updated>2010-12-01T04:05:37Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey guys, sorry its taken me a while to post here. If there is a particular topic that needs researching, I could spend some hours doing that tomorrow - suggestions? Also, I intend to fix up the style&amp;amp;structure after everything is done as I am quite good with that. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
--[[User:ScottG|ScottG]] 21:36, 26 November 2010 (UTC) So I was a little (more than a little) behind on my initially estimated time for getting stuff up on Guest Timekeeping, but that&#039;s the gist of it there now. I&#039;m going to try to buff it up a bit before it&#039;s due, since what I put in is a bit rougher than I&#039;d like. If I seem to be missing something that should be pretty obvious, let me know and I&#039;ll work it in.&lt;br /&gt;
&lt;br /&gt;
--[[User:Jjpwilso|Jjpwilso]] 15:49, 23 November 2010 (UTC) I&#039;ve been completely swamped with COMP3004 stuff (among other things) and feeling guilty as hell about this essay. The good news, for those who might have missed today&#039;s lecture, is we have an extension of one week. Phew!!&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 21:29, 22 November 2010 (UTC) I have added a small part to the background section. I have created by hand a diagram explaining how it works. I tried to find an original way of doing it but it is the same diagram everywhere. Please feel free to comment here or by sending me an email.&lt;br /&gt;
&lt;br /&gt;
--[[User:AbsMechanik|AbsMechanik]] 19:46, 22 November 2010 (UTC) Here&#039;s what my research has led me to so far. I&#039;m trying to come up with good points for the research problem, contribution and critique part of this essay. Here&#039;s a bunch of links, I&#039;ve come across. I think there will be a few more tonight. Feel free to read through &#039;em: &lt;br /&gt;
&amp;lt;br&amp;gt;http://www.vmware.com/files/pdf/Timekeeping-In-VirtualMachines.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.xen.org/files/xen_interface.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.microsoft.com/whdc/system/sysinternals/mm-timer.mspx&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.intel.com/hardwaredesign/hpetspec_1.pdf&lt;br /&gt;
&amp;lt;br&amp;gt;http://www.cubinlab.ee.unimelb.edu.au/radclock/&lt;br /&gt;
&lt;br /&gt;
--[[User:ScottG|ScottG]] 18:55, 22 November 2010 (UTC) I&#039;m good taking the Guest Timekeeping section. Hopefully I&#039;ll have some stuff up tonight or early tomorrow for it.&lt;br /&gt;
&lt;br /&gt;
--[[User:Sblais2|Sblais2]] 17:14, 22 November 2010 (UTC) I will be working on the Background section. I will dedicate it to explain some of the key concepts that are used in the research paper that will allow the readers to have a better understanding on the rest of our essay. The structure you&#039;ve put in place looks good but it might get modified, depending on the text will flow. The diagram is a good idea. I will drawn a simple one and add it in. Feel free again to critique.&lt;br /&gt;
&lt;br /&gt;
--[[User:Jjpwilso|Jjpwilso]] 15:12, 16 November 2010 (UTC) I wanted to get a structure started, so I have stubbed out the first section. Note: some of the sub-sections might belong in the Research Problem section but we can easily move them if they fit there. Let&#039;s use this area to plan who is doing what. Feel free to critique any of my submissions. When you comment here, please put your comments at the very top so we can easily see recent posts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Participants=&lt;br /&gt;
(X) Blais   Sylvain sblais2 - Email: syl20blais@gmail.com&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Graham  Scott   sgraham6&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Ilitchev Fedor  filitche fedor dot ilitchev at gmail dot com &amp;lt;br&amp;gt; &lt;br /&gt;
(X) Panke   Shane   spanke&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Shukla  Abhinav ashukla2&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Wilson  Robert  jjpwilso&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=5011</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=5011"/>
		<updated>2010-11-15T18:45:17Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please mark an X if you are able to participate.&lt;br /&gt;
&lt;br /&gt;
(X) Blais   Sylvain sblais2&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Graham  Scott   sgraham6&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Ilitchev Fedor  filitche fedor dot ilitchev at gmail dot com &amp;lt;br&amp;gt; &lt;br /&gt;
(X) Panke   Shane   spanke&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Shukla  Abhinav ashukla2&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Wilson  Robert  jjpwilso&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=5009</id>
		<title>Talk:COMP 3000 Essay 2 2010 Question 11</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_2_2010_Question_11&amp;diff=5009"/>
		<updated>2010-11-15T18:44:45Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please mark an X if you are able to participate.&lt;br /&gt;
&lt;br /&gt;
(X) Blais   Sylvain sblais2&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Graham  Scott   sgraham6&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Ilitchev Fedor  filitche&amp;lt;br&amp;gt; fedor dot ilitchev at gmail dot com&lt;br /&gt;
(X) Panke   Shane   spanke&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Shukla  Abhinav ashukla2&amp;lt;br&amp;gt;&lt;br /&gt;
(X) Wilson  Robert  jjpwilso&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4787</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4787"/>
		<updated>2010-10-15T16:49:43Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several disadvantages which are of key relevance for anyone attempting to implement an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Though flash memory on the whole has strengths and weaknesses, it is also divided into two sub-types and each of these also has its own advantages and disadvantages that shall be briefly examined here. The two types of flash memory are NOR and NAND: NOR has the faster read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and can last about ten times longer. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2] Although these two types of flash are different, they are not sufficiently so as to merit an independence file system approach for each one. Thus, we shall not differentiate between them for the rest of this article. &lt;br /&gt;
&lt;br /&gt;
The use of flash has grown dramatically in recent years, primarily for the purpose of portable devices and portable data storage. While this phenomenon has been partially due to the falling price of the product, it has been more of a result of flash&#039;s strengths - these make it a near optimal solution for the many portable devices which are currently in vogue. These strengths, besides compactness, resistance to shock and independence from power-supplies also include extremely fast read times. Indeed, the read times of flash devices can be as much as fourteen times those of hard disk drives. [17] &lt;br /&gt;
&lt;br /&gt;
Despite these advantages, however, are not the preferred storage method for home PCs. The reason for this is not just that other kinds of memory are still significantly cheaper, but also that flash memory has certain limitations built into it. The most critical of these is that each block of flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write or erase a file on flash than to a hard disk drive (HDD).[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
An HDD file-system, however, is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. [SOURCE?]&lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hot-spots, a system using flash memory would have to write new data to empty memory blocks. [3] This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources. It is also useful because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also has advantages when it comes to wear leveling. These advantages mostly come from the use of banks and the garbage collector.  A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used (ie. which one has the fewest timestamps). Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. These advantages are made actual through the log itself, the use of banks and through the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its special wear-leveling features, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
1. Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
2. Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
3. Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
4. What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4786</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4786"/>
		<updated>2010-10-15T16:38:29Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several disadvantages which are of key relevance for anyone attempting to implement an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Though flash memory on the whole has strengths and weaknesses, it is also divided into two sub-types and each of these also has its own advantages and disadvantages that shall be briefly examined here. The two types of flash memory are NOR and NAND: NOR has the faster read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and can last about ten times longer. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2] Although these two types of flash are different, they are not sufficiently so as to merit an independence file system approach for each one. Thus, we shall not differentiate between them for the rest of this article. &lt;br /&gt;
&lt;br /&gt;
The use of flash has grown dramatically in recent years, primarily for the purpose of portable devices and portable data storage. While this phenomenon has been partially due to the falling price of the product, it has been more of a result of flash&#039;s strengths - these make it a near optimal solution for the many portable devices which are currently in vogue. These strengths, besides compactness, resistance to shock and independence from power-supplies also include extremely fast read times. Indeed, the read times of flash devices can be as much as fourteen times those of hard disk drives. [17] &lt;br /&gt;
&lt;br /&gt;
Despite these advantages, however, are not the preferred storage method for home PCs. The reason for this is not just that other kinds of memory are still significantly cheaper, but also that flash memory has certain limitations built into it. The most critical of these is that each block of flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write or erase a file on flash than to a hard disk drive (HDD).[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
An HDD file-system, however, is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. [SOURCE?]&lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hot-spots, a system using flash memory would have to write new data to empty memory blocks. [3] This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources. It is also useful because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also has advantages when it comes to wear leveling. These are made actual through various technological innovations which include a translation table and banks. The translation table is a structure which maps each block of memory to a flag which keeps track of its state. When a block is being written to, the FTL marks its state as &amp;quot;allocated&amp;quot; so as to prevent other write-processes from targeting the same block. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becomes &amp;quot;pre-valid&amp;quot; If writing to this block involved the erasure from another block, the now old block is at marked as invalid (ready for erasure) and the new block is finally marked as valid after that.[8]&lt;br /&gt;
&lt;br /&gt;
On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
1. Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
2. Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
3. Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
4. What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4785</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4785"/>
		<updated>2010-10-15T16:20:04Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several disadvantages which are of key relevance for anyone attempting to implement an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Though flash memory on the whole has strengths and weaknesses, it is also divided into two sub-types and each of these also has its own advantages and disadvantages that shall be briefly examined here. The two types of flash memory are NOR and NAND: NOR has the faster read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and can last about ten times longer. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2] Although these two types of flash are different, they are not sufficiently so as to merit an independence file system approach for each one. Thus, we shall not differentiate between them for the rest of this article. &lt;br /&gt;
&lt;br /&gt;
The use of flash has grown dramatically in recent years, primarily for the purpose of portable devices and portable data storage. While this phenomenon has been partially due to the falling price of the product, it has been more of a result of flash&#039;s strengths - these make it a near optimal solution for the many portable devices which are currently in vogue. These strengths, besides compactness, resistance to shock and independence from power-supplies also include extremely fast read times. Indeed, the read times of flash devices can be as much as fourteen times those of hard disk drives. [17] &lt;br /&gt;
&lt;br /&gt;
Despite these advantages, however, are not the preferred storage method for home PCs. The reason for this is not just that other kinds of memory are still significantly cheaper, but also that flash memory has certain limitations built into it. The most critical of these is that each block of flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write or erase a file on flash than to a hard disk drive (HDD).[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
An HDD file-system, however, is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. [SOURCE?]&lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hot-spots, a system using flash memory would have to write new data to empty memory blocks. [3] This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources. It is also useful because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also has advantages when it comes to wear leveling. These are made actual through various technological innovations which include a translation table and banks. The translation table is a structure which maps each block of memory to a flag which keeps track of its state. These states are &amp;quot;allocated&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
1. Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
2. Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
3. Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
4. What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4784</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4784"/>
		<updated>2010-10-15T16:15:22Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several disadvantages which are of key relevance for anyone attempting to implement an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Though flash memory on the whole has strengths and weaknesses, it is also divided into two sub-types and each of these also has its own advantages and disadvantages that shall be briefly examined here. The two types of flash memory are NOR and NAND: NOR has the faster read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and can last about ten times longer. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2] Although these two types of flash are different, they are not sufficiently so as to merit an independence file system approach for each one. Thus, we shall not differentiate between them for the rest of this article. &lt;br /&gt;
&lt;br /&gt;
The use of flash has grown dramatically in recent years, primarily for the purpose of portable devices and portable data storage. While this phenomenon has been partially due to the falling price of the product, it has been more of a result of flash&#039;s strengths - these make it a near optimal solution for the many portable devices which are currently in vogue. These strengths, besides compactness, resistance to shock and independence from power-supplies also include extremely fast read times. Indeed, the read times of flash devices can be as much as fourteen times those of hard disk drives. [17] &lt;br /&gt;
&lt;br /&gt;
Despite these advantages, however, are not the preferred storage method for home PCs. The reason for this is not just that other kinds of memory are still significantly cheaper, but also that flash memory has certain limitations built into it. The most critical of these is that each block of flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write or erase a file on flash than to a hard disk drive (HDD).[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
An HDD file-system, however, is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. [SOURCE?]&lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hot-spots, a system using flash memory would have to write new data to empty memory blocks. [3] This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources. It is also useful because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also has advantages when it comes to wear leveling. These are made actual through var&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
1. Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
2. Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
3. Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
4. What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4783</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4783"/>
		<updated>2010-10-15T16:05:38Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several disadvantages which are of key relevance for anyone attempting to implement an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Though flash memory on the whole has strengths and weaknesses, it is also divided into two sub-types and each of these also has its own advantages and disadvantages that shall be briefly examined here. The two types of flash memory are NOR and NAND: NOR has the faster read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and can last about ten times longer. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2] Although these two types of flash are different, they are not sufficiently so as to merit an independence file system approach for each one. Thus, we shall not differentiate between them for the rest of this article. &lt;br /&gt;
&lt;br /&gt;
The use of flash has grown dramatically in recent years, primarily for the purpose of portable devices and portable data storage. While this phenomenon has been partially due to the falling price of the product, it has been more of a result of flash&#039;s strengths - these make it a near optimal solution for the many portable devices which are currently in vogue. These strengths, besides compactness, resistance to shock and independence from power-supplies also include extremely fast read times. Indeed, the read times of flash devices can be as much as fourteen times those of hard disk drives. [17] &lt;br /&gt;
&lt;br /&gt;
Despite these advantages, however, are not the preferred storage method for home PCs. The reason for this is not just that other kinds of memory are still significantly cheaper, but also that flash memory has certain limitations built into it. The most critical of these is that each block of flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write or erase a file on flash than to a hard disk drive (HDD).[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hot-spots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
1. Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
2. Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
3. Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
4. What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4782</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4782"/>
		<updated>2010-10-15T14:21:11Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While looking for what you requested, I found an entire section on the oxide breakdown... oops. :P&lt;br /&gt;
So really nothing changes, As electrons tunnel through the oxide layer, it deteriorates. When the damage becomes too great, the oxide abruptly loses its insulative properties. (damn firefox, that&#039;s a word) Looking for the erasures now ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
I&#039;m off to sleep, but I&#039;ll be up at 5am to see what else I can do.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aw, I just missed you.&lt;br /&gt;
It turns out that erasing entire blocks is necessary based on how the chip is built. For both NOR and NAND, pairs of word lines share an erase line, which is located near the floating gate. It uses FN tunneling to erase two lines of words at a time, making the sector the smallest size you can erase simply because that&#039;s how it&#039;s physically wired.&lt;br /&gt;
i.e []-mem byte |-erase line&lt;br /&gt;
&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[] ... If that makes any sense... The erase line is separate from the byte select or word select lines&lt;br /&gt;
&lt;br /&gt;
Numbers for formatting sake.&lt;br /&gt;
&lt;br /&gt;
I&#039;m prolly gonna take Fedor&#039;s advice and head to bed, but I&#039;ll likely pop back on before I go to sleep in case anyone needs me to look up anything else. :P&lt;br /&gt;
&lt;br /&gt;
--[[User:Lmundt|Lmundt]] 03:23, 15 October 2010 (UTC) Interesting article compaing speeds&lt;br /&gt;
https://noc.sara.nl/nrg/publications/RoN2010-D1.1.pdf&lt;br /&gt;
&lt;br /&gt;
Wow, I can&#039;t believe I completely forgot. Hybrid Drives... I can&#039;t remember for the life of me whether they exist yet or not, but there will eventually exist a hard drive that&#039;s both flash and traditional platter. It allocates files that are not rewritten often, like an OS (well except windows and all its lovely updates) to the flash memory on install, and the remainder of the files (Documents, programs etc) to the traditional platter. Because you can&#039;t reformat an OS 100,000 times (no matter HOW badly you screw it up with viruses and the like), the flash memory will retain usability, and all the hotspots are on the platters, so you don&#039;t need to worry about minimizing disk usage.&lt;br /&gt;
I&#039;m out for the night. Cheers all! ~Andrew&lt;br /&gt;
&lt;br /&gt;
Alright guys... I&#039;ve done as much as I can for tonight. I&#039;m exhausted and I&#039;m having troubles concentrating anymore. I added a few questions for people to answer as thehttp://homeostasis.scs.carleton.ca/wiki/index.php/COMP_3000_Essay_1_2010_Question_10y read. I&#039;m going to bed, hopefully people will be up early enough to fix some things that I may have missed because I sure as hell won&#039;t be :P. Really wish I could keep going though.  --[[User:Gsmith6|Gsmith6]] 07:38, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey y&#039;all,&lt;br /&gt;
&lt;br /&gt;
So, I&#039;m just rewriting part 3 as we speak, trying to understand the invalid/pre-valid stuff - what is the purpose of this with relation to what we are talking about? Does it achieve even writing, or just keeps the same block from being written to by two processes at once? Also, is an invalidated block one that has been written to too many times?&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
Moving right along, I&#039;m still re-writing P3 and posting as I go. Some things are not clear to me, however, I have written those in [BRACKETED CAPITALS], if any of your are online, it would be useful if you could post disambiguations here.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I&#039;ve gone over part 3. Certain things still don&#039;t necessarily make perfect and consistent sense. If one of you who has a solid understanding of of log-systems and how they work could go over it and see if what I&#039;ve written is consistent with your understanding, that would be great.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I emailed Anil and he said we could take a bit of extra time (couple of hours?) to get the essay to its best possible form. &lt;br /&gt;
&lt;br /&gt;
Here are the things I still find problematic about it:&lt;br /&gt;
&lt;br /&gt;
- as I said, I am not positive about the data in part 3... particularly the invalid/prevalid stuff. As I said, I&#039;d like for someone who understands this stuff to read what I&#039;ve written and tell me if any connections have been omitted or misrepresented.&lt;br /&gt;
&lt;br /&gt;
- part 1 is a messy collection of data. My original idea had been for it to explain what was innovative about flash design and how that lead to its particular advantages and disadvantages... but I don&#039;t think that we&#039;ve found this information... I am pretty sure it has to do with the materials and the cirquit: the materials give a shorter life-span, but do they confer an advantage?... the circuit structure is what allows for for the fast access and compactness but is also what forces block-sized erasures. Right? &lt;br /&gt;
&lt;br /&gt;
- we could use a final sentence... but unless it is both inspired and organically related to what the paper talks about, its better to leave it out.&lt;br /&gt;
&lt;br /&gt;
Fedor &lt;br /&gt;
&lt;br /&gt;
PS, I took away the bracketed caps for cosmetics but my concerns remain.&lt;br /&gt;
&lt;br /&gt;
...rewriting part 3 again to make it consistent with Paul&#039;s research... part 1 is still a shambles.&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
...I&#039;ve changed the thesis to accommodate the part 1 more or less as is - should be better now. Still looking for feedback vis-a-vis part 3. -fdr&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4781</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4781"/>
		<updated>2010-10-15T14:19:08Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several key disadvantages which are of key relevance for anyone attempting to implement an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
The extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown to be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives offer exponentially faster read-speeds than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hot-spots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
1. Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
2. Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
3. Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
4. What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4780</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4780"/>
		<updated>2010-10-15T14:18:38Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several key disadvantages which are of key relevance for anyone attempting to impliment an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
The extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown to be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives offer exponentially faster read-speeds than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
1. Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
2. Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
3. Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
4. What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4779</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4779"/>
		<updated>2010-10-15T14:10:18Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several key disadvantages which are of key relevance for anyone attempting to impliment an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Originally conceived as an improved alternative to EPROMs[7], Flash memory is non-volatile(power-supply independent) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
The extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown to be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives offer exponentially faster read-speeds than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
1. Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
2. Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
3. Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
4. What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4778</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4778"/>
		<updated>2010-10-15T14:09:19Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
Though Flash memory has many advantages it also has several key disadvantages which are of key relevance for anyone attempting to impliment an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Originally conceived as an improved alternative to EPROMs[7], Flash memory is non-volatile(power-supply independent) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
The extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown to be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives offer exponentially faster read-speeds than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4777</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4777"/>
		<updated>2010-10-15T14:09:04Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems. The particular limitations that lead to this necessity are flash-memory’s limited number of erase-cycles, the slowness of its writes and erasures, as well as its need to conduct erasures one entire block at a time. A typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes and wear-leveling, as well as its efficiency through the better management of writes and erasures. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==Though Flash memory has many advantages it also has several key disadvantages which are of key relevance for anyone attempting to impliment an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Originally conceived as an improved alternative to EPROMs[7], Flash memory is non-volatile(power-supply independent) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
The extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown to be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives offer exponentially faster read-speeds than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4776</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4776"/>
		<updated>2010-10-15T14:01:08Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes, wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==Though Flash memory has many advantages it also has several key disadvantages which are of key relevance for anyone attempting to impliment an file system to work with it. &lt;br /&gt;
&lt;br /&gt;
Originally conceived as an improved alternative to EPROMs[7], Flash memory is non-volatile(power-supply independent) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy. This means that NAND is the superior form of flash for long term storage, while NOR is preferred for computer embedded read-only functions. [2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
The extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown to be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives offer exponentially faster read-speeds than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times (or just 10000 if its NOR flash).[14] This poses a problem because of flash memory&#039;s second significant drawback: when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
Thus, though flash does offer much faster read-times, it comes with the heavy constraints on a limited number of erase cycles, slow write and erase times and the necessity to be erased a block at a time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4775</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4775"/>
		<updated>2010-10-15T13:42:32Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through the log-structure of writes, wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4774</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4774"/>
		<updated>2010-10-15T13:41:39Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature is a log that keeps the data which must still be written to disk and then writes it all in one big write. This is useful for flash systems because it allows them to time the expensive write operation in such a way as to not waste resources and also because, by filling up full blocks at at time, the log-structured file system makes sure that space is used to its fullest capacity. This last fact in turn ensures that it will take the memory a comparatively long time to be filled and that erasures and over-writes will only occur when they absolutely have to. As has been discussed, this is of great benefit to flash memory. &lt;br /&gt;
&lt;br /&gt;
A log structured file system also keeps a log of how many times each block of data has been erased and this is good for conducting wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3]&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid.On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system. [8]&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system arise from its log-structure but also have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4760</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4760"/>
		<updated>2010-10-15T13:27:28Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While looking for what you requested, I found an entire section on the oxide breakdown... oops. :P&lt;br /&gt;
So really nothing changes, As electrons tunnel through the oxide layer, it deteriorates. When the damage becomes too great, the oxide abruptly loses its insulative properties. (damn firefox, that&#039;s a word) Looking for the erasures now ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
I&#039;m off to sleep, but I&#039;ll be up at 5am to see what else I can do.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aw, I just missed you.&lt;br /&gt;
It turns out that erasing entire blocks is necessary based on how the chip is built. For both NOR and NAND, pairs of word lines share an erase line, which is located near the floating gate. It uses FN tunneling to erase two lines of words at a time, making the sector the smallest size you can erase simply because that&#039;s how it&#039;s physically wired.&lt;br /&gt;
i.e []-mem byte |-erase line&lt;br /&gt;
&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[] ... If that makes any sense... The erase line is separate from the byte select or word select lines&lt;br /&gt;
&lt;br /&gt;
Numbers for formatting sake.&lt;br /&gt;
&lt;br /&gt;
I&#039;m prolly gonna take Fedor&#039;s advice and head to bed, but I&#039;ll likely pop back on before I go to sleep in case anyone needs me to look up anything else. :P&lt;br /&gt;
&lt;br /&gt;
--[[User:Lmundt|Lmundt]] 03:23, 15 October 2010 (UTC) Interesting article compaing speeds&lt;br /&gt;
https://noc.sara.nl/nrg/publications/RoN2010-D1.1.pdf&lt;br /&gt;
&lt;br /&gt;
Wow, I can&#039;t believe I completely forgot. Hybrid Drives... I can&#039;t remember for the life of me whether they exist yet or not, but there will eventually exist a hard drive that&#039;s both flash and traditional platter. It allocates files that are not rewritten often, like an OS (well except windows and all its lovely updates) to the flash memory on install, and the remainder of the files (Documents, programs etc) to the traditional platter. Because you can&#039;t reformat an OS 100,000 times (no matter HOW badly you screw it up with viruses and the like), the flash memory will retain usability, and all the hotspots are on the platters, so you don&#039;t need to worry about minimizing disk usage.&lt;br /&gt;
I&#039;m out for the night. Cheers all! ~Andrew&lt;br /&gt;
&lt;br /&gt;
Alright guys... I&#039;ve done as much as I can for tonight. I&#039;m exhausted and I&#039;m having troubles concentrating anymore. I added a few questions for people to answer as thehttp://homeostasis.scs.carleton.ca/wiki/index.php/COMP_3000_Essay_1_2010_Question_10y read. I&#039;m going to bed, hopefully people will be up early enough to fix some things that I may have missed because I sure as hell won&#039;t be :P. Really wish I could keep going though.  --[[User:Gsmith6|Gsmith6]] 07:38, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey y&#039;all,&lt;br /&gt;
&lt;br /&gt;
So, I&#039;m just rewriting part 3 as we speak, trying to understand the invalid/pre-valid stuff - what is the purpose of this with relation to what we are talking about? Does it achieve even writing, or just keeps the same block from being written to by two processes at once? Also, is an invalidated block one that has been written to too many times?&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
Moving right along, I&#039;m still re-writing P3 and posting as I go. Some things are not clear to me, however, I have written those in [BRACKETED CAPITALS], if any of your are online, it would be useful if you could post disambiguations here.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I&#039;ve gone over part 3. Certain things still don&#039;t necessarily make perfect and consistent sense. If one of you who has a solid understanding of of log-systems and how they work could go over it and see if what I&#039;ve written is consistent with your understanding, that would be great.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I emailed Anil and he said we could take a bit of extra time (couple of hours?) to get the essay to its best possible form. &lt;br /&gt;
&lt;br /&gt;
Here are the things I still find problematic about it:&lt;br /&gt;
&lt;br /&gt;
- as I said, I am not positive about the data in part 3... particularly the invalid/prevalid stuff. As I said, I&#039;d like for someone who understands this stuff to read what I&#039;ve written and tell me if any connections have been omitted or misrepresented.&lt;br /&gt;
&lt;br /&gt;
- part 1 is a messy collection of data. My original idea had been for it to explain what was innovative about flash design and how that lead to its particular advantages and disadvantages... but I don&#039;t think that we&#039;ve found this information... I am pretty sure it has to do with the materials and the cirquit: the materials give a shorter life-span, but do they confer an advantage?... the circuit structure is what allows for for the fast access and compactness but is also what forces block-sized erasures. Right? &lt;br /&gt;
&lt;br /&gt;
- we could use a final sentence... but unless it is both inspired and organically related to what the paper talks about, its better to leave it out.&lt;br /&gt;
&lt;br /&gt;
Fedor &lt;br /&gt;
&lt;br /&gt;
PS, I took away the bracketed caps for cosmetics but my concerns remain.&lt;br /&gt;
&lt;br /&gt;
...rewriting part 3 again to make it consistent with Paul&#039;s research... part 1 is still a shambles.&lt;br /&gt;
Fedor&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4759</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4759"/>
		<updated>2010-10-15T13:26:24Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not share the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log that keeps the data which must still be written to disk and then writes it all in one big write. &lt;br /&gt;
&lt;br /&gt;
This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. Wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. &lt;br /&gt;
&lt;br /&gt;
On another technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4758</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4758"/>
		<updated>2010-10-15T13:23:31Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log that keeps the data which must still be written to disk and then writes it all in one big write. &lt;br /&gt;
&lt;br /&gt;
This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. &lt;br /&gt;
&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4756</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4756"/>
		<updated>2010-10-15T12:03:38Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While looking for what you requested, I found an entire section on the oxide breakdown... oops. :P&lt;br /&gt;
So really nothing changes, As electrons tunnel through the oxide layer, it deteriorates. When the damage becomes too great, the oxide abruptly loses its insulative properties. (damn firefox, that&#039;s a word) Looking for the erasures now ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
I&#039;m off to sleep, but I&#039;ll be up at 5am to see what else I can do.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aw, I just missed you.&lt;br /&gt;
It turns out that erasing entire blocks is necessary based on how the chip is built. For both NOR and NAND, pairs of word lines share an erase line, which is located near the floating gate. It uses FN tunneling to erase two lines of words at a time, making the sector the smallest size you can erase simply because that&#039;s how it&#039;s physically wired.&lt;br /&gt;
i.e []-mem byte |-erase line&lt;br /&gt;
&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[] ... If that makes any sense... The erase line is separate from the byte select or word select lines&lt;br /&gt;
&lt;br /&gt;
Numbers for formatting sake.&lt;br /&gt;
&lt;br /&gt;
I&#039;m prolly gonna take Fedor&#039;s advice and head to bed, but I&#039;ll likely pop back on before I go to sleep in case anyone needs me to look up anything else. :P&lt;br /&gt;
&lt;br /&gt;
--[[User:Lmundt|Lmundt]] 03:23, 15 October 2010 (UTC) Interesting article compaing speeds&lt;br /&gt;
https://noc.sara.nl/nrg/publications/RoN2010-D1.1.pdf&lt;br /&gt;
&lt;br /&gt;
Wow, I can&#039;t believe I completely forgot. Hybrid Drives... I can&#039;t remember for the life of me whether they exist yet or not, but there will eventually exist a hard drive that&#039;s both flash and traditional platter. It allocates files that are not rewritten often, like an OS (well except windows and all its lovely updates) to the flash memory on install, and the remainder of the files (Documents, programs etc) to the traditional platter. Because you can&#039;t reformat an OS 100,000 times (no matter HOW badly you screw it up with viruses and the like), the flash memory will retain usability, and all the hotspots are on the platters, so you don&#039;t need to worry about minimizing disk usage.&lt;br /&gt;
I&#039;m out for the night. Cheers all! ~Andrew&lt;br /&gt;
&lt;br /&gt;
Alright guys... I&#039;ve done as much as I can for tonight. I&#039;m exhausted and I&#039;m having troubles concentrating anymore. I added a few questions for people to answer as thehttp://homeostasis.scs.carleton.ca/wiki/index.php/COMP_3000_Essay_1_2010_Question_10y read. I&#039;m going to bed, hopefully people will be up early enough to fix some things that I may have missed because I sure as hell won&#039;t be :P. Really wish I could keep going though.  --[[User:Gsmith6|Gsmith6]] 07:38, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey y&#039;all,&lt;br /&gt;
&lt;br /&gt;
So, I&#039;m just rewriting part 3 as we speak, trying to understand the invalid/pre-valid stuff - what is the purpose of this with relation to what we are talking about? Does it achieve even writing, or just keeps the same block from being written to by two processes at once? Also, is an invalidated block one that has been written to too many times?&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
Moving right along, I&#039;m still re-writing P3 and posting as I go. Some things are not clear to me, however, I have written those in [BRACKETED CAPITALS], if any of your are online, it would be useful if you could post disambiguations here.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I&#039;ve gone over part 3. Certain things still don&#039;t necessarily make perfect and consistent sense. If one of you who has a solid understanding of of log-systems and how they work could go over it and see if what I&#039;ve written is consistent with your understanding, that would be great.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I emailed Anil and he said we could take a bit of extra time (couple of hours?) to get the essay to its best possible form. &lt;br /&gt;
&lt;br /&gt;
Here are the things I still find problematic about it:&lt;br /&gt;
&lt;br /&gt;
- as I said, I am not positive about the data in part 3... particularly the invalid/prevalid stuff. As I said, I&#039;d like for someone who understands this stuff to read what I&#039;ve written and tell me if any connections have been omitted or misrepresented.&lt;br /&gt;
&lt;br /&gt;
- part 1 is a messy collection of data. My original idea had been for it to explain what was innovative about flash design and how that lead to its particular advantages and disadvantages... but I don&#039;t think that we&#039;ve found this information... I am pretty sure it has to do with the materials and the cirquit: the materials give a shorter life-span, but do they confer an advantage?... the circuit structure is what allows for for the fast access and compactness but is also what forces block-sized erasures. Right? &lt;br /&gt;
&lt;br /&gt;
- we could use a final sentence... but unless it is both inspired and organically related to what the paper talks about, its better to leave it out.&lt;br /&gt;
&lt;br /&gt;
Fedor &lt;br /&gt;
&lt;br /&gt;
PS, I took away the bracketed caps for cosmetics but my concerns remain.&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4755</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4755"/>
		<updated>2010-10-15T12:03:01Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While looking for what you requested, I found an entire section on the oxide breakdown... oops. :P&lt;br /&gt;
So really nothing changes, As electrons tunnel through the oxide layer, it deteriorates. When the damage becomes too great, the oxide abruptly loses its insulative properties. (damn firefox, that&#039;s a word) Looking for the erasures now ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
I&#039;m off to sleep, but I&#039;ll be up at 5am to see what else I can do.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aw, I just missed you.&lt;br /&gt;
It turns out that erasing entire blocks is necessary based on how the chip is built. For both NOR and NAND, pairs of word lines share an erase line, which is located near the floating gate. It uses FN tunneling to erase two lines of words at a time, making the sector the smallest size you can erase simply because that&#039;s how it&#039;s physically wired.&lt;br /&gt;
i.e []-mem byte |-erase line&lt;br /&gt;
&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[] ... If that makes any sense... The erase line is separate from the byte select or word select lines&lt;br /&gt;
&lt;br /&gt;
Numbers for formatting sake.&lt;br /&gt;
&lt;br /&gt;
I&#039;m prolly gonna take Fedor&#039;s advice and head to bed, but I&#039;ll likely pop back on before I go to sleep in case anyone needs me to look up anything else. :P&lt;br /&gt;
&lt;br /&gt;
--[[User:Lmundt|Lmundt]] 03:23, 15 October 2010 (UTC) Interesting article compaing speeds&lt;br /&gt;
https://noc.sara.nl/nrg/publications/RoN2010-D1.1.pdf&lt;br /&gt;
&lt;br /&gt;
Wow, I can&#039;t believe I completely forgot. Hybrid Drives... I can&#039;t remember for the life of me whether they exist yet or not, but there will eventually exist a hard drive that&#039;s both flash and traditional platter. It allocates files that are not rewritten often, like an OS (well except windows and all its lovely updates) to the flash memory on install, and the remainder of the files (Documents, programs etc) to the traditional platter. Because you can&#039;t reformat an OS 100,000 times (no matter HOW badly you screw it up with viruses and the like), the flash memory will retain usability, and all the hotspots are on the platters, so you don&#039;t need to worry about minimizing disk usage.&lt;br /&gt;
I&#039;m out for the night. Cheers all! ~Andrew&lt;br /&gt;
&lt;br /&gt;
Alright guys... I&#039;ve done as much as I can for tonight. I&#039;m exhausted and I&#039;m having troubles concentrating anymore. I added a few questions for people to answer as thehttp://homeostasis.scs.carleton.ca/wiki/index.php/COMP_3000_Essay_1_2010_Question_10y read. I&#039;m going to bed, hopefully people will be up early enough to fix some things that I may have missed because I sure as hell won&#039;t be :P. Really wish I could keep going though.  --[[User:Gsmith6|Gsmith6]] 07:38, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey y&#039;all,&lt;br /&gt;
&lt;br /&gt;
So, I&#039;m just rewriting part 3 as we speak, trying to understand the invalid/pre-valid stuff - what is the purpose of this with relation to what we are talking about? Does it achieve even writing, or just keeps the same block from being written to by two processes at once? Also, is an invalidated block one that has been written to too many times?&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
Moving right along, I&#039;m still re-writing P3 and posting as I go. Some things are not clear to me, however, I have written those in [BRACKETED CAPITALS], if any of your are online, it would be useful if you could post disambiguations here.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I&#039;ve gone over part 3. Certain things still don&#039;t necessarily make perfect and consistent sense. If one of you who has a solid understanding of of log-systems and how they work could go over it and see if what I&#039;ve written is consistent with your understanding, that would be great.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I emailed Anil and he said we could take a bit of extra time (couple of hours?) to get the essay to its best possible form. &lt;br /&gt;
&lt;br /&gt;
Here are the things I still find problematic about it:&lt;br /&gt;
&lt;br /&gt;
- as I said, I am not positive about the data in part 3... particularly the invalid/prevalid stuff. As I said, I&#039;d like for someone who understands this stuff to read what I&#039;ve written and tell me if any connections have been omitted or misrepresented.&lt;br /&gt;
- part 1 is a messy collection of data. My original idea had been for it to explain what was innovative about flash design and how that lead to its particular advantages and disadvantages... but I don&#039;t think that we&#039;ve found this information... I am pretty sure it has to do with the materials and the cirquit: the materials give a shorter life-span, but do they confer an advantage?... the circuit structure is what allows for for the fast access and compactness but is also what forces block-sized erasures. Right? &lt;br /&gt;
- we could use a final sentence... but unless it is both inspired and organically related to what the paper talks about, its better to leave it out.&lt;br /&gt;
&lt;br /&gt;
Fedor &lt;br /&gt;
&lt;br /&gt;
PS, I took away the bracketed caps for cosmetics but my concerns remain.&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4751</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4751"/>
		<updated>2010-10-15T11:50:39Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. &lt;br /&gt;
&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4750</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4750"/>
		<updated>2010-10-15T11:49:45Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. &lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. &lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4749</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4749"/>
		<updated>2010-10-15T11:49:17Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. &lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4748</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4748"/>
		<updated>2010-10-15T11:48:58Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4741</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4741"/>
		<updated>2010-10-15T11:36:58Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a &lt;br /&gt;
&lt;br /&gt;
garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old &lt;br /&gt;
&lt;br /&gt;
segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes &lt;br /&gt;
&lt;br /&gt;
invalidated but ony does it by the bank, time is saved when the expensive erase operation is called [WHY EXACTLY? ARE YOU CONFUSING BLOCKS AND BANKS?]. Due &lt;br /&gt;
&lt;br /&gt;
to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The &lt;br /&gt;
&lt;br /&gt;
former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical &lt;br /&gt;
&lt;br /&gt;
tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its wear-leveling, banks and garbage collector, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4739</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4739"/>
		<updated>2010-10-15T11:35:33Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to its innovative design. Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it is able to optimize a flash unit&#039;s lifespan through wear-leveling and to better manage writes and erasures through the use of such tools as banks and the garbage collector. &lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a &lt;br /&gt;
&lt;br /&gt;
garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old &lt;br /&gt;
&lt;br /&gt;
segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes &lt;br /&gt;
&lt;br /&gt;
invalidated but ony does it by the bank, time is saved when the expensive erase operation is called [WHY EXACTLY? ARE YOU CONFUSING BLOCKS AND BANKS?]. Due &lt;br /&gt;
&lt;br /&gt;
to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The &lt;br /&gt;
&lt;br /&gt;
former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical &lt;br /&gt;
&lt;br /&gt;
tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its use of banks for organizing data, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4737</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4737"/>
		<updated>2010-10-15T11:31:29Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its unique advantages as both are due to [TO WHAT?] . Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it optimizes erasures by [WHAT?].&lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
&lt;br /&gt;
It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] &lt;br /&gt;
&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a &lt;br /&gt;
&lt;br /&gt;
garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old &lt;br /&gt;
&lt;br /&gt;
segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes &lt;br /&gt;
&lt;br /&gt;
invalidated but ony does it by the bank, time is saved when the expensive erase operation is called [WHY EXACTLY? ARE YOU CONFUSING BLOCKS AND BANKS?]. Due &lt;br /&gt;
&lt;br /&gt;
to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The &lt;br /&gt;
&lt;br /&gt;
former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical &lt;br /&gt;
&lt;br /&gt;
tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its use of banks for organizing data, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4736</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4736"/>
		<updated>2010-10-15T11:27:31Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its advantages with regard to [ TO WHAT?] as both are due to [TO WHAT?] . Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it optimizes erasures by [WHAT?].&lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a &lt;br /&gt;
&lt;br /&gt;
garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old &lt;br /&gt;
&lt;br /&gt;
segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes &lt;br /&gt;
&lt;br /&gt;
invalidated but ony does it by the bank, time is saved when the expensive erase operation is called [WHY EXACTLY? ARE YOU CONFUSING BLOCKS AND BANKS?]. Due &lt;br /&gt;
&lt;br /&gt;
to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The &lt;br /&gt;
&lt;br /&gt;
former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical &lt;br /&gt;
&lt;br /&gt;
tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its use of banks for organizing data, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
# What particularities/deficiencies of flash memory does any file-system which implements it have to take into account? What are some ways of dealing with them?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4735</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4735"/>
		<updated>2010-10-15T11:24:36Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While looking for what you requested, I found an entire section on the oxide breakdown... oops. :P&lt;br /&gt;
So really nothing changes, As electrons tunnel through the oxide layer, it deteriorates. When the damage becomes too great, the oxide abruptly loses its insulative properties. (damn firefox, that&#039;s a word) Looking for the erasures now ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
I&#039;m off to sleep, but I&#039;ll be up at 5am to see what else I can do.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aw, I just missed you.&lt;br /&gt;
It turns out that erasing entire blocks is necessary based on how the chip is built. For both NOR and NAND, pairs of word lines share an erase line, which is located near the floating gate. It uses FN tunneling to erase two lines of words at a time, making the sector the smallest size you can erase simply because that&#039;s how it&#039;s physically wired.&lt;br /&gt;
i.e []-mem byte |-erase line&lt;br /&gt;
&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[] ... If that makes any sense... The erase line is separate from the byte select or word select lines&lt;br /&gt;
&lt;br /&gt;
Numbers for formatting sake.&lt;br /&gt;
&lt;br /&gt;
I&#039;m prolly gonna take Fedor&#039;s advice and head to bed, but I&#039;ll likely pop back on before I go to sleep in case anyone needs me to look up anything else. :P&lt;br /&gt;
&lt;br /&gt;
--[[User:Lmundt|Lmundt]] 03:23, 15 October 2010 (UTC) Interesting article compaing speeds&lt;br /&gt;
https://noc.sara.nl/nrg/publications/RoN2010-D1.1.pdf&lt;br /&gt;
&lt;br /&gt;
Wow, I can&#039;t believe I completely forgot. Hybrid Drives... I can&#039;t remember for the life of me whether they exist yet or not, but there will eventually exist a hard drive that&#039;s both flash and traditional platter. It allocates files that are not rewritten often, like an OS (well except windows and all its lovely updates) to the flash memory on install, and the remainder of the files (Documents, programs etc) to the traditional platter. Because you can&#039;t reformat an OS 100,000 times (no matter HOW badly you screw it up with viruses and the like), the flash memory will retain usability, and all the hotspots are on the platters, so you don&#039;t need to worry about minimizing disk usage.&lt;br /&gt;
I&#039;m out for the night. Cheers all! ~Andrew&lt;br /&gt;
&lt;br /&gt;
Alright guys... I&#039;ve done as much as I can for tonight. I&#039;m exhausted and I&#039;m having troubles concentrating anymore. I added a few questions for people to answer as thehttp://homeostasis.scs.carleton.ca/wiki/index.php/COMP_3000_Essay_1_2010_Question_10y read. I&#039;m going to bed, hopefully people will be up early enough to fix some things that I may have missed because I sure as hell won&#039;t be :P. Really wish I could keep going though.  --[[User:Gsmith6|Gsmith6]] 07:38, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey y&#039;all,&lt;br /&gt;
&lt;br /&gt;
So, I&#039;m just rewriting part 3 as we speak, trying to understand the invalid/pre-valid stuff - what is the purpose of this with relation to what we are talking about? Does it achieve even writing, or just keeps the same block from being written to by two processes at once? Also, is an invalidated block one that has been written to too many times?&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
Moving right along, I&#039;m still re-writing P3 and posting as I go. Some things are not clear to me, however, I have written those in [BRACKETED CAPITALS], if any of your are online, it would be useful if you could post disambiguations here.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
OK, I&#039;ve gone over part 3. Certain things still don&#039;t necessarily make perfect and consistent sense. If one of you who has a solid understanding of of log-systems and how they work could go over it and see if what I&#039;ve written is consistent with your understanding, that would be great.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4734</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4734"/>
		<updated>2010-10-15T11:22:58Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its advantages with regard to [ TO WHAT?] as both are due to [TO WHAT?] . Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it optimizes erasures by [WHAT?].&lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a &lt;br /&gt;
&lt;br /&gt;
garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old &lt;br /&gt;
&lt;br /&gt;
segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes &lt;br /&gt;
&lt;br /&gt;
invalidated but ony does it by the bank, time is saved when the expensive erase operation is called [WHY EXACTLY? ARE YOU CONFUSING BLOCKS AND BANKS?]. Due &lt;br /&gt;
&lt;br /&gt;
to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The &lt;br /&gt;
&lt;br /&gt;
former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical &lt;br /&gt;
&lt;br /&gt;
tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its use of banks for organizing data, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4732</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4732"/>
		<updated>2010-10-15T11:19:56Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its advantages with regard to [ TO WHAT?] as both are due to [TO WHAT?] . Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it optimizes erasures by [WHAT?].&lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a &lt;br /&gt;
&lt;br /&gt;
garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old &lt;br /&gt;
&lt;br /&gt;
segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes &lt;br /&gt;
&lt;br /&gt;
invalidated but ony does it by the bank, time is saved when the expensive erase operation is called [WHY EXACTLY? ARE YOU CONFUSING BLOCKS AND BANKS?]. Due &lt;br /&gt;
&lt;br /&gt;
to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process.  [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
&lt;br /&gt;
Thus, the advantages of the log-based file system mostly have to do with wear leveling and the optimization of writes and erasures on the block level. The &lt;br /&gt;
&lt;br /&gt;
former is accomplished by means of the log itself and its intelligent use when it comes to deciding where to write. The latter, through certain technical &lt;br /&gt;
&lt;br /&gt;
tools such as allocation-technology, banks and, of course, the garbage collector.&lt;br /&gt;
&lt;br /&gt;
===Systems Developed For Flash===&lt;br /&gt;
In 1999 a Swedish company by the name of Axis Communications, developed and released a file system that was designed specifically to be run on a flash drive. Instead of mapping each physical address space with an emulated block sector, the system creates nodes that store data. The system keeps a log of the nodes and when each node was last updated. The system also keeps track of inodes. These inodes keep a list of nodes that correspond to the relevant data. The nodes also contain information about which inode it belongs to. When the drive is mounted, the system scans all the nodes on the drive, and rebuilds the directory.&lt;br /&gt;
As the directory gets built, the nodes containing the data also map the physical location for each piece of data.[14] &lt;br /&gt;
&lt;br /&gt;
When writing data to the drive, the nodes carrying that data get attached to the end of the log.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its use of banks for organizing data, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4707</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4707"/>
		<updated>2010-10-15T10:47:35Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its advantages with regard to [ TO WHAT?] as both are due to [TO WHAT?] . Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it optimizes erasures by [WHAT?].&lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
On a technical level, the FTL also works with banks. A bank is essentially a group of sequential addresses which keeps track of when it was last updated using timestamps.When the FTL receives a request to write something to memory, it uses a list of these to determine which area of the drive should be used. Then, it only writes to that bank, until it is full before switching to another. Very importantly, the system also keeps a Cleaning Bank list which indicates which banks need to be emptied out. This feature makes certain that writes and erasures are never mixed in the same bank and is also integral to the whole erasure process, which is in turn one of the key feature of the log-based file system.  [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
&lt;br /&gt;
At the heart of this process is the garbage collector: When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks. Furthermore, because the collector does not erase every block the moment it becomes invalidated but ony does it by the bank, time is saved when the expensive erase operation is called [WHY EXACTLY?]. Due to the slowness of the erasures, the kernel typically conducts the cleaning when the drive is idle and many resources are available for this process. [SOURCE]&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
The file system only writes a bank at a time. This means that the OS can save up the small random writes and write them all at the same time in a bank.  This will cut down on the use of the expensive write command improving the overall performance of the hard drive.[9]&lt;br /&gt;
&lt;br /&gt;
If a collision occurs when writing a new bank, the file system will sends the new data to an empty bank rather then erasing the existing bank and replacing it. This will cut down on using the erase function improving the life of the hard drive. Also since it only performs writes command and not a erase command and write command like a traditional file system this improves performance of the drive as well.[16]&lt;br /&gt;
&lt;br /&gt;
===Systems Developed For Flash===&lt;br /&gt;
In 1999 a Swedish company by the name of Axis Communications, developed and released a file system that was designed specifically to be run on a flash drive. Instead of mapping each physical address space with an emulated block sector, the system creates nodes that store data. The system keeps a log of the nodes and when each node was last updated. The system also keeps track of inodes. These inodes keep a list of nodes that correspond to the relevant data. The nodes also contain information about which inode it belongs to. When the drive is mounted, the system scans all the nodes on the drive, and rebuilds the directory.&lt;br /&gt;
As the directory gets built, the nodes containing the data also map the physical location for each piece of data.[14] &lt;br /&gt;
&lt;br /&gt;
When writing data to the drive, the nodes carrying that data get attached to the end of the log.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its use of banks for organizing data, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4705</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4705"/>
		<updated>2010-10-15T10:45:49Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While looking for what you requested, I found an entire section on the oxide breakdown... oops. :P&lt;br /&gt;
So really nothing changes, As electrons tunnel through the oxide layer, it deteriorates. When the damage becomes too great, the oxide abruptly loses its insulative properties. (damn firefox, that&#039;s a word) Looking for the erasures now ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
I&#039;m off to sleep, but I&#039;ll be up at 5am to see what else I can do.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aw, I just missed you.&lt;br /&gt;
It turns out that erasing entire blocks is necessary based on how the chip is built. For both NOR and NAND, pairs of word lines share an erase line, which is located near the floating gate. It uses FN tunneling to erase two lines of words at a time, making the sector the smallest size you can erase simply because that&#039;s how it&#039;s physically wired.&lt;br /&gt;
i.e []-mem byte |-erase line&lt;br /&gt;
&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[] ... If that makes any sense... The erase line is separate from the byte select or word select lines&lt;br /&gt;
&lt;br /&gt;
Numbers for formatting sake.&lt;br /&gt;
&lt;br /&gt;
I&#039;m prolly gonna take Fedor&#039;s advice and head to bed, but I&#039;ll likely pop back on before I go to sleep in case anyone needs me to look up anything else. :P&lt;br /&gt;
&lt;br /&gt;
--[[User:Lmundt|Lmundt]] 03:23, 15 October 2010 (UTC) Interesting article compaing speeds&lt;br /&gt;
https://noc.sara.nl/nrg/publications/RoN2010-D1.1.pdf&lt;br /&gt;
&lt;br /&gt;
Wow, I can&#039;t believe I completely forgot. Hybrid Drives... I can&#039;t remember for the life of me whether they exist yet or not, but there will eventually exist a hard drive that&#039;s both flash and traditional platter. It allocates files that are not rewritten often, like an OS (well except windows and all its lovely updates) to the flash memory on install, and the remainder of the files (Documents, programs etc) to the traditional platter. Because you can&#039;t reformat an OS 100,000 times (no matter HOW badly you screw it up with viruses and the like), the flash memory will retain usability, and all the hotspots are on the platters, so you don&#039;t need to worry about minimizing disk usage.&lt;br /&gt;
I&#039;m out for the night. Cheers all! ~Andrew&lt;br /&gt;
&lt;br /&gt;
Alright guys... I&#039;ve done as much as I can for tonight. I&#039;m exhausted and I&#039;m having troubles concentrating anymore. I added a few questions for people to answer as thehttp://homeostasis.scs.carleton.ca/wiki/index.php/COMP_3000_Essay_1_2010_Question_10y read. I&#039;m going to bed, hopefully people will be up early enough to fix some things that I may have missed because I sure as hell won&#039;t be :P. Really wish I could keep going though.  --[[User:Gsmith6|Gsmith6]] 07:38, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey y&#039;all,&lt;br /&gt;
&lt;br /&gt;
So, I&#039;m just rewriting part 3 as we speak, trying to understand the invalid/pre-valid stuff - what is the purpose of this with relation to what we are talking about? Does it achieve even writing, or just keeps the same block from being written to by two processes at once? Also, is an invalidated block one that has been written to too many times?&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
Moving right along, I&#039;m still re-writing P3 and posting as I go. Some things are not clear to me, however, I have written those in [BRACKETED CAPITALS], if any of your are online, it would be useful if you could post disambiguations here.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4703</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4703"/>
		<updated>2010-10-15T10:28:32Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage. It started out as a replacement for EPROMs. At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically.[7] Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its advantages with regard to [ TO WHAT?] as both are due to [TO WHAT?] . Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it optimizes erasures by [WHAT?].&lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
This extreme read speed makes flash drives a preferred method of storing games. This effectively makes loading times virtually non-existent. There is however a downside to this method. Games constantly save, modify, and change files wearing out the blocks much quicker. Flash drives have been shown be effective for the use in web-servers for running their CSS scripts or HTML pages.&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
The transistors that store the data are created with a thin strip of Silicon Oxide separating them. When the erase operation is called on the block where the transistors are located, the system fires electrons down the strip, wiping whatever bits the transistors are holding.   &lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Translational Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &#039;&#039;wear leveling&#039;&#039;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. For the reasons given above, HDD systems are unsuitable for use with flash memory.&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
Log-based file systems, however, do not the disadvantages of HDD file systems. Also known as Flash Transitional Layers (FTL), their distinguishing feature  is a log which keeps track of how many times each memory address has been erased. This allows for it to conduct wear leveling - a process the purpose of which is to prevent particular blocks from being erased more than others. As already discussed, the purpose of such a practice is to reduce hot-spots. For example, wear-leveling writes data that does not change to blocks that have been erased frequently thus decreasing the probability that those blocks will be erased even more. Similarly, it tries to write evenly to all the blocks so as to maximize the hard-drive&#039;s overall lifespan. [3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The FTL is what makes it possible to combine the above features with a more traditional memory-management structure. It has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. The FTL is able to achieve this by giving each block a flag which keeps track of its state. When blocks are being written to, the FTL marks them as allocated.&lt;br /&gt;
&lt;br /&gt;
When a block is being written to, the FTL marks the blocks needed as &amp;quot;allocated&amp;quot;. This prevents other data from being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. After this is finished, the relevant block&#039;s state becmes &amp;quot;pre-valid&amp;quot;. Next, the block is marked as valid. [WHAT IS THIS INVALIDATED BLOCK BUSINESS? WHAT IS AN INVALIDATED BLOCK?]&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
The FTL organizes data using structures called banks. When the FTL gets a request to write something to memory, it uses a bank list to determine which area of the drive should be used. Essentially a bank is a group of sequential addresses, that keeps track of when it was last updated using timestamps. The FTL will only write to that bank, and once there is not enough space to write anymore, it switches out the current bank for the one with the most available space. When cleaning up the bank, the system puts it into what is called the Cleaning Bank List and removes it from the Bank List, thus avoiding any chance of some data being written to that bank while something is being erased. [8]&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks and by not erasing every block as soon as it becomes invalidated, it saves on the amount of times that the expensive erase operation is called. The kernel can preemptively clean the drive when the system is idle.&lt;br /&gt;
&lt;br /&gt;
===Why a Log File System is efficient for flash had drive===&lt;br /&gt;
The file system only writes a bank at a time. This means that the OS can save up the small random writes and write them all at the same time in a bank.  This will cut down on the use of the expensive write command improving the overall performance of the hard drive.[9]&lt;br /&gt;
&lt;br /&gt;
If a collision occurs when writing a new bank, the file system will sends the new data to an empty bank rather then erasing the existing bank and replacing it. This will cut down on using the erase function improving the life of the hard drive. Also since it only performs writes command and not a erase command and write command like a traditional file system this improves performance of the drive as well.[16]&lt;br /&gt;
&lt;br /&gt;
===Systems Developed For Flash===&lt;br /&gt;
In 1999 a Swedish company by the name of Axis Communications, developed and released a file system that was designed specifically to be run on a flash drive. Instead of mapping each physical address space with an emulated block sector, the system creates nodes that store data. The system keeps a log of the nodes and when each node was last updated. The system also keeps track of inodes. These inodes keep a list of nodes that correspond to the relevant data. The nodes also contain information about which inode it belongs to. When the drive is mounted, the system scans all the nodes on the drive, and rebuilds the directory.&lt;br /&gt;
As the directory gets built, the nodes containing the data also map the physical location for each piece of data.[14] &lt;br /&gt;
&lt;br /&gt;
When writing data to the drive, the nodes carrying that data get attached to the end of the log.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its use of banks for organizing data, the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
# Even though flash drives are exponentially faster than traditional HDDs, why are HDDs still the main method of data storage?&lt;br /&gt;
# Writing and erasing data are costly operations for a flash based storage drive. Why does modifying data (even a single bit) take the most amount of time?&lt;br /&gt;
# Why is the Flash Translational Layer so important to a flash drive&#039;s functionality? Why can you not use the traditional interface to deal with the block layer?&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4702</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4702"/>
		<updated>2010-10-15T10:27:23Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While looking for what you requested, I found an entire section on the oxide breakdown... oops. :P&lt;br /&gt;
So really nothing changes, As electrons tunnel through the oxide layer, it deteriorates. When the damage becomes too great, the oxide abruptly loses its insulative properties. (damn firefox, that&#039;s a word) Looking for the erasures now ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
I&#039;m off to sleep, but I&#039;ll be up at 5am to see what else I can do.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Aw, I just missed you.&lt;br /&gt;
It turns out that erasing entire blocks is necessary based on how the chip is built. For both NOR and NAND, pairs of word lines share an erase line, which is located near the floating gate. It uses FN tunneling to erase two lines of words at a time, making the sector the smallest size you can erase simply because that&#039;s how it&#039;s physically wired.&lt;br /&gt;
i.e []-mem byte |-erase line&lt;br /&gt;
&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[]&lt;br /&gt;
#[]|[][]|[] ... If that makes any sense... The erase line is separate from the byte select or word select lines&lt;br /&gt;
&lt;br /&gt;
Numbers for formatting sake.&lt;br /&gt;
&lt;br /&gt;
I&#039;m prolly gonna take Fedor&#039;s advice and head to bed, but I&#039;ll likely pop back on before I go to sleep in case anyone needs me to look up anything else. :P&lt;br /&gt;
&lt;br /&gt;
--[[User:Lmundt|Lmundt]] 03:23, 15 October 2010 (UTC) Interesting article compaing speeds&lt;br /&gt;
https://noc.sara.nl/nrg/publications/RoN2010-D1.1.pdf&lt;br /&gt;
&lt;br /&gt;
Wow, I can&#039;t believe I completely forgot. Hybrid Drives... I can&#039;t remember for the life of me whether they exist yet or not, but there will eventually exist a hard drive that&#039;s both flash and traditional platter. It allocates files that are not rewritten often, like an OS (well except windows and all its lovely updates) to the flash memory on install, and the remainder of the files (Documents, programs etc) to the traditional platter. Because you can&#039;t reformat an OS 100,000 times (no matter HOW badly you screw it up with viruses and the like), the flash memory will retain usability, and all the hotspots are on the platters, so you don&#039;t need to worry about minimizing disk usage.&lt;br /&gt;
I&#039;m out for the night. Cheers all! ~Andrew&lt;br /&gt;
&lt;br /&gt;
Alright guys... I&#039;ve done as much as I can for tonight. I&#039;m exhausted and I&#039;m having troubles concentrating anymore. I added a few questions for people to answer as thehttp://homeostasis.scs.carleton.ca/wiki/index.php/COMP_3000_Essay_1_2010_Question_10y read. I&#039;m going to bed, hopefully people will be up early enough to fix some things that I may have missed because I sure as hell won&#039;t be :P. Really wish I could keep going though.  --[[User:Gsmith6|Gsmith6]] 07:38, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey y&#039;all,&lt;br /&gt;
&lt;br /&gt;
So, I&#039;m just rewriting part 3 as we speak, trying to understand the invalid/pre-valid stuff - what is the purpose of this with relation to what we are talking about? Does it achieve even writing, or just keeps the same block from being written to by two processes at once? Also, is an invalidated block one that has been written to too many times?&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4402</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4402"/>
		<updated>2010-10-15T03:13:28Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While looking for what you requested, I found an entire section on the oxide breakdown... oops. :P&lt;br /&gt;
So really nothing changes, As electrons tunnel through the oxide layer, it deteriorates. When the damage becomes too great, the oxide abruptly loses its insulative properties. (damn firefox, that&#039;s a word) Looking for the erasures now ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
I&#039;m off to sleep, but I&#039;ll be up at 5am to see what else I can do.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4400</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4400"/>
		<updated>2010-10-15T03:11:59Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage.  Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its advantages with regard to [ TO WHAT?] as both are due to [TO WHAT?] . Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it optimizes erasures by [WHAT?].&lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Possibly more on this later&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Transition Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
	Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &amp;quot;wear leveling&amp;quot;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More on this later&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
The process of &amp;quot;wear leveling&amp;quot; [WHAT IS THIS?] is achieved through a Log-based File System, often referred to as the Flash Transitional Layer(FTL). Essentially, the drive stores a log that keeps track of how many times each erase sector has been invalidated (or erased). The translational layer has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive. Each block has a flag which keeps track of its state. When a block is being written to, the FTL marks the blocks needed as &#039;&#039;allocated&#039;&#039;. This prevents other data being written to the block that has already been allocated. The FTL then goes on to write the data in the allocated blocks. Once it completes the transaction, the system updates the allocated blocks to &#039;&#039;pre-valid&#039;&#039;. Once that is completed, the drive marks the invalidated blocks to &#039;&#039;invalid&#039;&#039;, while marking the newly written block as &#039;&#039;valid&#039;&#039;. This entire flagging process is to ensure that the newly allocated blocks are never mixed up with the invalidated blocks. &lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
The FTL organizes data using structures called banks. When the FTL gets a request to write something to memory, it uses a bank list to determine which area of the drive should be used. Essentially a bank is a group of sequential addresses, that keeps track of when it was last updated using timestamps. The FTL will only write to that bank, and once there is not enough space to write anymore, it switches out the current bank for the one with the most available space. When cleaning up the bank, the system puts it into what is called the Cleaning Bank List and removes it from the Bank List, thus avoiding any chance of some data being written to that bank while something is being erased.&lt;br /&gt;
&lt;br /&gt;
===Cleaner===	&lt;br /&gt;
When the FTL realizes that there is not enough room to write new data onto the drive, it runs a garbage collection routine. This routine selects a segment to be cleaned, copies all of the valid data into a new segment, then erases everything in the old segment. This frees up the otherwise useless invalidated blocks and by not erasing every block as soon as it becomes invalidated, it saves on the amount of times that the expensive erase operation is called. The kernel can preemptively clean the drive when the system is idle.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
In this way, thanks to its [WHATEVER MAKES LOG FSs ACTUALLY GOOD AT DEALING WITH FLASH], the log-based file-system is far better suited to working with flash memory than a traditional HDD file system. The latter is utterly unfit for this task due to its placing primacy on the minimization of seeks rather than on the minimization and management of erasures. Dealing smartly with erasures is extremely important for a flash memory file system, as that memory type&#039;s particular weaknesses, the limited number of erasure cycles, the necessity to erase by the block and the relative slowness of the erasures themselves, all have to do with erasing. A good flash memory file system must therefore be built with the aim of making the best of these weaknesses and this is precisely the reason why older disk-based file systems are not suitable for flash memory while log-based file systems are. [INSPIRATIONAL LAST WORDS]&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=old=&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
This is what I&#039;ve got so far... mostly based on wikipedia:&lt;br /&gt;
&lt;br /&gt;
Flash memory has two limitations: it can only be erased in blocks and and it wears out after a certain number of erase cycles. Furthermore, a particular kind of Flash memory (NAND) is not able to provide random access.  &lt;br /&gt;
As a result of these Flash based file-systems cannot be handled in the same way as disk-based file systems. Here are a few of the key differences:&lt;br /&gt;
&lt;br /&gt;
-	Because memory must be erased in blocks, its erasure tends to take up time. Consequently, it is necessary to time the erasures in a way so as not to interfere with the efficiency of the system’s other operations. This is is not a real concern with disk-based file-systems. &lt;br /&gt;
-	A disk file-system needs to minimize the seeking time, but Flash file-system does not concern itself with this as it doesn’t have a disk. &lt;br /&gt;
-	A flash system tries to distribute memory in such a way so as not to make a particular block of memory subject to a disproportionally large number of erasures. The purpose of this is to keep the block from wearing out prematurely. The result of it is that memory needs to be distributed differently than in a disk based file-system. &lt;br /&gt;
Log-sturctured file systems are thus best suited to dealing with flash memory (they apparently do all of the above things). &lt;br /&gt;
&lt;br /&gt;
For the essay form, I&#039;m thinking of doing a section about traditional hard-disk systems, another about flash-memory and a third about flash systems. At this point, I am imagining the thesis as something like, &amp;quot;Flash systems require a fundamentally different system architecture than disk-based systems due to their need to adapt to the constraints inherent in flash memory: specifically, due to that memory&#039;s limited life-span and block-based erasures.&amp;quot; The argument would then talk about how these two differences directly lead to a new FS approach. &lt;br /&gt;
&lt;br /&gt;
That&#039;s how I see it at the moment. Honestly, I don&#039;t like doing research about this kind of stuff, so my data isn&#039;t very deep. That said, if you guys could find more info and summarize it, I&#039;m pretty sure that I could synthesize it all into a coherent essay. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4376</id>
		<title>COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=COMP_3000_Essay_1_2010_Question_10&amp;diff=4376"/>
		<updated>2010-10-15T02:56:01Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Question=&lt;br /&gt;
&lt;br /&gt;
How do the constraints of flash storage affect the design of flash-optimized file systems? Explain by contrasting with hard disk-based file systems.&lt;br /&gt;
&lt;br /&gt;
=Answer=&lt;br /&gt;
First introduced in the late 80s, Flash-memory is a light, energy-independent, compact, shock-resistant and efficiently readable type of storage.  Because of the particular limitations of this kind of memory, flash file systems require a fundamentally different system architecture than disk-based file-systems:  these systems need to be designed in light of flash-memory’s limited number of erase-cycles and its need to conduct erasures one entire block at a time. These constraints are a direct result of the same design that gives flash its advantages with regard to [ TO WHAT?] as both are due to [TO WHAT?] . Thus, a typical disk-based file-system is not suitable for working with flash memory as it erases far too frequently and indiscriminately while being simultaneously optimized for other constraints that do not affect flash memory. This means that a different solution is necessary and that solution is the log-based file-system which is far better suited to working with flash memory because it optimizes erasures by [WHAT?].&lt;br /&gt;
&lt;br /&gt;
==Flash Memory==&lt;br /&gt;
Flash memory is non-volatile(meaning digital storage that does not require power to retain its memory) storage space that has become more popular recently due to its fast fetch times. There are two basic forms of the flash storage system, NOR and NAND. Each type has its advantages and disadvantages. NOR has the fastest read times, but is much slower at writing. NAND on the other hand has much more capacity, faster write times, is less expensive, and has a much longer life expectancy.[2]&lt;br /&gt;
&lt;br /&gt;
More and more people use flash memory, with many sizes of drives, ranging from a few hundred megabyte USB key, to a few terabyte internal solid-state drive(SSD). Two main reasons for this movement are because of flash&#039;s extremely fast read times, and its falling price. A typical flash drive has read speeds of up to 14 times faster than a hard disk drive (HDD).[17]&lt;br /&gt;
&lt;br /&gt;
Although flash drives are exponentially faster than HDDs, they still have not become the main source of data management. The reason for this is because HDDs are simply much cheaper, and flash drives still have many faults. The most critical fault is that each block in flash memory can only be erased approximately 100,000 times.[14] This poses a problem because when modifying a file, even if its a single bit, the entire block must be erased, and rewritten. This erase/rewrite slows down the write operation considerably, making it actually slower to write a file to flash than an HDD.[8]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Possibly more on this later&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
HDDs use a block system, in which the kernel specifies which blocks to read and write. When using a flash drive, the blocks are emulated and mapped to a physical memory address. It does through what is called a &amp;quot;Transition Layer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Traditionally Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
	Since the kernel asks for a block number, a conventional hard disk drive (HDD) file-system is not optimized to work with flash memory. The reason for this is that conventional hard-disks have different constraints from those of flash memory - their primary problem is to reduce seeking time, while the primary problem when working with flash memory is to erase in a minimal and balanced way. &lt;br /&gt;
&lt;br /&gt;
The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk in order to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically. This is also why defragmentaion, a procedure used by HDDs to put files into more convenient configurations and thus minimize seeking times, loses its purpose in a flash memory context. Indeed, the unnecessary erasures that it entails are both inefficient and harmful for a flash memory unit. &lt;br /&gt;
&lt;br /&gt;
This comes directly out of flash memory&#039;s aforementioned constraints: the slow block-sized erasures and the limited number of erase-cycles. Because of these, a flash optimal file system needs to minimize its erase operations and also to spread out its erasures in such a way as to avoid the formation of hot-spots: sections of memory which have undergone a disproportionately high number of erasures and are thus in danger of burning out. This process of spreading out data is referred to as &amp;quot;wear leveling&amp;quot;. To minimize hotspots, a system using flash memory would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to conduct necessary erasure operations while the system is idle. It makes better sense to do these at this time because of the slow nature of erasures in the flash memory context. Of course, there is no such feature in a traditional HDD file-system. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;More on this later&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Flash Optimized File Systems==&lt;br /&gt;
&lt;br /&gt;
The process of &amp;quot;wear leveling&amp;quot; [WHAT IS THIS?] is achieved through a Log-based File System, often referred to as the Flash Transitional Layer(FTL). Essentially, the drive stores a log that keeps track of how many times each erase sector has been invalidated (or erased). The translational layer has a translation table, where each physical memory address is associated with an emulated block sectors. This allows a traditional file system that uses block sectors to be used on the flash drive.&lt;br /&gt;
&lt;br /&gt;
===Banks===&lt;br /&gt;
The FTL organizes data using structures called banks. When the FTL gets a request to write something to memory, it uses a bank list to determine which area of the drive should be used. Essentially a bank is a group of sequential addresses, that keeps track of when it was last updated using timestamps. The FTL will only write to that bank, and once there is not enough space to write anymore, it switches out the current bank for the one with the most available space.&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Questions=&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
[1]  Kim, Han-joon; Lee, Sang-goo. &#039;&#039;A New Flash Memory Management for Flash Storage System&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. Dept. of Comput. Sci., Seoul Nat. Univ., 06 Aug 2002. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[2] Smith, Lance. &#039;&#039;NAND Flash Solid State Storage Performance and Capability&#039;&#039;. &#039;&#039;Flash Memory Summit&#039;&#039;. SNIA Education Committee, 18 Aug 2009. &amp;lt;http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[3] Chang, LiPin. &#039;&#039;On Efficient Wear Leveling for Large-Scale Flash-Memory Storage Systems&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. Dept. of Comput. Sci.,Nat. ChiaoTung Univ., 15 Mar 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1244248&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[4] Nath, Suman; Gibbons, Phillip. &#039;&#039;Online maintenance of very large random samples on flash storage&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. The VLDB Journal, 27 Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1731355&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[5] Lim, Seung-Ho; Park; Kyu-Ho. &#039;&#039;An Efficient NAND Flash File System for Flash Memory Storage&#039;&#039;. &#039;&#039;CORE Laboratory&#039;&#039;. IEEE Transactions On Computers, Jul 2006. &amp;lt;http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[6] &#039;&#039;NAND vs. NOR Flash Memory Technology Overview&#039;&#039;. &#039;&#039;RMG and Associates&#039;&#039;. Toshiba America, accessed 14 Oct 2010. &amp;lt;http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[7] Bez, Roberto; Camerlenghi, Emilio; Modelli, Alberto; Visconti, Angelo. &#039;&#039;Introduction to Flash Memory&#039;&#039;. &#039;&#039;IEEExplore&#039;&#039;. STMicroelectronics, 21 May 2003. &amp;lt;http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[8] Kawaguchi, Atsuo; Nishioka, Shingo; Motoda Hiroshi. &#039;&#039;A Flash-Memory Based File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039; Advanced Research laboratory, Hitachi, Ltd., 1995. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[9] Rosenblum, Mendel; Ouserhout, John. &#039;&#039;The Design and Implementation of a Log-structured File System&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. University of California at Berkeley, Feb 1992. &amp;lt;http://portal.acm.org/citation.cfm?id=146943&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&amp;amp;ret=1#Fulltext&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[10] Shimpi, Anand. &#039;&#039;Intel X25-M SSD: Intel Delivers One of the World&#039;s Fastest Drives&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 8 Sep 2008. &amp;lt;http://www.anandtech.com/show/2614&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[11] Shimpi, Anand. &#039;&#039;The SSD Relapse: Understanding and Choosing the Best SSD&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 30 Aug 2009. &amp;lt;http://www.anandtech.com/show/2829&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[12] Shimpi, Anand. &#039;&#039;The SSD Anthology: Understanding SSDs and New Drives from OCZ&#039;&#039;. &#039;&#039;AnAndTech&#039;&#039;. AnAndTech, 18 Mar 2009. &amp;lt;http://www.anandtech.com/show/2738&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[13] Corbet, Jonathan. &#039;&#039;Solid-State Storage Devices and the Block Layer&#039;&#039;. &#039;&#039;Linux Weekly News&#039;&#039;. Linux Weekly News, 4 Oct 2010. &amp;lt;http://lwn.net/Articles/408428/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[14] Woodhouse, David. &#039;&#039;JFFS : The Journalling Flash File System&#039;&#039;. &#039;&#039;CiteSeerX&#039;&#039;. Red Hat, Inc, Accessed 14 Oct 2010. &amp;lt;http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[15] Agrawal, Nitin; Prabhakaran, Vijayan; Wobber, Ted; Davis, John; Manasse, Mark. Panigrahy, Rina. &#039;&#039;Design Tradeoffs for SSD Performance&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;, USENIX 2008 Annual Technical Conference, 2008. &amp;lt;http://portal.acm.org/citation.cfm?id=1404014.1404019&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[16] Lee, Sang-Won, et al. &#039;&#039;A Log Buffer-Based Flash Translation Layer Using Fully-Associative Sector Translation&#039;&#039;. &#039;&#039;Association for Computing Machinery (ACM)&#039;&#039;. ACM Transactions on Embedded Computing Systems (TECS), Jul 2007. &amp;lt;http://portal.acm.org/citation.cfm?id=1275990&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[17] &#039;&#039;Reach New Heights in Computing Performance&#039;&#039;. &#039;&#039;Micron Technology Inc&#039;&#039;. Micro Technology Inc, Accessed 14 Oct 2010. &amp;lt;http://www.micron.com/products/solid_state_storage/client_ssd.html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[18] &#039;&#039;Flash Memories.&#039;&#039; 1 ed. New York: Springer, 1999. Print.&lt;br /&gt;
&lt;br /&gt;
[19] &#039;&#039;Nonvolatile Memory Technologies with Emphasis on Flash: A Comprehensive Guide to Understanding and Using Flash Memory Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 2008. Print.&lt;br /&gt;
&lt;br /&gt;
[20] &#039;&#039;Nonvolatile Semiconductor Memory Technology: A Comprehensive Guide to Understanding and Using NVSM Devices&#039;&#039;. &#039;&#039;IEEE Press Series on Microelectronic Systems&#039;&#039;. New York: Wiley-Ieee Press, 1997. Print.&lt;br /&gt;
&lt;br /&gt;
=External links=&lt;br /&gt;
&lt;br /&gt;
Relevant Wikipedia articles: [http://en.wikipedia.org/wiki/Flash_Memory Flash Memory], [http://en.wikipedia.org/wiki/LogFS LogFS], [http://en.wikipedia.org/wiki/Hard_disk Hard Disk Drives], [http://en.wikipedia.org/wiki/Wear_leveling Wear Leveling], [http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29 Hot Spots], [http://en.wikipedia.org/wiki/Solid-state_drive Sold State Drive].  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=old=&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
This is what I&#039;ve got so far... mostly based on wikipedia:&lt;br /&gt;
&lt;br /&gt;
Flash memory has two limitations: it can only be erased in blocks and and it wears out after a certain number of erase cycles. Furthermore, a particular kind of Flash memory (NAND) is not able to provide random access.  &lt;br /&gt;
As a result of these Flash based file-systems cannot be handled in the same way as disk-based file systems. Here are a few of the key differences:&lt;br /&gt;
&lt;br /&gt;
-	Because memory must be erased in blocks, its erasure tends to take up time. Consequently, it is necessary to time the erasures in a way so as not to interfere with the efficiency of the system’s other operations. This is is not a real concern with disk-based file-systems. &lt;br /&gt;
-	A disk file-system needs to minimize the seeking time, but Flash file-system does not concern itself with this as it doesn’t have a disk. &lt;br /&gt;
-	A flash system tries to distribute memory in such a way so as not to make a particular block of memory subject to a disproportionally large number of erasures. The purpose of this is to keep the block from wearing out prematurely. The result of it is that memory needs to be distributed differently than in a disk based file-system. &lt;br /&gt;
Log-sturctured file systems are thus best suited to dealing with flash memory (they apparently do all of the above things). &lt;br /&gt;
&lt;br /&gt;
For the essay form, I&#039;m thinking of doing a section about traditional hard-disk systems, another about flash-memory and a third about flash systems. At this point, I am imagining the thesis as something like, &amp;quot;Flash systems require a fundamentally different system architecture than disk-based systems due to their need to adapt to the constraints inherent in flash memory: specifically, due to that memory&#039;s limited life-span and block-based erasures.&amp;quot; The argument would then talk about how these two differences directly lead to a new FS approach. &lt;br /&gt;
&lt;br /&gt;
That&#039;s how I see it at the moment. Honestly, I don&#039;t like doing research about this kind of stuff, so my data isn&#039;t very deep. That said, if you guys could find more info and summarize it, I&#039;m pretty sure that I could synthesize it all into a coherent essay. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4372</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4372"/>
		<updated>2010-10-15T02:52:27Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
I think it has to do with how some transistors are made. Give me a second to research that... ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From source 20, page 269 sec 4.6.4&lt;br /&gt;
Stress Induced Oxide leakage&lt;br /&gt;
...These devices are either erased ... orboth programmed and erased by a high field (Fowler-Nordheim) injection of electrons into a very thin dielectric film to charge and discharge the floating gate. Unfortunately, [passing] this current through the oxide degrades the quality of the oxide and eventually leads to breakdown. The wearout of tunnel oxide films during high-field stress has been correlated with the buildup of both positive or negative trapped charges.&amp;quot;... there are still some things missing from this explanation... Give me a couple more seconds... and my brain won&#039;t process this for some reason. =_= What can you guys make of this? ~Andrew&lt;br /&gt;
&lt;br /&gt;
And I said NOR Flash memory had fast fetch times. I found what I was looking for, just not too sure how to explain it in text. Silicon Oxide is used for electron injection methods, including the Fowler-Nordheim Tunneling method, where it seems to say that an electric current is passed across the oxide and it thins enough for a current to be passed through a barrier into the oxide conduction... band?&lt;br /&gt;
&lt;br /&gt;
Kay. New resource [19], the massively complicated theories and science would put anyone to sleep, but the basic point is The Silicon oxide layer will degrade in quality to the point where charge trapping begins to occur, the more it&#039;s used, and the more electrons that tunnel through it over time. It&#039;s like a kneaded eraser scenario. The more you use it, the poorer quality it gets until it gets all flakey and cannot do its job anymore. The same happens with the SiO2 layer in the floating gate transistors ~Andrew&lt;br /&gt;
&lt;br /&gt;
hmmm... alright, I think I understand that, could you maybe try your best and add it into the essay? If not I can try and whip something up to put in there. thanks --[[User:Gsmith6|Gsmith6]] 02:39, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Wow, I&#039;m sorry I made you go into that... that does explain the limited erase-cycles, though. Was it the use of these materials that made flash innovative? How does that explain the block-sized erasures?&lt;br /&gt;
&lt;br /&gt;
Going to go write a conclusion now.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4319</id>
		<title>Talk:COMP 3000 Essay 1 2010 Question 10</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Talk:COMP_3000_Essay_1_2010_Question_10&amp;diff=4319"/>
		<updated>2010-10-15T01:46:47Z</updated>

		<summary type="html">&lt;p&gt;Filitche: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hey all,&lt;br /&gt;
&lt;br /&gt;
I think we should write down our emails here so we can further discuss stuff without having to login here.&lt;br /&gt;
(&#039;&#039;&#039;***Note that discussions over email can&#039;t be counted towards your participation grade!***&#039;&#039;&#039;--[[User:Soma|Anil]])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Geoff Smith (gsmith0413@gmail.com) - gsmith6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Andrew Bujáki (abujaki [at] Connect or Live.ca)&lt;br /&gt;
***I&#039;m usually on MSN(Live) for collaboration at nights, Just make sure to put in a little message about who you are when you&#039;re adding me. :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I used Google Scholar and came to this page http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=812717&amp;amp;tag=1#&lt;br /&gt;
Which briefly touches on the issues of Flash memory. Specifically, inability to update in place, and limited write/erase cycles.&lt;br /&gt;
&lt;br /&gt;
Inability to update in place could refer to the way the flash disk is programmed, instead of bit-by-bit, it is programmed block-by-block. A block would have to be erased and completely reprogrammed in order to flip one bit after it&#039;s been set.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Block_erasure&lt;br /&gt;
&lt;br /&gt;
Limited write/erase: Flash memory typically has a short lifespan if it&#039;s being used a lot. Writing and erasing the memory (Changing, updating, etc) Will wear it out. Flash memory has a finite amount of writes, (varying on manufacturer, models, etc), and once they&#039;ve been used up, you&#039;ll get bad sectors, corrupt data, and generally be SOL.&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_memory#Memory_wear&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Filesystems would have to be changed to play nicely with these constraints, where it must use blocks efficiently and nicely, and minimize writing/erasing as much as possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I found a paper that talks about the performance, capabilities and limitations of NAND flash storage. &lt;br /&gt;
&lt;br /&gt;
Abstract: &amp;quot;This presentation provides an in-depth examination of the&lt;br /&gt;
fundamental theoretical performance, capabilities, and&lt;br /&gt;
limitations of NAND Flash-based Solid State Storage (SSS). The&lt;br /&gt;
tutorial will explore the raw performance capabilities of NAND&lt;br /&gt;
Flash, and limitations to performance imposed by mitigation of&lt;br /&gt;
reliability issues, interfaces, protocols, and technology types.&lt;br /&gt;
Best practices for system integration of SSS will be discussed.&lt;br /&gt;
Performance achievements will be reviewed for various&lt;br /&gt;
products and applications. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
Link: http://www.flashmemorysummit.com/English/Collaterals/Proceedings/2009/20090812_T1B_Smith.pdf&lt;br /&gt;
&lt;br /&gt;
There&#039;s no Starting place like Wikipedia, even if you shouldn&#039;t source it. &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Flash_Memory &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/LogFS &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hard_disk &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Wear_leveling &lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Hot_spot_%28computer_science%29&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Solid-state_drive&lt;br /&gt;
&lt;br /&gt;
Hey Guys,&lt;br /&gt;
&lt;br /&gt;
We really don&#039;t have much time to get this done. Lets meet tomorrow after class and get our bearings to do this properly.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A few of us have Networking immediately after class. I know personally I won&#039;t be able to make anything set on Tuesday.&lt;br /&gt;
Additionally, he spoke briefly about hotspots on the disk for our question last week, where places on the disk would be written to far more often than others. &lt;br /&gt;
As well, for bibliographical citing, http://bibme.org is a wonderful resource for the popular formats (I.e. MLA). If it should come down to that.&lt;br /&gt;
~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===links===&lt;br /&gt;
&lt;br /&gt;
Start Posting some stuff to source from:&lt;br /&gt;
&lt;br /&gt;
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1&lt;br /&gt;
--&amp;quot;Introduction to flash memory&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1244248&lt;br /&gt;
--&amp;quot;Wear Leveling&amp;quot; (it&#039;s about a proposed way of doing it, but explains a whole bunch of other things to do that)&lt;br /&gt;
&lt;br /&gt;
http://portal.acm.org/citation.cfm?id=1731355&lt;br /&gt;
--&amp;quot;Online maintenance of very large random samples on flash storage&amp;quot; (ie dealing with the constraints of Flash Storage in a system that might actually be written to 100000 times)&lt;br /&gt;
&lt;br /&gt;
http://vlsi.kaist.ac.kr/paper_list/2006_TC_CFFS.pdf&lt;br /&gt;
--&amp;quot;An Efficient NAND Flash File System for Flash Memory Storage&amp;quot; discuses shortcomings of using hard disk based file systems and current flash based file systems&lt;br /&gt;
&lt;br /&gt;
http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
--&amp;quot;NAND vs NOR Flash Memory&amp;quot; (note: i didn&#039;t get this off of Google scholar but it seems to be written by someone from Toshiba. is that ok?)&lt;br /&gt;
&lt;br /&gt;
Hi everybody,&lt;br /&gt;
&lt;br /&gt;
So here are the latest news. Geoff, Andrew and myself had a meeting after class today and came up with a plan for writing this thing. &lt;br /&gt;
&lt;br /&gt;
We decided to have 3 parts:&lt;br /&gt;
&lt;br /&gt;
1. What flash storage is, why its good but also why it must have the problems that it does (the assumption is that it must have them, why would it otherwise?)&lt;br /&gt;
[don&#039;t know much about this just now... basics include that there is NOR (reads slightly faster)and NAND (holds more, writes faster, erases much faster, lasts about ten times longer) flash with NAND being especially popular for storage (what&#039;s NOR good for?). Here, we&#039;d ideally want to talk about why flash was invented (supposed as an alternative to slow ROM), why it was suitable for that, and how it works on a technical level. Then, we&#039;d want to mention why this technical functionality was innovative and useful but also why it came with two serious set-backs: having a limited-number of re-write cycles and needing to erase a block at a time.]&lt;br /&gt;
&lt;br /&gt;
Either way, Flash storage affords far faster fetch times than the traditional platter-based HDD, and stability of information in a sense. Where the data is not actually stored, but reprogrammed, in a sense, the data is more secure and is less likely to be erased easily. On that note, in order to flip a single bit, that entire block will need to be erased, then reprogrammed. In an &#039;old&#039; HDD, let&#039;s say, When the HDD fails at the end of its life cycle, your data is gone. (unless you&#039;re willing to shell out $200/hr to have it recovered, yes I&#039;ve seen companies in Ottawa that do this.) In a flash HDD, when it reaches the end of its life, it merely becomes read-only. Bugger for Databases, but useful for technical notes and archives, let&#039;s say.&lt;br /&gt;
With today&#039;s modern gaming computers, Flash memory can be good on quick load times, however with limited read-writes, it could afford better use to things that are not updated as frequently. I.e... Well I don&#039;t have a better example than a webserver hosting a company&#039;s CSS and scripts.&lt;br /&gt;
~Source: Years in the &#039;biz &lt;br /&gt;
&lt;br /&gt;
Flash memory started out as a replacement for EPROMs.  At the time EPROMs needed a UV photoemission to be erased while flash memory could be erased electronically. The first flash memory product came out in 1988 but it did not take off until the late 1990’s because it could not be reliable produced. NOR and NAND memory is named after the arrangement of the cells in the memory array. NOR based flash memory benefits from having very fast burst read times but slower write times. Due to the structure of NOR memory programs stored in NOR based memory can be executed without being loaded into RAM first. NAND flash memory has a very large storage capacity and can read and write large files relatively fast. NAND is more suited for storage while NOR memory is better suited for direct program execution such as in CMOS chips.&lt;br /&gt;
source: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1199079&amp;amp;tag=1 , http://maltiel-consulting.com/NAND_vs_NOR_Flash_Memory_Technology_Overview_Read_Write_Erase_speed_for_SLC_MLC_semiconductor_consulting_expert.pdf&lt;br /&gt;
&lt;br /&gt;
2. How a traditional disk-based file-system works and why the limitations of flash storage make the two a poor match&lt;br /&gt;
[the obvious answer seems to be that traditional file-systems could just write to whatever memory was available but if they did this with a flash file-systems, certain chunks of memory would become unusable before others and the memory would be more difficult to work with. Also, disk-based file systems need to deal with seeking times which means that they want to organize their data in such a way as to reduce those (by putting related things together?) - with Flash, this isn&#039;t really a problem and thus one constraint the less to be concerned with.]&lt;br /&gt;
&lt;br /&gt;
3. How a log based file-system works and why this method of operation is so well suited to working with flash memory especially in light of the latter&#039;s inherent limitations&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
At this time, the plan is that Geoff will work on #3 today, Andrew will work on #1 tomorrow and I will work on #2 tomorrow. The three of us will make an effort to consult some somewhat more painfully technical literature in order to gain insight into our respective queries. Whatever insight we find will be posted here. &lt;br /&gt;
&lt;br /&gt;
Then, we will meet again on Thursday after class to decide how to actually write the essay.&lt;br /&gt;
&lt;br /&gt;
PS, if there is anybody in the group besides the three of us - let us know so you can find a way to contribute to this... as at least two of us are competent essayists, painfully technical research would on one or more of the above topics would be a great way to contribute... especially if you could post it here prior to one of us going over the same thing. &lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
-- I&#039;m not that great (but absolutely horrid) at essays and I&#039;m alright at research, but if nothing else I have Thursday off and nothing (else) that needs doing by Friday so I can probably spend a bunch of time working on it just before it&#039;s due. -- &#039;&#039;Nick L&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
-- Hay sorry I was unable to attend the meeting after class today. I am not too good at writing essays as well but I am pretty good at summarizing and researching. I am not too sure at what you would like me to do. Right now I&#039;ll assume you need me to research/summarizing articles for the 3 topics above. If you need me to do anything else post it here. I&#039;ll be checking the discussion regularly until this due. once again sorry for missing the meeting-- Paul Cox.&lt;br /&gt;
&lt;br /&gt;
-- Hey i&#039;m also supposed to be in on this. Sorry i couldn&#039;t contribute sooner because i was playing catchup in my other classes. Let me know what i can do and i&#039;ll be on it asap. - kirill (k.kashigin@gmail.com)&lt;br /&gt;
update: i&#039;m gonna be helping Fedor with #2&lt;br /&gt;
&lt;br /&gt;
PS, this article http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw looks really useful for part 3.&lt;br /&gt;
&lt;br /&gt;
---same article as above but shorter link: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.5142&lt;br /&gt;
&lt;br /&gt;
PPS, and this article looks really great for understanding how log based file systems work: http://delivery.acm.org/10.1145/150000/146943/p26-rosenblum.pdf?key1=146943&amp;amp;key2=3656986821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=108397378&amp;amp;CFTOKEN=72657973&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hey Luc (TA) here, Anandtech ran a series of articles on solid state drives that you guys might find useful.  It mostly looked at hardware aspects but it gives some interesting insights on how to modify file systems to better support flash memory.&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&lt;br /&gt;
&lt;br /&gt;
http://www.anandtech.com/storage/showdoc.aspx?i=3531&amp;amp;p=1&lt;br /&gt;
&lt;br /&gt;
http://anandtech.com/storage/showdoc.aspx?i=3631&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:3maisons|3maisons]] 19:44, 12 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey Paul&amp;amp;Kirill,&lt;br /&gt;
&lt;br /&gt;
If one of you guys could help me out with #2, that would be really great. I was going to work on that tomorrow, but I also have another large assignment to deal with and not having to do this research would greatly ease my life. Moreover, I do intend to work on writing&amp;amp;polishing the essay on Thursday as I have a lot of experience with that and it far more than research. Let me know if either one of you can help me with this. &lt;br /&gt;
&lt;br /&gt;
The other person could probably read over what Luc posted for us and see if it fits into our framework. Just be sure to state who is going to do what. &lt;br /&gt;
&lt;br /&gt;
Nick, &lt;br /&gt;
&lt;br /&gt;
Honestly, we really hope to have the research done by Thursday. If that is the only day that you are free and you&#039;re not a writer, I&#039;m honestly not sure what you could do. Perhaps someone else can think of something.&lt;br /&gt;
&lt;br /&gt;
- Fedor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m gonna have something for #2 up tonight. -kirill&lt;br /&gt;
&lt;br /&gt;
So I found this article on Reddit, posted from Linux Weekly News on pretty much exactly what we are looking at. It&#039;s entitled &amp;quot;Solid-state storage devices and the block layer&amp;quot;&lt;br /&gt;
&lt;br /&gt;
http://lwn.net/SubscriberLink/408428/68fa8465da45967a/    --[[User:Gsmith6|Gsmith6]] 20:36, 13 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I wasn&#039;t exactly sure how much information i was supposed to present but here&#039;s what i got for #2:&lt;br /&gt;
&lt;br /&gt;
	Most conventional file systems are designed to me implemented on hard disk drives. This fact does not mean they cannot be implemented on a solid state drive (file storage that uses flash memory instead of magnetic discs). It would however, in many ways, defeat the purpose of using flash memory. The most consuming process for an HDD is seeking data by relocating the read-head and spinning the magnetic disk. A traditional file system optimizes the way it stores data by placing related blocks close-by on the disk to minimize mechanical movement within the HDD. One of the great advantages of flash memory, which accounts for its fast read speed, is that there is no need to seek data physically so there is no need to waste resources laying out the data in close proximity.&lt;br /&gt;
	A traditional HDD file system will also attempt to defragment itself, moving blocks of data around for closer proximity on the magnetic disk. This process, although beneficial for HDD&#039;s, is harmful and inefficient for flash based storage. A flash optimal file system needs to reduce the amount of erase operations, since flash memory only has a limited amount of erase cycles as well as having very slow erase speeds.&lt;br /&gt;
	When an HDD rewrites data to a physical location there is no need for it to erase the previously occupying data first, so a traditional disk based file system doesn&#039;t worry about erasing data from unused memory blocks. In contrast flash memory needs to first erase the data block before it can modify any of it contents. Since the erase procedure is extremely slow, its not practical to overwrite old data every time. It is also decremental to the life span of flash memory.&lt;br /&gt;
	To maximize the potential of flash based memory the file system would have to write new data to empty memory blocks. This method would also call for some sort of garbage collection to erase unused blocks when the system is idle, which does not get implemented in conventional file systems since it is not needed.&lt;br /&gt;
&lt;br /&gt;
--kirill&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So Fedor and I were talking in the labs, and we came to the conclusion that we have been focusing on just the translation from a regular file system to a flash drive. We were under the impression that this was in fact the &amp;quot;Flash Optimized System&amp;quot;, but pulling up some more articles, I&#039;m finding that this is not necessarily the case. &lt;br /&gt;
&lt;br /&gt;
This paper here http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.128.6156&amp;amp;rep=rep1&amp;amp;type=pdf.&lt;br /&gt;
shows an example from Axis Communications where they developed a file system specifically designed to be used on flash drives. &lt;br /&gt;
&lt;br /&gt;
Now I haven&#039;t completely read it, so it might just be an optimized translational system, but its at least a start.&lt;br /&gt;
&lt;br /&gt;
At our meeting today, we&#039;ve decided that it would be best if people could post a rough summary of their notes in the appropriate sections, and I will rewrite them into an essay, which Fedor will go through later tonight to edit and add some more information.&lt;br /&gt;
&lt;br /&gt;
Paul: I missed your comment that you weren&#039;t that great at writing, and good at research. If you want some articles behind the pay-walls, I&#039;ve saved a bunch of them and emailed them to myself. Just email me (at the address at the top of the page) and I&#039;ll be more than happy to send some your way.&lt;br /&gt;
&lt;br /&gt;
PS. some more references&lt;br /&gt;
&lt;br /&gt;
Design tradeoffs for SSD performance http://portal.acm.org/citation.cfm?id=1404014.1404019 &lt;br /&gt;
A log buffer-based flash translation layer using fully-associative sector translation http://delivery.acm.org/10.1145/1280000/1275990/a18-lee.pdf?key1=1275990&amp;amp;key2=0709607821&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=105787273&amp;amp;CFTOKEN=74601780&lt;br /&gt;
&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 15:03, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I don&#039;t have any notes on this computer. &amp;gt;: I will be adding more to my section later on tonight. Sorry. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hello dudes,&lt;br /&gt;
&lt;br /&gt;
Just a quick note, try to include citations in your paragraphs - each time that you make a claim which came from evidence, put a little number [X, pp. page-number (if applicable)] into your text. Then, put the same [X] at the bottom of the page with the bibliographical information about the source. The prof hasn&#039;t yet gotten back to me about his preferred citation format, so just stick with this one for now:&lt;br /&gt;
&lt;br /&gt;
Authors. &#039;&#039;Title&#039;&#039;. Web-page. Date of article. Web (the word). Date you accessed it.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s an example:&lt;br /&gt;
&lt;br /&gt;
[1] Kawaguchi, Nishioka, Tamoda. &#039;&#039;A Flash Memory Based File System&#039;&#039;.&lt;br /&gt;
http://docs.google.com/viewer?a=v&amp;amp;q=cache:E7-H_pv_18wJ:citeseerx.ist.psu.edu/viewdoc/download%3Fdoi%3D10.1.1.92.2279%26rep%3Drep1%26type%3Dpdf+flash+memory+and+disk-based+file+systems&amp;amp;hl=en&amp;amp;gl=ca&amp;amp;pid=bl&amp;amp;srcid=ADGEESgspy-jqIdLOpaLYlPPoM56kjLPwXcL3_eMbTTBRkI7PG0jQKl9vIieTAYHubPu0EdQ0V4ccaf_p0S_SnqKMirSIM0Qoq5E0NpLd0M7LAGaE51wkD0F55cRSkX8dnTqx_9Yx2E7&amp;amp;sig=AHIEtbS-yfGI9Y48DJ0WyEEhmsXInelRGw . 1995. Web. Oct. 14, 2010.&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;br /&gt;
&lt;br /&gt;
PS, its a good idea to check this fairly frequently between now and tomorrow morning - you never know when something will come up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Phew... for a while there I was starting to think that I had nothing about the actual &amp;quot;Log-Based System&amp;quot;, but it turns out that the &amp;quot;Transitional Layer&amp;quot; is the same thing. It looks like some articles are calling it the Log system, while others are calling it the transitional layer. Pretty sure I&#039;m going to have an experts knowledge about flash drives after reading all these articles :P&lt;br /&gt;
--[[User:Gsmith6|Gsmith6]] 18:13, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hay Geoff this is what i got so far after reading a couple of the pdfs. the double tabed points are just my annotation on how they relate to the question.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ware leveling: p1126-chang.pdf&lt;br /&gt;
&lt;br /&gt;
* Uneven wearing of flash memory due to storing data close together&lt;br /&gt;
* Garbage collection prefers that no blocks have pages that have data that is constantly becoming invalid&lt;br /&gt;
* data that remains the same for longs periods of time should be moved from block that have not be written to much and moved to blocks that haven been erased frequently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Log file structure: 926-rosenblum.pdf&lt;br /&gt;
&lt;br /&gt;
* LFS based on assumption that frequently read files will be stored in cash and that the hard disk traffic will be dominated by writes&lt;br /&gt;
* Writes all new info to disk in a sequential structure called a log&lt;br /&gt;
* Data is stored permanently in these logs no other data is stored on the hard drive&lt;br /&gt;
* Converts many small random synchronous writes to a large asynchronous sequential write&lt;br /&gt;
** Good for flash because it cuts down on writing (prolongs drive life)&lt;br /&gt;
** It also good because it writes to a bigger section then a page. This means it can fill a block at a time so it doesn’t fill up other blocks with random writes that would later need to be cleaned. Cuts down on cleaning.&lt;br /&gt;
* Inode is stored in the log on the disk while an inode map is maintained in memory which points to the inode in the hard disk. as&lt;br /&gt;
** This is good for flash drives because reading does not hurt the drives life and it is fast.&lt;br /&gt;
** This means the map will not have to be updated on the disk as frequently cutting down on the writes.&lt;br /&gt;
* Log systems weakness is that it is susceptible to becoming fragmented due to the larger writes. &lt;br /&gt;
** Since flash drives do not require fragmentation this is fine. Also since flash drives have very fast random access the system does not become bogged down when the logs are fragmented&lt;br /&gt;
* Log system implements a cleaning system that scans a segment in and sees if there is live data in it. If there is a certain percentage of invalid data which goes according to the cleaning policy it will be cleaned. All the live data will be copied out and the segment will be erased.&lt;br /&gt;
** This is a garbage collector but its built into the file system.&lt;br /&gt;
* Segments contain a number of blocks. Segments can contain logs or parts of logs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m still sifting though the other pdfs you sent me. Would you like me to post more info or should i format this into a paragraph or 2?&lt;br /&gt;
&lt;br /&gt;
--Paul&lt;br /&gt;
&lt;br /&gt;
I&#039;m sorting through my notes and putting them into a digital format. Difficult because It&#039;s hard to remember what I copied directly out of the notes for my own reference, so I&#039;m trying to de-plagarize. I&#039;ll upload what I have to the section by 20:30, but expect more updates. ~Andrew&lt;br /&gt;
&lt;br /&gt;
Hey Paul,&lt;br /&gt;
&lt;br /&gt;
Thanks for helping out with the research&lt;br /&gt;
I&#039;m thinking that we probably have enough information (at least for the log-based system), so maybe if you could &amp;quot;try&amp;quot; and putting them into paragraphs. I&#039;m kind of in the middle of typing up the essay, and I&#039;m uploading new information every 10-20 minutes or so. Even if you could get something into paragraph form, I can go through and edit, rearrange, and add stuff as I get there. --[[User:Gsmith6|Gsmith6]] 23:51, 14 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
I&#039;m just going to dump my entire wiki so far into my profile page, because everything&#039;s being updated so quickly.&lt;br /&gt;
[[User:Abujaki]] ~Andrew&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I&#039;m sitting at my computer working on much less immediately important homework if someone wants me to do something. I&#039;m not a great writer but if there&#039;s something that needs doing I can do it. -- Nick [[User:Nlessard|Nlessard]] 00:55, 15 October 2010 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey guys,&lt;br /&gt;
&lt;br /&gt;
Keep up the good work!&lt;br /&gt;
&lt;br /&gt;
Geoff, it would be good if you uploaded the stuff you were typing as you got each section finished. I rewrote part 2 and the intro some hours ago and I guess I could go out and write a conclusion while stuff is still being updated. &lt;br /&gt;
&lt;br /&gt;
The other thing is that the current version of part 1 doesn&#039;t really seem to serve the argument - I mean, it doesn&#039;t actually tell us why flash has the constraints that it does on a technical level... and that&#039;s not surprising because that information seems to be hard to find. Still, I&#039;m going to see if I can find out anything about that, though, so far, I haven&#039;t had much luck.&lt;br /&gt;
&lt;br /&gt;
Apart from this, I&#039;ll try to get up early tomorrow to look over what&#039;s there: make sure the argument works, etc.&lt;br /&gt;
&lt;br /&gt;
Good luck with the writing,&lt;br /&gt;
&lt;br /&gt;
Fedor&lt;/div&gt;</summary>
		<author><name>Filitche</name></author>
	</entry>
</feed>