Field of the Invention
This invention relates to self configuring small computer systems (personal computers, workstations, etc.) with dynamically connectable and disconnectable attachments.
Related Patent Application
U.S. patent application Ser. No. 07/911564 (JA9-91-025) by N. Harada et al, filed Jul. 8, 1992, and assigned to the assignee of this application.
Background of the Invention
Contemporary personal computer systems have capabilities for automatically adapting to changes in connection status at their peripheral attachment ports. The Harada et al application, listed above under "Related Application", discloses an arrangement of this kind in which the system automatically reconfigures as device adapters are attached to and disconnected from the system. However, adapter connections in that arrangement are static in the sense that they are not changeable while the system is up and running. Thus, if the system is running an application calling for data exchange with an adapter not currently attached, the system would have to be powered off while the adapter is attached, repowered on, rebooted, and resequenced to the application state it was in before power was turned off.
From the perspective of a computer system user, the foregoing reconfiguration operation would be more efficient if it could be accomplished dynamically, while the application is being run, without turning off system power and without having to reboot the system and reinstate the application process.
Dynamic attachment and disconnection of adapters to running systems, also known as "hot plugging" and "hot unplugging", is known in the art. However, applicants are presently unaware of any teaching in the art of having the system reconfigure automatically, in response to such actions, in a manner which is essentially transparent to applications in process and substantially transparent to system users.
There is a need for providing such autoconfiguration capabilities, which the present invention seeks to fulfill.
Objects of the Invention
An object of the invention is to provide a method and associated means for conditioning a computer system to adapt automatically to actions associated with hot plugging and hot unplugging of adapters, in a manner which is substantially transparent to system users and applications undergoing processing at the time such actions occur.
Another object is to provide such method and means with facilities for coordinating the physical and electrical release of an adapter being unplugged with I/O processes directed to the same adapter, so as to prevent the removal of that adapter from interfering with any I/O processes being conducted relative to the adapter at the time removal is attempted.
A further object is to provide such method and means with capabilities for interacting with an adapter being plugged in, so that the adapter attribute information needed by the system for revising its internal configuration is directly derivable from the respective adapter.
Summary of the Invention
In accordance with the invention, these objects are realized by providing the system with a detection mechanism, that detects insertion or removal of an adapter at any connection port, coupling control means for physically and electrically completing connection between the system and adapter, and "resource manager" means for monitoring the running state of an adapter undergoing insertion or removal so as to properly coordinate operations of the coupling control means with I/O operations being conducted between the system and adapter, so that I/O operations relative to an adapter being plugged in are not started until the adapter is properly and fully connected, and connection to an adapter being unplugged is not prematurely broken while an I/O operation is under way relative to that adapter.
When an adapter is plugged into the system, the detection mechanism indicates that occurrence to the resource manager means, via an interrupt or the like, and the latter unit actuates the coupling means to secure physical connection and complete electrical connection between the system and the adapter. The securing function may include locking the adapter in place so as to prevent its physical removal. When these connections are properly secure and complete, the resource manager performs the operations required to adjust the internal configuration of the system to conform to the presence of the adapter. In accordance with the invention, these operations may include: reading adapter/device attribute information stored on the adapter, setup of associated configuration information in system registers, assignment of memory address space to the adapter, and activation of device drivers if needed; so that an application program running on the system just prior to the insertion can be immediately and automatically prepared to address and use the adapter for I/O transfers.
When a user wants to remove an adapter, he or she signals the system (e.g. via an "adapter remove" switch, or by an equivalent request signal). The "removal request" associated with that signal is transferred to the resource manager means, which then checks the running state of the adapter. If the adapter is in a running state consistent with removal, the resource manager completes the actions for disconnecting the adapter and isolating it from the system, and then signals the user that the adapter can be physically removed. If the adapter is in a running state inconsistent with removal (e.g. if an I/O transfer is being conducted between the system and the adapter), the resource manager delays completion of the removal actions until the inconsistent running state ends. When the adapter is removed, the device driver is either deactivated or conditioned to conform to the removal (so that if an I/O request is issued relative to a device that has been effectively removed, the driver is incapable of responding, and an indication that the device is unavailable will be returned to the requesting application or other program).
Accordingly, an adapter can be inserted or removed while the computer system remains fully operational. In addition, handling of adapters becomes very easy because any type of adapter is automatically incorporated in the system for the user.
These and other features, effects, advantages and benefits associated with the present invention may be more fully understood and appreciated by considering the following description and claims.
Brief Description of the Drawings
FIG. 1 is a perspective view showing the appearance of an embodiment of the invention, and its state in use.
FIG. 2 is a block diagram showing internal configuration of the embodiment.
FIG. 3 illustrates a connection area of an adapter structured in accordance with the invention.
FIG. 4 illustrates details of connection between the adapter area shown in FIG. 3 and corresponding elements in a computer system, in accordance with the invention.
FIG. 5 illustrates system software associated with the automatic system configuring operation of the invention.
FIG. 6 illustrates the form of system configuration information used in the embodiment of the preceding figures.
FIG. 7 is a flowchart illustrating the sequence of system operations evoked when an adapter is hot plugged into a system port in accordance with the invention.
FIG. 8 is a flowchart illustrating the sequence of system operations induced when a currently attached adapter is unplugged.
FIG. 9 is a perspective view of an alternate embodiment of the invention in which a portable computer is dynamically connectable to and detachable from an adapter associated with a docking station or expansion unit.
FIG. 10 is a block diagram of another alternate embodiment of the invention.
FIG. 11 is a diagram illustrating a variation of the arrangement shown in FIG. 10.
Detailed Description
FIG. 1 shows the external appearance of a typical system environment in which the invention can be applied to advantage. Portable computer 1 has connection ports/slots, not shown in this figure, through which adapters 2, typified by memory adapter 2.sub.1 and video camera adapter 2.sub.2, are attached to the computer. It is understood that these slots are general purpose, and can attach to various other adapters (e.g. communication adapters) in addition to the adapters 2.sub.1 and 2.sub.2.
FIG. 2 schematically illustrates internal elements of the computer 1 and a typical adapter 2, including elements associated with the operations of this invention.
Within the computer, central processing unit (CPU) 4, memory 5, and I/O devices 6 (one of which may be the keyboard of the computer) are attached to a system bus 7; and inter-communicate via that bus. Extension bus 8, which is connected to the system bus 7, couples to electrical connector 9, mechanical connector 10 and adapter detection device 11. An adapter removal signalling button 12, whose usage and operation are explained later, is located on the computer housing; typically near the above-mentioned slots for adapter attachment.
The adapter contains an attribute information store 13, and a not-shown logical functional block associated with the adapter operations (for example, a memory block in the case of a memory adapter). Attribute information store 13 stores adapter identity (ID) information and other information.
FIG. 3 shows a "connection area" portion 2a, of the adapter 2 in FIG. 2, which is formed to plug into a slot of computer 1. Along the end at which electrical contact is made with the computer, area 2a has signal line terminations 14, power supply line terminations 15, and adapter detection line terminations 16. When area 2a is inserted into a slot of the computer, line terminations 16 contact corresponding line terminations in the slot which extend to adapter detection device 11 (FIG. 2). This enables device 11 to detect that an adapter has been inserted into the respective slot. Upon detecting this, device 11 actuates mechanical connector 10 (FIG. 2) to drive lock mechanism 10a (FIG. 3) into a recess in adapter portion 2a, thereby physically locking the adapter into connective relation with the computer.
Power transfer line terminations 15 connect via corresponding power transfer lines in the computer to a source of power serving the computer. Signal line terminations 14 connect via corresponding lines in the computer to switches 9a (FIG. 4) which are part of electrical connector 9 (FIG. 2). Contacts in switches 9a, which are capable of electrically connecting adapter lines 14 and corresponding signal lines in computer 1, are controlled by a programmed resource manager in the computer (FIG. 5). These contacts are open when a computer slot is empty and are closed by the resource manager when an adapter is inserted into the slot.
Adapter removal button 12 (FIG. 2) is used by a computer user prior to attempting to remove an adapter from a computer slot. Operation of this button prompts the above-mentioned programmed resource manager to perform certain signalling operations (described later) relative to the adapter, interrupt signal line contacts 9a, and release lock mechanism 10a. Release of the lock mechanism frees the adapter for removal from the respective slot. Those skilled in the art appreciate that the function of button 12 can be performed by other than a dedicated button; e.g. by a special combination of keys on the computer keyboard.
It is understood that elements 9-12 as shown in FIG. 2 are duplicated for each computer slot; so that for each slot there is the equivalent of an electrical connector 9, mechanical connector 10, and button 12, and so that adapter detector 11 receives separate inputs relative to each slot from respective elements.
FIG. 5 shows the software configuration of computer 1. Device drivers 17, prepared for attached adapters 2, interface through resource manager 19 with operating system (OS) 18, and via the latter with one or more application programs 20. Resource manager 19 monitors insertion and removal of adapters 2, and manages system configuration information (FIG. 6) and (activation and deactivation of) device drivers 17. Operations of resource manager 19 will be explained later in detail with reference to FIGS. 7 and 8. Application program 20 is executed under support of operating system 18.
Next, specific operations of the resource manager in this embodiment are explained. Operations associated with adapter insertion are explained with reference to the flow diagram of FIG. 7, and operations associated with adapter removal are explained with reference to the flow diagram of FIG. 8. In each of these operations it is assumed that the computer is fully powered up and initialized, and that it is either running or immediately capable of running an application program.
Referring to FIG. 7, insertion of an adapter, into an empty slot, is detected at step S1. This action is indicated to the resource manager 19 through a means such as an interrupt. In response, resource manager 19 operates lock mechanism 10a to lock the adapter physically in the inserted position (step S2). At the same time, power is supplied to the adapter 2, and then electrical signalling connections between the adapter and computer are completed (step S3). This two-stage completion of power and signal connections suppresses generation of noise or the like, in the signal circuits of the computer, which otherwise could occur during hot plugging insertion. In this regard, it may be noted (see FIG. 3) that adapter line terminations 14, 15 and 16 are of different lengths, so that adapter insertion is detectable before power terminations engage, and power terminations engage before signal line terminations connect; whereby power transfer to the adapter can stabilize before signal conduction paths are completed.
After completion of mechanical and electrical connections, the adapter's identity ID is read out (from the adapter's attribute information, FIG. 2) and checked to determine whether or not the adapter is of a type supported for connection in this manner (steps S4 and S5). If it is so supported, further necessary adapter attribute information is read out from the adapter's attribute information store 13 (step S6).
This attribute information is used by the resource manager to set up configuration information elements tailored to the respective adapter (I/O address, memory address, interrupt level, etc., step S7), to read a device driver (or drivers) 17 from the adapter, that is/are needed for operating the respective adapter (step S8), to install such driver(s) and an appropriate work area therefor into the computer's operating system (step S9), to initialize or reset (a register in) the adapter (step S10), and to set a flag or the like in the adapter activating it for operation relative to the computer (step S11). The interrupt level established in step S7 is needed to ensure that the respective adapter does not compete inappropriately with other system resources. Upon completing the foregoing operations, the resource manager transfers control to OS 18 or an application program 20, via an interrupt or the like (step S12).
If the determination at step S5 is that the adapter is one which either is not connectable or connectable but not usable because of the system configuration (insufficient mounted memories, too small capacity of a necessary file device, or no necessary input/output device), the resource manager electrically and mechanically releases the adapter (steps S13 and S14) so that it can be physically removed by the user. If appropriate an indication is given to the user to prompt the removal.
Removal of an installed adapter is explained with reference to FIG. 8. As noted earlier, before physically removing the adapter the user operates adapter removal button 12 (FIG. 2) to signal a request for such action. This signal is transmitted to the resource manager 19 (step S21). Although, the user's removal request in this embodiment is signalled by operation of a dedicated removal button 12, it should be understood that the same function could be performed by operation of another device; e.g. a selected key combination on the computer keyboard or a button on an appropriately positioned mouse., or by a signal from an application program representing an adapter removal request. After receiving the adapter removal request, the resource manager 19 checks whether or not the adapter 2 is in use (step S22). If the adapter is in use, the manager is caused to wait until completion of use ("Yes" return in step S22).
When the adapter is no longer in use, the resource manager performs operations for adjusting the computer configuration before allowing the adapter to be removed. Incidental to such operations, if appropriate or required, the resource manager resets the adapter enabling flag (step S23) that was set during insertion step S11 (FIG. 7), and saves the register states (step 24) that were set during insertion step S10 (FIG. 7) in a permanent form (e.g. in a nonvolatile memory in the computer or on a secondary storage device such as a disk). Subsequently, the resource manager releases the associated device driver and driver work area (step S25), frees up the I/O address, memory address, interrupt level and the like which the adapter has used (Step S26), electrically isolates and mechanically releases the adapter (opens switches 9a and releases lock mechanism 10a, FIG. 3), and transfers control to the OS or application program (steps 27-29). The actions to electrically isolate and mechanically release the adapter are performed in sequence, in order to avoid generation of noise and the like on signal lines in the computer when the adapter is physically removed. Mechanical release disengages lock mechanism 10a, so the user can freely remove the adapter.
Variations of the foregoing embodiment are described next with reference to FIGS. 9-11.
In the variation of FIG. 9, portable computer 1 is attachable to an expansion unit (docking station) 21, which has connection slots for multiple adapters 2, and circuitry equivalent to elements 9-12 (FIG. 2) for linking those slots to the connection interface at which the computer attaches to unit 21. In this case, unit 21 is powered separately (typically, by DC power generated from an AC source). As before, the resource manager 19 (FIG. 5), which is a programmed element in the computer, operates to detect insertion and removal of adapters relative to slots in either the computer or the expansion unit 21, and to automatically reconfigure the system to conform to the insertion or removal condition.
FIGS. 10 and 11 show a portable computer system formed by connecting a system unit 22 with modular LCD (liquid crystal display) units 23, 24 of different sizes; e.g. for displaying images (or portions of images) with various magnifications. As suggested in FIG. 10, LCD unit 23 could have overall dimensions the same as those of the system unit and a relatively small viewing area; whereas, as shown in FIG. 11, LCD unit 24 could have larger overall dimensions and viewing area than unit 23.
Thus, LCD unit 23 might be used for presenting a "condensed" view of all or part of a page of printed matter, while LCD unit 24 could be used for presenting a magnified view of all or part of the image displayed by unit 23. In this example, the system unit and LCD unit 23 could each have letter size dimensions (e.g. 8.5 by 11 inches), and the LCD units 23 and 24 could contain differently configured LCD arrays, attribute stores, display controllers and display drivers arranged to form their respective viewing images.
Upon "hot plug" attachment to any of the display units, the resource manager in the system unit shown in these figures would reconfigure as before, using attribute information and display driver information stored by the respective display unit, and the reconfigured system would then form a displayed image having overall dimensions and printed characters sized in accordance with attributes of the respective display unit.
The display units shown in FIGS. 10 and 11 might also be arranged to included tablet functions, to which the system unit would adjust in reconfiguring.