5 The concept of state of a system and MegaHz

The execution of an instruction takes place through a sequence of state changes of the processor defined by a periodic signal (clock), say, of the following form:

clock image

This signal is carried by a wire for the entire chip containing the microprocessor. At every occurrence of "", or rather to each peak of the signal, the microprocessor changes its state. the state of a microprocessor can mean all physical states of every single electric wire that is part of the system. It’s therefore clear that the higher the clock frequency the more quickly the processor changes states and the higher is the number of instructions executed in a unit of time. In other words, the higher the clock frequency is the faster the processor is. A processor running at 3000 MHz = 3 Ghz is a system which changes its state 3,000,000,000 times per second!

Today the most common processors for Personal Computers (computers for everybody) come from three main companies: the INTEL, AMD (Advanced Micro Devices) and IBM (International Business Machines). All Intel and AMD processors (Intel® Core ™ 2, Intel® Core ™ 2 Duo, Intel Pentium, AMD Athlon 64, AMD Turion 64, AMD Oopteron, AMD Phenom, ...) now have a 64-bit architecture (until 2005 the architectures were with 32-bits) and a frequency which can reach up 3.73 Ghz. All these processors have got the same Instruction Set (that is, they speak the same machine language called x86) given by a number of instructions of the order of hundreds of instructions. A family totally different (because they have a different Instruction Set) are the Macintosh computers processors (before), the Nintendo Wii, the Playstation 3 and Xbox 360, which are manufactured by IBM. They are the PowerPC G5 and can be found with a clock frequency of up to 2.7 GHz. All the previously mentioned processors have already an architecture of 64 bits, and many of them contains more simultaneously working processors on the same single chip (up to four!).

Anyway, when you buy a computer you have to consider that ICT is a technological field with a rapid evolution and that what is innovative today will be obsolete in a year or two. This rapid evolution is expressed by a law known as Moore's law (one of the four founders of INTEL) that says: the performances of a computer would double every 18 - 24 months. This empirical law has not yet failed.

6 Memories and their hierarchy

In today's computers, there are many memory types (levels); some of them are more expensive, faster, smaller and other are cheaper, slower, bigger. The main types of existing memory today are shown in Table 1 with its features and performances. The memory types with the best performances are at higher level than the ones with the worst performances.

memory hierarchy
Table 1: memory hierarchy. For a memory hierarchy update please see memory hierarchy on wikipedia.

In the table, registers, cache memories and RAM (Random Access Memory) are made of transistors. The hard disk is usually made up of a magnetic disk divided into cells each of which contains 1 bit of information. Into the cell is written 0 or 1 depending on the orientation of the magnetic field of the cell; say if the magnetic field is oriented downword means that the cell stores a 0, otherwise a 1. Essentially with the same technology are made floppy disks and magnetic tapes. While the hard disk is fixed inside a computer system, floppy disks and magnetic tapes are removable and can be transported anywhere. Apart from this, the only difference between the magnetic tapes and the hard or floppy disks is that the magnetic tape is a tape while the others are disks, and so, accessing data on tapes occurs sequentially (which is a slower way to access data). The Compact Disks (CD) and the Digital Versatile Disks (DVD) technology are essentially different: they are optical disks. An optical disk is a plastic disc on which reflecting material has been laid. Also optical disks are divided into cells each of which contains 1 bit of information. In a cell you write 0 leaving the cell intact and you write 1 by doing a laser scratch on it. During the reading phase, a low power laser illuminates the various cells. The untouched cells reflects the light indicating that they store a 0, the scratched cells do not reflect the light indicating that they store a 1. Because of their nature, the optic disks are Write Once Memories (WOMs), that means memory in which you can write only one time. The substantial difference between the CD and the DVD is that in the second type the cells size are considerably smaller (almost 1/7-th of a CD cell size) and you can write on two layers on every side (that is, they are holographic memories).

Table 1 shows the size, the speed and the cost of every memory type. The speed is measured in terms of memory access time (or, memory latency). The memory access time is the amount of time that elapses between when the CPU requires a data in a memory location to when the data stored in that memory location is received. Table 1 shows the orders of magnitude of the access times for various memories.

By volatile memory we mean a type of memory (made of transistors) whose stored data vanishes when you turn off your the computer. The cache and RAM are volatile memories. The remaining memories in the table are non-volatile or mass storage media, so even turning off the computer, they retain the data contained in them. This causes the cache and RAM to be used for storing programs and data in execution. Whereas, the other memories are used to save programs and data permanently.

In modern computers the memory is managed by a mechanism which is called virtual memory. The purpose of this mechanism is to make the user (and its application programs) seem to have more high-level memory available by using low-level memory. Virtual memory works in the following way. Suppose, for example, that the CPU has available a RAM of 8 Mbytes, one cache of 512 Kbytes and must execute (because it is ordered by the user) an application program of the size of 4 Mbytes already resident (saved) in the RAM. To execute, the program is divided into 8 blocks (called pages) of 512 Kbytes (the cache size) per block, the first block (the one containing the first instruction of the program) is copied from the RAM to the cache and execution starts with the CPU that "fetchs" instructions directly from the cache (and not from the RAM that is slower) as described by von Neuman machine defined previously. Eventually, at certain point, the CPU will refer to an instruction in another page (that is not allocated in the cache, but in the RAM). Then the CPU will copy this new page in the cache in the position of the old one (page swap) and will continue the computation on the new page. And so on. Even though the program does not fit in the cache (because the program is 8 times bigger than the cache) it will be like it is located in the cache. For example, let’s suppose that the CPU requires a 8 Mbytes of RAM, a cache of 512 Kbytes and must perform (because ordered by the user) a program of the size of 4 Mbytes already resident (saved) in RAM. In order to be execute, the program is divided into 8 blocks (called pages) of 512 Kbytes (cache size) for each block, the first block (the one containing the first instruction of the program) is copied from the RAM to cache and the execution starts with the CPU that "fetchs" instructions directly from the cache (and not from the RAM that is slower) as described by von Neuman machine defined in section 4. Eventually, at certain point, the CPU will refer to an instruction in another page (that is not allocated in the cache, but in the RAM). Then the CPU will copy this new page in the cache in the position of the old one (page swap) and will continue the computation on the new page. And so on. Even if the program does not fit in the cache (because the cache is 8 times bigger than it) it will be like it is located in the cache. Note that the efficiency of this method is based on the empirically true principle of locality which states that if Ij is the k-th executed instruction then it is very likely that Ij+1 is the (k + 1)-th instruction that has to be executed. If this principle were not true, the CPU would take up almost all of its time by doing page swaps.

7 The Input/Output Interfaces

This section will describe all the Input/Output Interfaces, the most common today, which allow a computer to interact with the external world and with the users. These devices are also called computer pheripherals and are used precisely to realize the input and output (I/O) of a computer.

The monitor. It is used to view computer responses in real time. It essentially consists of a grid of light bulbs (pixels) that can take different colors using RGB technology. The most common screens are those of 15 inches (with a grid of 1024 × 768 pixels) and those of 17 inches (with a grid of 1280 × 1024 pixels), but many other sizes are available nowdays too. Their resolution is 72 × 72 dpi (dot per inch = pixel per inch). There are cathode ray tube screens (usually used for desktop computers) and LCD screens with the active or passive matrix (for laptops). Active matrix screens are better than passive matrix screens.

The keyboard. It is used to enter alphanumeric characters and / or compose text files. It is an electromechanical device that converts the stroke of a keyboard key into the relative word in ASCII code (American standard code for the exchange of information).

The Mouse. It is used to point and select objects on the screen of a computer which has got an operating system using a GUI (Graphical User Interface). It has been introduced by the Apple Macintosh in 1982.

The Hard disk drive. Hardware that it is used to write and read data on the hard disk.

The Optical disc drive. Hardware that is used to read and write data on a CD/DVD. Commonly its speed is expressed in n×, where n is a natural number. The bigger n the faster is the player. Today, there are optical disc drive whose reading speed is 48× and writing speed is 6×.

The Floppy disk drive. Hardware that is used to write and read data on a floppy disk.

The modem (modulator/demodulator). It is used to transmit data (sequences of bits) usually along the telephone line. For example, It is an essential device to connect to the Internet from home. Nowadays, there are modems whose speed transmission goes up to 56 K bps (Kilo bits per second).

The scanner. It is used to capture (i. e., digitize) images (typically from a paper sheet) on your computer. The picture has been "scanned", digitized and put it in the computer's RAM in order to be manipulated and eventually saved.

The printer. It is the peripheral to print on paper sheets. The main printing techniques are: by inkjet when writing occurs through a jet of drop of ink or by laser, when printing is realized through the use of a laser that acts on a barrel coated with photosensitive material. See also the 3D-printers.

The Web camera. It captures videos or pictures to be stored and sent over the internet in real time.

and other input and output devices.

8 Contemporary computer classification

Nowadays the types of computers that are on the market are from smaller, less powerful and more manageable to the larger, more powerful and less manageable, for an up to date classification please see class of computers on wikipedia. The following classification is a little bit dated (it dates back to more or less the year 2005) but to certain extent it is still valid.

Palm-top computers. These are palm-sized computers that can be hold in a hand. Their cost is less than 2000 euros.

Lap-top computers. Computers that can stay on the knee of a person. They are also usually known with the name of portable computers. They can cost up to 6000 euros.

Personal computers. They are the common PCs that can stay on everyone's desk whose cost goes up to 5000 euros.

Workstations. desk-top computers with an high computational power. The starting cost is 5000 euros. Usually they use the UNIX operating system.

Mainframes. Computers of high computational capability (they can also have many microprocessors) and the starting cost for them is 10000 euros. These occupy the space of a wardrobe of 2 cubic meters and they are designed in order to be used by more than one user, say 10-100 users, through many terminals usually located in the range of one kilometer. Usually they use the operating system UNIX.

Supercomputers. Computers with considerable computational capacity (they are mostly parallel machines with up to 1024 microprocessors) that cost around milions of euros. Those occupy the space of a wardrobe of 6 cubic meters and are projected to solve very difficult problems like the weather forecasts, sequencing of the human genome, sending probes to Mars, and so on. There might be, say, a hundred of this kind of machines on the entire planet.