1. Field of the Invention
The present invention relates generally to controlling printing in computers having a MICROSOFT WINDOWS®-type print architecture and, more specifically, to improving the efficiency with which the printer driver and related software elements provide print data to a printer.
2. Description of the Related Art
In a computer operating under the MICROSOFT WINDOWS operating system, an application program can initiate printing by generating a page description and transmitting it to the printer driver. The printer driver is software that operates in conjunction with the operating system and is typically provided by the printer manufacturer. The printer driver converts the page description into a printer-specific data stream.
The printer driver provides the printer-specific data to a spooler, which is part of the operating system. The printer driver typically generates print data in bands or sections, generating data for one part of the page, passing it on to the spooler, and the generating print data for the next part of the page. The printer driver continues this process until print data for the entire page has been generated. The port monitor, which is software that is also typically provided by the printer manufacturer, takes data from the spooler and delivers it to the printer attached to the computer. This combination of a printer driver, spooler and port monitor characterizes the print subsystem of WINDOWS operating systems (WINDOWS 95, WINDOWS 98, WINDOWS 2000, WINDOWS NT, WINDOWS Me, etc.).
The port monitor receives data from the spooler by invoking an application program interface (API) call or function call. The API call is of the blocking type. That is, the port monitor delivers all the data to the printer before returning control to the spooler. As a result of this blocking API call, during the time the port monitor is delivering data to the printer, printer driver operation is suspended. Printer driver operation is suspended because, although WINDOWS is a multi-tasking or multi-threading operating system, independent processes are not used in certain WINDOWS versions (e.g., WINDOWS 95, WINDOWS 98 and WINDOWS Me) to store data in the spooler and read data from the spooler. Rather, the spooler and printer driver operate in the above-mentioned alternating or sequential fashion under a single process: the printer driver generates print data and sends it to the spooler but then is idle or blocked until the port monitor has finished reading the data from the spooler and sending it on to the printer. Multi-threading is not used in this print mechanism because idiosyncrasies of certain versions of the WINDOWS operating system require that the printer driver be implemented in 16-bit code, and the 16-bit components of WINDOWS are not multi-threaded. Therefore, the printer driver is blocked while sending data.
It would be desirable to improve print performance and efficiency in a WINDOWS-type print architecture by minimizing the amount of time that elements of the print architecture are idle. It would further be desirable to do so without altering the WINDOWS operating system itself. The present invention addresses these problems and deficiencies and others in the manner described below.
The present invention relates to a print subsystem architecture in which a port monitor buffers data received from a spooler and asynchronously reads the buffered print data and transmits it to a printer.
When an application program initiates a print job, the port monitor receives print data from the spooler via a series of application program interface (API) calls. A portion of the print data is provided with each API call until all print data associated with the print job has been passed to the port monitor. A process launched when the print job is begun reads the print data stored in the buffer in a first-in-first-out manner and transmits it to the printer.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
The accompanying drawings illustrate one or more embodiments of the invention and, together with the written description, serve to explain the principles of the invention. Wherever possible, the same reference numbers are used throughout the drawings to refer to the same or like elements of an embodiment, and wherein:
As illustrated in
With reference to
The computer system can include any suitable personal computer or other computer operating under WINDOWS operating system 24 or an operating system having a print subsystem architecture similar to that of WINDOWS. In this regard, the computer can include a processing unit 26 with which printer 16 is compatible, as well as conventional computer elements such as a mouse 28, keyboard 30 and display 32. Processing unit 26 includes hardware and software elements of the types generally included in conventional personal computers, such as a processor 34 or central processing unit (which includes any supporting hardware, firmware or other logic), a disk storage device 36 such as a hard disk drive, input/output interfaces 38, a network interface 40, and a removable read/write storage device 42 such as a drive that uses a CD-ROM or a floppy disk 44. The software elements of the programmed computer, such as application program 20, operating system 24, printer driver 18 and port monitor 10, are shown for purposes of clarity and illustration as executable in a main memory 46, but as persons skilled in the art understand they may not in actuality reside simultaneously or in their entireties in memory 46. Rather, they can be stored on disk storage device 36 and portions of them retrieved into main memory 46 on an as-needed basis under control of operating system 24. Furthermore, it should be understood that the computer has other hardware and software elements of the types conventionally included in personal computers but are not shown in
The API through which spooler 22 interfaces with port monitor 10 can involve the following three major API calls: StartDoc( ), WritePort( ) and EndDoc( ), as conceptually illustrated in
struct_MWOBuffer {
}
Note that the data structures defining buffer 12 are doubly-linked lists named “MWOBuffer” and that, as such, there is no inherent limit upon storage space in it. Rather, the size of memory 46 and its utilization by other software elements is the limiting factor. Nevertheless, a limit can be imposed. For example, a 300 kilobyte (kB) limit was used in one embodiment of the invention because the printer driver did not generate a swath or band of print data that exceeded this size. One swath can therefore be buffered, and while printer driver 18 is generating the next swath, buffer 12 can be emptied via the MWOWrite( ) process described below. Also, the data structure is global in scope so that the StartDoc( ), WritePort( ), MWOWrite( ) and EndDoc( ) processes, described below, can all access it.
As will be further understood, port monitor 10 performs operations in addition to those described in this patent specification of the type that are performed by conventional port monitors. Such conventional operations are familiar to persons skilled in the art and are not described herein for purposes of clarity.
As illustrated in
As illustrated in
As illustrated in
As illustrated in
As illustrated in
It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the scope or spirit of the invention. Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. For example, although the above-described embodiment relates to WINDOWS operating systems, those skilled in the art will, in view of the teachings set forth above, be able to make and use embodiments of the invention for other operating systems that have printing mechanisms similar to that of WINDOWS. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
Number | Name | Date | Kind |
---|---|---|---|
5371888 | Lehnertz et al. | Dec 1994 | A |
5425135 | Motoyama et al. | Jun 1995 | A |
5511152 | Lai et al. | Apr 1996 | A |
5539917 | Jirgal | Jul 1996 | A |
5557707 | Inoue et al. | Sep 1996 | A |
5566306 | Ishida | Oct 1996 | A |
5596426 | Ueno et al. | Jan 1997 | A |
5602974 | Shaw et al. | Feb 1997 | A |
5623688 | Ikeda et al. | Apr 1997 | A |
5629781 | Ueno et al. | May 1997 | A |
5630029 | Kosukegawa | May 1997 | A |
5640495 | Colbert et al. | Jun 1997 | A |
5721922 | Dingwall | Feb 1998 | A |
5732198 | Deppa et al. | Mar 1998 | A |
5732269 | Compton et al. | Mar 1998 | A |
5752081 | Jirgal | May 1998 | A |
5764869 | Bagley et al. | Jun 1998 | A |
5768487 | LeClair et al. | Jun 1998 | A |
5784177 | Sanchez et al. | Jul 1998 | A |
5799206 | Kitagawa et al. | Aug 1998 | A |
5809255 | Amada et al. | Sep 1998 | A |
5819112 | Kusters | Oct 1998 | A |
5825991 | Plakosh et al. | Oct 1998 | A |
5835788 | Blumer et al. | Nov 1998 | A |
5838888 | Oda | Nov 1998 | A |
5842044 | No | Nov 1998 | A |
5845058 | Shaw et al. | Dec 1998 | A |
5864652 | Murahashi | Jan 1999 | A |
5867633 | Taylor, III et al. | Feb 1999 | A |
5872640 | Cohen et al. | Feb 1999 | A |
5881213 | Shaw et al. | Mar 1999 | A |
5892976 | Jirgal | Apr 1999 | A |
5914737 | Silverbrook | Jun 1999 | A |
5915127 | Ogawa et al. | Jun 1999 | A |
5930464 | Nakayama et al. | Jul 1999 | A |
5953501 | Hattori | Sep 1999 | A |
5960168 | Shaw et al. | Sep 1999 | A |
5974477 | Kobayashi | Oct 1999 | A |
5982996 | Snyders | Nov 1999 | A |
6003069 | Cavill | Dec 1999 | A |
6038033 | Bender et al. | Mar 2000 | A |
6097499 | Casey et al. | Aug 2000 | A |
6147765 | Yoneda | Nov 2000 | A |
6311237 | Suzuki et al. | Oct 2001 | B1 |
6337746 | Coyle et al. | Jan 2002 | B1 |
6392758 | Hines | May 2002 | B2 |
6433882 | Mori et al. | Aug 2002 | B1 |
6474881 | Wanda | Nov 2002 | B1 |
6549947 | Suzuki | Apr 2003 | B1 |
6580966 | Shimada | Jun 2003 | B2 |
6618157 | Coyle et al. | Sep 2003 | B2 |
6665587 | Leone et al. | Dec 2003 | B2 |
6697898 | Shishizuka et al. | Feb 2004 | B1 |
6745265 | Sindalovsky | Jun 2004 | B1 |
6775020 | Fukunaga et al. | Aug 2004 | B2 |
6785015 | Smith et al. | Aug 2004 | B1 |
6809833 | Blair et al. | Oct 2004 | B1 |
6839347 | Ishida et al. | Jan 2005 | B1 |
6856412 | Kaneko | Feb 2005 | B1 |