Showing posts with label Chapter 6. Show all posts
Showing posts with label Chapter 6. Show all posts

Saturday, February 26, 2011

Virtual Memory

Virtual memory is the common part of most operating systems on desktop computer.It had become so common because it provides a big benefit for users at a very low cost.

Most computers today have something like 32 or 64 megabytes of RAM available for the CPU to use. Unfortunately, that amount of RAM is not enough to run all of the programs that most users expect to run at once.

For example, if you load the operating system, an e-mail program, a Web browser and word processor into RAM simultaneously, 32 megabytes is not enough to hold it all. If there were no such thing as virtual memory, then once you filled up the available RAM your computer would have to say, "Sorry, you cannot load any more applications. Please close another application to load a new one." With virtual memory, what the computer can do is look at RAM for areas that have not been used recently and copy them onto the hard disk. This frees up space in RAM to load the new application.

Because this copying happens automatically, you not even know it is happening, and it makes your computer feel like is has unlimited RAM space even though it only has 32 megabytes. Because hard disk space is so much cheaper than RAM chips, it also has a nice economic benefit.

The read or write speed of a hard drive is much slower than RAM, and the technology of a hard drive is not geared toward accessing small pieces of data at a time. If your system has to rely too heavily on virtual memory, you will notice a significant performance drop. The key is to have enough RAM to handle everything you tend to work on simultaneously - then, the only time you feel the slowness of virtual memory is when there is a slight pause when you are changing tasks. When that is the case, virtual memory is perfect.

When it is not the case, the operating system has to constantly swap information back and forth between RAM and the hard disk. This is called thrashing, and it can make your computer feel incredibly slow.

The area of the hard disk that stores the RAM image is called a page file. It holds pages of RAM on the hard disk, and the operating system moves data back and forth between the pages file and RAM. On a Windows machine, page files have a .SWP extension.

                          

 



Monday, February 21, 2011

What is a computer bus?

Introduction to the concept of a Bus

A bus, in computing, is a set of physical connections (cables, printed circuits, etc.) which can be shared by multiple hardware components in order to communicate with one another.

The purpose of buses is to reduce the number of "pathways" needed for communication between the components, by carrying out all communications over a single data channel. This is why the metaphor of a "data highway" is sometimes used.











If only two hardware components communicate over the line, it is called a hardware port (such as aserial port or parallel port).


Characteristics of a Bus

A bus is characterised by the amount of information that can be transmitted at once. This amount, expressed in bits, corresponds to the number of physical lines over which data is sent simultaneously. A 32-wire ribbon cable can transmit 32 bits in parallel. The term "width" is used to refer to the number of bits that a bus can transmit at once.

Additionally, the bus speed is also defined by its frequency (expressed in Hertz), the number of data packets sent or received per second. Each time that data is sent or received is called a cycle.

This way, it is possible to find the maximum transfer speed of the bus, the amount of data which it can transport per unit of time, by multiplying its width by its frequency. A bus with a width of 16 bits and a frequency of 133 MHz, therefore, has a transfer speed equal to:
16 * 133.106 = 2128*106 bit/s,
or 2128*106/8 = 266*106 bytes/s
or 266*106 /1000 = 266*103 KB/s
or 259.7*103 /1000 = 266 MB/s

Bus Subassembly

In reality, each bus is generally constituted of 50 to 100 distinct physical lines, divided into three subassemblies:

• The address bus (sometimes called the memory bus) transports memory addresses which the processor wants to access in order to read or write data. It is a unidirectional bus.
• The data bus transfers instructions coming from or going to the processor. It is a bidirectional bus.
• The control bus (or command bus) transports orders and synchonisation signals coming from the control unit and travelling to all other hardware components. It is a bidirectional bus, as it also transmits response signals from the hardware.

The primary Buses

There are generally two buses within a computer:

• the internal bus (sometimes called the front-side bus, or FSB for short). The internal bus allows the processor to communicate with the system's central memory (the RAM).
• the expansion bus (sometimes called the input/output bus) allows various motherboard components (USB, serial, and parallel ports, cards inserted in PCI connectors, hard drives, CD-ROM and CD-RW drives, etc.) to communicate with one another. However, it is mainly used to add new devices using what are called expansion slots connected to the input/outpur bus.

The chipset

A chipset is the component which routes data between the computer's buses, so that all the components which make up the computer can communicate with each other. The chipset originally was made up of a large number of electronic chips, hence the name. It generally has two components:

• The NorthBridge (also called the memory controller) is in charge of controlling transfers between the processor and the RAM, which is way it is located physically near the processor. It is sometimes called the GMCH, forr Graphic and Memory Controller Hub.
• The SouthBridge (also called the input/output controller or expansion controller) handles communications between peripheral devices. It is also called the ICH (I/O Controller Hub). The tembridge is generally used to designate a component which connects two buses.