Monday, March 11, 2013


Computer Memory: about its past, present and possible future


The rate at which computer technology has developed over the past few decades has baffled anyone who is thoughtful enough to contemplate the infinite amounts of complexity that were associated with bringing all of that about.

The transformation of computers from room-sized, slow and inefficient bulks of metal to small, stylish and a thousand times faster personal computers is something well beyond the image that some of the earliest computer scientists foresaw in their mind's eyes when they first started working towards this, what was soon to be revolutionary phenomenon.

It is ironic how something which is so easy to use was and still is so difficult and complex to make. Had it not been for the unparalleled dedication, patience, determination and brilliance of numerous specialists, our lives today would have been cumbersome and uninteresting.

Therefore, it is unfair on our part as the consumers and lucky beneficiaries of the years of ingenious and tireless efforts put in by these scientists and experts to take full advantage of their success without making much effort to know how all of that really came about; so as to be able to appreciate all the amazing technologies that we have at our disposal exactly in the way that they really deserve to be appreciated.

Of course, the development of computers as a whole is an extremely vast topic and deserves to be written about in volumes. But my goal here is to focus on a specific part of the computer that has undergone the same stages of development as all of its other parts and is equally vital- The memory.


The Stages of Development of Computer Memory
In 1945 the US Army built the world’s first electronic digital computer that was the first ever computer to have memory storage capacity of any form-The ENIAC. It consisted of thousands of vacuum tubes, relays and hundreds of thousands of resistors, capacitors and inductors and was capable of doing all four basic calculations along with square root extraction and sign differentiation-extremely powerful for its time.

The standard concepts of logical AND and OR gates and the employment of flip-flops for storage and control devices was introduced for the first time in the design of this thirty ton computing phenomenon (of that time of course). Up to a large extent the concepts and techniques that were applied in making this computer later on became the basic foundation upon which modern computers were built.

Unlike modern computers, the ENIAC did not really have any singular central memory device. Instead, it relied on a group of twenty accumulators for its computation and storage. These accumulators, with the help of a combination of numerous flip-flops were able to store one signed ten-digit decimal number each. They were also capable of carrying out calculations.

Following that, in 1948 Dr Freddie Williams and Tom Kilburn built the iconic “Manchester Baby” computer which had the ability to store programs in the form of random access memory. The memory device used in this computer was known as the Williams-Kilburn tube. Williams was the one who initially invented it but Kilburn later made drastic improvements to its design, greatly increasing its capacity and making it more suitable to be used in actual computers.

The principle behind this device was that an electron beam would be fired down a cathode ray tube onto a phosphorescent coating at the other end, causing the formation of small static charges. These charges would then be detected by a set of metal pick-up plates placed right in front of the coating. Because the charges dissipated very fast, a refresh circuit was required to read which bits were set and use the electron beam to refresh them every few milliseconds. When Dr. Williams first invented the tube he was able to store only a single bit, but with Tom Kilburn’s intervention the capacity of the device was remarkably increased to as much as 2048 bits.

fig 1.1- Williams-Kilburn Tube
But the problem with this device was that it tended to become quite unreliable with age. Furthermore, most working installations had to be adjusted and set up manually, which was a highly cumbersome process. As a result the hunt for an alternative began much sooner than sir Williams and his colleague would have personally liked.

A similar device, with a few variations was invented at around the same time-the Selectron tube. Like the Williams-Kilburn tube it also used a vacuum tube into which electron beams were fired upon a phosphorescent surface in order to produce charges. It was both faster and more reliable but unfortunately could store only 256 bits and was costly to make. The only computer to have ever used it was the Rand Corporation’s “JOHNNIAC”.

Fortunately, the world did not have to wait too long for a more feasible alternative. The early part of the 1950s saw the introduction of the Magnetic Core Memory which went on to dominate the field of random access memory for the next two decades or so.

Invented in 1949 by An Wang, core memory was extremely cheap to make unlike all of its predecessors. Once it became well established in the computer world it only cost a few cents per bit. Another feature that made this technology such a huge success was that it was a form of non-volatile memory, meaning that it had the ability to retain all stored information when the power was switched off.

The principle behind this technology was simple. A core, which is a ring of iron or ferrite material, was permanently magnetized in either clockwise or anticlockwise direction, corresponding to a value of either 1 or 0. A large number of these cores were arranged to form a two-dimensional grid or plane with a vertical, horizontal and diagonal wire running through each of them. The cores were magnetized by sending currents through the horizontal and vertical wires (also known as read/write wires).

Each wire contained half the amount of current required to magnetize a core, making it possible to target specific cores without magnetizing other ones in the same row or column. Once magnetized in one direction, a core would remain so unless re-magnetized in the opposite direction. This is why cores never lost information stored in them. The diagonal wire was known as the sense/inhibit wire and was used to alter or detect contents of a memory location.  Earlier designs used two different wires as sense and inhibit.

 fig 1.2- Magnetic core memory
The sense/inhibit wire went through all the cores in a core plane and could detect what value each core was set to. It was able to do this because whenever a core got magnetized in the opposite direction to which it initially was, that change in magnetic field created a small yet detectable pulse of electricity on the sense wire, indicating that it had indeed been set to a different value initially. If the magnetic field remained unchanged then no pulse would be created indicating that it was already magnetized in the direction in which the currents were sent. Since the device ‘remembered’ previous values, it worked as an actual memory device.

When a core that was set to 0 was magnetized in the opposite direction and set to 1 or vice versa, the method was known as ‘destructive reading’ because the initial state of the core had to be ‘destroyed’ in order to find out or ‘read’ what it actually was. The ring’s initial state could be restored with the help of the information contained in the sense wire and sending a pulse through the other two wires.

The amount of time required to write a value into a ring was known as the cycle time of the memory and the amount of current required to alter the magnetic field of a core depended on the thickness and size of the ring. Also, the current that was passed into the cores got transformed into heat .Therefore, the smaller and thinner the cores, the lesser the amount of current required, the lesser the amount of heat produced and therefore the lesser the amount of extra cooling needed, if any. That explained why some of the earliest cores that were a few millimeters in diameter and hand-made eventually became almost microscopic and obviously made through automated processing.

When large mainframes were used in the 40's and 50's, programs had to be loaded one bit at a time on plug boards-a process that was painfully manual. Throughout the first two generations of computers, an operating system was completely unheard of. Not even a single programming language existed .But in the transition from the second to the third generation scientists started thinking in ways that kept taking them one step closer to something of that very mould.


Through the Third Generation and onto the Fourth

The third generation saw the introduction of the revolutionary concept of multiprogramming, which would serve as the fundamental building block of operating systems of the future. For the first time, several jobs could be kept in memory at once and the processor could be switched from job to job as needed.

Also, traditionally computers were only able to handle one job at a time, meaning that if a job was waiting for I/O to complete the CPU would remain idle until it did complete. This was extremely wasteful and expensive. The solution came in the form of partitioning. Memory would be split up into several partitions with a job in each partition. Whenever a particular job was waiting for I/O, the CPU could be switched to another job in memory in order to ensure maximized utilization. This was all made possible because of the technical developments made in main memory at that time, and as the technology of memory kept advancing the concept and development of operating systems became more and more common. Among some notable operating systems developed, marketed and widely used during that time were the OS/360 (which was built for IBM’s System/360) , MULTICS and eventually UNIX.

Having successfully been around for more than twenty years, one would have thought that core memory would have continued to dominate its field for much longer. But through experience we know that the world of technology can be cruelly uncompromising when it comes to performance and quality. The core memory had deficiencies in a few areas; therefore, it was never really here to stay.

In the 1970s the world witnessed the subtle application of the transistor in a way that completely revolutionized the way in which computer memory was built, paving the way to the creation of some of the first ever mass-produced personal computers. .Not only was the transistor small in size, it also worked at incredible speeds and consumed a very small amount of power, making it ideal for both manufacturers and consumers.

Intel released its first ever DRAM for commercial purposes- model 1103. The architecture of the DRAM is somewhat similar to core memory from the fact that it also was made up of a grid of cells, each representing a separate memory bit. Otherwise, it was packed with technology much advanced for even the latest forms of core memory of that time.

Each bit of the DRAM contained one microscopic capacitor and transistor. The capacitor was used to store a small charge whilst the transistor was used as an electrical switch. In order to store a 1 the capacitor had to  be charged and in order to store a 0 its charge needed to be drained.

The columns in a DRAM chip are known as bitlines and the rows are known as wordlines. Associated with the rows is a row address latch which is a buffer for holding the address and a row address decoder which converts the row address from the CPU to a corresponding row number. Associated with the columns is a similar latch and a decoder and additionally a sense/refresh amplifier for each respective column. The DRAM typically performs three different operations: read, refresh and write.

In order to read a value from a particular cell, first and foremost the CPU sends a binary address to the RAM. This address is spilt into half, one half specifying the row address and the other specifying the column address. Firstly the row address is stored into the row address latch from which the decoder fetches it and converts it to a specific row number, causing all the cells within that row to get activated. Upon activation the value of the capacitor of each cell is ‘sensed’ by the sense amplifier of that particular column, causing the cell to get refreshed (explained below).

Once the column number is also determined by the decoder, the particular cell is located and the charge in its capacitor (0 or 1) is sent to the sense amplifier of that particular column. Because this charge is too small to be recognized by the data bus, it is amplified to recognizable levels by the sense amplifier and finally sent along the data bus back to the CPU.

Reading the data from the capacitor of a cell causes the charge in the capacitor to get depleted, causing the data to get destroyed (similar to the ‘destructive reading’ in core memory). This is one of the criticisms against DRAM. The sense amplifier therefore takes responsibility of refreshing the cell by applying voltage to it, thus writing back its previous data. This refresh operation must be performed periodically in between read and write operations and care must be taken not to interfere with any ongoing read or write operations, because that can seriously hurt performance.

                                                               fig 1.3- Basic DRAM

Similar to the read operation the same sequence of events follow when a memory cell is written to. The only difference is that, upon receiving data from the data bus, the sense amplifier corresponding to the particular cell being written to either charges or discharges the capacitor of the cell, thereby writing the desired data to it.

Because DRAM needed to be refreshed frequently it was inevitably slow, and at a time computing demands were on the rise an alternative had to be found. The seemingly immediate solution came in the form of SRAM or ‘Static RAM’ which does not need to be refreshed in order to retain data, making it much faster than DRAM. The reason behind this was that each bit of memory in an SRAM was stored in a flip-flop made up of five to six transistors. There was no capacitor to store the charge but instead whenever the flip-flop was switched on a constant flow of current would flow through the transistors unless the flip-flop was switched off, therefore the data was never lost. This architecture was a blessing in disguise because having a flip-flop in every cell meant that SRAMs were much larger in size than DRAMs and therefore more expensive to manufacture.

Hence engineers were faced with a great dilemma. On one hand was a type of RAM that was cheap to produce but was slow and on the other was one that was much faster but expensive. So which one to choose? The solution was to use both of them-SRAM would be used as fast cache memory and DRAM as the main memory, creating a smartly convenient balance.

Another criticism against DRAM was that it used an asynchronous interface- meaning that it operated independently of the processor. Therefore if the CPU made too many requests and in quick succession then the RAM would not be able to handle all of them. This led to the development of the SDRAM (Synchronous Dynamic RAM) in the early 90s which had the ability to queue up one process while waiting for another. By the end of the 90s SDRAM became the main form of memory used in computers.

But computer specialists were quick to point out that even this form of memory had its limitations. This time the criticism was that the SDRAM operated through a single data rate (SDR) interface, meaning that it could only accept one request per clock cycle. Now this was far too less considering the rising popularity and complexity of computers and computer software at that time. Performance was slowing down. This called for yet another modification- this time in the form of double data rate (DDR RAM) which could operate with twice the amount of speed of the SDR SDRAM. This was made at around 2000 but was quickly overtaken in 2003 by yet another modification in the form of DDR2 which again was twice as fast as DDR and finally in 2007 even that was overtaken by DDR3 which was twice as fast as DDR2. DDR3 remains the main form of memory used in computers to this day, but the word is out that development of a DDR4 in under way and can make its debut in 2014.

It was around the early 80s that the revolutionary operating system MS-DOS was made, and eventually in the following years the concept of GUI (Graphical User Interface) was also introduced. Hence the basic grounds for future operating systems were solidified, and in the following years all the operating systems that are in use today began their journeys into the world of shrinking computers one by one. And obviously, the development in memory played a key role in causing all this advancement.


Looking at the future through the binoculars of time
So far, the rate at which computer technology has been advancing has been in line with what Gordon Moore, the co-founder of Intel had stated-that computational power would double roughly every two years. Engineers have been able to achieve this over the years by packing more and more transistors into chips by decreasing the size of transistors. But that in itself has proved to be a growing cause for concern. This is because scientists have realized that there will inevitably come a point when it would no longer be possible to shrink transistors any further (currently transistors are smaller than 22nm). Then they will have to look for feasible alternatives. Large amounts of intensive research have been underway for years now in order to find exactly that. Some working prototypes have even been designed and demonstrated. Hopefully, it is only a matter of time before they become market-ready.

One of these would-be revolutionary technologies and one very much talked about is the ‘Memristor’ (Memory + Resistor). The idea of the memristor was actually suggested by electrical engineer Leon Chua in 1971 who was correct to identify that the chain made up of the three traditional circuit elements (inductor, resistor and capacitor) was incomplete in that the link between the basic circuit variables (charge, voltage, magnetic flux and current) was one short of being complete. There was no element that could link up electric charge with magnetic flux- Hence, he suggested the memristor in order to fulfill that linkage. However, his ideas did not go anywhere beyond a few research papers that very few people had laid their eyes upon and remained unheard of by the rest of the world until recently.

fig 1.4- Link between basic memory elements
It was not until 2008 that the first real memristor actually saw the light of day. Thanks to the efforts of Dr. Stanley Williams of Hewlett-Packard, who gradually saw the picture that Prof. Chua had tried to paint forty years ago, and patiently built on it.

The idea behind memristors is simple. As the name suggests, it is a resistor with memory that ‘remembers’ the amount of charge that had flown through it the last time it was switched on. It can be used to build both memory and storage. When voltage is applied on one end of the memristor the electrical resistance increases and when voltage is applied on the opposite end resistance decreases. When the power is turned off, the memristor retains the last value of resistance that it had.

The memristor that was built in 2008 by a team of specialists in the labs of Hewlett-Packard was a thin film of titanium dioxide (TiO₂) - a compound that is semiconductor in nature. In its pure state TiO₂ is very resistive, but when doped with other elements it can be very conductive. The most vital property of this doped titanium dioxide compound is that when a voltage is applied to either end of the film, the dopants do not stay stationary- they tend to drift in the direction of the current. That in itself makes up the working principle of the memristor. The memristor designed by the Hewlett-Packard team consisted of dopants only on one side and pure titanium dioxide on the other. Applying a positive voltage at the dopant end pushes these dopants towards the pure titanium dioxide on the other side, causing the resistance of the silicon dioxide to decrease and therefore allowing current to flow through. Conversely, when voltage is applied in the opposite end the dopants get pushed back into place causing the resistance of the silicon dioxide to increase.

When the power is switched off the dopants retain the position they were in the last time there was any voltage and therefore the resistance remains as it was. Hence, the memristor is said to ‘remember’ the previous value of resistance that it had before the power supply was switched off.

This property of remembering previously stored data opens up incredible possibilities of ways in which the memristor can be used. To begin with, they can be used to design new forms of non-volatile random access memory that can be used both as memory and storage. If such a device were to be built then computers would become much faster than they are right now because the computers we have use the hard disk as storage and the main memory for processing; In order to run programs an active exchange of virtual pages has to occur between the memory and the storage and therefore a lot of precious time and power is wasted in carrying out these exchanges. With a memristor-driven memory no exchanges need to happen because memory and storage will both be the same thing-Therefore, a lot of time will be saved. Another immediate and amazing possibility that comes to mind is that since such a form of memory does retain all of its previous data, a memristor-driven computer will not need to reboot during startup because it continues exactly where it left off when it is switched back on. As a result, startup will be almost instantaneous. On the contrary the computers that we use today need to be rebooted every time they are switched on because their logic circuits are incapable of retaining memory bits after the power is switched off.

Furthermore, it turns out that the smaller these memristors are the stronger they get because a small surface area will leave very little room for the dopants to move about. This is exactly what manufacturers needed to hear at this point in time because currently it is hoped that the widths of transistors can be reduced to less than 20 nanometres, but there is no telling how much further miniaturization can take place. Dr. Williams, on the other hand, claims to have already built a working prototype of a memristor of width 15 nanometers, and he believes that pretty soon he and his team back at their lab can lower it down to as little as 4 nanometers! If they can achieve this soon enough, then it is safe to say that transistors will gradually be replaced by memristors as the chief components for building silicon chips in the computer industry.

fig 1.5- Basic internal structure of a memristor
Another fascinating technology currently under development and scrutiny is molecular memory. Instead of using traditional electronic components or properties for storing information this kind of technology uses actual molecules to store bits. Given the minuteness of a typical molecule, any device made with molecular memory can have massive storage capacity.

Even though molecular memory it is highly conceptual and there is a long way to go before it can even be considered to be used commercially, a few working prototypes have actually been built.  Robert Birge has succeeded in designing a molecular memory based system using a protein called Bacteriorhodopsin, which is found in the membrane of a microscopic organism known as Halobacterium Halobium. Scientists have experimented on a number of proteins in the past but, when they stumbled upon this particular one, they decided that they had found exactly what they were looking for.

The property that attracted scientists to Bacteriorhodopsin is its ability to change its physical structure under certain types of lights-giving rise to a range of different possible applications. Another great property of this protein is its outstanding stability. Halobacterium Halobium live in salt marshes where temperatures can reach as high as 140 degrees Fahrenheit, but quite remarkably this protein is unaffected by such high levels of temperature and can operate over a broader range of temperatures than semiconductor memory. By virtue of its stability it is capable of holding either of two states (0 or 1) for years (theoretically five years). It is also inexpensive to produce in large quantities.

All conventional forms of memory use two dimensional matrices to store their bits, but in the case of Bacteriorhodopsin the storage is carried out in three dimensional matrices, allowing for massive amount of capacity. Such matrices are built by placing the protein into a transparent vessel (a cuvette) filled with a polyacrylamide gel. The protein gets fixed into place by the polymerization of the gel.

The cube of Bacteriorhodopsin is surrounded by two arrays of laser beams that are placed at right angles to each other. One array consists of green lasers while the other consists of red lasers.  In a nutshell, in order to write data the array of green lasers is made to strike the three-dimensional cube first. Upon being struck the selected square or page within the cube begins to go through a cycle of states from its initial native state to an active or ready state. Once that is done the other array of red lasers is programmed to be fired at that specific region of the activated square where the data bits are intended to be written. Within a few milliseconds that region reaches the desired high-stability state and contains the binary value of binary 1. This is almost the same as the principle used in semiconductor or magnetic core memories, except that multiple addresses within the selected page can be written in parallel because the laser array can activate multiple molecules simultaneously.

In order to read data the same sequence of events follow, but with a little variation. The array of green lasers is made to strike the plane within the cube from which the data bit is to be read. After that the array of red lasers is also fired, but with very low intensity of light. Doing this causes a detector to read the locations of the different 0s and 1s.

Data can also be erased by striking specific locations within the cube with a blue laser. The light does not necessarily have to be a laser; if exposed to incandescent light, the cuvette may have all of its contents erased. The system designed by Birge also has the ability to get refreshed periodically. It uses a counter to keep track of the number of times a page of data is read (the reading here is nondestructive). After every 1024 reads the page is automatically refreshed with a write operation.

There is no doubt that if molecular memory does become fit for commercial purposes in the next few years it will take the computer world completely by storm. The prospect of having computers driven by such powerful memory is very exciting indeed. The progress shown by scientists has been fairly encouraging so far, but whether or not this technology will really make it to the next level, and if so, then how long we will have to wait for it still remain to be seen.

What is equally intriguing are the types of operating systems that may have to be developed in order to run compatibly with these new forms of memory, given that these new technologies do hit the market. There is no doubt that the amounts of complexity will have to be increased by a few times, but it will be very interesting to see whether or not the great leaps made in hardware can be matched by equally great leaps in software.


Here is the link to the video presentation for this blog











References
http://194.81.104.27/~brian/Comp_Sys1/Memory_New.htm
http://www.psych.usyd.edu.au/pdp-11/core.html
www.wikipedia.com
http://spectrum.ieee.org/semiconductors/design/the-mysterious-memristor
http://examcrazy.com/engineering/Computer-Science/Operating-System/History-of-Operating-Systems.asp
http://www.rsc.org/chemistryworld/News/2010/March/04031001.asp