Archives
 
 
 
  Special
 
 
 
  About Us
 
 
 

Newsletter
Free E-mail Newsletter from BYTE.com

 
    
           
Visit the home page Browse the four-year online archive Download platform-neutral CPU/FPU benchmarks Find information for advertisers, authors, vendors, subscribers Request free information on products written about or advertised in BYTE Submit a press release, or scan recent announcements Talk with BYTE's staff and readers about products and technologies

ArticlesPNP Docking with OS/2


April 1996 / Special Report / Dock and Play -- Almost / PNP Docking with OS/2
Barry Kasindorf

IBM provided the ThinkPad 750 series with plug-and-play (PnP) docking in the Dock II before the advent of Windows 95, so it's no surprise that you also get it with OS/2 Warp. It takes an OS/2 PnP driver, existing Advanced Power Management (APM) support, and device drivers that can handle the sudden appearance or absence of a device, but you gain some capabilities that Win 95 lacks.

OS/2 docking required a device driver to interface OS/2 to the PnP functions provided by the ThinkPad BIOS. There already was a driver (APM.SYS) to support APM BIOS functions (and thus wake up from warm docking). The PnP driver (DOCKPDD.SYS) is in IBM's Dock II support package. It allows both drivers, via the IDC system interface, and applications, via an IOCTL interface, to send and receive PnP messages and poll for PnP events.

OS/2 lacks a configuration manager, and it can't load and unload device drivers to accommodate the hardware changes involved in docking and undocking. OS/2's resource manager resolves resource conflicts only at boot-up time. To make devices absent at boot-up time able to start working after a warm dock, OS/2 emulates dock devices so that all necessary drivers load at boot-up time.

OS/2 also assigns resources such as drive letters to devices at boot-up time, whether they're attached or not--something Win 95 doesn't do well. If you boot undocked, a SCSI hard drive in the dock can't become active with docking, because it has no drive letter.

With Dock II under OS/2, if you boot while docked, the device driver for the SCSI controller in the dock checks for new devices and updates its configuration to emulate th e presence of the device the next time you boot with the unit undocked. OS/2 assigns a drive letter for the device, which is not really there.

Activation of new hardware during docking relies on APM, the battery management specification from Intel and Microsoft. OS/2 hardware drivers already had APM capability to support laptops and machines where devices power down. The OS/2 docking support relies on APM to do the actual work of activating and deactivating device drivers.

An alert program (DOCKMGR.EXE) in the Dock II support package polls the PnP BIOS for event messages. When you press the undock button on the front of the Dock II, or insert a ThinkPad into the dock, this GUI program catches the ABOUT_TO_CHANGE_CONFIG PnP message and puts up a screen that gives you the choice to continue or abort the undocking. If you choose to continue, the GUI program acknowledges the PnP docking message, and the BIOS initiates an APM suspend. Resuming causes the OS/2 device drivers to reevaluate the hardware environment and either initialize the hardware in the dock or handle missing hardware for an undock.


Barry Kasindorf is chief scientist at Communica, Inc., a system software design company in Bourne, Massachusetts. You can reach him on the Internet or BIX at bkasindorf bix.com.

Up to the Special Report section contentsGo to previous article: PNP Docking with OS/2Go to next article: OLE's Missing LinksSearchSend a comment on this articleSubscribe to BYTE or BYTE on CD-ROM  
Flexible C++
Matthew Wilson
My approach to software engineering is far more pragmatic than it is theoretical--and no language better exemplifies this than C++.

more...

BYTE Digest

BYTE Digest editors every month analyze and evaluate the best articles from Information Week, EE Times, Dr. Dobb's Journal, Network Computing, Sys Admin, and dozens of other CMP publications—bringing you critical news and information about wireless communication, computer security, software development, embedded systems, and more!

Find out more

BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE Volume 1: Programming Languages
The Best of BYTE
Volume 1: Programming Languages
In this issue of Best of BYTE, we bring together some of the leading programming language designers and implementors...

Copyright © 2005 CMP Media LLC, Privacy Policy, Your California Privacy rights, Terms of Service
Site comments: webmaster@byte.com
SDMG Web Sites: BYTE.com, C/C++ Users Journal, Dr. Dobb's Journal, MSDN Magazine, New Architect, SD Expo, SD Magazine, Sys Admin, The Perl Journal, UnixReview.com, Windows Developer Network