Hot swapping is the replacement or addition of components to a
computer system
A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These progr ...
without stopping,
shutting down, or
rebooting the system; hot plugging describes the addition of components only.
Components which have such functionality are said to be ''hot-swappable'' or ''hot-pluggable''; likewise, components which do not are ''cold-swappable'' or ''cold-pluggable''.
Most desktop
computer hardware
Computer hardware includes the physical parts of a computer, such as the computer case, case, central processing unit (CPU), Random-access memory, random access memory (RAM), Computer monitor, monitor, Computer mouse, mouse, Computer keyboard, ...
, such as CPUs and memory, are only cold-pluggable. However, it is common for mid to high-end
servers and
mainframes
A mainframe computer, informally called a mainframe or big iron, is a computer used primarily by large organizations for critical applications like bulk data processing for tasks such as censuses, industry and consumer statistics, enterprise ...
to feature hot-swappable capability for hardware components, such as
CPU, memory,
PCIe
PCI Express (Peripheral Component Interconnect Express), officially abbreviated as PCIe or PCI-e, is a high-speed serial computer expansion bus standard, designed to replace the older PCI, PCI-X and AGP bus standards. It is the common mo ...
,
SATA
SATA (Serial AT Attachment) is a computer bus interface that connects host bus adapters to mass storage devices such as hard disk drives, optical drives, and solid-state drives. Serial ATA succeeded the earlier Parallel ATA (PATA) standard to ...
and
SAS drives.
An example of hot swapping is the express ability to pull a
Universal Serial Bus
Universal Serial Bus (USB) is an industry standard that establishes specifications for cables, connectors and protocols for connection, communication and power supply (interfacing) between computers, peripherals and other computers. A broad ...
(USB)
peripheral
A peripheral or peripheral device is an auxiliary device used to put information into and get information out of a computer. The term ''peripheral device'' refers to all hardware components that are attached to a computer and are controlled by the ...
device, such as a thumb drive, external
hard disk drive
A hard disk drive (HDD), hard disk, hard drive, or fixed disk is an electro-mechanical data storage device that stores and retrieves digital data using magnetic storage with one or more rigid rapidly rotating platters coated with magnet ...
(HDD), mouse, keyboard, or printer out of a computer's USB slot or peripheral hub without ejecting it first.
Most smartphones and tablets with tray-loading holders can interchange SIM cards without powering down the system.
Dedicated
digital camera
A digital camera is a camera that captures photographs in digital memory. Most cameras produced today are digital, largely replacing those that capture images on photographic film. Digital cameras are now widely incorporated into mobile device ...
s and
camcorder
A camcorder is a self-contained portable electronic device with video and recording as its primary function. It is typically equipped with an articulating screen mounted on the left side, a belt to facilitate holding on the right side, hot-swa ...
s usually have readily accessible
memory card
A memory card is an electronic data storage device used for storing digital information, typically using flash memory. These are commonly used in digital portable electronic devices. They allow adding memory to such devices using a card in a so ...
and
battery
Battery most often refers to:
* Electric battery, a device that provides electrical power
* Battery (crime), a crime involving unlawful physical contact
Battery may also refer to:
Energy source
*Automotive battery, a device to provide power t ...
compartments for quick changing with only minimal interruption of operation. Batteries can be cycled through by recharging reserve batteries externally while unused. Many cameras and camcorders feature an internal memory to allow capturing when no memory card is inserted.
Rationale
Hot swapping is used whenever it is desirable to change the configuration or repair a working system without interrupting its operation. It may simply be for convenience of avoiding the delay and nuisance of shutting down and then restarting complex equipment or because it is essential for equipment, such as a
server
Server may refer to:
Computing
*Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients
Role
* Waiting staff, those who work at a restaurant or a bar attending customers and su ...
, to be continuously active.
Hot swapping may be used to add or remove
peripheral
A peripheral or peripheral device is an auxiliary device used to put information into and get information out of a computer. The term ''peripheral device'' refers to all hardware components that are attached to a computer and are controlled by the ...
s or components, to allow a device to synchronize data with a computer, and to replace faulty modules without interrupting equipment operation. A machine may have dual
power supplies
A power supply is an electrical device that supplies electric power to an electrical load. The main purpose of a power supply is to convert electric current from a source to the correct voltage, current, and frequency to power the load. As a res ...
, each adequate to power the machine; a faulty one may be hot-swapped. Important cards such as
disk controller
{{unreferenced, date=May 2010
The disk controller is the controller circuit which enables the CPU to communicate with a hard disk, floppy disk or other kind of disk drive. It also provides an interface between the disk drive and the bus conne ...
s or
host adapter
In computer hardware, a host controller, host adapter, or host bus adapter (HBA), connects a computer system bus, which acts as the host system, to other network and storage devices. The terms are primarily used to refer to devices for conne ...
s may be designed with redundant paths in order for these to be replaceable in case of failure without necessitating interruption of associated computer system operation.
System considerations
Machines that support hot swapping need to be able to modify their operation for the changed
configuration
Configuration or configurations may refer to:
Computing
* Computer configuration or system configuration
* Configuration file, a software file used to configure the initial settings for a computer program
* Configurator, also known as choice board ...
, either automatically on detecting the change, or by user intervention. All electrical and mechanical connections associated with hot-swapping must be designed so that neither the equipment nor the user can be harmed while hot-swapping. Other components in the system must be designed so that the removal of a hot-swappable component does not interrupt operation.
Mechanical design
Protective covering plates, shields, or bezels may be used on either the removable components or the main device itself to prevent operator contact with live powered circuitry, to provide antistatic protection for components being added or removed, or to prevent the removable components from accidentally touching and shorting out the powered components in the operating device.
Additional guide slots, pins, notches, or holes may be used to aid in proper insertion of a component between other live components, while mechanical engagement latches, handles, or levers may be used to assist in proper insertion and removal of devices that either require large amounts of force to connect or disconnect, or to assist in the proper mating and holding together of power and communications connectors.
Variations
There are two slightly differing meanings of the term ''hot swapping''. It may refer only to the ability to add or remove hardware without powering down the system, while the system software may have to be notified by the user of the event in order to cope with it. Examples include
RS-232
In telecommunications, RS-232 or Recommended Standard 232 is a standard originally introduced in 1960 for serial communication transmission of data. It formally defines signals connecting between a ''DTE'' (''data terminal equipment'') such a ...
and lower-end
SCSI
Small Computer System Interface (SCSI, ) is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, electrical, optical and logical interface ...
devices. Examples include USB, FireWire and higher-end
SCSI
Small Computer System Interface (SCSI, ) is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, electrical, optical and logical interface ...
devices.
Some implementations require a component shutdown procedure prior to removal. This simplifies the design, but such devices are not robust in the case of component failure. If a component is removed while it is being used, the operations to that device fail and the user is responsible for retrying if necessary, although this is not usually considered to be a problem.
More complex implementations may recommend but do not require that the component be shut down, with sufficient
redundancy in the system to allow operation to continue if a component is removed without being shut down. In these systems hot swap is normally used for regular maintenance to the computer, or to replace a broken component.
Connectors
Most modern hot-swap methods use a specialized connector with staggered pins, so that certain pins are certain to be connected before others. Most staggered-pin designs have ground pins longer than the others, ensuring that no sensitive circuitry is connected before there is a reliable system ground. The other pins may all be the same length, but in some cases three pin lengths are used so that the incoming device is grounded first, data lines connected second, and power applied third, in rapid succession as the device is inserted. Pins of the same nominal length do not necessarily make contact at exactly the same time due to mechanical tolerances, and angling of the connector when inserted.
At one time staggered pins were thought to be an expensive solution, but many contemporary connector families now come with staggered pins as standard; for example, they are used on all modern serial SCSI disk-drives. Specialized hot-plug power connector pins are now commercially available with repeatable DC current interruption ratings of up to 16 A.
Printed circuit board
A printed circuit board (PCB; also printed wiring board or PWB) is a medium used in Electrical engineering, electrical and electronic engineering to connect electronic components to one another in a controlled manner. It takes the form of a L ...
s are made with staggered edge-fingers for direct hot-plugging into a backplane connector.
Although the speed of plugging cannot be controlled precisely, practical considerations will provide limits that can be used to determine worst-case conditions. For a typical staggered pin design where the length difference is 0.5 mm, the elapsed time between long and short pin contact is between 25 ms and 250 ms. It is quite practical to design hot-swap circuits that can operate at that speed.
As long as the hot-swap connector is sufficiently rigid, one of the four corner pins will always be the first to engage. For a typical two-row connector arrangement this provides four first-to-make corner pins that are usually used for grounds. Other pins near the corners can be used for functions that would also benefit from this effect, for example sensing when the connector is fully seated. This diagram illustrates good practice where the grounds are in the corners and the power pins are near the center. Two sense pins are located in opposite corners so that fully seated detection is confirmed only when both of them are in contact with the slot. The remaining pins are used for all the other data signals.
Power electronics
The DC power supplies to a hot-swap component are usually
pre-charge
Pre-charge of the powerline voltages in a high voltage DC application is a preliminary mode which limits the inrush current during the power up procedure.
A high-voltage system with a large capacitive load can be exposed to high electric curren ...
d by dedicated long pins that make contact before the main power pins. These pre-charge pins are protected by a circuit that limits the inrush current to an acceptable value that cannot damage the pins nor disturb the supply voltage to adjacent slots. The pre-charge circuit might be a simple series
resistor
A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust signal levels, to divide voltages, bias active el ...
, a
negative temperature coefficient
A temperature coefficient describes the relative change of a physical property that is associated with a given change in temperature. For a property ''R'' that changes when the temperature changes by ''dT'', the temperature coefficient α is def ...
(NTC) resistor, or a
current-limiter circuit. Further protection can be provided by a "soft-start" circuit that provides a managed ramp-up of the internal DC supply voltages within the component.
A typical sequence for a hot-swap component being plugged into a slot could be as follows:
#Long ground pins make contact; basic electrical safety and ESD protection becomes available.
#Long (or medium) pre-charge pins make contact; decoupling capacitors start to charge up.
#Real time delay of tens of milliseconds.
#Short power/signal pins make contact.
#Connector becomes fully seated; power-on reset signal asserted within component
#Soft-start circuit starts to apply power to the component.
#Real time delay of tens of milliseconds.
#Soft-start circuit completes sequence; power-on reset circuit deasserted
#Component begins normal operation.
Hot-swap power circuits can now be purchased commercially in specially designed
ASICs called hot-swap power managers (HSPMs).
Signal electronics
Circuitry attached to signal pins in a hot-swap component should include some protection against
electrostatic discharge
Electrostatic discharge (ESD) is a sudden and momentary flow of electric current between two electrically charged objects caused by contact, an short circuit, electrical short or dielectric breakdown. A buildup of static electricity can be caused ...
(ESD). This usually takes the form of clamp diodes to ground and to the DC power supply voltage. ESD effects can be reduced by careful design of the mechanical package around the hot-swap component, perhaps by coating it with a thin film of conductive material.
Particular care must be taken when designing systems with bussed signals which are wired to more than one hot-swap component. When a hot-swap component is inserted its input and output signal pins will represent a temporary short-circuit to ground. This can cause unwanted ground-level pulses on the signals which can disturb the operation of other hot-swap components in the system. This was a problem for early
parallel SCSI
Parallel SCSI (formally, SCSI Parallel Interface, or SPI) is the earliest of the interface implementations in the SCSI family. SPI is a parallel bus; there is one set of electrical connections stretching from one end of the SCSI bus to the othe ...
disk-drives. One common design solution is to protect bussed signal pins with series diodes or resistors. CMOS buffer devices are now available with specialized inputs and outputs that minimize disturbance of bussed signals during the hot-swap operation. If all else fails, another solution is to
quiesce
To quiesce is to pause or alter a device or application to achieve a consistent state, usually in preparation for a backup or other maintenance.
Description
In software applications that modify information stored on disk, this generally involves ...
the operation of all components during the hot-swap operation.
Applications
Radio transmitters
Modern day
radio transmitter
In electronics and telecommunications, a radio transmitter or just transmitter is an electronic device which produces radio waves with an antenna. The transmitter itself generates a radio frequency alternating current, which is applied to the ...
s (and some
TV transmitter
A television transmitter is a transmitter that is used for terrestrial (over-the-air) television broadcasting. It is an electronic device that radiates radio waves that carry a video signal representing moving images, along with a synchronized au ...
s as well) use high power RF transistor power modules instead of
vacuum tube
A vacuum tube, electron tube, valve (British usage), or tube (North America), is a device that controls electric current flow in a high vacuum between electrodes to which an electric voltage, potential difference has been applied.
The type kn ...
s. Hot swapping power modules is not a new technology, as many of the radio transmitters manufactured in the 1930s were capable of having power tubes swapped out while the transmitter was running—but this feature was not universally adopted due to the introduction of more reliable high power tubes.
In the mid-1990s, several radio transmitter manufactures in the US started offering swappable high power RF transistor modules.
* There was no industry standard for the design of the swappable power modules at the time.
* Early module designs had only limited patent protection.
* By the early 2000s, many transmitter models were available that used many different kinds of power modules.
The reintroduction of power modules has been good for the radio transmitter industry, as it has fostered innovation. Modular transmitters have proven to be more reliable than tube transmitters, when the transmitter is properly chosen for the conditions at the transmitting site.
Power limitations:
* Lowest power modular transmitter: generally 1.0 kW, using 600 W modules.
* Highest power modular transmitter: 1.0 MW (for
LW,
MW).
* Highest power modular transmitter: 45 kW (FM, TV).
Gaming
Although most contemporary
video game
Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This fee ...
systems can interchange games and multimedia (e.g.
Blu-ray
The Blu-ray Disc (BD), often known simply as Blu-ray, is a digital optical disc data storage format. It was invented and developed in 2005 and released on June 20, 2006 worldwide. It is designed to supersede the DVD format, and capable of sto ...
s) without powering down the system, older generations of systems varied in their support of hot-swapping capabilities. For example, whereas the Sony PlayStation and PlayStation 2 could eject a game disc with the system powered on, the Nintendo Game Boy Advance and the Nintendo 64 would freeze up and could potentially become corrupt if the game cartridge was removed with the power on. Manufacturers specifically warned against such practices in the owner's manual or on the game cartridge.
It was supposedly for this reason that
Stop 'N' Swop was taken out of the
Banjo-Kazooie series. With the
Sega Genesis/Mega Drive
The Sega Genesis, known as the outside North America, is a 16-bit fourth generation home video game console developed and sold by Sega. It was Sega's third console and the successor to the Master System. Sega released it in 1988 in Japan a ...
system, it was sometimes possible to apply
cheats
Cheating generally describes various actions designed to subvert rules in order to obtain unfair advantages. This includes acts of bribery, cronyism and nepotism in any situation where individuals are given preference using inappropriate crit ...
(such as a player having infinite lives) and other temporary software alterations to games by hot swapping cartridges, even though the cartridges were not designed to be hot swappable.
Keyboards
Hot-swappable keyboards enable changing the
switches
In electrical engineering, a switch is an electrical component that can disconnect or connect the conducting path in an electrical circuit, interrupting the electric current or diverting it from one conductor to another. The most common type of ...
without having to disassemble the keyboard.
On standard mechanical-switch keyboards, the switch is directly
soldered
Solder (; NA: ) is a fusible metal alloy used to create a permanent bond between metal workpieces. Solder is melted in order to wet the parts of the joint, where it adheres to and connects the pieces after cooling. Metals or alloys suitable ...
to the
PCB
PCB may refer to:
Science and technology
* Polychlorinated biphenyl, an organic chlorine compound, now recognized as an environmental toxin and classified as a persistent organic pollutant
* Printed circuit board, a board used in electronics
* ...
. Hot-swappable keyboards instead have a socket in its place that allows the switch to be freely replaced without re-soldering.
Due to hot-swappable keyboards being less common, they often require being custom built or bought from custom keyboard manufacturers.
They can be found in a variety of sizes and
layouts, including more specialized
ergonomic
Human factors and ergonomics (commonly referred to as human factors) is the application of psychological and physiological principles to the engineering and design of products, processes, and systems. Four primary goals of human factors learnin ...
layouts.
Software
Hot swapping can also refer to the ability to alter the running code of a program without needing to interrupt its execution.
Interactive programming
Interactive programming is the procedure of writing parts of a program while it is already active. This focuses on the program text as the main interface for a running process, rather than an interactive application, where the program is design ...
is a
programming paradigm
Programming paradigms are a way to classify programming languages based on their features. Languages can be classified into multiple paradigms.
Some paradigms are concerned mainly with implications for the execution model of the language, suc ...
that makes extensive use of hot swapping, so the programming activity becomes part of the program flow itself.
Only a few
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming ...
s support hot swapping natively, including
Pike
Pike, Pikes or The Pike may refer to:
Fish
* Blue pike or blue walleye, an extinct color morph of the yellow walleye ''Sander vitreus''
* Ctenoluciidae, the "pike characins", some species of which are commonly known as pikes
* ''Esox'', genus of ...
,
Lisp
A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech.
Types
* A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
,
Erlang,
Smalltalk
Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan Ka ...
, Visual Basic 6 (Not VB.net),
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
and most recently
Elm
Elms are deciduous and semi-deciduous trees comprising the flowering plant genus ''Ulmus'' in the plant family Ulmaceae. They are distributed over most of the Northern Hemisphere, inhabiting the temperate and tropical-montane regions of North ...
and
Elixir
ELIXIR (the European life-sciences Infrastructure for biological Information) is an initiative that will allow life science laboratories across Europe to share and store their research data as part of an organised network. Its goal is to bring t ...
.
Microsoft Visual Studio
Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such a ...
supports a kind of hot swapping called Edit and Continue, which is supported by
C#,
VB.NET
Visual Basic, originally called Visual Basic .NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on .NET, Mono, and the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visua ...
and
C/
C++
C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
when running under a debugger.
Hot swapping is the central method in
live coding
Live coding, sometimes referred to as on-the-fly programming,Wang G. & Cook P. (2004"On-the-fly Programming: Using Code as an Expressive Musical Instrument" In ''Proceedings of the 2004 International Conference on New Interfaces for Musical Expr ...
, where programming is an integral part of the runtime process. In general, all programming languages used in live coding, such as
SuperCollider,
TidalCycles
TidalCycles (also known as "Tidal") is a live coding environment designed for musical improvisation and composition. In particular, it is a domain-specific language embedded in Haskell, focused on the generation and manipulation of audible or visu ...
, or
Extempore
''Ex tempore'' (Latin for "out of the moment“) is a legal term that means 'at the time'. A judge who hands down a decision in a case soon or straight after hearing it is delivering a decision ''ex tempore''. Another way a judge may deliver a de ...
support hot swapping.
Some web-based frameworks, such as
Django, support detecting module changes and reloading them on the fly. However, although the same as hotswapping for most intents and purposes, this is technically just a
cache
Cache, caching, or caché may refer to:
Places United States
* Cache, Idaho, an unincorporated community
* Cache, Illinois, an unincorporated community
* Cache, Oklahoma, a city in Comanche County
* Cache, Utah, Cache County, Utah
* Cache County ...
purge, triggered by a new file. This does not apply to markup and programming languages such as
HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
and
PHP
PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group ...
respectively, in the general case, as these files are normally re-interpreted on each use by default. There are a few
CMS
CMS may refer to:
Computing
* Call management system
* CMS-2 (programming language), used by the United States Navy
* Code Morphing Software, a technology used by Transmeta
* Collection management system for a museum collection
* Color manag ...
s and other PHP-based frameworks (such as
Drupal
Drupal () is a free and open-source web content management system (CMS) written in PHP and distributed under the GNU General Public License. Drupal provides an open-source back-end framework for at least 14% of the top 10,000 websites worldwide ...
) that employ caching, however. In these cases, similar abilities and exceptions apply.
Hot swapping also facilitates developing systems where large amounts of data are being processed, as in entire genomes in bioinformatics algorithms.
Trademarks
The term "HOT PLUG" was registered as a trademark in the United States in November 1992 to
Core International, Inc., and cancelled in May 1999.
See also
*
udev
udev (userspace ) is a device manager for the Linux kernel. As the successor of devfsd and hotplug, udev primarily manages device nodes in the directory. At the same time, udev also handles all user space events raised when hardware devices ...
References
{{DEFAULTSORT:Hot Swapping
Computer peripherals
Fault-tolerant computer systems
Live coding