Tuesday, July 6, 2010

Hardware Informatione.

In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution.
A hardware interrupt causes the processor to save its state of execution and begin execution of an interrupt handler.
Software interrupts are usually implemented as instructions in the instruction set, which cause a context switch to an interrupt handler similar to a hardware interrupt.
Interrupts are a commonly used technique for computer multitasking, especially in real-time computing. Such a system is said to be interrupt-driven.

Types of Interrupts.
Level-triggered
A level-triggered interrupt is a class of interrupts where the presence of an unserviced interrupt is indicated by a high level (1), or low level (0), of the interrupt request line. A device wishing to signal an interrupt drives line to its active level, and then holds it at that level until serviced. It ceases asserting the line when the CPU commands it to or otherwise handles the condition that caused it to signal the interrupt.
Typically, the processor samples the interrupt input at predefined times during each bus cycle such as state T2 for the Z80 microprocessor. If the interrupt isn't active when the processor samples it, the CPU doesn't see it. One possible use for this type of interrupt is to minimize spurious signals from a noisy interrupt line: a spurious pulse will often be so short that it is not noticed.
Multiple devices may share a level-triggered interrupt line if they are designed to. The interrupt line must have a pull-down or pull-up resistor so that when not actively driven it settles to its inactive state. Devices actively assert the line to indicate an outstanding interrupt, but let the line float (do not actively drive it) when not signalling an interrupt. The line is then in its asserted state when any (one or more than one) of the sharing devices is signalling an outstanding interrupt.
This class of interrupts is favored by some because of a convenient behavior when the line is shared. Upon detecting assertion of the interrupt line, the CPU must search through the devices sharing it until one requiring service is detected. After servicing this device, the CPU may recheck the interrupt line status to determine whether any other devices also need service. If the line is now de-asserted, the CPU avoids checking the remaining devices on the line. Since some devices interrupt more frequently than others, and other device interrupts are particularly expensive, a careful ordering of device checks is employed to increase efficiency.
There are also serious problems with sharing level-triggered interrupts. As long as any device on the line has an outstanding request for service the line remains asserted, so it is not possible to detect a change in the status of any other device. Deferring servicing a low-priority device is not an option, because this would prevent detection of service requests from higher-priority devices. If there is a device on the line that the CPU does not know how to service, then any interrupt from that device permanently blocks all interrupts from the other devices.
The original PCI standard mandated shareable level-triggered interrupts. The rationale for this was the efficiency gain discussed above. (Newer versions of PCI allow, and PCI Express requires the use of message-signalled interrupts.)

Hybrid
Some systems use a hybrid of level-triggered and edge-triggered signalling. The hardware not only looks for an edge, but it also verifies that the interrupt signal stays active for a certain period of time.
A common use of a hybrid interrupt is for the NMI (non-maskable interrupt) input. Because NMIs generally signal major – or even catastrophic – system events, a good implementation of this signal tries to ensure that the interrupt is valid by verifying that it remains active for a period of time. This 2-step approach helps to eliminate false interrupts from affecting the system.

Edge-triggered
An edge-triggered interrupt is a class of interrupts that are signalled by a level transition on the interrupt line, either a falling edge (1 to 0) or a rising edge (0 to 1). A device wishing to signal an interrupt drives a pulse onto the line and then releases the line to its quiescent state. If the pulse is too short to be detected by polled I/O then special hardware may be required to detect the edge.
Multiple devices may share an edge-triggered interrupt line if they are designed to. The interrupt line must have a pull-down or pull-up resistor so that when not actively driven it settles to one particular state. Devices signal an interrupt by briefly driving the line to its non-default state, and let the line float (do not actively drive it) when not signalling an interrupt. This type of connection is also referred to as open collector. The line then carries all the pulses generated by all the devices. (This is analogous to the pull cord on some buses and trolleys that any passenger can pull to signal the driver that they are requesting a stop.) However, interrupt pulses from different devices may merge if they occur close in time. To avoid losing interrupts the CPU must trigger on the trailing edge of the pulse (e.g. the rising edge if the line is pulled up and driven low). After detecting an interrupt the CPU must check all the devices for service requirements.
Edge-triggered interrupts do not suffer the problems that level-triggered interrupts have with sharing. Service of a low-priority device can be postponed arbitrarily, and interrupts will continue to be received from the high-priority devices that are being serviced. If there is a device that the CPU does not know how to service, it may cause a spurious interrupt, or even periodic spurious interrupts, but it does not interfere with the interrupt signalling of the other devices. However, it is fairly easy for an edge triggered interrupt to be missed - for example if interrupts have to be masked for a period - and unless there is some type of hardware latch that records the event it is impossible to recover. Such problems caused many "lockups" in early computer hardware because the processor did not know it was expected to do something. More modern hardware often has one or more interrupt status registers that latch the interrupt requests; well written edge-driven interrupt software often checks such registers to ensure events are not missed.
The elderly Industry Standard Architecture (ISA) bus uses edge-triggered interrupts, but does not mandate that devices be able to share them. The parallel port also uses edge-triggered interrupts. Many older devices assume that they have exclusive use of their interrupt line, making it electrically unsafe to share them. However, ISA motherboards include pull-up resistors on the IRQ lines, so well-behaved devices share ISA interrupts just fine.

Performance issues

Interrupts provide low overhead and good latency at low offered load, but degrade significantly at high interrupt rate unless care is taken to prevent several pathologies. These are various forms of livelocks, when the system spends all of its time processing interrupts, to the exclusion of other required tasks. Under extreme conditions, a large number of interrupts (like very high network traffic) may completely stall the system. To avoid such problems, an operating system must schedule network interrupt handling as carefully as it schedules process execution.

Difficulty with sharing interrupt lines

Multiple devices sharing an interrupt line (of any triggering style) all act as spurious interrupt sources with respect to each other. With many devices on one line the workload in servicing interrupts grows in proportion to the square of the number of devices. It is therefore preferred to spread devices evenly across the available interrupt lines. Shortage of interrupt lines is a problem in older system designs where the interrupt lines are distinct physical conductors. Message-signalled interrupts, where the interrupt line is virtual, are favoured in new system architectures (such as PCI Express) and relieve this problem to a considerable extent.
Some devices with a badly-designed programming interface provide no way to determine whether they have requested service. They may lock up or otherwise misbehave if serviced when they do not want it. Such devices cannot tolerate spurious interrupts, and so also cannot tolerate sharing an interrupt line. ISA cards, due to often cheap design and construction, are notorious for this problem. Such devices are becoming much rarer, as hardware logic becomes cheaper and new system architectures mandate shareable interrupts

Monday, July 5, 2010

Bundling Hardware and Software to Do Big Jobs.

In data-center computing, the big trend today is to move from building blocks to bundles.

John Marshall Mantel for The New York Times

Rodney Adkins, senior vice president for systems and technology at I.B.M., which is ahead in developing customized systems.

Suppliers are offering customers assembled bundles of hardware and software to make it easier and less expensive for customers to cope with the Internet-era surge in data — an information flood coming from internal databases, but also from Web-based collaboration and smartphone applications, sensors that monitor electrical use, environmental contamination and food shipments, even biological and genetic research.The shift to packaging hardware and software together is behind the recent big deals and partnerships in the technology industry: Oracle’s purchase of SunMicrosystems for $7.4 billion, an alliance between Hewlett-Packard and Microsoft announced last month, and a similar partnership between Cisco Systems and EMC.


But computer scientists at universities and technology companies say that simply putting the hardware and software building blocks together more efficiently for customers is not enough.


“The huge challenge is to take all this data and generate useful knowledge from it,” said Kunle Olukotun, a computer scientist at Stanford. “It’s an enormous opportunity in science and business, but it also presents a massive computing problem.”


The path to intelligently mining the explosion of data, Mr. Olukotun said, involves new approaches to breaking down computing tasks into subtasks that can be processed simultaneously — a concept known as parallel computing — and new system designs optimized for specific kinds of work.


Designing computer systems around the work to be done is a departure from the dominant approach of general-purpose design, in which machines are built to be capable of handling all kinds of chores and are then programmed to do specific tasks.

Several companies are beginning to bring workload-optimized systems design into the mainstream of corporate and government computing. The promise, analysts say, is to not only open the door to exploiting the data flood for competitive advantage, but also to reduce energy costs and help automate the management and administration of computer systems — a labor-intensive expense that is rising four times faster than the cost of hardware.

I.B.M., according to industry analysts, is at the forefront of the effort to develop more customized systems. And on Monday, the company is making the first of a series of announcements this year that embody the new approach.


I.B.M. is introducing a line of big computer servers using its Power 7 32-core microprocessors. They are priced at $190,000, typically run Unix or Linux, and are aimed at industries like finance and utilities, as well as scientific researchers. Next month, I.B.M. plans to unveil far less costly server systems based on industry-standard microprocessors made by Intel. Those machines, which typically run Unix or Microsoft Windows, will be used for Web collaboration, e-mail and other applications.

“These are not simply hardware products, but the result of years of work and investment at every level from the silicon up through the software,” said Rodney C. Adkins, I.B.M.’s senior vice president for systems and technology. “And the real challenge is to optimize it all, not just the hardware.”

The early deployment of so-called smart utility grids points to the challenges of handling ever-vaster amounts of data. Smart electric meters can measure room temperatures and energy use hourly or at 15-minute intervals instead of the old pattern of utility service workers reading electro-mechanical meters every month or two.

The goal of smart grids, which governments are starting to heavily subsidize, is to give households and businesses timely information so they can change their electricity consumption habits to reduce energy use and pollution, and save money.


That involves not only collecting the data, but also analyzing and presenting it to consumers in ways that are easily understood — typically a personalized Web site graphically showing household electricity consumption and pricing.

EMeter, a maker of smart-grid software in San Mateo, Calif., said that using I.B.M.’s workload-tuned P-7 systems should more than double its capacity to manage smart meters, bringing it up to 50 million. In one eMeter project, the utilities in Ontario are going to install 4.5 million smart meters by 2011. Before, meters were read once every month or two. Under the digital system, readings will be made hourly, a hundredfold increase in the data generated.

“If you can’t continually measure energy use down to the granular level in homes and businesses, the smart grid doesn’t work,” said Scott Smith, director of technical solutions at eMeter. “You need a tremendous amount of computing power to do that at scale.”

Computer scientists, biologists and researchers from Rice University and the Texas Medical Center have been working with I.B.M. scientists to fine-tune P-7 systems for cancer research. Genetic and protein-folding simulations require vast amounts of specialized high-speed processing and computer memory, said Kamran Khan, vice provost for information technology at Rice.

I.B.M., he said, dispatched three Ph.D. biologists to work with the cancer researchers. “They really understand computational biology,” Mr. Khan said.

The more bespoke approach to computer-systems design does increase the risk that customers are locked into one or two powerful companies. Indeed, the reason data-center customers long preferred the building-block approach to hardware and software was that it guaranteed competition among suppliers.

But the tradeoff has been that customers had to put the hardware and software together themselves, even as computing complexity and data-handling demands surged. Many companies, it seems, are willing to accept less competition among suppliers for the convenience and cost savings from prepackaged systems.

“It’s a balancing act,” said Frank Gens, chief analyst at IDC. “It does take away some choice, but also makes things a lot simpler. And that, after all, is the model that Apple used so successfully in consumer technology.”

Components Of A Personal Computer.

Processor (CPU)

CPU

The CPU, also called the processor or microprocessor, is the brain of the PC. The processor receives data input by the user, processes information and executes commands.


RAM

RAM

RAM (Random-access Memory) is memory modules that are are installed on the motherboard that contain microchips which hold data and programs while the CPU processes both. Data in RAM is only held temporarily and will be lost when the PC is turned off.


Motherboards (Mobo)

Motherboards

Also called the system board, the motherboard is the main circuit board of the PC. The CPU, RAM, expansion cards, storage devices and optical drives are all plugged into the motherboard.


Video Cards

Video Cards

A video card, also called a display adapter, is an expansion card installed into either a PCI, AGP or PCI-E slot on the motherboard and gives the PC display capabilities.
  • PCI-E

  • AGP

  • PCI


Hard Drives (HDD)

Hard Drives

The hard drive is the main secondary storage device in a PC. Hard drives contain magnetic coated platters that rotate at high RPMs. Hard drives use one or more round magnetic disks called platters, read/write heads controlled by an actuator, and a spindle on which the platters rotate.


Power Supply

Power Supplies

A power supply is the small, metal box usually located at the back of the PC that converts the AC current from your home to the DC current needed by the PC. A quality power supply is essential to a PC, especially for those who overclock or have numerous components and multiple hard drives installed.


Peripherals

Peripherals

A peripheral is a device that communicates with the CPU, but is not essential for the PC to operate. This includes a wide variety of PC components including monitors, keyboards, mice, printers, game controllers, scanners, media drives and speakers.


Monitors

Monitors

A monitor is the display device used to output the video that is processed by a video card. The most common PC monitor technologies are CRT (Cathode Ray Tube) and LCD (Liquid Crystal Display). LCD panels use a liquid crystal material made of polarized molecules to produce an image. An electric current is passed through the liquid and causes the crystals to align so that light...


Laptop versus a desktop pc.How to choose?

You might find yourself asking that question many times while shopping for a computer. This guide offers you the pros and cons of owning a laptop versus a desktop pc.


Processing speed
Comparing processing speeds, laptops usually lag behind their desktop counterparts. With the rapid advance in microchip technology, the gap between them will become smaller.
Wireless
Most laptops especially those with Intel mobile chips come with wireless capability out of the box. This means you can get online from any location at home easily without ugly wires if you have a wireless network setup at home. Desktop pcs do not typically provide this capability out of the box although that may change in the near future.


Memory
Memory chip tends to be more expensive in Laptop than desktop pcs. If you buy a laptop with less than 512MB ram, be prepare to pay more for memory upgrades than you have to with a desktop pc.
Graphics Display
Because of the size of a laptop, most business or entry level laptop use integrated graphics with limited ram. This means most laptops even some expensive ones cannot run graphics intensive applications or 3d games as well as a desktop pc. With a desktop pc, you can buy a dedicated graphics card just to serve a graphics intensive application.
green-laptopPortability
Portability is why everyone wants a laptop these days. Because of their size and weight, it is easier to carry a laptop around as opposed to a desktop pc.
Screen Display
Everyone buy laptop for their portability so laptops usually do not come with screens as big as their desktop counterparts. The screen technology used is usually not as good as those used by desktop pc. Furthermore with a desktop pc, you can always upgrade to a bigger and better screen whereas for laptop you are stuck with the same screen display for the whole lifespan of the laptop.
Upgradeability
Laptops do not offer many upgrade options. You can only upgrade memory and hard disk. With a desktop you can upgrade almost anything and only limited by the motherboard. This means a cheap desktop pc offers a longer lifespan than a laptop.
So whether you should buy a cheap laptop or a cheap desktop, ask yourself what are your needs? If you want to be able to use a computer wherever you go, then you are looking at a laptop to fulfill your needs. However if you do not require the portability of a laptop, play a lot of 3D games, graphic intensive applications, if you care about upgradeability to prolong the lifespan of your investment, then desktop pc is a smarter choice for you.