JP2009241485A - Printing device - Google Patents

Printing device Download PDF

Info

Publication number
JP2009241485A
JP2009241485A JP2008092517A JP2008092517A JP2009241485A JP 2009241485 A JP2009241485 A JP 2009241485A JP 2008092517 A JP2008092517 A JP 2008092517A JP 2008092517 A JP2008092517 A JP 2008092517A JP 2009241485 A JP2009241485 A JP 2009241485A
Authority
JP
Japan
Prior art keywords
image forming
thread
pdl
command
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008092517A
Other languages
Japanese (ja)
Other versions
JP5141338B2 (en
Inventor
Mitsuyoshi Sasakura
三好 笹倉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Casio Electronics Co Ltd
Original Assignee
Casio Computer Co Ltd
Casio Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd, Casio Electronics Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2008092517A priority Critical patent/JP5141338B2/en
Publication of JP2009241485A publication Critical patent/JP2009241485A/en
Application granted granted Critical
Publication of JP5141338B2 publication Critical patent/JP5141338B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Record Information Processing For Printing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a printing device capable of executing image forming processing at high speed by reducing interruption to the image forming processing relating to a processing technology of printing data of the printing device having a multicore CPU. <P>SOLUTION: The multicore CPU having a plurality of cores is used in the printer device 3 (PPR) and furthermore, an image forming thread 1 (0532) and an image forming thread 2 (0534) are activated at high priority compared to other threads for executing the image forming processing. Consequently, the interruption to the image forming thread 1 (0532) and the image forming thread 2 (0534) is reduced, thereby acceleration in the speed of the image forming processing can be achieved, and the printing device for executing the image forming processing at high speed can be provided. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、プリンタ装置等の印刷データの処理技術に関し、特にマルチコアCPUを有するプリンタ装置等の印刷データの処理技術に関する。   The present invention relates to print data processing technology for a printer device, and more particularly to print data processing technology for a printer device having a multi-core CPU.

一般に、プリンタ装置等の印刷装置は、クライアントPCなどのホスト機器から印刷データの供給を受け、印刷処理を行っている。今日の印刷装置は、LAN(local area network)等を介した複数のホスト機器と接続されることも珍しくなく、さらに印刷データの高解像度・高精細化も進んでいるため、大量のデータを高速に印刷する機能が求められている。   Generally, a printing apparatus such as a printer apparatus receives print data from a host device such as a client PC and performs print processing. It is not uncommon for today's printing devices to be connected to multiple host devices via a local area network (LAN), etc. Furthermore, high resolution and high definition printing data are also progressing, so large amounts of data can be transferred at high speed. There is a need for the ability to print on

以下、従来の一般的な印刷装置の構成と印刷処理の流れについて、図28から図30を用いて従来例として説明する。
図28は、ホスト機器である、例えばクライアントPC1がLAN2を介して印刷装置3(PPR)と接続される構成を例示したブロック図である。印刷装置3(PPR)は、CPU4、RAM5、ROM6、LAN回路7、PPRエンジン8等で構成される。
Hereinafter, a configuration of a conventional general printing apparatus and a flow of printing processing will be described as a conventional example with reference to FIGS.
FIG. 28 is a block diagram illustrating a configuration in which, for example, a client PC 1 that is a host device is connected to the printing apparatus 3 (PPR) via the LAN 2. The printing apparatus 3 (PPR) includes a CPU 4, a RAM 5, a ROM 6, a LAN circuit 7, a PPR engine 8, and the like.

図29は、図28で例示した環境の機能的構成を具体的に説明する図である。クライアントPC1は、アプリケーションプログラム0210(APL)、プリンタドライバ0212(Printer Driver)、スプーラ0214で構成され、さらにプリンタドライバ0212(Printer Driver)は、PDL変換部0213を含んでいる。   FIG. 29 is a diagram for specifically explaining the functional configuration of the environment illustrated in FIG. The client PC 1 includes an application program 0210 (APL), a printer driver 0212 (Printer Driver), and a spooler 0214. The printer driver 0212 (Printer Driver) further includes a PDL conversion unit 0213.

一方、印刷装置3(PPR)は、中間PDL変換部0232および画像データ形成部0234、受信バッファ0240、PDLバッファ0241、複数の画像データメモリ0242(画像データメモリ0243、画像データメモリ0244、・・・)、印刷行列0246、PPRエンジン8等から構成され、受信制御スレッド0230、画像形成スレッド0231、印刷行列制御スレッド0235、PPRエンジン制御スレッド0236の4つのスレッドが起動し処理を行う。   On the other hand, the printing apparatus 3 (PPR) includes an intermediate PDL conversion unit 0232 and an image data formation unit 0234, a reception buffer 0240, a PDL buffer 0241, a plurality of image data memories 0242 (an image data memory 0243, an image data memory 0244,... ), A print matrix 0246, a PPR engine 8, and the like, and four threads of a reception control thread 0230, an image forming thread 0231, a print matrix control thread 0235, and a PPR engine control thread 0236 are activated and perform processing.

クライアントPC1では、ワープロソフトや表計算ソフト等のアプリケーションプログラム0210(APL)によって作成された文書ファイル0211は、PDL変換部0213に供給され、PDL変換部0213によってPDL(Page Description Language)と呼ばれるプリンタ制御言語で記述されたPDLデータに変換される。このPDLデータには、例えば線や円の作成、文字の作成等を指示する各種のPDLコマンドが含まれている。PDLデータはスプーラ0214へ出力され、スプーラ0214からLAN2を介して印刷装置3(PPR)に送信される。   In the client PC 1, a document file 0211 created by an application program 0210 (APL) such as word processing software or spreadsheet software is supplied to the PDL conversion unit 0213, and printer control called PDL (Page Description Language) is performed by the PDL conversion unit 0213. It is converted into PDL data described in a language. The PDL data includes various PDL commands for instructing creation of lines and circles, creation of characters, and the like. The PDL data is output to the spooler 0214 and transmitted from the spooler 0214 to the printing apparatus 3 (PPR) via the LAN 2.

印刷装置3(PPR)では、まず、受信制御スレッド0230がPDLデータを受信し、受信バッファ0240へ格納する。画像形成スレッド0231は、中間PDL変換部0232で受信バッファ0240からPDLデータを順次取り出してPDLデータを中間PDLデータに変換しPDLバッファ0241へ格納する。なお、中間PDLデータには、PDLデータと同様に例えば線や円の作成、文字の作成等を指示する各種のコマンドである中間PDLコマンドが含まれている。   In the printing apparatus 3 (PPR), first, the reception control thread 0230 receives the PDL data and stores it in the reception buffer 0240. The image forming thread 0231 sequentially extracts PDL data from the reception buffer 0240 by the intermediate PDL conversion unit 0232, converts the PDL data into intermediate PDL data, and stores the PDL data in the PDL buffer 0241. The intermediate PDL data includes, for example, intermediate PDL commands that are various commands for instructing creation of lines and circles, creation of characters, and the like, similar to PDL data.

画像データ形成部0234は、PDLバッファ0241に格納された中間PDLデータを読み出して中間PDLコマンドを実行し、例えばビットマップ形式の画像データを形成し、画像データメモリ0242に記憶する。画像形成スレッド0231は、1頁分の画像データが形成される毎に、印刷行列制御スレッド0235に印刷要求を出す。これを受けて、印刷行列制御スレッド0235は、印刷行列要素を生成し印刷要求を印刷行列0246にキューイングする。PPRエンジン制御スレッド0236は、印刷行列0246にキューイングされている印刷要求を順次取り出し、印刷要求に該当する画像データをPPRエンジン8へ転送する。   The image data forming unit 0234 reads the intermediate PDL data stored in the PDL buffer 0241 and executes the intermediate PDL command, forms image data in a bitmap format, for example, and stores it in the image data memory 0242. The image forming thread 0231 issues a print request to the print matrix control thread 0235 every time image data for one page is formed. In response to this, the print matrix control thread 0235 generates a print matrix element and queues a print request in the print matrix 0246. The PPR engine control thread 0236 sequentially takes out the print requests queued in the print matrix 0246 and transfers the image data corresponding to the print request to the PPR engine 8.

図30は、中間転写体として転写ベルト83を用いたタンデム方式の印刷装置3(PPR)の内部構成を例示した図である。同図を用いてPPRエンジン8へ転送された画像データが印刷される流れについて説明する。PPRエンジン8は画像データを受信すると、感光ドラム82上に画像データを描き(露光工程)、各色のトナー81を画像データに合わせて付着させる(現像工程)。感光ドラム82に付着した各色のトナー81は、一旦転写ベルト83上に転写された後、2次転写ロール84によって給紙装置87から取り出された用紙に再転写される(転写工程)。用紙に転写されたトナー81は、定着ロール85で熱と圧力をかけることで定着され(定着工程)、排紙トレイ88から出力される。   FIG. 30 is a diagram illustrating the internal configuration of a tandem printing apparatus 3 (PPR) using a transfer belt 83 as an intermediate transfer member. A flow of printing the image data transferred to the PPR engine 8 will be described with reference to FIG. When receiving the image data, the PPR engine 8 draws the image data on the photosensitive drum 82 (exposure process), and attaches the toner 81 of each color according to the image data (development process). The toner 81 of each color adhering to the photosensitive drum 82 is once transferred onto the transfer belt 83 and then retransferred to the paper taken out from the paper supply device 87 by the secondary transfer roll 84 (transfer process). The toner 81 transferred to the paper is fixed by applying heat and pressure by the fixing roll 85 (fixing step), and is output from the paper discharge tray 88.

以上が一般的な印刷装置の構成と印刷処理の流れである。図29で例示したように、印刷装置3(PPR)内の処理をマルチスレッド化して実行することにより、印刷速度の高速化を図る方法は一般的に利用されている。   The above is the configuration of a general printing apparatus and the flow of printing processing. As illustrated in FIG. 29, a method for increasing the printing speed by executing the processing in the printing apparatus 3 (PPR) in a multi-thread manner is generally used.

ところで、印刷処理で最も時間の時間のかかる処理は画像形成処理であり、この傾向は一般に印刷する画像データが大きくなるほど顕著となる。しかし、図29では、受信制御やPPRエンジン制御などの各I/O処理(物理処理)と、画像形成処理(論理処理)を別スレッドにより並列処理しているのみで、画像形成処理自体は単一のスレッドで処理されている。このため、画像形成処理がボトルネックとなり、印刷処理の高速化を妨げる要因となっている。   By the way, the most time-consuming process in the printing process is the image forming process, and this tendency becomes more noticeable as the image data to be printed becomes larger. However, in FIG. 29, each I / O process (physical process) such as reception control and PPR engine control and the image formation process (logical process) are processed in parallel by separate threads, and the image formation process itself is simple. It is processed by one thread. For this reason, the image forming process becomes a bottleneck, which hinders the speeding up of the printing process.

このような問題を踏まえ、特許文献1及び特許文献2では、複数のプロセッサを用いて画像形成処理を並列化する方法が提案されている。特許文献1の発明は、頁毎に異なるプロセッサが割り当てられ、それぞれのプロセッサが描画処理を並列に行う印刷制御方法である。特許文献2の発明は、画像形成処理に利用できるプロセッサ数を問い合わせて、複数のプロセッサが利用できる場合には、順次実施される各種の画像処理を複数のプロセッサが分担して行う画像処理方法である。いずれも、画像形成処理を並列化することにより処理の高速化を図っている。
特開平05−201077号公報 特開2000−293674号公報
In view of such a problem, Patent Document 1 and Patent Document 2 propose a method of parallelizing image forming processing using a plurality of processors. The invention of Patent Document 1 is a printing control method in which different processors are assigned to each page, and each processor performs drawing processing in parallel. The invention of Patent Document 2 is an image processing method in which the number of processors that can be used for image forming processing is inquired, and when a plurality of processors can be used, various types of image processing that are sequentially performed are shared by the plurality of processors. is there. In either case, the image forming process is parallelized to speed up the process.
Japanese Patent Laid-Open No. 05-201077 JP 2000-293694 A

上記特許文献1の発明は、複数のプロセッサを使用するが、基本的には線や円を作成し、文字の生成等を行なうPDLデータを1頁分受け取り、PDLデータを解析しながら一時蓄積する(空描画)。1頁分のPDLデータが揃ってから画像形成タスクを生成しプロセッサを割り当て、一時蓄積したPDLデータを再度解析・実行して画像形成を行なう(実描画)。それと並行して次の頁のPDLデータを受け取り解析しながら一時蓄積し、次の頁のPDLデータが揃うとまた新たに画像形成タスクを生成し同じように画像形成していく。印刷データを頁単位にプロセッサを割り当て、並列処理を行う制御方法である。したがって、プリンタエンジンが高速になればなるほど、多くのプロセッサを必要とし、非常に高価なものになってしまう。また、空描画の為に受け取ったPDLデータを一度解析する必要があり、効率も良くない。   The invention of Patent Document 1 uses a plurality of processors. Basically, it generates a line or a circle, receives one page of PDL data for generating characters, etc., and temporarily stores it while analyzing the PDL data. (Empty drawing). After one page of PDL data is prepared, an image forming task is generated, a processor is assigned, and the temporarily stored PDL data is analyzed and executed again to form an image (actual drawing). At the same time, PDL data of the next page is received and temporarily stored while being analyzed. When the PDL data of the next page is ready, a new image forming task is generated and an image is similarly formed. This is a control method in which processors are assigned to print data in units of pages and parallel processing is performed. Therefore, the faster the printer engine, the more processors are required and the more expensive it becomes. Moreover, it is necessary to analyze the PDL data received for empty drawing once, which is not efficient.

また、この空描画の為に1つのタスクが必要でありプロセッサも1つ必要である。プロセッサが少ない場合、同時並行して画像形成できる頁数は非常に少ないものとなり、印刷処理の高速化には限界がある。更に、頁単位の処理であるため各種描画コマンドを順次処理して画像を生成していくストリーム型の印刷データの場合、大幅な高速化は期待できない。   Also, one task is required for this empty drawing, and one processor is also required. When the number of processors is small, the number of pages on which images can be simultaneously formed becomes very small, and there is a limit to speeding up the printing process. Furthermore, since it is a page unit process, in the case of stream type print data in which various drawing commands are sequentially processed to generate an image, a significant increase in speed cannot be expected.

上記特許文献2の発明は、画像処理に利用可能なプロセッサ数を問い合わせ、予め決められた順番に実行される複数の画像処理(ラスタライズ、色補正、ハーフトニング)を、画像処理に利用可能なプロセッサ数に応じて、各プロセッサに分担させる方法である。従って、分担する複数の画像処理には、順次実行による制約が存在する。   The invention of Patent Document 2 inquires about the number of processors that can be used for image processing, and can use a plurality of image processing (rasterization, color correction, halftoning) executed in a predetermined order for image processing. In this method, each processor is assigned according to the number. Accordingly, there is a restriction due to sequential execution in a plurality of shared image processing.

また、いずれの発明においても割込み処理の影響については考慮されていないため、割り込みによる処理の中断や中断に伴うレジスタへの退避/復帰等に要するオーバヘッドの影響を大きく受けてしまう課題がある。   In any of the inventions, the influence of interrupt processing is not taken into consideration, and therefore there is a problem that it is greatly affected by overhead required for processing interruption due to interruption, saving / restoring to a register accompanying interruption, and the like.

以上、上記の課題を鑑みて、本発明の目的は、画像形成処理への割り込みを減少させることにより画像形成処理を高速に行う印刷装置を提供することにある。
なお、本発明では、印刷装置のCPUとして、近年開発が進み、すでに数多く製品化されコストも廉価となってきているデュアルコアCPUやクアッドコアCPUなどのマルチコアCPUの利用を前提とする。
In view of the above problems, an object of the present invention is to provide a printing apparatus that performs image formation processing at high speed by reducing interruptions to the image formation processing.
The present invention is premised on the use of a multi-core CPU such as a dual-core CPU or a quad-core CPU, which has been developed in recent years and has already been commercialized and the cost has been reduced.

本発明の第1の態様は、印刷データをPDLコマンドに変換し、前記PDLコマンドから画像データを形成する画像データ形成手段と、前記PDLコマンドを記憶するコマンド記憶部と、複数のコアを有するCPUと、前記コアの割り当てを制御するシステム制御手段とを含み、前記システム制御手段は、前記画像データ形成手段を実現する画像形成スレッドに優先的に前記コアを割り当てる印刷装置を提供する。   According to a first aspect of the present invention, a CPU having a plurality of cores, an image data forming unit that converts print data into a PDL command and forms image data from the PDL command, a command storage unit that stores the PDL command, And a system control unit for controlling the allocation of the core, wherein the system control unit provides a printing apparatus that preferentially allocates the core to an image forming thread that realizes the image data forming unit.

本発明の第2の態様は、前記第1の態様に記載の印刷装置において、前記画像データ形成手段は、前記印刷データを前記PDLコマンドに変換する第1の画像データ形成手段と、前記PDLコマンドから前記画像データを形成する第2の画像データ形成手段とを含み、前記画像形成スレッドは、複数起動する場合には、前記第1の画像データ形成手段を実現する第1の画像形成スレッドと、前記第2の画像データ形成手段を実現する第2の画像形成スレッドとを含み、前記第1の画像形成スレッドと前記第2の画像形成スレッドは、互いに並列に動作可能な異なるスレッドである印刷装置を提供する。   According to a second aspect of the present invention, in the printing apparatus according to the first aspect, the image data forming unit includes a first image data forming unit that converts the print data into the PDL command, and the PDL command. Second image data forming means for forming the image data from the first image forming thread for realizing the first image data forming means when a plurality of image forming threads are activated, and A printing apparatus including a second image forming thread for realizing the second image data forming unit, wherein the first image forming thread and the second image forming thread are different threads operable in parallel with each other; I will provide a.

本発明の第3の態様は、前記第2の態様に記載の印刷装置において、前記コマンド記憶部は、第1のコマンド記憶部と、第2のコマンド記憶部とを含み、前記画像形成スレッドが複数起動する場合には、前記第1の画像形成スレッドが前記PDLコマンドを前記第1のコマンド記憶部へ出力する期間、前記第2の画像形成スレッドは前記PDLコマンドを前記第2のコマンド記憶部から取得し、前記第1の画像形成スレッドが前記PDLコマンドを前記第2のコマンド記憶部へ出力する期間、前記第2の画像形成スレッドは前記PDLコマンドを前記第1のコマンド記憶部から取得する印刷装置を提供する。   According to a third aspect of the present invention, in the printing apparatus according to the second aspect, the command storage unit includes a first command storage unit and a second command storage unit, and the image forming thread is When a plurality of activations are performed, the second image forming thread outputs the PDL command to the second command storage unit during a period in which the first image forming thread outputs the PDL command to the first command storage unit. The second image forming thread acquires the PDL command from the first command storage unit during a period in which the first image forming thread outputs the PDL command to the second command storage unit. A printing device is provided.

本発明の第4の態様は、前記第3の態様に記載の印刷装置において、前記画像形成スレッドが複数起動する場合には、前記第1の画像形成スレッドは、前記第2の画像形成スレッドへ処理を要求する毎に、前記第1のコマンド記憶部と前記第2のコマンド記憶部を交互に切り替えて利用する印刷装置を提供する。   According to a fourth aspect of the present invention, in the printing apparatus according to the third aspect, when a plurality of the image forming threads are activated, the first image forming thread is transferred to the second image forming thread. Provided is a printing apparatus that switches between and uses the first command storage unit and the second command storage unit each time processing is requested.

本発明の第5の態様は、前記第1の態様乃至第4の態様のいずれか1つに記載の印刷装置において、前記画像形成スレッドの数は、前記CPUが有するコアの数に応じて決定する印刷装置を提供する。   According to a fifth aspect of the present invention, in the printing apparatus according to any one of the first to fourth aspects, the number of the image forming threads is determined according to the number of cores included in the CPU. A printing apparatus is provided.

本発明の第6の態様は、前記第1の態様乃至第4の態様のいずれか1つに記載の印刷装置において、前記画像形成スレッドの数は、前記印刷装置が処理に利用するメモリの記憶容量に応じて決定する印刷装置を提供する。   According to a sixth aspect of the present invention, in the printing apparatus according to any one of the first to fourth aspects, the number of the image forming threads is stored in a memory used for processing by the printing apparatus. Provided is a printing apparatus that determines according to capacity.

本発明の第7の態様は、前記第1の態様乃至第4の態様のいずれか1つに記載の印刷装置において、前記画像形成スレッドの数は、前記画像データの解像度及び階調数に応じて決定する印刷装置を提供する。   According to a seventh aspect of the present invention, in the printing apparatus according to any one of the first to fourth aspects, the number of the image forming threads depends on the resolution and the number of gradations of the image data. To provide a printing apparatus to be determined.

本発明の第8の態様は、前記第1の態様乃至第4の態様のいずれか1つに記載の印刷装置において、前記画像形成スレッドの数は、前記画像データを印刷する用紙サイズに応じて決定する印刷装置を提供する。   According to an eighth aspect of the present invention, in the printing apparatus according to any one of the first to fourth aspects, the number of the image forming threads depends on a paper size on which the image data is printed. A printing apparatus for determining is provided.

本発明の第9の態様は、前記第1の態様乃至第4の態様のいずれか1つに記載の印刷装置において、更に、前記画像形成スレッドの各々の1頁当りの処理時間を計測する計測手段と、前記処理時間を元に算出される平均処理時間を記録する記憶手段とを含む印刷装置を提供する。   According to a ninth aspect of the present invention, in the printing apparatus according to any one of the first to fourth aspects, measurement is further performed to measure a processing time per page of each of the image forming threads. There is provided a printing apparatus including means and storage means for recording an average processing time calculated based on the processing time.

本発明の第10の態様は、前記第9の態様に記載の印刷装置において、前記記録手段は、前記平均処理時間を前記画像形成スレッドの数毎に記録し、前記画像形成スレッドの数は、前記平均処理時間が最も短い数に決定する印刷装置を提供する。   According to a tenth aspect of the present invention, in the printing apparatus according to the ninth aspect, the recording unit records the average processing time for each number of the image forming threads, and the number of the image forming threads is: Provided is a printing apparatus that determines the average processing time to the shortest number.

本発明の第11の態様は、前記第9の態様に記載の印刷装置において、前記記録手段は、前記平均処理時間を用紙サイズ毎且つ前記画像形成スレッドの数毎に記録し、前記画像形成スレッドの数は、前記平均処理時間が最も短い数に決定する印刷装置を提供する。   An eleventh aspect of the present invention is the printing apparatus according to the ninth aspect, wherein the recording unit records the average processing time for each sheet size and for each number of the image forming threads. The printing apparatus determines the average processing time to be the shortest number.

本発明によれば、画像形成処理を高速化する印刷装置を提供することができる。   According to the present invention, it is possible to provide a printing apparatus that speeds up image forming processing.

以下、本発明の実施の形態について図面を参照しながら説明する。
(実施形態1)
図2は、本実施形態に使用する印刷装置3の構成例を示す図である。印刷装置3(PPR)は、ホスト機器であるクライアントPC1とLAN2を介して接続されている。印刷装置3(PPR)はCPU9、RAM5、ROM6、LAN回路7、及びPPRエンジン8等で構成されている。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(Embodiment 1)
FIG. 2 is a diagram illustrating a configuration example of the printing apparatus 3 used in the present embodiment. A printing apparatus 3 (PPR) is connected to a client PC 1 that is a host device via a LAN 2. The printing apparatus 3 (PPR) includes a CPU 9, a RAM 5, a ROM 6, a LAN circuit 7, a PPR engine 8, and the like.

CPU9は内部に4個のコア9a〜9dを有する。コア9a〜9dは、それぞれ独立したCPU時間を有し、PDLコマンドの生成や画像形成などの各種処理を行うことができ、後述するスレッドを実行する処理手段である。尚、RAM5は上記コア9a〜9dによる印刷データ処理の際、ワークエリアとしても使用される。ROM6は印刷装置3(PPR)のシステム制御プログラムや、後述する印刷データの処理プログラムを記憶する。また、LAN回路7はクライアントPC1によって作成された印刷データを受信し、PPRエンジン8は、CPU9の指示に従って印刷装置3(PPR)内で処理された画像データを印刷する。   The CPU 9 has four cores 9a to 9d inside. Each of the cores 9a to 9d is a processing unit that has independent CPU time, can perform various processes such as generation of a PDL command and image formation, and executes a thread described later. The RAM 5 is also used as a work area during print data processing by the cores 9a to 9d. The ROM 6 stores a system control program for the printing apparatus 3 (PPR) and a print data processing program to be described later. The LAN circuit 7 receives print data created by the client PC 1, and the PPR engine 8 prints image data processed in the printing apparatus 3 (PPR) according to an instruction from the CPU 9.

図1は、本実施形態のクライアントPC1及び印刷装置3(PPR)の機能的構成を具体的に説明する図である。クライアントPC1は文書ファイル0211の作成及び編集を行うアプリケーションプログラム0210(APL)、PDL変換部0213を含むプリンタドライバ0212(Printer Driver)、スプーラ0214で構成されている。   FIG. 1 is a diagram for specifically explaining the functional configuration of the client PC 1 and the printing apparatus 3 (PPR) according to the present embodiment. The client PC 1 includes an application program 0210 (APL) for creating and editing a document file 0211, a printer driver 0212 (Printer Driver) including a PDL conversion unit 0213, and a spooler 0214.

印刷装置3(PPR)は、中間PDL変換部0232、画像データ形成部0234、受信バッファ0240、2つのPDLバッファ0247(第1のPDLバッファ0248、第2のPDLバッファ0249)、複数の画像データメモリ0242(画像データメモリ0243、画像データメモリ0244、・・・)、印刷行列0246、PPRエンジン8等から構成され、受信制御スレッド0230、画像形成スレッド1(0532)、画像形成スレッド2(0534)、印刷行列制御スレッド0235、PPRエンジン制御スレッド0236の5つのスレッドが起動し処理を行う。CPUコアの割り当ては、システム制御プログラムのカーネル部がレディ状態のタスクまたはスレッドに対し、スレッド等のプライオリティを考慮して行う。なお、本実施形態では、マルチCPUの能力を有効に活用するため、対称型マルチプロセッシング(Symmetric Multi Processing、以降SMPと称する)を利用することが望ましい。なお、以降では、画像形成スレッド1(0532)及び画像形成スレッド2(0534)を画像形成スレッドと称し、受信制御スレッド0230、印刷行列制御スレッド0235及びPPRエンジン制御スレッド0236をI/O制御スレッドと称する。   The printing apparatus 3 (PPR) includes an intermediate PDL conversion unit 0232, an image data formation unit 0234, a reception buffer 0240, two PDL buffers 0247 (a first PDL buffer 0248 and a second PDL buffer 0249), and a plurality of image data memories. 0242 (image data memory 0243, image data memory 0244,...), Print matrix 0246, PPR engine 8 and the like, including reception control thread 0230, image forming thread 1 (0532), image forming thread 2 (0534), Five threads, a print matrix control thread 0235 and a PPR engine control thread 0236, are activated and perform processing. The CPU core is assigned in consideration of the priority of the thread or the like with respect to the task or thread in which the kernel part of the system control program is ready. In the present embodiment, it is desirable to use symmetric multiprocessing (hereinafter referred to as SMP) in order to effectively utilize the multi-CPU capability. Hereinafter, the image forming thread 1 (0532) and the image forming thread 2 (0534) are referred to as image forming threads, and the reception control thread 0230, the print matrix control thread 0235, and the PPR engine control thread 0236 are referred to as I / O control threads. Called.

クライアントPC1では、ワープロソフトや表計算ソフト等のアプリケーションプログラム0210(APL)によって作成された文書ファイル0211は、PDL変換部0213に供給され、PDL変換部0213によってPDL(Page Description Language)と呼ばれるプリンタ制御言語で記述されたPDLデータに変換される。このPDLデータには、例えば線や円の作成、文字の作成等を指示する各種のPDLコマンドが含まれている。PDLデータはスプーラ0214へ出力され、スプーラ0214からLAN2を介して印刷装置3(PPR)に送信される。   In the client PC 1, a document file 0211 created by an application program 0210 (APL) such as word processing software or spreadsheet software is supplied to the PDL conversion unit 0213, and printer control called PDL (Page Description Language) is performed by the PDL conversion unit 0213. It is converted into PDL data described in a language. The PDL data includes various PDL commands for instructing creation of lines and circles, creation of characters, and the like. The PDL data is output to the spooler 0214 and transmitted from the spooler 0214 to the printing apparatus 3 (PPR) via the LAN 2.

印刷装置3(PPR)では、まず、受信制御スレッド0230がPDLデータを受信し、受信バッファ0240へ格納する。画像形成スレッド1(0532)は、中間PDL変換部0232で受信バッファ0240からPDLデータを順次取り出してPDLデータを中間PDLデータに変換しPDLバッファ0247へ格納する。なお、中間PDLデータには、PDLデータと同様に例えば線や円の作成、文字の作成等を指示する各種のコマンドである中間PDLコマンドが含まれている。また、PDLバッファ0247は、中間PDL変換部0232によって変換された中間PDLコマンドを格納するダブルバッファであり、第1のPDLバッファ0248、第2のPDLバッファ0249で構成される。   In the printing apparatus 3 (PPR), first, the reception control thread 0230 receives the PDL data and stores it in the reception buffer 0240. In the image forming thread 1 (0532), the intermediate PDL conversion unit 0232 sequentially extracts the PDL data from the reception buffer 0240, converts the PDL data into intermediate PDL data, and stores the PDL data in the PDL buffer 0247. The intermediate PDL data includes, for example, intermediate PDL commands that are various commands for instructing creation of lines and circles, creation of characters, and the like, similar to PDL data. The PDL buffer 0247 is a double buffer that stores the intermediate PDL command converted by the intermediate PDL conversion unit 0232, and includes a first PDL buffer 0248 and a second PDL buffer 0249.

画像形成スレッド2(0534)は、画像データ形成部0234でPDLバッファ0247(第1のPDLバッファ0248、第2のPDLバッファ0249)に格納された中間PDLデータを交互に読み出し、中間PDLコマンドを実行して、例えばCMYK等の色成分へ変換してビットマップ形式の画像データを形成し、画像データメモリ0242に記憶する。画像データメモリ0242は、複数の画像データメモリ(画像データメモリ0243、画像データメモリ0244、・・・)を有し、それぞれ1頁分ずつ画像データが記憶される。画像形成スレッド2(0534)は、1頁分の画像データが形成される毎に、印刷行列制御スレッド0235に印刷要求を出す。   The image forming thread 2 (0534) alternately reads the intermediate PDL data stored in the PDL buffer 0247 (the first PDL buffer 0248 and the second PDL buffer 0249) in the image data forming unit 0234, and executes the intermediate PDL command. Then, for example, the image data is converted into color components such as CMYK to form bitmap format image data, and is stored in the image data memory 0242. The image data memory 0242 has a plurality of image data memories (image data memory 0243, image data memory 0244,...), And each page stores image data for one page. The image forming thread 2 (0534) issues a print request to the print matrix control thread 0235 every time image data for one page is formed.

これを受けて、印刷行列制御スレッド0235は、印刷行列要素を生成し印刷要求を印刷行列0246にキューイングする。PPRエンジン制御スレッド0236は、印刷行列0246にキューイングされている印刷要求を順次取り出し、印刷を依頼するために印刷要求に該当する画像データをPPRエンジン8へ転送する。その後、画像データの転送が正常に終了し画像データ転送エンドを検出すると、印刷行列制御スレッド0235は転送した画像データメモリ0242上の画像データを圧縮する。また、PPRエンジン8での印刷処理の正常終了し完全排紙後には、圧縮した画像データメモリ0242上の画像データを削除し、印刷行列0246にキューイングされている印刷要求に該当する印刷行列要素を削除する。   In response to this, the print matrix control thread 0235 generates a print matrix element and queues a print request in the print matrix 0246. The PPR engine control thread 0236 sequentially takes out the print requests queued in the print matrix 0246 and transfers the image data corresponding to the print request to the PPR engine 8 in order to request printing. Thereafter, when the transfer of the image data ends normally and the end of the image data transfer is detected, the print matrix control thread 0235 compresses the transferred image data on the image data memory 0242. Further, after the print processing in the PPR engine 8 is normally completed and completely discharged, the compressed image data memory 0242 is deleted, and the print matrix element corresponding to the print request queued in the print matrix 0246 is deleted. Is deleted.

ここで、図1に示す画像形成スレッドの各々は、前述の図2に示すCPU9のコア9a〜9dの何れかが担当するものであり、例えばコア9aが画像形成スレッド1(0532)の中間PDL変換処理を行い、コア9bが画像形成スレッド2(0534)の画像データ形成処理を担当する。さらに、I/O制御スレッドは、画像形成スレッドにより利用されたコアを除いた残りのコアが担当する。例えばコア9cが受信制御スレッド0230及び印刷行列制御スレッド0235を担当し、コア9dがPPRエンジン制御スレッド0236を担当してもよい。また、コア9cが印刷行列制御スレッド0235を担当し、コア9dが受信制御スレッド0230とPPRエンジン制御スレッド0236を担当してもよい。   Here, each of the image forming threads shown in FIG. 1 is assigned to any one of the cores 9a to 9d of the CPU 9 shown in FIG. 2, and for example, the core 9a is an intermediate PDL of the image forming thread 1 (0532). Conversion processing is performed, and the core 9b takes charge of the image data forming process of the image forming thread 2 (0534). Further, the remaining cores except for the core used by the image forming thread are in charge of the I / O control thread. For example, the core 9c may be in charge of the reception control thread 0230 and the print matrix control thread 0235, and the core 9d may be in charge of the PPR engine control thread 0236. The core 9c may be in charge of the print matrix control thread 0235, and the core 9d may be in charge of the reception control thread 0230 and the PPR engine control thread 0236.

なお、上記スレッドとスレッドを担当するコアの関係はこれに限定されるのではなく、各処理が必要な際、空いているコア9a〜9dが使用される。ただし、画像形成スレッドにはI/O制御スレッドより優先的にコアを割り当てる。つまり、最も時間の要する画像形成処理を他の処理よりも優先的に処理することができる。これは、画像形成スレッドのプライオリティをI/O制御スレッドより高く設定して起動することにより実現される。   The relationship between the thread and the core in charge of the thread is not limited to this, and when each process is required, the free cores 9a to 9d are used. However, the core is assigned to the image forming thread with priority over the I / O control thread. That is, the image forming process that requires the most time can be processed with priority over other processes. This is realized by setting and starting the priority of the image forming thread higher than that of the I / O control thread.

以上の構成において、以下に本例の処理動作を説明する。
図3及び図4は画像形成スレッドの初期設定処理を説明するフローチャートである。先ず、図3に示すフローチャートに従って、図4で詳述するマルチスレッドの初期化処理を行い(ステップ(以下、Sで示す)1)、更にマルチスレッド以外の画像形成タスクの初期化処理を行う(S2)。その後、本スレッドは、画像形成スレッド1(0532)として後述する中間PDL変換部0232の処理を行う。また、画像形成スレッド1(0532)の処理は、プライオリティを高く設定した上で、例えばコア9aによって実行される。
In the above configuration, the processing operation of this example will be described below.
3 and 4 are flowcharts for explaining the initial setting processing of the image forming thread. First, in accordance with the flowchart shown in FIG. 3, multithread initialization processing described in detail in FIG. 4 is performed (step (hereinafter referred to as S) 1), and further, initialization processing for image forming tasks other than multithreading is performed (see FIG. 3). S2). Thereafter, this thread performs processing of an intermediate PDL conversion unit 0232 described later as an image forming thread 1 (0532). Further, the processing of the image forming thread 1 (0532) is executed by, for example, the core 9a after setting a high priority.

図4に示すフローチャートは上記マルチスレッドの初期化処理を具体的に説明するフローチャートである。先ず、スレッド数を1に設定する(S3)。次に、PDLバッファ0247(第1のPDLバッファ0248及び第2のPDLバッファ0249)の領域を確保する(S4)。具体的には前述の図2に示すRAM5に、PDLバッファ0247の記憶領域を確保する。   The flowchart shown in FIG. 4 is a flowchart for specifically explaining the multithread initialization process. First, the number of threads is set to 1 (S3). Next, an area of the PDL buffer 0247 (the first PDL buffer 0248 and the second PDL buffer 0249) is secured (S4). Specifically, the storage area of the PDL buffer 0247 is secured in the RAM 5 shown in FIG.

次に、中間PDL変換部0232により中間PDLコマンド生成中において選択するバッファ(以降、中間PDL生成中PDLバッファと称する)を第1のPDLバッファ0248とし、画像データ形成部(レンダリング部)0234により描画データ生成中において選択するバッファ(以降、画像形成PDLバッファと称する)も同じ第1のPDLバッファ0248に初期設定する(S5)。   Next, a buffer selected during intermediate PDL command generation by the intermediate PDL conversion unit 0232 (hereinafter referred to as intermediate PDL generation PDL buffer) is set as a first PDL buffer 0248, and rendering is performed by the image data forming unit (rendering unit) 0234. A buffer to be selected during data generation (hereinafter referred to as an image forming PDL buffer) is also initialized in the same first PDL buffer 0248 (S5).

次に、画像形成要求中フラグをオフに設定する(S6)。すなわち、画像データ形成部(レンダリング部)0234が処理を行っていない状態であることを、フラグをオフ状態にすることで示す。最後に、画像形成スレッド2(0534)を生成して起動し、初期化ルーチンを終了する(S7)。以上のようにして画像形成スレッド1(0532)及び画像形成スレッド2(0534)の初期設定処理が完了する。また、画像形成スレッド2(0534)の処理は、プライオリティを高く設定した上で、例えばコア9bによって実行される。   Next, an image formation request flag is set to OFF (S6). That is, the image data forming unit (rendering unit) 0234 indicates that the processing is not performed by turning off the flag. Finally, the image forming thread 2 (0534) is generated and activated, and the initialization routine is terminated (S7). As described above, the initial setting processing of the image forming thread 1 (0532) and the image forming thread 2 (0534) is completed. Further, the processing of the image forming thread 2 (0534) is executed by, for example, the core 9b after setting a high priority.

図5は受信制御スレッド0230の初期設定処理とその後の受信制御処理を説明するフローチャートである。受信制御スレッド0230は起動すると、先ず受信するデータの保管場所として、図2に示すRAM5に受信バッファ0240の領域を確保する。さらに受信制御スレッド0230内で利用する制御データなど、これから行われるデータ受信処理に備えて受信タスクの初期化を行う(S10)。初期化が終了し、データの受信準備が整うと印刷データの受信を開始し(S11)、データ受信待ち状態となる(S12)。   FIG. 5 is a flowchart for explaining the initial setting process of the reception control thread 0230 and the subsequent reception control process. When activated, the reception control thread 0230 first secures an area of the reception buffer 0240 in the RAM 5 shown in FIG. 2 as a storage location for received data. Further, in preparation for data reception processing to be performed in the future, such as control data used in the reception control thread 0230, the reception task is initialized (S10). When initialization is completed and data reception preparation is completed, reception of print data is started (S11), and a data reception waiting state is entered (S12).

一方、印刷装置3(PPR)は、クライアントPC1等から印刷データが送信されると、図2に示すLAN回路7でLANケーブル等を介して伝わる電気信号から受信すべきデータを識別して上位の階層へ引き渡す。その後、各階層では下位の階層から引き渡されたデータ中から制御情報を抽出し、データの信頼性等を確認しながら上位層へ順次引き渡す(S20〜S23)。各層を介してアプリケーションレベルの印刷データに復元されると、印刷データは受信制御スレッド0230へ受信タスクとしてポストされる(S24)。   On the other hand, when print data is transmitted from the client PC 1 or the like, the printing apparatus 3 (PPR) identifies data to be received from an electrical signal transmitted via a LAN cable or the like by the LAN circuit 7 shown in FIG. Deliver to hierarchy. Thereafter, in each layer, control information is extracted from the data delivered from the lower layer, and sequentially transferred to the upper layer while checking the reliability of the data (S20 to S23). When the application level print data is restored via each layer, the print data is posted to the reception control thread 0230 as a reception task (S24).

受信制御スレッド0230は、印刷データを受信すると受信した印刷データを受信バッファ0240へ格納する(S13)。受信バッファ0240へのデータの格納が終了すると、画像形成スレッド1(0532)へ画像形成タスクとしてポストし(S14)、次の印刷データの受信まで待機する(S12)。   When receiving the print data, the reception control thread 0230 stores the received print data in the reception buffer 0240 (S13). When the storage of data in the reception buffer 0240 is completed, it is posted as an image forming task to the image forming thread 1 (0532) (S14), and waits until the next print data is received (S12).

以降、受信制御スレッド0230は、印刷データを受信する毎に順次受信バッファ0240へ格納し、画像形成スレッド1(0532)へ画像形成タスクとしてポストする。また、受信制御スレッド0230の処理は、例えばコア9cや9dによって実行される。なお、受信制御スレッド0230は、前述した画像形成スレッド1(0532)や後述する画像形成スレッド2(0534)よりプライオリティを低く設定する。   Thereafter, the reception control thread 0230 sequentially stores the print data in the reception buffer 0240 and posts it as an image formation task to the image formation thread 1 (0532). The processing of the reception control thread 0230 is executed by, for example, the cores 9c and 9d. The reception control thread 0230 sets a lower priority than the above-described image forming thread 1 (0532) or an image forming thread 2 (0534) described later.

図6から図11は以後の処理を説明するフローチャートであり、画像形成スレッド1(0532)、画像形成スレッド2(0534)、印刷行列制御スレッド0235、PPRエンジン制御スレッド0236、PPRエンジン8が行う処理を説明するものである。尚、図12(a)は本実施形態の処理を模式的に示す図である。   FIG. 6 to FIG. 11 are flowcharts for explaining the subsequent processing. Processing performed by the image forming thread 1 (0532), the image forming thread 2 (0534), the printing matrix control thread 0235, the PPR engine control thread 0236, and the PPR engine 8 Is described. FIG. 12A is a diagram schematically showing the processing of this embodiment.

先ず、図6に示すフローチャートは中間PDL変換部0232による画像形成スレッド1(0532)の処理を説明するものである。印刷データを受信すると受信バッファ0240に格納された印刷データ中からPDLコマンドを順次取り出す(S100、S101)。取り出したPDLコマンドは、印刷装置3(PPR)の仕様に合致したPDLの形式である中間PDLに変換され、中間PDLのPDLコマンドである中間PDLコマンドとして、中間PDL生成中PDLバッファにバッファリングされる(S102)。図12(a)に示すaはこの処理を示し、文書ファイル等の印刷データの1頁目の最初の印刷データの中間PDLコマンドが第1のPDLバッファ0248に格納される。また、上記処理は、例えばコア9aによって実行される。   First, the flowchart shown in FIG. 6 explains the processing of the image forming thread 1 (0532) by the intermediate PDL conversion unit 0232. When print data is received, PDL commands are sequentially extracted from the print data stored in the reception buffer 0240 (S100, S101). The extracted PDL command is converted into an intermediate PDL that is a PDL format that conforms to the specifications of the printing apparatus 3 (PPR), and is buffered in the intermediate PDL generation PDL buffer as an intermediate PDL command that is a PDL command of the intermediate PDL. (S102). In FIG. 12A, “a” represents this processing, and the intermediate PDL command of the first print data of the first page of print data such as a document file is stored in the first PDL buffer 0248. Moreover, the said process is performed by the core 9a, for example.

なお、PDLコマンド及び中間PDLコマンドには、ジョブ開始コマンド、ジョブ終了コマンド、頁開始コマンド、改頁コマンド等が含まれている。PDLデータおよび中間PDLデータ中の印刷ジョブは、ジョブ開始コマンドとジョブ終了コマンドで挟まれ、さらに、印刷ジョブ中の各頁に対応する箇所は頁開始コマンドと改頁コマンドに挟まれた構造となっている。   The PDL command and the intermediate PDL command include a job start command, a job end command, a page start command, a page break command, and the like. A print job in PDL data and intermediate PDL data is sandwiched between a job start command and a job end command, and a portion corresponding to each page in the print job is sandwiched between a page start command and a page break command. ing.

次に、S103からS113では、受信バッファ0240から取り出し変換した中間PDLコマンドの種類を判断し、引き続き受信バッファ0240から後続のデータを取り出し中間PDLコマンドへの変換処理を行うか、又は変換した中間PDLコマンドによる画像形成処理に進むかを決定している。具体的には、S103、S105、S108、S111のそれぞれで、ジョブ終了コマンド、ジョブ開始コマンド、頁開始コマンド、改頁コマンドか否かを判断しそれぞれに応じた処理を行っている。いずれにも該当しない場合は、さらにS112で中間PDL生成中PDLバッファの空き状況を確認している。   Next, in S103 to S113, the type of the intermediate PDL command extracted from the reception buffer 0240 is determined, and subsequent data is subsequently extracted from the reception buffer 0240 and converted into an intermediate PDL command, or converted intermediate PDL command is processed. It is determined whether to proceed to image forming processing by command. Specifically, in each of S103, S105, S108, and S111, it is determined whether a job end command, a job start command, a page start command, or a page break command, and processing corresponding to each is performed. If none of these are true, the availability of the intermediate PDL generating PDL buffer is further confirmed in S112.

基本的には、改頁コマンドが出現するまでは、受信バッファ0240から順番にPDLコマンドを取り出し、中間PDLコマンドに変換して中間PDL生成中PDLバッファへ格納する。この処理は引き続き図12(a)のaの処理に該当する。そして、改頁コマンドの出現により、中間PDL生成中PDLバッファへ格納された中間PDLコマンドの画像形成処理へ進む。ただし、多くの場合、改頁コマンドの発生前に中間PDL生成中PDLバッファが一杯になるため、その場合は、改頁コマンドの発生を待たずに画像形成処理に進む。また、その他、ジョブ終了コマンドが出現した場合にも、これ以上現在処理中のジョブのPDLデータは存在しないため画像形成処理に進む。   Basically, until a page break command appears, the PDL commands are sequentially extracted from the reception buffer 0240, converted into intermediate PDL commands, and stored in the intermediate PDL generating PDL buffer. This process continues to correspond to the process a in FIG. Then, when the page break command appears, the process proceeds to the image forming process of the intermediate PDL command stored in the intermediate PDL generating PDL buffer. However, in many cases, the intermediate PDL generation PDL buffer is full before the page break command is generated. In this case, the process proceeds to the image forming process without waiting for the page break command to be generated. In addition, even when a job end command appears, since there is no more PDL data of the job currently being processed, the process proceeds to the image forming process.

以下、ジョブ開始コマンド、頁開始コマンド、改頁コマンド、ジョブ終了コマンドの順にそれぞれが出現した場合の処理について説明する。まず、中間PDLコマンドがジョブ開始コマンドであった場合(S105がYES)は、スレッド数の決定処理が開始され(S106)、図7に示すスレッド数決定ルーチンにて、スレッド数が2に設定される(S107)。その後、中間PDL生成中PDLバッファの容量一杯までPDLコマンドがバッファリングされたか判断する(S112)。NOと判定され場合は、受信バッファ0240を確認し、PDLコマンドをすべて処理したかどうかを判断する(S113)。すべて処理済みの場合は、受信制御スレッド0230から新たな印刷データが受信バッファ0240へ格納されるまで待機する(S100)。   Hereinafter, processing when each of the job start command, page start command, page break command, and job end command appears in this order will be described. First, when the intermediate PDL command is a job start command (YES in S105), the thread number determination process is started (S106), and the thread number is set to 2 in the thread number determination routine shown in FIG. (S107). Thereafter, it is determined whether the PDL command has been buffered to the full capacity of the PDL buffer during intermediate PDL generation (S112). If NO is determined, the reception buffer 0240 is checked to determine whether all PDL commands have been processed (S113). If all of the data has been processed, the process waits until new print data is stored in the reception buffer 0240 from the reception control thread 0230 (S100).

PDLコマンドをすべて処理していない場合、処理が未済のPDLコマンドを順次取得し、中間PDLコマンドに変換し中間PDL生成中PDLバッファへ格納する(S101、S102)。なお、ジョブ開始コマンドにはオペランドとして、解像度、階調、用紙サイズ、給紙口などの各種情報が指定されている。ジョブ終了コマンドが処理されるまでの間、これらの情報は一時的に記憶され、後続の各種処理では必要に応じてこれらの情報を利用することができる。   If all the PDL commands have not been processed, the PDL commands that have not been processed are sequentially obtained, converted into intermediate PDL commands, and stored in the intermediate PDL generating PDL buffer (S101, S102). In the job start command, various information such as resolution, gradation, paper size, and paper feed port are specified as operands. Until the job end command is processed, these pieces of information are temporarily stored, and these pieces of information can be used as necessary in various subsequent processes.

次に、中間PDLコマンドが頁開始コマンドであった場合は(S108がYES)、印刷行列制御スレッド0235に対して画像データメモリ0242の確保要求を出し(S109)、印刷行列制御スレッド0235からの確保通知まで待機する(S110)。画像形成スレッド1(0532)から画像データメモリ0242の確保要求を受けた印刷行列制御スレッド0235は、図9で示す印刷行列制御要求待ちから開放され(S300)、印刷行列制御要求の種類を判断する(S301、S306、S308、S310)。この場合、要求は画像データメモリ0242の確保要求であるので、1頁分の画像データメモリ0242(画像データメモリ0243や画像データメモリ0244など)を確保する(S311)。   Next, if the intermediate PDL command is a page start command (YES in S108), a request for securing the image data memory 0242 is issued to the printing matrix control thread 0235 (S109), and the securing from the printing matrix control thread 0235 is performed. Wait until notification (S110). The print queue control thread 0235 that has received the request for securing the image data memory 0242 from the image forming thread 1 (0532) is released from the wait for the print queue control request shown in FIG. 9 (S300), and determines the type of the print queue control request. (S301, S306, S308, S310). In this case, since the request is a request for securing the image data memory 0242, the image data memory 0242 for one page (such as the image data memory 0243 and the image data memory 0244) is secured (S311).

この時、1頁分として必要なサイズの算定には、ジョブ開始コマンドのオペランドとして指定され、一時的に記憶されている情報を利用する。1頁分の画像データメモリ0242を確保すると、印刷行列制御スレッド0235は要求元の画像形成スレッド1(0532)に対して、画像メモリ確保通知を送り(S312)、次の印刷行列制御要求に備えて待機する(S300)。なお、印刷行列制御スレッド0235は、プライオリティを画像形成スレッド1(0532)及び画像形成スレッド2(0534)より低く設定した上で、例えばコア9cによって実行される。印刷行列制御スレッド0235から画像メモリ確保通知を受けた画像形成スレッド1(0532)は、待機状態から解放され(S110)、ジョブ開始コマンドの場合と同様に、中間PDL生成中PDLバッファの状態や受信バッファ0240を確認して、それぞれに応じた処理を行う。   At this time, for the calculation of the size required for one page, the information specified as the operand of the job start command and temporarily stored is used. When the image data memory 0242 for one page is secured, the print matrix control thread 0235 sends an image memory reservation notice to the request source image forming thread 1 (0532) (S312), and prepares for the next print matrix control request. (S300). The print matrix control thread 0235 is executed by, for example, the core 9c after setting the priority lower than that of the image forming thread 1 (0532) and the image forming thread 2 (0534). The image forming thread 1 (0532) that has received the image memory reservation notification from the print queue control thread 0235 is released from the standby state (S110), and the state of the intermediate PDL generation PDL buffer and the reception are the same as in the case of the job start command. The buffer 0240 is confirmed, and processing corresponding to each is performed.

次に、中間PDLコマンドが改頁コマンドであった場合(S111がYES)は、中間PDL生成中PDLバッファへ格納された中間PDLコマンドを元にした画像形成処理へ進む(S114以降)。   Next, if the intermediate PDL command is a page break command (YES in S111), the process proceeds to an image forming process based on the intermediate PDL command stored in the intermediate PDL generating PDL buffer (S114 and later).

次に、中間PDLコマンドがジョブ終了コマンドであった場合は(S103がYES)、ジョブ終了内部フラグをONに設定した上で(S104)、中間PDL生成中PDLバッファへ格納された中間PDLコマンドによる画像形成処理へ進む(S114以降)。   Next, when the intermediate PDL command is a job end command (YES in S103), the job end internal flag is set to ON (S104), and the intermediate PDL command stored in the intermediate PDL buffer is generated. The process proceeds to the image forming process (S114 and later).

中間PDLコマンドがジョブ開始コマンド、頁開始コマンド、改頁コマンド、ジョブ終了コマンドのいずれにも該当しない場合は、中間PDL生成中PDLバッファが一杯ではない限り、引き続き受信バッファ0240からのPDLコマンドの変換処理を行う。以上の処理により、中間PDL生成中PDLバッファに中間PDLコマンドが格納される。   If the intermediate PDL command does not correspond to any of the job start command, page start command, page break command, and job end command, the conversion of the PDL command from the reception buffer 0240 is continued as long as the intermediate PDL generation PDL buffer is not full. Process. Through the above process, the intermediate PDL command is stored in the intermediate PDL generating PDL buffer.

上記のS103からS113では、改頁コマンドまたはジョブ終了コマンドが出現した場合(S111又はS103がYES)、又は中間PDL生成中PDLバッファの容量が一杯となった場合(S112がYES)、中間PDLコマンドによる画像形成処理へ進み、スレッド数の設定が1となっているかどうかが判断される(S114)。ただし、本実施例ではジョブ開始コマンドの出現時にスレッド数が2に設定されるため、NOと判定される。   In S103 to S113, when a page break command or a job end command appears (YES in S111 or S103), or when the capacity of the PDL buffer during intermediate PDL generation is full (S112 is YES), an intermediate PDL command The process proceeds to the image forming process in step S114, and it is determined whether the number of threads is set to 1 (S114). However, in this embodiment, since the number of threads is set to 2 when the job start command appears, it is determined as NO.

S115からS120では、中間PDL生成中PDLバッファに格納された中間PDLコマンドの画像形成処理を画像形成スレッド2(0534)へ依頼している。先ず、画像形成要求中フラグがオンであるか判断する(S115)。   In steps S115 to S120, the image forming thread 2 (0534) is requested to perform image forming processing of the intermediate PDL command stored in the intermediate PDL generating PDL buffer. First, it is determined whether the image forming request flag is on (S115).

この画像形成要求中フラグは、図4において前述したフラグの初期化処理(S6)によってオフに設定されており(S115がNO)、上記中間PDLコマンドを格納した中間PDL生成中PDLバッファ(この場合は、第1のPDLバッファ0248)を、以後画像形成スレッド2(0534)が画像データ形成部0234で読み出しを行う画像形成PDLバッファに設定する(S118)。続いて、画像形成要求中フラグをオンにセットし(S119)、画像形成スレッド2(0534)に対して画像形成要求を出す(S120)。すなわち、中間PDL変換部0232から画像データ形成部0234に対して画像形成要求を出力する。   This image formation request flag is set to OFF by the flag initialization process (S6) described above with reference to FIG. 4 (S115 is NO), and an intermediate PDL generating PDL buffer storing the intermediate PDL command (in this case) The first PDL buffer 0248) is set as an image forming PDL buffer from which the image forming thread 2 (0534) reads data with the image data forming unit 0234 (S118). Subsequently, an image formation request flag is set on (S119), and an image formation request is issued to the image formation thread 2 (0534) (S120). That is, the intermediate PDL conversion unit 0232 outputs an image formation request to the image data forming unit 0234.

尚、前述の判断(S115)において、画像形成要求中フラグがオンの場合には、画像形成スレッド2(0534)による画像形成処理の終了を待ち、画像形成要求中フラグをオフする(S115がYES、S116、S117)。この処理は、画像形成スレッド2(0534)が画像形成処理を終了した際行う処理であり、後述する。   If the image forming request flag is on in the above determination (S115), the image forming thread 2 (0534) waits for the end of the image forming process and turns off the image forming request flag (YES in S115). , S116, S117). This process is performed when the image forming thread 2 (0534) completes the image forming process, which will be described later.

S121からS126では、画像形成スレッド1(0532)が画像形成スレッド2(0534)へ画像形成処理を要求した後、以降の処理に備え、画像形成スレッド1(0532)の設定を変更している。   In S121 to S126, after the image forming thread 1 (0532) requests the image forming thread 2 (0534) to perform image forming processing, the setting of the image forming thread 1 (0532) is changed in preparation for the subsequent processing.

前半部分のS121からS123では、画像形成スレッド1(0532)が中間PDLコマンドを出力する中間PDL生成中PDLバッファの設定を変更する。まず、中間PDL生成中PDLバッファが第1のPDLバッファ0248か否かを判断する(S121)。その結果、第1のPDLバッファ0248と判定した場合(S121がYES)は、中間PDL生成中PDLバッファを第2のPDLバッファ0249へ変更し(S123)、第1のPDLバッファ0248でない判定した場合(S121がNO)、つまり第2のPDLバッファ0249である場合は、中間PDL生成中PDLバッファを第1のPDLバッファ0248へ変更する(S122)。ここでは、図4のバッファの初期化処理(S5)により第1のPDLバッファ0248が中間PDL生成中PDLバッファとして設定されているので、第2のPDLバッファ0249へ変更される。   In S121 to S123 of the first half, the setting of the intermediate PDL generating PDL buffer in which the image forming thread 1 (0532) outputs an intermediate PDL command is changed. First, it is determined whether or not the intermediate PDL generating PDL buffer is the first PDL buffer 0248 (S121). As a result, when it is determined that the PDL buffer is the first PDL buffer 0248 (YES in S121), the intermediate PDL generating PDL buffer is changed to the second PDL buffer 0249 (S123), and it is determined that it is not the first PDL buffer 0248. If S121 is NO, that is, if it is the second PDL buffer 0249, the intermediate PDL generating PDL buffer is changed to the first PDL buffer 0248 (S122). Here, since the first PDL buffer 0248 is set as the intermediate PDL generating PDL buffer by the buffer initialization process (S5) in FIG. 4, the buffer is changed to the second PDL buffer 0249.

なお、この処理は、先に依頼した画像形成処理と、中間PDL変換処理を並列して進めるために行われる処理である。これから画像形成スレッド2(0534)が画像形成処理で利用する第1のPDLバッファ0248の内容を、画像形成スレッド1(0532)が後続の処理で上書きしないために行われる。当該処理は、印刷装置3(PPR)がダブルバッファ化したPDLバッファ0247(第1のPDLバッファ0248、第2のPDLバッファ0249)を有することで実現される仕組みであり、これにより、画像形成スレッド1(0532)は画像形成処理の要求後、画像形成処理の終了を待たずに、中間PDL変換処理を行うことができる。   This process is a process performed in order to advance the image formation process requested earlier and the intermediate PDL conversion process in parallel. This is performed so that the image forming thread 1 (0532) does not overwrite the contents of the first PDL buffer 0248 used by the image forming thread 2 (0534) in the subsequent processes. This processing is realized by having the PDL buffer 0247 (first PDL buffer 0248, second PDL buffer 0249) in which the printing apparatus 3 (PPR) is double-buffered. 1 (0532) can perform the intermediate PDL conversion process without waiting for the end of the image forming process after the image forming process is requested.

その後、ジョブ終了内部フラグがONであるかが判断され(S124)、ONであると判定された場合は、先に画像形成スレッド2(0534)へ要求した画像形成処理の終了まで待機する(S125)。画像形成処理の終了が通知されるとジョブ終了内部フラグがOFFに設定して、受信バッファ0240の確認処理(S113)へ戻る。なお、ジョブ終了内部フラグがOFFと判定された場合はすぐに受信バッファ0240の確認処理(S113)へ戻り、同様の手順で中間PDL変換処理(図12(a)のe1からenの処理)を繰り返す。   Thereafter, it is determined whether the job end internal flag is ON (S124). If it is determined that the job end internal flag is ON, the process waits until the end of the image forming process requested to the image forming thread 2 (0534) first (S125). ). When the end of the image forming process is notified, the job end internal flag is set to OFF, and the process returns to the reception buffer 0240 confirmation process (S113). If it is determined that the job end internal flag is OFF, the process immediately returns to the reception buffer 0240 confirmation processing (S113), and the intermediate PDL conversion processing (processing from e1 to en in FIG. 12A) is performed in the same procedure. repeat.

なお、スレッド数の設定が1である場合(S114がYES)に行われる処理(S127からS132)は、スレッド数の設定が2の場合(S114がNO)に、画像形成要求により画像形成スレッド2(0534)で行われる処理に対応するものである。つまり、スレッド数の設定が1であるため、画像形成スレッド1(0532)自身が画像形成処理を行うことを示している。なお、詳細な処理の内容については、画像形成スレッド1(0532)への通知処理とジョブ終了コマンド検出処理が不要な点を除き、後述する画像形成スレッド2(0534)が行う処理と同様であるので、ここでは説明を省略する。   Note that the processing (S127 to S132) performed when the number of threads is set to 1 (S114 is YES), the image forming thread 2 is set by the image forming request when the number of threads is set to 2 (S114 is NO). This corresponds to the processing performed in (0534). That is, since the setting of the number of threads is 1, it indicates that the image forming thread 1 (0532) itself performs the image forming process. The details of the processing are the same as the processing performed by the image forming thread 2 (0534) described later, except that the notification processing to the image forming thread 1 (0532) and the job end command detection processing are unnecessary. Therefore, explanation is omitted here.

図8に示すフローチャートは画像データ形成部0234による画像形成スレッド2(0534)の処理を説明するものである。画像形成スレッド1(0532)からの画像形成要求を受信すると画像形成PDLバッファに格納された中間PDLコマンドを順次取り出し(S200、S201)、取出した中間PDLコマンドがジョブ終了コマンドかどうか判断する(S202)。通常、画像形成要求後の最初の中間PDLコマンドはジョブ終了コマンドではないので(S202がNO)、さらに改頁コマンドかどうか判断する(S204)。改頁コマンドでない場合(S204がNO)は、取出した中間PDLコマンドの解析を行い、その中間PDLコマンドに対応した画像形成処理を実施し、予め印刷行列制御スレッド0235により確保された一頁分の画像データメモリ0242(画像データメモリ0243や画像データメモリ0244など要求毎に異なる)に画像を展開する(S205)(例えば、図12(a)のbの処理)。   The flowchart shown in FIG. 8 explains the processing of the image forming thread 2 (0534) by the image data forming unit 0234. When an image formation request is received from the image formation thread 1 (0532), the intermediate PDL commands stored in the image formation PDL buffer are sequentially extracted (S200, S201), and it is determined whether the extracted intermediate PDL command is a job end command (S202). ). Usually, since the first intermediate PDL command after the image formation request is not a job end command (S202 is NO), it is further determined whether it is a page break command (S204). If it is not a page break command (NO in S204), the extracted intermediate PDL command is analyzed, image forming processing corresponding to the intermediate PDL command is performed, and one page of pages reserved in advance by the print matrix control thread 0235 is executed. The image is developed in the image data memory 0242 (different for each request such as the image data memory 0243 and the image data memory 0244) (S205) (for example, the process of b in FIG. 12A).

その後、画像形成PDLバッファに格納された中間PDLコマンドをすべて処理したか判断され(S206)、処理が未済の中間PDLコマンドがある場合は(S206がNO)、中間PDLコマンドの取り出し処理まで戻り(S201)、上記の処理を繰り返す(例えば、図12(a)のfの処理)。   Thereafter, it is determined whether all the intermediate PDL commands stored in the image forming PDL buffer have been processed (S206). If there is an intermediate PDL command that has not been processed (S206: NO), the process returns to the intermediate PDL command extraction process ( S201), the above processing is repeated (for example, processing f in FIG. 12A).

画像形成PDLバッファから取出した中間PDLコマンドが改頁コマンドである場合は、画像データメモリ0242に展開された画像について、印刷行列制御スレッド0235に対し印刷要求を出し(S207)、印刷要求受付終了の通知があるまで待機する(S208)。画像形成スレッド2(0534)から印刷要求を受けた印刷行列制御スレッド0235は、後述する処理を行った後に、画像形成スレッド2(0534)へ印刷要求受付を通知する。印刷行列制御スレッド0235からの印刷要求受付の通知があると、画像形成スレッド2(0534)は待機状態(S208)から解放され、画像形成要求の要求元である画像形成スレッド1(0532)に対して、画像形成PDLバッファ(この場合、第1のPDLバッファ0248)の画像形成処理の終了通知を送り(S209)、次の画像形成要求があるまで待機する(S200)。   If the intermediate PDL command extracted from the image formation PDL buffer is a page break command, a print request is issued to the print matrix control thread 0235 for the image developed in the image data memory 0242 (S207), and the print request acceptance end is completed. Wait until notification is received (S208). The print queue control thread 0235 that has received the print request from the image forming thread 2 (0534) notifies the image forming thread 2 (0534) of acceptance of the print request after performing processing described later. When a print request acceptance notification is received from the print queue control thread 0235, the image forming thread 2 (0534) is released from the standby state (S208), and is sent to the image forming thread 1 (0532) that is the request source of the image forming request. Then, an end notification of the image forming process of the image forming PDL buffer (in this case, the first PDL buffer 0248) is sent (S209), and the process waits until there is a next image forming request (S200).

また、画像形成スレッド2(0534)が画像形成PDLバッファから取出した中間PDLコマンドがジョブ終了コマンドである場合(S202がYES)も、画像形成要求の要求元である画像形成スレッド1(0532)に対して、画像形成PDLバッファ(この場合、第1のPDLバッファ0248)の画像形成処理の終了通知を送り(S203)、次の画像形成要求があるまで待機する(S200)。   In addition, when the intermediate PDL command fetched from the image forming PDL buffer by the image forming thread 2 (0534) is a job end command (YES in S202), the image forming thread 1 (0532) that is the request source of the image forming request is also sent. On the other hand, an end notification of the image forming process in the image forming PDL buffer (in this case, the first PDL buffer 0248) is sent (S203), and the process waits until there is a next image forming request (S200).

なお、画像形成スレッド1(0532)は、当該終了通知の元となった画像形成要求を出した後、受信バッファ0240の印刷データの中間PDL変換処理を繰り返し、第2のPDLバッファ0249に中間PDLコマンドを格納した上で、画像形成スレッド2(0534)の画像形成処理の終了を待っている(図6のS116)。   Note that the image forming thread 1 (0532), after issuing the image forming request that is the source of the end notification, repeats the intermediate PDL conversion processing of the print data in the reception buffer 0240, and stores the intermediate PDL in the second PDL buffer 0249. After storing the command, the image forming thread 2 (0534) waits for the end of the image forming process (S116 in FIG. 6).

画像形成スレッド1(0532)は、画像形成スレッド2(0534)からの画像形成処理の終了通知を受け取ると、画像形成要求中フラグをOFFに設定する(図6のS117)。その後、画像形成PDLバッファとして中間PDLコマンドが格納された第2のPDLバッファ0249を指定し、画像形成要求フラグを再度ONに設定した上で、新たに画像形成スレッド2(0534)へ画像形成要求を出す。以降、画像形成スレッド1(0532)は、PDLバッファ0247を画像形成要求毎に第1のPDLバッファ0248と第2のPDLバッファ0249に切り替えながら交互に利用して中間PDLコマンドへの変換処理と画像形成要求を繰り返す。これにより、画像形成スレッド2(0534)の画像形成処理と並列に画像形成スレッド1(0532)の中間PDL変換処理を行うことができ、画像形成スレッド1(0532)及び画像形成スレッド2(0534)に割り当てられたCPUコア(例えば、コア9aとコアコア9b)のCPU時間を有効に活用することができる。   When the image forming thread 1 (0532) receives the completion notification of the image forming process from the image forming thread 2 (0534), the image forming thread 1 (0532) sets the image forming request flag to OFF (S117 in FIG. 6). After that, the second PDL buffer 0249 storing the intermediate PDL command is designated as the image forming PDL buffer, the image forming request flag is set to ON again, and a new image forming request is sent to the image forming thread 2 (0534). Put out. Thereafter, the image forming thread 1 (0532) switches the PDL buffer 0247 to the first PDL buffer 0248 and the second PDL buffer 0249 for each image forming request, and alternately uses them to convert to the intermediate PDL command and the image. Repeat the formation request. As a result, the intermediate PDL conversion process of the image forming thread 1 (0532) can be performed in parallel with the image forming process of the image forming thread 2 (0534), and the image forming thread 1 (0532) and the image forming thread 2 (0534). The CPU time of the CPU cores (for example, the core 9a and the core core 9b) assigned to can be effectively utilized.

図9、図10及び図11に示すフローチャートは、それぞれ印刷行列制御スレッド0235の処理、PPRエンジン制御スレッド0236の処理、及びPPRエンジン8からの割込みの処理を説明するものである。以下、画像形成スレッド2(0534)から印刷行列制御スレッド0235に印刷要求が出されてから印刷処理が終了するまでの流れについて説明する。   The flowcharts shown in FIGS. 9, 10, and 11 describe the processing of the print matrix control thread 0235, the processing of the PPR engine control thread 0236, and the processing of interruption from the PPR engine 8, respectively. Hereinafter, a flow from when a print request is issued from the image forming thread 2 (0534) to the print matrix control thread 0235 until the print processing is completed will be described.

先ず、印刷行列制御スレッド0235は、画像形成スレッド2(0534)からの印刷要求を受けると、図9で示す印刷行列制御要求待ちから開放され(S300)、印刷行列制御要求の種類を判断する(S301、S306、S308、S310)。この場合、要求は印刷要求であるので(S301がYES)、印刷行列0246の最後尾に新しい印刷行列要素を1つ作成しキューイングする(例えば、図12(a)のcやgの処理)。この時、印刷行列要素には、要求のあった画像のアドレス(画像データメモリ0242のアドレス)、解像度、階調、用紙サイズ、紙種、給紙口、排紙口等の印刷処理に必要な情報をセットする(S302)。   First, when receiving a print request from the image forming thread 2 (0534), the print queue control thread 0235 is released from the print queue control request wait shown in FIG. 9 (S300), and determines the type of print queue control request (S300). S301, S306, S308, S310). In this case, since the request is a print request (YES in S301), one new print matrix element is created and queued at the end of the print matrix 0246 (for example, processes c and g in FIG. 12A). . At this time, the print matrix elements are required for print processing such as the requested image address (image data memory 0242 address), resolution, gradation, paper size, paper type, paper feed port, paper discharge port, and the like. Information is set (S302).

印刷行列要素のキューイングが終了すると、印刷行列制御スレッド0235は、PPRエンジン制御スレッド0236に対して印刷開始要求を送り(S303)、印刷開始要求受付の通知があるまで待機する(S304)。   When the queuing of print matrix elements is completed, the print matrix control thread 0235 sends a print start request to the PPR engine control thread 0236 (S303), and waits until a print start request acceptance notification is received (S304).

PPRエンジン制御スレッド0236は、印刷行列制御スレッド0235から印刷開始要求を受け取ると、待機状態から解放され(S400)、要求又は通知の種類を判断する(S401、S406、S411、S412)。この場合、印刷開始要求であるので(S401がYES)、既に他の画像データをPPRエンジン8に対して転送中であるかどうか判断する(S402)。   When receiving the print start request from the print queue control thread 0235, the PPR engine control thread 0236 is released from the standby state (S400), and determines the type of request or notification (S401, S406, S411, S412). In this case, since it is a print start request (YES in S401), it is determined whether other image data is already being transferred to the PPR engine 8 (S402).

転送中でない場合は(S402がNO)、先ず、印刷行列にキューイングされている印刷行列要素を取得し、PPRエンジン8に対して印刷行列要素に設定されている印刷処理に必要な解像度、階調、用紙サイズ、給紙口等の指定に関する情報を送る(S403)。その後、印刷行列要素に設定されている画像のアドレスが示す場所(画像データメモリ0242)から印刷対象となる画像データをPPRエンジン8へ転送を開始する(S404)(例えば、図12(a)のdやhの処理)。転送開始後、PPRエンジン制御スレッド0236は転送の終了を待たずに印刷開始要求受付完了通知を印刷行列制御スレッド0235へ返す(S405)。また、前述の画像データ転送中か否かの判断において転送中と判断された場合(S402がYES)は、PPRエンジン8への画像データの転送等は行わずに印刷開始要求受付完了通知をすぐに印刷行列制御スレッド0235へ返す(S405)。   If it is not being transferred (NO in S402), first, the print matrix elements queued in the print matrix are acquired, and the resolution and floor required for the print processing set in the print matrix elements for the PPR engine 8 are acquired. Information relating to designation of the key, paper size, paper feed port, etc. is sent (S403). Thereafter, transfer of image data to be printed from the location (image data memory 0242) indicated by the image address set in the print matrix element is started to the PPR engine 8 (S404) (for example, FIG. 12A). d and h)). After starting the transfer, the PPR engine control thread 0236 returns a print start request acceptance completion notification to the print queue control thread 0235 without waiting for the end of the transfer (S405). If it is determined that the image data is being transferred (YES in S402), the image data transfer to the PPR engine 8 is not performed, and a print start request acceptance completion notification is immediately issued. To the print queue control thread 0235 (S405).

これにより、印刷行列制御スレッド0235は、PPRエンジン制御スレッド0236からPPRエンジン8への画像データ等の転送終了を待つことなく、要求の受付が正常に処理されたことを確認した上で、画像形成スレッド2(0534)へ印刷要求の受付を通知することができる(S305)。その結果、画像形成スレッド2(0534)の待機時間を最小限に抑えて、画像形成スレッド2(0534)に割り当てられたCPUコアのCPU時間を最大限活用することができる。   As a result, the print queue control thread 0235 confirms that the reception of the request has been processed normally without waiting for the transfer of the image data and the like from the PPR engine control thread 0236 to the PPR engine 8 to be completed. The thread 2 (0534) can be notified of acceptance of the print request (S305). As a result, the waiting time of the image forming thread 2 (0534) can be minimized, and the CPU time of the CPU core assigned to the image forming thread 2 (0534) can be utilized to the maximum.

PPRエンジン制御スレッド0236から画像データの転送を受けたPPRエンジン8は、図11で示すように画像データ転送が終了すると、割込みにより何れかのCPUコアにディスパッチされる(S500がYES)。ディスパッチされたPPRエンジン8は、PPRエンジン制御スレッド0236に対して画像データ転送終了を通知した後(S501)、割込み処理を終了してCPUコアを解放する。   The PPR engine 8 that has received the image data transfer from the PPR engine control thread 0236, as shown in FIG. 11, is dispatched to one of the CPU cores by interruption (YES in S500). The dispatched PPR engine 8 notifies the PPR engine control thread 0236 of the end of image data transfer (S501), ends the interrupt processing, and releases the CPU core.

PPRエンジン制御スレッド0236は、PPRエンジン8からの画像データ転送終了の通知により、待機状態から解放され(S400)、要求又は通知の種類を判断する(S401、S406、S411、S412)。この場合、画像転送終了通知であるので(S406がYES)、印刷行列制御スレッド0235に対して画像データの転送終了を通知する(S407)。   The PPR engine control thread 0236 is released from the standby state by the notification of the end of image data transfer from the PPR engine 8 (S400), and determines the type of request or notification (S401, S406, S411, S412). In this case, since this is an image transfer end notification (YES in S406), the print matrix control thread 0235 is notified of the end of image data transfer (S407).

通知後は印刷行列0246に次の印刷行列要素がキューイングされているかどうかを確認し(S408)、次の印刷行列要素が作成されていない場合は、次の要求及び通知に備えて待機する(S400)。次の印刷行列要素が作成されている場合、具体的には、PPRエンジン制御スレッド0236が印刷開始要求の受付時に他の画像データを転送中であったため(S402がYES)、PPRエンジン8への画像転送を行うことなく印刷開始要求受付完了通知を印刷行列制御スレッド0235へ返していた場合は(S405)、本来なら印刷開始要求の受付時に行われるはずであった処理(S403、S404に該当する処理)を行う。先ず、印刷行列要素を取得し、PPRエンジン8に対して印刷行列要素にセットされている印刷処理に必要な解像度、階調、用紙サイズ、給紙口等の指定に関する情報を送る(S409)。その後、印刷行列要素にセットされている画像のアドレスが示す場所(画像データメモリ0242)から印刷対象となる画像データをPPRエンジン8への転送を開始する(S410)。なお、さらに次の印刷行列要素がある場合は、画像データ転送終了後、PPRエンジン8による画像転送終了割込み処理から始まる一連の処理により、前述した同様の処理が行われ、次の印刷行列要素の画像データについても転送が行われる。   After the notification, it is confirmed whether or not the next print matrix element is queued in the print matrix 0246 (S408). If the next print matrix element has not been created, it waits for the next request and notification ( S400). When the next print matrix element has been created, specifically, because the PPR engine control thread 0236 is transferring other image data when accepting the print start request (YES in S402), the process proceeds to the PPR engine 8. When the print start request acceptance completion notification is returned to the print queue control thread 0235 without performing image transfer (S405), the processing that should have been originally performed at the time of accepting the print start request (corresponding to S403 and S404) Process). First, a print matrix element is acquired, and information relating to designation of resolution, gradation, paper size, paper feed port, etc. necessary for the printing process set in the print matrix element is sent to the PPR engine 8 (S409). Thereafter, transfer of the image data to be printed to the PPR engine 8 is started from the location (image data memory 0242) indicated by the address of the image set in the print matrix element (S410). If there is a next print matrix element, the same process as described above is performed by a series of processes starting from the image transfer end interrupt process by the PPR engine 8 after the image data transfer is completed. The image data is also transferred.

また、画像データの転送終了通知を受けた印刷行列制御スレッド0235は、待機状態から解放され(S300)、印刷行列制御要求の種類を判断する(S301、S306、S308、S310)。この場合、要求は画像データの転送終了通知であるので(S308がYES)、転送が終了した画像データ(画像データメモリ0242)を圧縮し、印刷行列0246の該当する行列要素中に記載されている画像データのアドレスを圧縮後の画像データのアドレスに更新する。また、画像データ圧縮済みフラグも圧縮済みに更新する(S309)。ここで、画像転送終了通知後も画像データを削除することなく圧縮するに止めているのは、PPRエンジン8内における印刷処理が正常に終了しなかった場合に、再度PPRエンジン制御スレッド0236からの画像データの転送が行うことで印刷処理の信頼性を確保するためである。   The print queue control thread 0235 that has received the image data transfer end notification is released from the standby state (S300), and determines the type of print queue control request (S301, S306, S308, S310). In this case, since the request is an image data transfer end notification (YES in S308), the transferred image data (image data memory 0242) is compressed and described in the corresponding matrix element of the print matrix 0246. The image data address is updated to the compressed image data address. Further, the image data compressed flag is also updated to be compressed (S309). Here, after the image transfer completion notification, the image data is not compressed but deleted without being deleted. If the printing process in the PPR engine 8 does not end normally, the PPR engine control thread 0236 again returns. This is to ensure the reliability of the printing process by transferring the image data.

次に、PPRエンジン8への画像データの転送終了後、PPRエンジン8での印刷処理が終了し、排紙口から正常に用紙が出力された場合(以降、完全排紙と称する)について説明する。PPRエンジン8は、図11で示すように完全排紙状態になると、割込みにより何れかのCPUコアにディスパッチされる(S502がYES)。ディスパッチされたPPRエンジン8は、PPRエンジン制御スレッド0236に対して完全排紙を通知した後(S503)、割込み処理を終了してCPUコアを解放する。   Next, a case will be described in which after the transfer of the image data to the PPR engine 8 is finished, the printing process in the PPR engine 8 is finished, and the paper is normally output from the paper discharge port (hereinafter referred to as complete paper discharge). . When the PPR engine 8 is in a complete paper discharge state as shown in FIG. 11, it is dispatched to one of the CPU cores by interruption (YES in S502). The dispatched PPR engine 8 notifies the PPR engine control thread 0236 of complete paper discharge (S503), ends the interrupt processing, and releases the CPU core.

PPRエンジン制御スレッド0236は、PPRエンジン8からの完全排紙の通知により、待機状態から解放され(S400)、要求又は通知の種類を判断する(S401、S406、S411、S412)。この場合、完全排紙通知であるので(S411がYES)、印刷行列制御スレッド0235に対して印刷終了を通知する(S412)。通知後は、次の要求及び通知に備えて待機する(S400)。   The PPR engine control thread 0236 is released from the standby state by the notification of the complete discharge from the PPR engine 8 (S400), and determines the type of request or notification (S401, S406, S411, S412). In this case, since it is a complete paper discharge notification (YES in S411), the print queue control thread 0235 is notified of the end of printing (S412). After the notification, it waits for the next request and notification (S400).

印刷終了通知を受けた印刷行列制御スレッド0235は、待機状態から解放され(S300)、印刷行列制御要求の種類を判断する(S301、S306、S308、S310)。この場合、要求は印刷終了の通知であるので(S306がYES)、印刷行列0246内の印刷が終了した画像の印刷行列要素を参照し、その画像データメモリ0242のアドレスを取得して該当する画像データメモリ0242を開放する。その後、その印刷行列要素を削除する(S307)。これにより、クライアントPC1等から送られた印刷データは完全に削除される。   The print queue control thread 0235 that has received the print end notification is released from the standby state (S300), and determines the type of print queue control request (S301, S306, S308, S310). In this case, since the request is a notification of the end of printing (YES in S306), the address of the image data memory 0242 is obtained by referring to the print matrix element of the image in the print matrix 0246, and the corresponding image is obtained. The data memory 0242 is released. Thereafter, the print matrix element is deleted (S307). As a result, the print data sent from the client PC 1 or the like is completely deleted.

以上のように、本実施形態によれば、画像形成スレッド1(0532)及び画像形成スレッド2(0534)を受信制御やPPRエンジン制御などのI/O処理を行うスレッドに比べプライオリティを高く設定して動作させることで、画像形成スレッドが印刷装置3(PPR)のCPU9のコアを優先的に利用することができる。その結果、画像形成スレッドへの割り込みが減少し、処理の中断や中断に伴うレジスタへの退避/復帰等に要するオーバヘッドの影響を抑制することができる。また、画像形成スレッドがレディ状態で待機する時間も短くすることができる。これにより、画像形成スレッドへ割り当てるCPU時間を長くすることができる。   As described above, according to this embodiment, the image forming thread 1 (0532) and the image forming thread 2 (0534) are set to have higher priority than threads that perform I / O processing such as reception control and PPR engine control. The image forming thread can preferentially use the core of the CPU 9 of the printing apparatus 3 (PPR). As a result, the number of interruptions to the image forming thread is reduced, and the influence of overhead required for processing interruption and saving / restoring to a register accompanying the interruption can be suppressed. In addition, the time that the image forming thread waits in the ready state can be shortened. Thereby, the CPU time allocated to the image forming thread can be lengthened.

また、本実施形態では、画像形成スレッド1(0532)と画像形成スレッド2(0534)間のデータの受け渡し場所であるPDLバッファ0247をダブルバッファ化し、それぞれのスレッドが異なるバッファを利用することにより、最も時間を要する画像形成処理を行う画像形成スレッド1(0532)と画像形成スレッド2(0534)の並列化を高めることができる。これにより、割り当てられたCPU時間を有効に活用することができる。   In this embodiment, the PDL buffer 0247, which is a data transfer location between the image forming thread 1 (0532) and the image forming thread 2 (0534), is double-buffered, and each thread uses a different buffer. The parallelization of the image forming thread 1 (0532) and the image forming thread 2 (0534) for performing the image forming process that requires the most time can be enhanced. Thereby, the allocated CPU time can be utilized effectively.

また、本実施形態では、画像形成スレッド2(0534)が行う印刷要求に対して、PPRエンジン8での実際の印刷やPPRエンジン8での印刷に伴うデータの転送の終了を待つことなく、画像形成スレッド2(0534)に制御を戻している。これにより、画像形成スレッド2(0534)に割り当てられたCPU時間を無駄にすることなく有効に活用することができる。   In this embodiment, in response to a print request made by the image forming thread 2 (0534), the image is not waited for the actual printing in the PPR engine 8 or the completion of data transfer accompanying the printing in the PPR engine 8. Control is returned to forming thread 2 (0534). As a result, the CPU time allocated to the image forming thread 2 (0534) can be effectively utilized without wasting it.

以上により、画像形成処理を高速に行う印刷装置3(PPR)を提供することができる。
なお、ここでは、4つのコアを有するCPUについて説明したが、コアが2つのデュアルコアCPUの場合も同様の効果を得ることができる。
As described above, it is possible to provide the printing apparatus 3 (PPR) that performs image forming processing at high speed.
Although a CPU having four cores has been described here, the same effect can be obtained when the core is a dual-core CPU having two cores.

(実施形態2)
次に、本発明の実施形態2について説明する。尚、以下で説明する実施形態2以降は、前述の実施形態1の処理を前提として、条件に応じてスレッド数を設定する例を示すものである。
(Embodiment 2)
Next, Embodiment 2 of the present invention will be described. In the second and subsequent embodiments described below, an example in which the number of threads is set according to a condition on the premise of the processing of the first embodiment described above is shown.

本実施形態はスレッド数の設定をCPU9のコア数で決定する構成であり、クライアントPC1の構成や印刷装置3(PPR)の構成等は前述の実施形態1と同様である。なお、スレッド数とは画像形成処理に割り当てるスレッドの数のことである。以下、図13に示すフローチャートを使用して本実施形態の処理を説明する。   In the present embodiment, the setting of the number of threads is determined by the number of cores of the CPU 9, and the configuration of the client PC 1, the configuration of the printing apparatus 3 (PPR), and the like are the same as those in the first embodiment. The number of threads is the number of threads assigned to the image forming process. Hereinafter, the processing of this embodiment will be described using the flowchart shown in FIG.

この処理は、前述のジョブ開始コマンド検出後に行われるスレッド数決定ルーチン(図6のS106)によって呼び出されるルーチンである。先ずマルチコアCPUであるCPU9のコア数を獲得する(ステップ(以下、SPで示す)1)。このコア数の情報は、印刷装置3(PPR)内のROM6に記録されているシステム制御プログラムによりシステム情報として読み出すことができる。   This process is a routine called by the thread number determination routine (S106 in FIG. 6) performed after the above-described job start command is detected. First, the number of cores of the CPU 9 which is a multi-core CPU is acquired (step (hereinafter referred to as SP) 1). The information on the number of cores can be read out as system information by a system control program recorded in the ROM 6 in the printing apparatus 3 (PPR).

次に、スレッド数の初期値として2をセットする(SP2)。次に、読み出したコア数の情報に基づいて、コア数が1を越えているか、即ち2以上であるか判断する(SP3)。ここで、コア数が2以上である場合(SP3がYES)、上記初期設定したスレッド数である2がスレッド数となる。一方、コア数が1を越えていない場合、スレッド数を1に変更する(SP3がNO、STP4)。   Next, 2 is set as the initial value of the number of threads (SP2). Next, based on the read information on the number of cores, it is determined whether the number of cores exceeds 1 or 2 or more (SP3). Here, when the number of cores is 2 or more (SP3 is YES), 2 as the number of threads set as the initial setting is the number of threads. On the other hand, if the number of cores does not exceed 1, the number of threads is changed to 1 (SP3 is NO, STP4).

スレッド数の設定が2の場合は前述したとおり、画像形成処理をそれぞれ異なるCPUコアが割り当てられた2つのスレッド(画像形成スレッド1(0532)と画像形成スレッド2(0534))が処理する。一方、スレッド数の設定が1の場合は、前述したスレッド数確認処理における判断(図6のS114)がYESとなり、スレッド数が2の場合では画像形成スレッド2(0534)が処理していた中間PDLコマンドの解析、画像展開、印刷要求等の処理を、画像形成スレッド1(0532)が処理する。これにより、画像形成処理が1つのCPUコアに割り当てられた1つのスレッドで処理される。   When the number of threads is set to 2, as described above, the image forming process is performed by two threads (image forming thread 1 (0532) and image forming thread 2 (0534)) to which different CPU cores are assigned. On the other hand, when the setting of the number of threads is 1, the determination in the thread number confirmation process described above (S114 in FIG. 6) is YES, and when the number of threads is 2, the image forming thread 2 (0534) is in the middle of processing. Processing such as PDL command analysis, image expansion, and print request is processed by the image forming thread 1 (0532). Thereby, the image forming process is processed by one thread assigned to one CPU core.

以上のように、本実施形態では印刷装置3(PPR)が有するコア数を意識することなく、CPUコア数に応じた最適なスレッド数で並列動作させることができ、効率よく画像形成の高速化を図ることができる。これにより、画像形成処理を高速に行う印刷装置3(PPR)を提供することができる。
(実施形態3)
次に、本発明の実施形態3について説明する。
As described above, in this embodiment, it is possible to operate in parallel with the optimum number of threads corresponding to the number of CPU cores without being aware of the number of cores of the printing apparatus 3 (PPR), and to efficiently speed up image formation. Can be achieved. Thereby, it is possible to provide a printing apparatus 3 (PPR) that performs image forming processing at high speed.
(Embodiment 3)
Next, a third embodiment of the present invention will be described.

本実施形態はスレッド数の設定をメモリサイズに従って決定する構成でありクライアントPC1の構成や印刷装置3(PPR)の構成等は前述の実施形態1と同様である。なお、スレッド数とは画像形成処理に割り当てるスレッドの数のことである。以下、図14に示すフローチャートを使用して本実施形態の処理を説明する。   In this embodiment, the setting of the number of threads is determined according to the memory size, and the configuration of the client PC 1 and the configuration of the printing apparatus 3 (PPR) are the same as those in the first embodiment. The number of threads is the number of threads assigned to the image forming process. Hereinafter, the processing of this embodiment will be described with reference to the flowchart shown in FIG.

本実施形態の処理も、前述のジョブ開始コマンド検出後に行われるスレッド数決定ルーチン(図6のS106)によって呼び出されるルーチンである。先ずメモリサイズの情報を獲得する(ステップ(以下、SPで示す)11)。このメモリサイズの情報も、印刷装置3(PPR)内のROM6に記録されているシステム制御プログラムによりシステム情報として読み出すことができる。   The processing of this embodiment is also a routine called by the thread number determination routine (S106 in FIG. 6) performed after the above-described job start command is detected. First, memory size information is acquired (step (hereinafter referred to as SP) 11). This memory size information can also be read out as system information by the system control program recorded in the ROM 6 in the printing apparatus 3 (PPR).

次に、本実施形態においても、スレッド数の初期値として2をセットする(SP12)。以下、獲得したメモリサイズの情報に従ってスレッド数の設定を行う。すなわち、読み出したメモリサイズが512MB以上の場合、上記初期設定したスレッド数を維持し、このスレッド数が2に設定される(SP13がYES)。   Next, also in this embodiment, 2 is set as the initial value of the number of threads (SP12). Hereinafter, the number of threads is set according to the acquired memory size information. That is, when the read memory size is 512 MB or more, the number of threads initially set is maintained, and the number of threads is set to 2 (YES in SP13).

一方、メモリサイズが512MB未満の場合、スレッド数として1を設定する(SP13がNO、SP14)。
以上のように、本実施形態ではメモリサイズに対応して、自動的に最適なスレッド数の設定で並列動作させることができ、メモリサイズを意識することなく、効率よく画像形成の高速化を図ることができる。これにより、画像形成処理を高速に行う印刷装置3(PPR)を提供することができる。
(実施形態4)
次に、本発明の実施形態4について説明する。
On the other hand, when the memory size is less than 512 MB, 1 is set as the number of threads (SP13 is NO, SP14).
As described above, according to the present embodiment, it is possible to automatically perform the parallel operation with the optimum number of threads corresponding to the memory size, and to efficiently speed up image formation without being conscious of the memory size. be able to. Thereby, it is possible to provide a printing apparatus 3 (PPR) that performs image forming processing at high speed.
(Embodiment 4)
Next, a fourth embodiment of the present invention will be described.

本実施形態は、文書ファイル印刷の為にアプリケーション(APL)より指定された解像度及び階調数に従ってスレッド数の設定を行うものである。なお、スレッド数とは画像形成処理に割り当てるスレッドの数のことである。以下、図15に示すフローチャートを使用して本実施形態の処理を説明する。   In this embodiment, the number of threads is set in accordance with the resolution and the number of gradations specified by the application (APL) for printing a document file. The number of threads is the number of threads assigned to the image forming process. Hereinafter, the processing of this embodiment will be described using the flowchart shown in FIG.

本実施形態の処理も、前述のジョブ開始コマンド検出後に行われるスレッド数決定ルーチン(図6のS106)によって呼び出されるルーチンである。ここでは、ジョブ開始コマンドのオペランドとして指定される解像度と階調数を利用する。先ず指定された解像度が1200dpiより大きいかどうか判断される(ステップ(以下、SPで示す)21)。解像度が1200dpiより大きい場合は、スレッド数を1に設定する(SP21がYES、SP22)。   The processing of this embodiment is also a routine called by the thread number determination routine (S106 in FIG. 6) performed after the above-described job start command is detected. Here, the resolution and the number of gradations specified as the operands of the job start command are used. First, it is determined whether or not the designated resolution is greater than 1200 dpi (step (hereinafter referred to as SP) 21). If the resolution is greater than 1200 dpi, the number of threads is set to 1 (YES in SP21, SP22).

解像度が1200dpi以下の場合は、さらに解像度が600dpiより大きいかどうか判断される(SP23)。解像度が600dpiより大きい場合は、さらに指定された階調数が2より大きいかどうか判断される(SP23がYES、SP24)。ここで、階調数が2より大きい場合は、スレッド数を1に設定し(SP22)、階調数が2以下の場合は、スレッド数を2に設定する(SP27)。   If the resolution is 1200 dpi or less, it is further determined whether or not the resolution is greater than 600 dpi (SP23). If the resolution is greater than 600 dpi, it is further determined whether or not the designated number of gradations is greater than 2 (SP23 is YES, SP24). Here, when the number of gradations is greater than 2, the number of threads is set to 1 (SP22), and when the number of gradations is 2 or less, the number of threads is set to 2 (SP27).

また、解像度が600dpi以下の場合は(SP23がNO)、さらに解像度が600dpiかどうか判断され(SP25)、解像度が600dpiでない場合、つまり解像度が600dpi未満の場合は(SP25がNO)、スレッド数を2に設定する(SP27)。   If the resolution is 600 dpi or less (SP23 is NO), it is further determined whether the resolution is 600 dpi (SP25). If the resolution is not 600 dpi, that is, if the resolution is less than 600 dpi (SP25 is NO), the number of threads is set. 2 is set (SP27).

一方、解像度が600dpiである場合は(SP25がYES)、さらに階調数が16以上かどうか判断される(SP26)。階調数が16以上であった場合は、スレッド数を1に設定し(SP26がYES、SP22)、階調数が16未満であった場合は、スレッド数を2に設定する(SP26がNO、SP27)。   On the other hand, when the resolution is 600 dpi (SP25 is YES), it is further determined whether the number of gradations is 16 or more (SP26). When the number of gradations is 16 or more, the number of threads is set to 1 (SP26 is YES, SP22), and when the number of gradations is less than 16, the number of threads is set to 2 (SP26 is NO). , SP27).

以上のように、本実施形態ではジョブ開始コマンドで指定された解像度及び階調数に対応して自動的に最適なスレッド数の設定で並列動作させることができ、解像度及び階調数を意識することなく、効率よく画像形成の高速化を図ることができる。これにより、画像形成処理を高速に行う印刷装置3(PPR)を提供することができる。
(実施形態5)
次に、本発明の実施形態5について説明する。
As described above, according to the present embodiment, it is possible to automatically perform the parallel operation with the optimum number of threads corresponding to the resolution and the number of gradations specified by the job start command, and be aware of the resolution and the number of gradations. Therefore, it is possible to efficiently increase the speed of image formation. Thereby, it is possible to provide a printing apparatus 3 (PPR) that performs image forming processing at high speed.
(Embodiment 5)
Next, a fifth embodiment of the present invention will be described.

本実施形態は、文書ファイル印刷の為にアプリケーション(APL)より指定された用紙サイズに従ってスレッド数の設定を行うものである。なお、スレッド数とは画像形成処理に割り当てるスレッドの数のことである。以下、図16に示すフローチャートを使用して本実施形態の処理を説明する。   In this embodiment, the number of threads is set in accordance with the paper size designated by the application (APL) for printing a document file. The number of threads is the number of threads assigned to the image forming process. Hereinafter, the processing of this embodiment will be described using the flowchart shown in FIG.

本実施形態の処理も、前述のジョブ開始コマンド検出後に行われるスレッド数決定ルーチン(図6のS106)によって呼び出されるルーチンである。ここでは、ジョブ開始コマンドのオペランドとして指定される用紙サイズを利用する。先ず指定された用紙サイズを元に定型紙が指定されているかどうか判断される(ステップ(以下、SPで示す)31)。定型紙が指定されていた場合は、さらに用紙サイズがB4以上のサイズかどうか判断される(SP31がYES、SP32)。ここで、B4以上のサイズであった場合は、スレッド数を1に設定し(SP32がYES、SP33)、B4未満のサイズであった場合は、スレッド数を2に設定する(SP32がNO、SP35)。   The processing of this embodiment is also a routine called by the thread number determination routine (S106 in FIG. 6) performed after the above-described job start command is detected. Here, the paper size specified as the operand of the job start command is used. First, it is determined whether or not a standard paper is designated based on the designated paper size (step (hereinafter referred to as SP) 31). If the standard paper is designated, it is further determined whether the paper size is B4 or larger (SP31 is YES, SP32). If the size is B4 or larger, the number of threads is set to 1 (SP32 is YES, SP33), and if the size is less than B4, the number of threads is set to 2 (SP32 is NO, SP35).

一方、用紙サイズとして非定型紙が指定されていた場合は、さらに非定型紙の用紙長が220mmより長いかどうか判断される(SP31がNO、SP34)。非定型紙の用紙長が220mmより長い場合は、スレッド数を1に設定し(SP34がYES、SP33)、非定型紙の用紙長が220mm以下の場合は、スレッド数を2に設定する(SP34がNO、SP35)。   On the other hand, if atypical paper is designated as the paper size, it is further determined whether or not the paper length of the atypical paper is longer than 220 mm (SP31 is NO, SP34). When the paper length of the non-standard paper is longer than 220 mm, the number of threads is set to 1 (SP34 is YES, SP33), and when the paper length of the non-standard paper is 220 mm or less, the number of threads is set to 2 (SP34). NO, SP35).

以上のように、本実施例ではジョブ開始コマンドで指定された用紙サイズに対応して自動的に最適なスレッド数の設定で並列動作させることができ、用紙サイズを意識することなく、効率よく画像形成の高速化が図れる。これにより、画像形成処理を高速に行う印刷装置3(PPR)を提供することができる。
(実施形態6)
次に、本発明の実施形態6について説明する。
As described above, in this embodiment, it is possible to automatically perform the parallel operation with the optimum number of threads corresponding to the paper size specified by the job start command, and to efficiently perform the image without being aware of the paper size. The formation speed can be increased. Thereby, it is possible to provide a printing apparatus 3 (PPR) that performs image forming processing at high speed.
(Embodiment 6)
Next, a sixth embodiment of the present invention will be described.

本実施形態は1スレッド構成及び2スレッド構成におけるスレッドの処理時間を計測し、平均処理時間が短いスレッド数の設定を行うものである。なお、スレッド数とは画像形成処理に割り当てるスレッドの数のことである。以下、具体的に説明する。   In this embodiment, the processing time of a thread in the 1-thread configuration and the 2-thread configuration is measured, and the number of threads with a short average processing time is set. The number of threads is the number of threads assigned to the image forming process. This will be specifically described below.

図17は本実施形態で使用する印刷装置3(PPR)のシステム構成図である。尚、同図の構成は前述の図2に示すシステム構成と基本的に同様であるが、印刷装置3(PPR)内に時間計測手段10、及び処理時間記憶手段11を含む。尚、他の構成は前述の図2と同様であり、図2と同じ回路には同じ番号を付し、構成上の説明を省略する。   FIG. 17 is a system configuration diagram of the printing apparatus 3 (PPR) used in the present embodiment. 2 is basically the same as the system configuration shown in FIG. 2 described above, but includes a time measuring means 10 and a processing time storage means 11 in the printing apparatus 3 (PPR). Other configurations are the same as those in FIG. 2 described above, and the same circuits as those in FIG.

時間計測手段10は各コア9a〜9dがスレッド処理を実行する際の処理時間を計測する機能を有し、具体的な計測処理については後述する。なお、ここでスレッド処理とは、画像形成処理を行うスレッドによる処理のことである。また、処理時間記憶手段11は、例えば図18に示す処理時間テーブルで構成され、1スレッド構成及び2スレッド構成時の各累積処理時間、累積頁数、及び1頁当たりの平均処理時間を記憶する。   The time measuring means 10 has a function of measuring the processing time when each of the cores 9a to 9d executes thread processing, and specific measurement processing will be described later. Here, the thread processing is processing by a thread that performs image forming processing. Further, the processing time storage means 11 is constituted by, for example, a processing time table shown in FIG. 18, and stores the accumulated processing time, the number of accumulated pages, and the average processing time per page in the 1-thread configuration and the 2-thread configuration. .

なお、画像形成スレッド(画像形成スレッド1(0532)及び画像形成スレッド2(0534))以外のスレッドについては、実施形態1と同様の処理となるので、ここでは説明を省略する(図5及び図9から図11)。また、スレッドの初期化処理についても実施形態1と同様の処理となるので同じく説明を省略する(図3及び図4)。   Since threads other than the image forming thread (image forming thread 1 (0532) and image forming thread 2 (0534)) are the same as those in the first embodiment, description thereof is omitted here (FIGS. 5 and 5). 9 to FIG. 11). Since the thread initialization process is the same as that of the first embodiment, the description thereof is omitted (FIGS. 3 and 4).

図19に示すフローチャートは中間PDL変換部0232による画像形成スレッド1(0532)の処理を説明するものであり、実施形態1における図6に対応するものである。実施形態1における図6との相違点は、スレッド数の決定処理(SP110)、画像形成スレッド1(0532)の計測開始(SP101)、終了(SP126、SP151)、1スレッド構成の処理時間更新(SP152)、スレッド数判断処理(SP125)のみである。   The flowchart shown in FIG. 19 explains the processing of the image forming thread 1 (0532) by the intermediate PDL conversion unit 0232, and corresponds to FIG. 6 in the first embodiment. The difference from FIG. 6 in the first embodiment is that the number of threads is determined (SP110), the measurement start (SP101) and end (SP126, SP151) of the image forming thread 1 (0532), and the processing time update of one thread configuration ( SP152), only the thread number determination process (SP125).

以下、図19に示す中間PDL変換部0232による画像形成スレッド1(0532)の処理について具体的に説明する。先ず、画像形成スレッド1(0532)は、受信制御スレッド0230により印刷データが受信バッファ0240に格納されるまで待機する(ステップ(以下、SPで示す)100)。受信バッファ0240に印刷データが格納されると画像形成スレッド1(0532)の処理時間を計測するため、計測処理を開始する(SP101)。具体的には、図20に示す処理に従って実行され、先ず画像形成スレッド1(0532)の時間計測中フラグがオフであるか判断される(SP102)。尚、画像形成スレッド1(0532)の時間計測中フラグは初期状態ではオフに設定されているため(SP102がYES)、画像形成スレッド1(0532)の時間計測中フラグをオンにセットし、時間計測手段10(タイマ1)による時間計測を開始する(SP103、SP104)。   Hereinafter, the processing of the image forming thread 1 (0532) by the intermediate PDL conversion unit 0232 shown in FIG. 19 will be specifically described. First, the image forming thread 1 (0532) waits until print data is stored in the reception buffer 0240 by the reception control thread 0230 (step (hereinafter referred to as SP) 100). When print data is stored in the reception buffer 0240, measurement processing is started in order to measure the processing time of the image forming thread 1 (0532) (SP101). Specifically, it is executed according to the processing shown in FIG. 20, and it is first determined whether or not the time measuring flag of the image forming thread 1 (0532) is off (SP102). Since the time measuring flag of the image forming thread 1 (0532) is set to OFF in the initial state (SP102 is YES), the time measuring flag of the image forming thread 1 (0532) is set to ON and time is set. Time measurement by the measuring means 10 (timer 1) is started (SP103, SP104).

その後、図19に示すフローチャートに戻って、格納された印刷データ中からPDLコマンドを順次取り出す(SP105)。取り出したPDLコマンドは、印刷装置3(PPR)の仕様に合致した中間PDLの形式に変換され、中間PDLコマンドとして、中間PDL生成中PDLバッファにバッファリングされる(SP106)。   Thereafter, returning to the flowchart shown in FIG. 19, PDL commands are sequentially extracted from the stored print data (SP105). The extracted PDL command is converted into an intermediate PDL format that conforms to the specifications of the printing apparatus 3 (PPR), and is buffered in the intermediate PDL generation PDL buffer as an intermediate PDL command (SP106).

なお、PDLコマンド及び中間PDLコマンドには、ジョブ開始コマンド、ジョブ終了コマンド、頁開始コマンド、改頁コマンド等が含まれている。PDLデータおよび中間PDLデータ中の印刷ジョブは、ジョブ開始コマンドとジョブ終了コマンドで挟まれ、さらに、印刷ジョブ中の各頁に対応する箇所は頁開始コマンドと改頁コマンドに挟まれた構造となっている。   The PDL command and the intermediate PDL command include a job start command, a job end command, a page start command, a page break command, and the like. A print job in PDL data and intermediate PDL data is sandwiched between a job start command and a job end command, and a portion corresponding to each page in the print job is sandwiched between a page start command and a page break command. ing.

次に、SP107からSP124では、受信バッファ0240から取り出し変換した中間PDLコマンドの種類を判断し、引き続き受信バッファ0240から後続のデータを取り出し中間PDLコマンドへの変換処理を行うか、又は変換した中間PDLコマンドの画像形成処理に進むかを決定している。具体的には、SP107、SP109、SP119、SP122のそれぞれで、ジョブ終了コマンド、ジョブ開始コマンド、頁開始コマンド、改頁コマンドか否かを判断しそれぞれに応じた処理を行っている。いずれにも該当しない場合は、さらに中間PDL生成中PDLバッファの空き状況を確認している(SP123)。   Next, in SP107 to SP124, the type of the intermediate PDL command extracted from the reception buffer 0240 and converted is determined, and subsequent data is subsequently extracted from the reception buffer 0240 and converted into an intermediate PDL command, or converted intermediate PDL It is determined whether to proceed to the command image forming process. Specifically, each of SP107, SP109, SP119, and SP122 determines whether the job end command, job start command, page start command, or page break command is being performed, and processing corresponding to each is performed. If none of the above applies, the availability of the intermediate PDL generating PDL buffer is confirmed (SP123).

基本的には、改頁コマンドが出現するまでは、受信バッファ0240から順番にPDLコマンドを取り出し、中間PDLコマンドに変換して中間PDL生成中PDLバッファへ格納する。そして、改頁コマンドの出現により、中間PDL生成中PDLバッファへ格納された中間PDLコマンドの画像形成処理へ進む。ただし、多くの場合、改頁コマンドの発生前に中間PDL生成中PDLバッファが一杯になるため、その場合は、改頁コマンドの発生を待たずに画像形成処理に進む。また、その他、ジョブ終了コマンドが出現した場合にも、これ以上現在処理中のジョブのPDLデータは存在しないため画像形成処理に進む。   Basically, until a page break command appears, the PDL commands are sequentially extracted from the reception buffer 0240, converted into intermediate PDL commands, and stored in the intermediate PDL generating PDL buffer. Then, when the page break command appears, the process proceeds to the image forming process of the intermediate PDL command stored in the intermediate PDL generating PDL buffer. However, in many cases, the intermediate PDL generation PDL buffer is full before the page break command is generated. In this case, the process proceeds to the image forming process without waiting for the page break command to be generated. In addition, even when a job end command appears, since there is no more PDL data of the job currently being processed, the process proceeds to the image forming process.

以下、ジョブ開始コマンド、頁開始コマンド、改頁コマンド、ジョブ終了コマンドの順にそれぞれが出現した場合の処理について説明する。
まず、中間PDLコマンドがジョブ開始コマンドであった場合(SP107がYES)は、スレッド数の決定処理が開始され(SP110)、図21に示すスレッド数決定ルーチンが開始される。まず、不図示の不揮発性記憶装置に記録された図18で示す処理時間テーブルを読み出し(SP111)、1スレッド構成の場合と2スレッド構成の場合で1頁あたりの平均処理時間を比較する(SP112)。比較の結果、2スレッド構成時の1頁あたりの平均処理時間が最も少ない場合は、スレッド数を2に設定する(SP113がYES、SP114)。これに該当しない場合は、スレッド数を1に設定する(SP113がNO、SP115)。なお、処理時間テーブルの初期状態はすべての項目が0となっているので、最初はスレッド数が2と設定される。その後、画像形成スレッド1(0532)及び画像形成スレッド2(0534)の時間計測中フラグをOFFに、処理時間を0に設定する(SP116、SP117)。さらに、時間計測手段10(タイマ1およびタイマ2)もリセットして(SP118)、図19のフローチャートに戻る。
Hereinafter, processing when each of the job start command, page start command, page break command, and job end command appears in this order will be described.
First, when the intermediate PDL command is a job start command (YES in SP107), the thread number determination process is started (SP110), and the thread number determination routine shown in FIG. 21 is started. First, the processing time table shown in FIG. 18 recorded in a nonvolatile storage device (not shown) is read (SP111), and the average processing time per page is compared between the one-thread configuration and the two-thread configuration (SP112). ). If the average processing time per page in the two-thread configuration is the shortest as a result of comparison, the number of threads is set to two (SP113 is YES, SP114). If this is not the case, the number of threads is set to 1 (SP113 is NO, SP115). Since all items are 0 in the initial state of the processing time table, the number of threads is initially set to 2. Thereafter, the time measurement flag of the image forming thread 1 (0532) and the image forming thread 2 (0534) is set to OFF and the processing time is set to 0 (SP116, SP117). Further, the time measuring means 10 (timer 1 and timer 2) is also reset (SP118), and the process returns to the flowchart of FIG.

なお、上述したとおり図21で示すスレッド数決定ルーチンにより、先に開始された画像形成スレッド1(0532)の処理時間の計測(SP101)が、スレッド数の設定と同時に一旦初期化されてしまう。ただし、このような計測の初期化を伴うスレッド数の決定処理は、ジョブ開始コマンドが出現した場合のみ行われるものであり、後述するように、引き続き行われる画像形成スレッド1(0532)の処理の中で、再度、画像形成スレッド1(0532)の処理時間計測が開始される(SP101、SP102がYES、SP103、SP104)。通常、ジョブ開始コマンドは一連の印刷データの始めでのみ出現し、頁の途中で出現することはないため、以降は処理中に計測が初期化されることはない。   As described above, according to the thread number determination routine shown in FIG. 21, the processing time measurement (SP101) of the image forming thread 1 (0532) started earlier is temporarily initialized simultaneously with the setting of the thread number. However, the thread number determination process that accompanies such measurement initialization is performed only when a job start command appears. As will be described later, the process of the image forming thread 1 (0532) that is performed subsequently is performed. Then, the processing time measurement of the image forming thread 1 (0532) is started again (SP101 and SP102 are YES, SP103 and SP104). Normally, the job start command appears only at the beginning of a series of print data, and does not appear in the middle of the page. Therefore, the measurement is not initialized during processing thereafter.

その後、中間PDL生成中PDLバッファの容量一杯まで中間PDLコマンドがバッファリングされたか判断する(SP123)。NOと判定され場合は、受信バッファ0240を確認し、PDLコマンドをすべて処理したかどうかを判断する(SP124)。すべて処理済みの場合は、受信制御スレッド0230から新たな印刷データが受信バッファ0240へ格納されるまで待機する(SP100)。PDLコマンドをすべて処理していない場合、画像形成スレッド1(0532)の処理時間計測開始ルーチンが開始される(SP101)。先のスレッド数決定ルーチンにより画像形成スレッド1(0532)の時間計測中フラグがオフとされているため(SP102がYES)、再度、画像形成スレッド1(0532)の時間計測中フラグをオンにセットし、時間計測手段10(タイマ1)による時間計測を開始する(SP103、SP104)。   Thereafter, it is determined whether the intermediate PDL command has been buffered up to the capacity of the PDL buffer being generated (SP123). If NO is determined, the reception buffer 0240 is checked to determine whether all PDL commands have been processed (SP124). If all the data has been processed, the process waits until new print data is stored in the reception buffer 0240 from the reception control thread 0230 (SP100). When all the PDL commands are not processed, the processing time measurement start routine of the image forming thread 1 (0532) is started (SP101). Since the time measuring flag of the image forming thread 1 (0532) is turned off by the previous thread number determination routine (SP102 is YES), the time measuring flag of the image forming thread 1 (0532) is set to ON again. Then, time measurement by the time measurement means 10 (timer 1) is started (SP103, SP104).

計測を開始すると処理が未済のPDLコマンドを受信バッファ0240から順次取得し、中間PDLコマンドに変換し中間PDL生成中PDLバッファへ格納する(SP105、SP106)。なお、ジョブ開始コマンドにはオペランドとして、解像度、階調、用紙サイズ、給紙口などの各種情報が指定されている。ジョブ終了コマンドが処理されるまでの間、これらの情報は一時的に記憶され、後続の各種処理では必要に応じてこれらの情報を利用することができる。   When measurement is started, PDL commands that have not been processed are sequentially acquired from the reception buffer 0240, converted into intermediate PDL commands, and stored in the intermediate PDL generating PDL buffer (SP105, SP106). In the job start command, various information such as resolution, gradation, paper size, and paper feed port are specified as operands. Until the job end command is processed, these pieces of information are temporarily stored, and these pieces of information can be used as necessary in various subsequent processes.

次に、中間PDLコマンドが頁開始コマンドであった場合は(SP109がYES)、印刷行列制御スレッド0235に対して画像データメモリ0242の確保要求を出し(SP120)、印刷行列制御スレッド0235からの確保通知まで待機する(SP121)。印刷行列制御スレッド0235から画像メモリ確保通知を受けた画像形成スレッド1(0532)は、待機状態から解放され、ジョブ開始コマンドの場合と同様に、中間PDL生成中PDLバッファの状態や受信バッファ0240を確認して、それぞれに応じた処理を行う。   Next, when the intermediate PDL command is a page start command (SP109 is YES), a request for securing the image data memory 0242 is issued to the print matrix control thread 0235 (SP120), and the reservation from the print matrix control thread 0235 is issued. Wait until notification (SP121). The image forming thread 1 (0532) that has received the image memory reservation notification from the print queue control thread 0235 is released from the standby state, and the state of the intermediate PDL generating PDL buffer and the reception buffer 0240 are set as in the case of the job start command. Check and perform processing according to each.

次に、中間PDLコマンドが改頁コマンドであった場合(SP122がYES)は、スレッド数が2かどうか判断される(SP125)。スレッド数が2と設定されている場合、画像形成スレッド1(0532)の処理時間の計測を終了するため、計測終了処理が行われる(SP125がYES、SP126)。具体的には、図22に示す処理に従って実行され、先ず時間計測手段10(タイマ1)による計測処理を停止し(SP127)、時間計測手段10(タイマ1)の値を読み出し(SP128)、画像形成スレッド1(0532)の処理時間として、一時的に記憶する(SP129)。また、タイマ1の値をリセットし(SP130)、画像形成スレッド1(0532)の時間計測中フラグをオフにする(SP131)。なお、この時点で計測終了処理が行われるのは、引き続き実施される画像形成処理は画像形成スレッド2(0534)が担当することにより、画像形成スレッド1(0532)の実質的な処理が終了するためである。一方、スレッド数が2でないと判断される(SP125がNO)場合は、引き続き画像形成スレッド1(0532)により画像形成処理が行われるため、計測終了処理は行われない。   Next, when the intermediate PDL command is a page break command (SP122 is YES), it is determined whether the number of threads is 2 (SP125). When the number of threads is set to 2, a measurement end process is performed in order to end the measurement of the processing time of the image forming thread 1 (0532) (SP125 is YES, SP126). Specifically, it is executed in accordance with the processing shown in FIG. 22, and first the measurement processing by the time measuring means 10 (timer 1) is stopped (SP127), the value of the time measuring means 10 (timer 1) is read (SP128), and the image The processing time of the forming thread 1 (0532) is temporarily stored (SP129). Further, the value of the timer 1 is reset (SP130), and the time measuring flag of the image forming thread 1 (0532) is turned off (SP131). Note that the measurement end process is performed at this time because the image forming thread 2 (0534) takes charge of the image forming process to be subsequently performed, and the substantial process of the image forming thread 1 (0532) ends. Because. On the other hand, when it is determined that the number of threads is not 2 (SP125 is NO), the image forming process is continuously performed by the image forming thread 1 (0532), and thus the measurement end process is not performed.

次に、中間PDLコマンドがジョブ終了コマンドであった場合は(SP107がYES)、ジョブ終了内部フラグをONに設定した上で(SP108)、スレッド数が2かどうか判断される(SP125)。以降、改頁コマンドの場合と同様に、スレッド数が2の場合は、画像形成スレッド1(0532)の処理時間の計測が終了され、スレッド数が2の場合は、計測が終了されない。   Next, when the intermediate PDL command is a job end command (SP107 is YES), after setting the job end internal flag to ON (SP108), it is determined whether the number of threads is 2 (SP125). Thereafter, as in the case of the page break command, when the number of threads is 2, the measurement of the processing time of the image forming thread 1 (0532) is terminated, and when the number of threads is 2, the measurement is not terminated.

中間PDLコマンドがジョブ開始コマンド、頁開始コマンド、改頁コマンド、ジョブ終了コマンドのいずれにも該当しない場合は、中間PDL生成中PDLバッファが一杯ではない限り、引き続き受信バッファ0240からのPDLコマンドの変換処理を行う。以上の処理により、中間PDL生成中PDLバッファに中間PDLコマンドが格納される。   If the intermediate PDL command does not correspond to any of the job start command, page start command, page break command, and job end command, the conversion of the PDL command from the reception buffer 0240 is continued as long as the intermediate PDL generation PDL buffer is not full. Process. Through the above process, the intermediate PDL command is stored in the intermediate PDL generating PDL buffer.

上記のSP107からSP124で、改頁コマンドまたはジョブ終了コマンドが出現した場合、又は中間PDL生成中PDLバッファの容量が一杯となった場合、中間PDLコマンドによる画像形成処理へ進み、スレッド数の設定が1となっているかどうかが判断される(SP132)。以降では、最初の計測処理、つまり印刷データの1頁目の計測処理の場合を想定する。この場合、スレッド数が2と設定されているため、NOと判定される。   If a page break command or a job end command appears in SP107 to SP124 described above, or if the capacity of the PDL buffer during intermediate PDL generation is full, the process proceeds to image formation processing using the intermediate PDL command, and the number of threads is set. It is determined whether or not 1 (SP132). Hereinafter, the case of the first measurement process, that is, the measurement process for the first page of the print data is assumed. In this case, since the number of threads is set to 2, NO is determined.

SP133からSP138では、中間PDL生成中PDLバッファに格納された中間PDLコマンドの画像形成処理を画像形成スレッド2(0534)へ依頼している。先ず、画像形成要求中フラグがオンであるか判断する(SP133)。この画像形成要求中フラグは、図4で示すマルチスレッドの初期化ルーチン内の処理(S6)によってオフに設定されており(SP133がNO)、上記中間PDLコマンドを格納した中間PDL生成中PDLバッファ(第1のPDLバッファ0248)を、以後画像形成スレッド2(0534)が画像データ形成部0234で読み出しを行う画像形成PDLバッファに設定する(SP136)。続いて、画像形成要求中フラグをオンにセットし(SP137)、画像形成スレッド2(0534)に対して画像形成要求を出す(SP138)。すなわち、中間PDL変換部0232から画像データ形成部0234に対して画像形成要求を出力する。   In SP133 to SP138, the image forming thread 2 (0534) is requested to perform the image forming process of the intermediate PDL command stored in the intermediate PDL generating PDL buffer. First, it is determined whether the image forming request flag is on (SP133). This image formation request flag is set to OFF by the processing (S6) in the multithread initialization routine shown in FIG. 4 (SP133 is NO), and the intermediate PDL generating PDL buffer storing the intermediate PDL command is stored. Thereafter, the first PDL buffer 0248 is set as an image forming PDL buffer from which the image forming thread 2 (0534) reads by the image data forming unit 0234 (SP136). Subsequently, the image forming request flag is set on (SP137), and an image forming request is issued to the image forming thread 2 (0534) (SP138). That is, the intermediate PDL conversion unit 0232 outputs an image formation request to the image data forming unit 0234.

尚、前述の判断(SP133)において、画像形成要求中フラグがオンの場合には、画像形成スレッド2(0534)による画像形成処理の終了を待ち、画像形成要求中フラグをオフする(SP133がYES、SP134、SP135)。この処理は、画像形成スレッド2(0534)が画像形成処理を終了した際行う処理であり、後述する。   If the image forming request flag is on in the above determination (SP133), the image forming thread 2 (0534) waits for the end of the image forming process and turns off the image forming request flag (SP133 is YES). , SP134, SP135). This process is performed when the image forming thread 2 (0534) completes the image forming process, which will be described later.

SP139からSP144では、画像形成スレッド1(0532)が画像形成スレッド2(0534)へ画像形成処理を要求した後、以降の処理に備え、画像形成スレッド1(0532)の設定を変更している。   In SP139 to SP144, after the image forming thread 1 (0532) requests the image forming thread 2 (0534) to perform image forming processing, the setting of the image forming thread 1 (0532) is changed in preparation for the subsequent processing.

前半部分のSP139からSP141では、画像形成スレッド1(0532)が中間PDLコマンドを出力する中間PDL生成中PDLバッファの設定を変更する。まず、中間PDL生成中PDLバッファが第1のPDLバッファ0248か否かを判断する(SP139)。その結果、第1のPDLバッファ0248と判定した場合(SP139がYES)は、中間PDL生成中PDLバッファを第2のPDLバッファ0249へ変更し(SP141)、第1のPDLバッファ0248でない判定した場合(SP139がNO)、つまり第2のPDLバッファ0249である場合は、中間PDL生成中PDLバッファを第1のPDLバッファ0248へ変更する(SP140)。ここでは、図4で示すマルチスレッドの初期化ルーチン内の処理(S5)により第1のPDLバッファ0248が中間PDL生成中PDLバッファとして設定されているので、第2のPDLバッファ0249へ変更される。   In SP139 to SP141 in the first half, the image forming thread 1 (0532) changes the setting of the intermediate PDL generating PDL buffer that outputs the intermediate PDL command. First, it is determined whether or not the intermediate PDL generating PDL buffer is the first PDL buffer 0248 (SP139). As a result, when it is determined that the PDL buffer is the first PDL buffer 0248 (SP139 is YES), the intermediate PDL generating PDL buffer is changed to the second PDL buffer 0249 (SP141), and it is determined that the PDL buffer is not the first PDL buffer 0248 (SP139 is NO), that is, in the case of the second PDL buffer 0249, the intermediate PDL generating PDL buffer is changed to the first PDL buffer 0248 (SP140). Here, since the first PDL buffer 0248 is set as the intermediate PDL generating PDL buffer by the processing (S5) in the multithread initialization routine shown in FIG. 4, the second PDL buffer 0249 is changed. .

なお、この処理は、先に依頼した画像形成処理と、中間PDL変換処理を並列して進めるために行われる処理である。これから画像形成処理で画像形成スレッド2(0534)が利用する第1のPDLバッファ0248の内容を、画像形成スレッド1(0532)が後続の処理で上書きしないために行われる。当該処理は、印刷装置3(PPR)がダブルバッファ化したPDLバッファ0247(第1のPDLバッファ0248、第2のPDLバッファ0249)を有することで実現される仕組みであり、これにより、画像形成スレッド1(0532)は画像形成処理の要求後、画像形成処理の終了を待たずに、中間PDL変換処理を行うことができる。   This process is a process performed in order to advance the image formation process requested earlier and the intermediate PDL conversion process in parallel. This is performed so that the image forming thread 1 (0532) does not overwrite the contents of the first PDL buffer 0248 used by the image forming thread 2 (0534) in the image forming process. This processing is realized by having the PDL buffer 0247 (first PDL buffer 0248, second PDL buffer 0249) in which the printing apparatus 3 (PPR) is double-buffered. 1 (0532) can perform the intermediate PDL conversion process without waiting for the end of the image forming process after the image forming process is requested.

その後、ジョブ終了内部フラグがONであるかが判断され(SP142)、ONであると判定された場合は、先に画像形成スレッド2(0534)へ要求した画像形成処理の終了に備えて待機する(SP143)。画像形成処理の終了が通知されるとジョブ終了内部フラグがOFFに設定して(SP144)、受信バッファ0240の確認処理(SP124)へ戻る。なお、ジョブ終了内部フラグがOFFと判定された場合はすぐに受信バッファ0240の確認処理(SP124)へ戻り、引き続き中間PDL変換処理を行う。   Thereafter, it is determined whether or not the job end internal flag is ON (SP142). If it is determined that the job end internal flag is ON, it waits for the end of the image forming process requested to the image forming thread 2 (0534) first. (SP143). When the end of the image forming process is notified, the job end internal flag is set to OFF (SP144), and the process returns to the reception buffer 0240 confirmation process (SP124). If it is determined that the job end internal flag is OFF, the process immediately returns to the confirmation process (SP124) of the reception buffer 0240, and the intermediate PDL conversion process is continued.

以上、スレッド数決定ルーチンが最初に呼び出される場合を想定して、画像形成スレッド1(0532)の処理について説明したが、この場合、前述のとおりスレッド数は2と設定される。次回、スレッド数決定ルーチンが呼び出される場合(つまり、2つ目のジョブ開始コマンドが出現した場合)は、スレッド数は基本的に1と設定される。これは、図18で示す処理時間テーブル内の2スレッド構成の1頁あたりの平均処理時間は更新されているのに対し、1スレッド構成の1頁あたりの平均処理時間は初期状態のまま0となっていることから、平均処理時間の短い1スレッド構成が選択され、スレッド数が1に設定されるためである。これにより、各構成少なくとも1回は実行されることになり、平均処理時間の短い構成が適切に評価されることになる。   The processing of the image forming thread 1 (0532) has been described above assuming that the thread number determination routine is called first. In this case, the number of threads is set to 2 as described above. When the thread number determination routine is called next time (that is, when the second job start command appears), the thread number is basically set to 1. This is because the average processing time per page of the two-thread configuration in the processing time table shown in FIG. 18 is updated, while the average processing time per page of the one-thread configuration is 0 in the initial state. This is because a one-thread configuration with a short average processing time is selected and the number of threads is set to one. Accordingly, each configuration is executed at least once, and a configuration with a short average processing time is appropriately evaluated.

なお、スレッド数が1と設定されている場合は、S132におけるスレッド数の判断処理がYESとなり、SP145からSP152の処理が行われる。これは、前述したスレッド数の設定が2の場合(SP132がNO)に、画像形成要求により画像形成スレッド2(0534)で行われる処理に対応するものである。スレッド数の設定が1であるため、画像形成スレッド1(0532)自身が画像形成処理も行うことを示している。以下、具体的に説明する。   If the number of threads is set to 1, the process for determining the number of threads in S132 is YES, and the processes from SP145 to SP152 are performed. This corresponds to the processing performed by the image forming thread 2 (0534) in response to the image forming request when the above-described setting of the number of threads is 2 (SP132 is NO). Since the number of threads is set to 1, it indicates that the image forming thread 1 (0532) itself also performs image forming processing. This will be specifically described below.

スレッド数が1と判断されると、画像形成PDLバッファに格納された中間PDLコマンドを順次取り出し(SP145)、改頁コマンドかどうか判断する(SP146)。改頁コマンドでない場合(SP146がNO)は、取出した中間PDLコマンドの解析を行い、その中間PDLコマンドに対応した画像形成処理を実施し、予め印刷行列制御スレッド0235により確保された一頁分の画像データメモリ0242(画像データメモリ0243や画像データメモリ0244など要求毎に異なる)に画像を展開する(SP147)。その後、画像形成PDLバッファに格納された中間PDLコマンドをすべて処理したか判断され(SP148)、処理が未済の中間PDLコマンドがある場合は(SP148がNO)、中間PDLコマンドの取り出し処理まで戻り(SP145)、上記の処理を繰り返す。   If the number of threads is determined to be 1, the intermediate PDL commands stored in the image forming PDL buffer are sequentially extracted (SP145), and it is determined whether or not the page break command (SP146). If it is not a page break command (SP146 is NO), the extracted intermediate PDL command is analyzed, an image forming process corresponding to the intermediate PDL command is performed, and one page of pages reserved in advance by the print matrix control thread 0235 is executed. The image is developed in the image data memory 0242 (different for each request such as the image data memory 0243 and the image data memory 0244) (SP147). Thereafter, it is determined whether all the intermediate PDL commands stored in the image forming PDL buffer have been processed (SP148). If there is an intermediate PDL command that has not been processed (SP148 is NO), the process returns to the intermediate PDL command extraction process ( SP145), the above processing is repeated.

画像形成PDLバッファから取出した中間PDLコマンドが改頁コマンドである場合は、画像データメモリ0242に展開された画像について、印刷行列制御スレッド0235に対し印刷要求を出し(SP149)、印刷要求受付終了の通知があるまで待機する(SP150)。印刷行列制御スレッド0235からの印刷要求受付の通知があると、待機状態から解放され、画像形成スレッド1(0532)の処理時間の計測を終了するため、計測終了処理が行われる(SP151)。具体的には、SP126において前述した図22に示す処理に従って実行される。   If the intermediate PDL command extracted from the image formation PDL buffer is a page break command, a print request is issued to the print matrix control thread 0235 for the image developed in the image data memory 0242 (SP149), and the print request acceptance end is completed. Wait until notification is received (SP150). When there is a print request acceptance notification from the print queue control thread 0235, it is released from the standby state, and measurement end processing is performed in order to end measurement of the processing time of the image forming thread 1 (0532) (SP151). Specifically, it is executed according to the process shown in FIG.

処理時間計測終了処理が終了し一連の計測処理が終了すると、1スレッド構成における計測結果について図18に示す処理時間テーブルを更新する(SP152)。具体的には、図23に示す処理に従って実行され、1スレッド構成の累積頁数のデータを+1し(SP153)、1スレッド構成の累積処理時間に計測した画像形成スレッド1(0532)の処理時間を累積し(SP154)、1スレッド構成の平均処理時間を計算し(1スレッド構成の累積処理時間/1スレッド構成の累積頁数)、処理時間テーブルの1スレッド構成の対応するエリアに平均処理時間を記録する(SP155、SP156)。その後、画像形成スレッド1(0532)及び画像形成スレッド2(0534)の処理時間を0にリセットし(SP163)、受信バッファ0240の確認処理(SP124)へ戻り、以上の処理を繰り返す。   When the processing time measurement end processing ends and a series of measurement processing ends, the processing time table shown in FIG. 18 is updated for the measurement result in the one-thread configuration (SP152). Specifically, the processing time of the image forming thread 1 (0532), which is executed in accordance with the processing shown in FIG. (SP154), the average processing time of one thread configuration is calculated (cumulative processing time of one thread configuration / accumulated number of pages of one thread configuration), and the average processing time in the corresponding area of the one thread configuration of the processing time table Is recorded (SP155, SP156). Thereafter, the processing time of the image forming thread 1 (0532) and the image forming thread 2 (0534) is reset to 0 (SP163), the processing returns to the confirmation processing (SP124) of the reception buffer 0240, and the above processing is repeated.

図24に示すフローチャートは画像データ形成部0234による画像形成スレッド2(0534)の処理を説明するものである。先ず、画像形成スレッド2(0534)は、画像形成スレッド1(0532)により画像形成要求があるまで待機する(ステップ(以下、SPで示す)200)。画像形成要求があると画像形成スレッド2(0534)の処理時間を計測するため、計測処理を開始する(SP201)。具体的には、図25に示す処理に従って実行され、先ず画像形成スレッド2(0534)の時間計測中フラグがオフであるか判断される(SP202)。尚、画像形成スレッド2(0534)の時間計測中フラグは初期状態ではオフに設定されているため(SP202がYES)、画像形成スレッド2(0534)の時間計測中フラグをオンにセットし、時間計測手段10(タイマ2)による時間計測を開始する(SP203、SP204)。   The flowchart shown in FIG. 24 explains the processing of the image forming thread 2 (0534) by the image data forming unit 0234. First, the image forming thread 2 (0534) stands by until an image forming request is issued by the image forming thread 1 (0532) (step (hereinafter referred to as SP) 200). When there is an image formation request, measurement processing is started in order to measure the processing time of the image formation thread 2 (0534) (SP201). Specifically, the process is executed according to the processing shown in FIG. 25, and it is first determined whether or not the time measuring flag of the image forming thread 2 (0534) is off (SP202). Since the time measuring flag of the image forming thread 2 (0534) is set to OFF in the initial state (SP202 is YES), the time measuring flag of the image forming thread 2 (0534) is set to ON and time is set. Time measurement by the measuring means 10 (timer 2) is started (SP203, SP204).

その後、図24に示すフローチャートに戻って、画像形成PDLバッファに格納された中間PDLコマンドを順次取り出し(SP205)、取出した中間PDLコマンドがジョブ終了コマンドかどうか判断する(SP206)。通常、画像形成要求後の最初の中間PDLコマンドはジョブ終了コマンドではないので(SP206がNO)、さらに改頁コマンドかどうか判断する(SP208)。改頁コマンドでない場合(SP208がNO)は、取出した中間PDLコマンドの解析を行い、その中間PDLコマンドに対応した画像形成処理を実施し、予め印刷行列制御スレッド0235により確保された一頁分の画像データメモリ0242(画像データメモリ0243や画像データメモリ0244など要求毎に異なる)に画像を展開する(SP209)。その後、画像形成PDLバッファに格納された中間PDLコマンドをすべて処理したか判断され(SP210)、処理が未済の中間PDLコマンドがある場合は(SP210がNO)、中間PDLコマンドの取り出し処理まで戻り(SP205)、上記の処理を繰り返す。   Thereafter, returning to the flowchart shown in FIG. 24, the intermediate PDL commands stored in the image forming PDL buffer are sequentially extracted (SP205), and it is determined whether or not the extracted intermediate PDL command is a job end command (SP206). Normally, the first intermediate PDL command after the image formation request is not a job end command (SP206 is NO), and it is further determined whether it is a page break command (SP208). If it is not a page break command (SP208 is NO), the extracted intermediate PDL command is analyzed, image forming processing corresponding to the intermediate PDL command is performed, and one page of pages reserved in advance by the print matrix control thread 0235 is executed. The image is developed in the image data memory 0242 (different for each request such as the image data memory 0243 and the image data memory 0244) (SP209). Thereafter, it is determined whether all the intermediate PDL commands stored in the image forming PDL buffer have been processed (SP210). If there is an intermediate PDL command that has not been processed (SP210: NO), the process returns to the intermediate PDL command extraction process ( SP205), the above processing is repeated.

画像形成PDLバッファから取出した中間PDLコマンドが改頁コマンドである場合は、画像データメモリ0242に展開された画像について、印刷行列制御スレッド0235に対し印刷要求を出し(SP211)、印刷要求受付終了の通知があるまで待機する(SP212)。印刷行列制御スレッド0235からの印刷要求受付の通知があると、第2の画像形成スレッド0534は待機状態(SP212)から解放され、第2の画像形成スレッド0534の処理時間の計測を終了するため、計測終了処理が行われる(SP213)。具体的には、図26に示す処理に従って実行され、先ず時間計測手段10(タイマ2)による計測処理を停止し(SP214)、時間計測手段10(タイマ2)の値を読み出し(SP215)、画像形成スレッド2(0534)の処理時間として、一時的に記憶する(SP216)。また、タイマ2の値をリセットし(SP217)、画像形成スレッド2(0534)の時間計測中フラグをオフにする(SP218)。   If the intermediate PDL command extracted from the image formation PDL buffer is a page break command, a print request is issued to the print matrix control thread 0235 for the image developed in the image data memory 0242 (SP211), and the print request acceptance end is completed. Wait until notification is received (SP212). When there is a print request acceptance notification from the print queue control thread 0235, the second image forming thread 0534 is released from the standby state (SP212) and ends the measurement of the processing time of the second image forming thread 0534. A measurement end process is performed (SP213). Specifically, the process is executed according to the process shown in FIG. 26. First, the measurement process by the time measurement unit 10 (timer 2) is stopped (SP214), the value of the time measurement unit 10 (timer 2) is read (SP215), and the image is displayed. The processing time of the forming thread 2 (0534) is temporarily stored (SP216). Further, the value of the timer 2 is reset (SP217), and the time measuring flag of the image forming thread 2 (0534) is turned off (SP218).

処理時間計測終了処理が終了し一連の計測処理が終了すると、2スレッド構成における計測結果について図18に示す処理時間テーブルを更新する(SP219)。具体的には、図23に示す処理に従って実行され、2スレッド構成の累積頁数のデータを+1し(SP157)、画像形成スレッド2(0534)の処理時間が画像形成スレッド1(0532)の処理時間より長いか判断する(SP158)。   When the processing time measurement end processing ends and a series of measurement processing ends, the processing time table shown in FIG. 18 is updated for the measurement result in the two-thread configuration (SP219). Specifically, it is executed in accordance with the processing shown in FIG. 23, and the data of the cumulative number of pages in the 2-thread configuration is incremented by 1 (SP157), and the processing time of the image forming thread 2 (0534) is the processing of the image forming thread 1 (0532). It is determined whether it is longer than the time (SP158).

ここで、画像形成スレッド2(0534)の処理時間が画像形成スレッド1(0532)の処理時間より長い場合(SP158がYES)、画像形成スレッド1(0532)の処理時間を画像形成スレッド2(0534)の処理時間に設定する(SP159)。次に、2スレッド構成の累積処理時間に上記画像形成スレッド1(0532)の処理時間を累積し(SP160)、2スレッド構成の平均処理時間を計算し(2スレッド構成の累積処理時間/2スレッド構成の累積頁数)、処理時間テーブルの対応するエリアに平均処理時間を記録し、処理時間記憶手段11に書き込む(SP161、SP162)。   If the processing time of the image forming thread 2 (0534) is longer than the processing time of the image forming thread 1 (0532) (SP158 is YES), the processing time of the image forming thread 1 (0532) is set to the image forming thread 2 (0534). ) Is set to the processing time (SP159). Next, the processing time of the image forming thread 1 (0532) is accumulated in the cumulative processing time of the two-thread configuration (SP160), and the average processing time of the two-thread configuration is calculated (cumulative processing time of the two-thread configuration / 2 threads). The average processing time is recorded in the corresponding area of the processing time table and written in the processing time storage means 11 (SP161, SP162).

なお、上記のとおり、2スレッド構成の累積処理時間には、画像形成スレッド1(0532)及び画像形成スレッド2(0534)の合計処理時間ではなく、より時間を要したスレッドの処理時間を累積し、平均処理時間を算出している。これは、並列処理における全体の処理時間は、並列して行われる各処理時間の合算値ではなく、並列して行われる各処理時間の中の最大値に依存するためである。   As described above, the accumulated processing time of the two-thread configuration is not the total processing time of the image forming thread 1 (0532) and the image forming thread 2 (0534), but the processing time of the thread that requires more time is accumulated. The average processing time is calculated. This is because the total processing time in parallel processing depends on the maximum value among the processing times performed in parallel, not the sum of the processing times performed in parallel.

その後、画像形成スレッド1(0532)及び画像形成スレッド2(0534)の処理時間を0にリセットし(SP163)、図24に示すフローチャートに戻って、画像形成要求の要求元である画像形成スレッド1(0532)に対して、画像形成PDLバッファ(この場合、第1のPDLバッファ0248)の画像形成処理の終了通知を送り(SP220)、次の画像形成要求があるまで待機する(S200)。   Thereafter, the processing time of the image forming thread 1 (0532) and the image forming thread 2 (0534) is reset to 0 (SP163), and the process returns to the flowchart shown in FIG. 24 to return to the image forming thread 1 that is the request source of the image forming request. In response to (0532), an end notification of the image forming process in the image forming PDL buffer (in this case, the first PDL buffer 0248) is sent (SP220), and the process waits until there is a next image forming request (S200).

また、画像形成スレッド2(0534)が画像形成PDLバッファから取出した中間PDLコマンドがジョブ終了コマンドである場合(S206がYES)も、画像形成要求の要求元である画像形成スレッド1(0532)に対して、画像形成PDLバッファ(この場合、第1のPDLバッファ0248)の画像形成処理の終了通知を送り(S207)、次の画像形成要求があるまで待機する(S200)。   In addition, when the intermediate PDL command fetched from the image forming PDL buffer by the image forming thread 2 (0534) is a job end command (S206: YES), the image forming thread 1 (0532) that is the request source of the image forming request is also sent. In response to this, an end notification of the image forming process in the image forming PDL buffer (in this case, the first PDL buffer 0248) is sent (S207), and the system waits for a next image forming request (S200).

本実施形態は以上のように処理することによって、前述の実施形態2乃至5で説明したCPUの能力や、メモリサイズ、解像度/階調コマンド等を全く意識することなく、1頁あたりの平均処理時間の最も少ないスレッド構成を選択し、自動的に適切なスレッド数の設定を行うことができる。   In the present embodiment, by performing the processing as described above, the average processing per page is completely unaware of the CPU capability, memory size, resolution / gradation command, etc. described in the above-described embodiments 2 to 5. It is possible to select the thread configuration with the shortest time and automatically set an appropriate number of threads.

尚、処理時間記憶手段11に設定する処理時間テーブルを用紙サイズに対応した構成としてもよい。図27は用紙サイズ毎に1スレッド構成と2スレッド構成の累積処理時間、累積頁数、1頁当たりの平均処理時間を記録し、用紙サイズに従って最適なスレッド構成を選択するための処理時間テーブルの例を示す図である。   The processing time table set in the processing time storage unit 11 may be configured to correspond to the paper size. FIG. 27 shows a processing time table for recording the cumulative processing time, the cumulative number of pages, and the average processing time per page for each paper size and selecting the optimum thread configuration according to the paper size. It is a figure which shows an example.

上記テーブルに前述の実施形態6の処理に従ってデータを記録し、上記と同様の処理を行うことによって、スレッド構成毎であり、且つ用紙毎に1頁当たりの平均画像形成時間を求め、用紙サイズに応じて最適なスレッド数の設定を行うことができる。   Data is recorded in the table according to the process of the sixth embodiment described above, and the same process as described above is performed to obtain the average image formation time per page for each thread configuration and for each sheet. The optimum number of threads can be set accordingly.

なお、本発明は、上述の実施の形態に例示した構成に限らず、その趣旨を逸脱しない範囲で種々変更可能であることは言うまでもない。   Needless to say, the present invention is not limited to the configuration exemplified in the above-described embodiment, and various modifications can be made without departing from the spirit of the present invention.

本発明の一実施形態におけるクライアントPCと印刷装置の機能的な構成例を説明する図である。It is a figure explaining the functional structural example of client PC and printing apparatus in one Embodiment of this invention. 本発明の一実施形態におけるクライアントPCと印刷装置の構成例を説明する図である。It is a figure explaining the structural example of client PC and printing apparatus in one Embodiment of this invention. 本発明の一実施形態における画像形成スレッドの初期設定処理を説明するフローチャートである。6 is a flowchart illustrating an image forming thread initial setting process according to an embodiment of the present invention. 本発明の一実施形態における画像形成スレッドの初期設定処理を説明するフローチャートである。6 is a flowchart illustrating an image forming thread initial setting process according to an embodiment of the present invention. 本発明の一実施形態における受信制御スレッドの処理を説明するフローチャートである。It is a flowchart explaining the process of the reception control thread | sled in one Embodiment of this invention. 本発明の一実施形態における画像形成処理スレッド1の処理を説明するフローチャートである。It is a flowchart explaining the process of the image formation process thread | sled 1 in one Embodiment of this invention. 本発明の一実施形態における画像形成処理スレッド1の処理を説明するフローチャートである。It is a flowchart explaining the process of the image formation process thread | sled 1 in one Embodiment of this invention. 本発明の一実施形態における画像形成処理スレッド2の処理を説明するフローチャートである。It is a flowchart explaining the process of the image formation process thread | sled 2 in one Embodiment of this invention. 本発明の一実施形態における印刷行列制御スレッドの処理を説明するフローチャートである。It is a flowchart explaining the process of the printing matrix control thread | sled in one Embodiment of this invention. 本発明の一実施形態におけるプリンタエンジン制御スレッドの処理を説明するフローチャートである。6 is a flowchart illustrating processing of a printer engine control thread according to an embodiment of the present invention. 本発明の一実施形態におけるプリンタエンジンからの割込みによる処理を説明するフローチャートである。6 is a flowchart illustrating processing by an interrupt from a printer engine according to an embodiment of the present invention. (a)は、本発明の一実施形態の印刷データ処理を説明する模式図である。(b)は、従来の印刷データ処理を説明する模式図である。FIG. 4A is a schematic diagram illustrating print data processing according to an embodiment of the present invention. (B) is a schematic diagram illustrating conventional print data processing. 実施形態2の処理を説明するフローチャートである。10 is a flowchart illustrating processing of the second embodiment. 実施形態3の処理を説明するフローチャートである。10 is a flowchart illustrating processing according to the third embodiment. 実施形態4の処理を説明するフローチャートである。10 is a flowchart illustrating processing of the fourth embodiment. 実施形態5の処理を説明するフローチャートである。10 is a flowchart for explaining processing of the fifth embodiment. 実施形態6におけるクライアントPCと印刷装置の構成例を説明する図である。FIG. 10 is a diagram illustrating a configuration example of a client PC and a printing apparatus according to a sixth embodiment. 実施形態6における処理時間記憶手段の構成例を示す図である。It is a figure which shows the structural example of the processing time memory | storage means in Embodiment 6. 実施形態6における画像形成処理スレッド1の処理を説明するフローチャートである。18 is a flowchart for describing processing of an image forming processing thread 1 according to the sixth embodiment. 実施形態6における画像形成処理スレッド1の処理時間計測開始処理を説明するフローチャートである。18 is a flowchart for explaining processing time measurement start processing of an image forming processing thread 1 in Embodiment 6. 実施形態6におけるスレッド数決定の処理を説明するフローチャートである。18 is a flowchart for explaining processing for determining the number of threads in the sixth embodiment. 実施形態6における画像形成処理スレッド1の処理時間計測終了処理を説明するフローチャートである。18 is a flowchart illustrating processing time measurement end processing of an image forming processing thread 1 according to Embodiment 6. 実施形態6における1スレッド構成および2スレッド構成の処理時間更新処理を説明するフローチャートである。15 is a flowchart for explaining processing time update processing of a one-thread configuration and a two-thread configuration in the sixth embodiment. 実施形態6における画像形成処理スレッド2の処理を説明するフローチャートである。15 is a flowchart for describing processing of an image forming processing thread 2 in Embodiment 6. 実施形態6における画像形成処理スレッド2の処理時間計測開始処理を説明するフローチャートである。18 is a flowchart for describing processing time measurement start processing of an image forming processing thread 2 in Embodiment 6. 実施形態6における画像形成処理スレッド2の処理時間計測終了処理を説明するフローチャートである。18 is a flowchart for explaining processing time measurement end processing of an image forming processing thread 2 in Embodiment 6. 実施形態6におけるその他の処理時間記憶手段の構成例を示す図である。It is a figure which shows the structural example of the other processing time memory | storage means in Embodiment 6. 従来のクライアントPCと印刷装置の構成例を説明する図である。It is a figure explaining the structural example of the conventional client PC and a printing apparatus. 従来のクライアントPCと印刷装置の機能的な構成例を説明する図である。It is a figure explaining the functional structural example of the conventional client PC and a printing apparatus. 印刷装置の内部構成例を説明する図である。FIG. 3 is a diagram illustrating an internal configuration example of a printing apparatus.

符号の説明Explanation of symbols

1・・・・・クライアントPC
2・・・・・LAN
3・・・・・印刷装置(PPR)
4・・・・・CPU
5・・・・・RAM
6・・・・・ROM
7・・・・・LAN回路
8・・・・・PPRエンジン
9・・・・・CPU
9a、9b、9c、9d・・CPUコア
81・・・・トナー
82・・・・感光ドラム
83・・・・転写ベルト
84・・・・2次転写ロール
85・・・・定着ロール
86・・・・用紙カセット
87・・・・給紙装置
88・・・・排紙トレイ
89・・・・両面機構
210・・アプリケーションプログラム(APL)
211・・文書ファイル
212・・プリンタドライバ(Printer Driver)
213・・PDL変換部
214・・スプーラ
230・・受信制御スレッド
231・・画像形成スレッド
232・・中間PDL変換部
234・・画像データ形成部
235・・印刷行列制御スレッド
236・・PPRエンジン制御スレッド
240・・受信バッファ
241・・PDLバッファ
242・・画像データメモリ
243・・画像データメモリ
244・・画像データメモリ
246・・印刷行列
247・・PDLバッファ
248・・第1のPDLバッファ
249・・第2のPDLバッファ
532・・画像形成スレッド1
534・・画像形成スレッド2
1 ... Client PC
2 ... LAN
3. Printing device (PPR)
4 ... CPU
5 ... RAM
6 ... ROM
7 ... LAN circuit 8 ... PPR engine 9 ... CPU
9a, 9b, 9c, 9d ··· CPU core 81 ··· Toner 82 ··· Photosensitive drum 83 ··· Transfer belt 84 ··· Secondary transfer roller 85 ··· Fixing roller 86 ··· ··· Paper cassette 87 ··· Paper feeder 88 ··· Discharge tray 89 ··· Double-sided mechanism 210 ·· Application program (APL)
211 .. Document file 212 .. Printer driver (Printer Driver)
213.. PDL conversion unit 214.. Spooler 230.. Reception control thread 231.. Image formation thread 232. Intermediate PDL conversion unit 234.. Image data formation unit 235. 240 ·· Receive buffer 241 · · PDL buffer 242 · Image data memory 243 · · Image data memory 244 · · Image data memory 246 · · Print matrix 247 · · PDL buffer 248 · · first PDL buffer 249 · · · 2 PDL buffers 532 ..Image forming thread 1
534 ..Image forming thread 2

Claims (11)

印刷データをPDLコマンドに変換し、前記PDLコマンドから画像データを形成する画像データ形成手段と、
前記PDLコマンドを記憶するコマンド記憶部と、
複数のコアを有するCPUと、
前記コアの割り当てを制御するシステム制御手段と、を含み、
前記システム制御手段は、前記画像データ形成手段を実現する画像形成スレッドに優先的に前記コアを割り当てることを特徴とする印刷装置。
Image data forming means for converting print data into PDL commands and forming image data from the PDL commands;
A command storage unit for storing the PDL command;
A CPU having a plurality of cores;
System control means for controlling the allocation of the core,
The printing apparatus according to claim 1, wherein the system control unit preferentially assigns the core to an image forming thread that realizes the image data forming unit.
請求項1に記載の印刷装置において、
前記画像データ形成手段は、
前記印刷データを前記PDLコマンドに変換する第1の画像データ形成手段と、
前記PDLコマンドから前記画像データを形成する第2の画像データ形成手段と、を含み、
前記画像形成スレッドは、複数起動する場合には、
前記第1の画像データ形成手段を実現する第1の画像形成スレッドと
前記第2の画像データ形成手段を実現する第2の画像形成スレッドと、を含み、
前記第1の画像形成スレッドと前記第2の画像形成スレッドは、互いに並列に動作可能な異なるスレッドであることを特徴とする印刷装置。
The printing apparatus according to claim 1,
The image data forming means
First image data forming means for converting the print data into the PDL command;
Second image data forming means for forming the image data from the PDL command,
When a plurality of the image forming threads are activated,
A first image forming thread that realizes the first image data forming means; and a second image forming thread that realizes the second image data forming means;
The printing apparatus, wherein the first image forming thread and the second image forming thread are different threads operable in parallel with each other.
請求項2に記載の印刷装置において、
前記コマンド記憶部は、
第1のコマンド記憶部と、
第2のコマンド記憶部と、を含み、
前記画像形成スレッドが複数起動する場合には、
前記第1の画像形成スレッドが前記PDLコマンドを前記第1のコマンド記憶部へ出力する期間、前記第2の画像形成スレッドは前記PDLコマンドを前記第2のコマンド記憶部から取得し、
前記第1の画像形成スレッドが前記PDLコマンドを前記第2のコマンド記憶部へ出力する期間、前記第2の画像形成スレッドは前記PDLコマンドを前記第1のコマンド記憶部から取得することを特徴とする印刷装置。
The printing apparatus according to claim 2,
The command storage unit
A first command storage unit;
A second command storage unit,
When a plurality of the image forming threads are activated,
During the period when the first image forming thread outputs the PDL command to the first command storage unit, the second image forming thread acquires the PDL command from the second command storage unit,
The second image forming thread acquires the PDL command from the first command storage unit during a period in which the first image forming thread outputs the PDL command to the second command storage unit. Printing device to do.
請求項3に記載の印刷装置において、
前記画像形成スレッドが複数起動する場合には、
前記第1の画像形成スレッドは、前記第2の画像形成スレッドへ処理を要求する毎に、前記第1のコマンド記憶部と前記第2のコマンド記憶部を交互に切り替えて利用することを特徴とする印刷装置。
The printing apparatus according to claim 3.
When a plurality of the image forming threads are activated,
The first image forming thread alternately uses the first command storage unit and the second command storage unit each time it requests processing from the second image forming thread. Printing device to do.
請求項1乃至請求項4のいずれか1つに記載の印刷装置において、
前記画像形成スレッドの数は、前記CPUが有するコアの数に応じて決定することを特徴とする印刷装置。
The printing apparatus according to any one of claims 1 to 4,
The number of the image forming threads is determined according to the number of cores of the CPU.
請求項1乃至請求項4のいずれか1つに記載の印刷装置において、
前記画像形成スレッドの数は、前記印刷装置が処理に利用するメモリの記憶容量に応じて決定することを特徴とする印刷装置。
The printing apparatus according to any one of claims 1 to 4,
The number of the image forming threads is determined according to a storage capacity of a memory used for processing by the printing apparatus.
請求項1乃至請求項4のいずれか1つに記載の印刷装置において、
前記画像形成スレッドの数は、前記画像データの解像度及び階調数に応じて決定することを特徴とする印刷装置。
The printing apparatus according to any one of claims 1 to 4,
The number of the image forming threads is determined according to the resolution and the number of gradations of the image data.
請求項1乃至請求項4のいずれか1つに記載の印刷装置において、
前記画像形成スレッドの数は、前記画像データを印刷する用紙サイズに応じて決定することを特徴とする印刷装置。
The printing apparatus according to any one of claims 1 to 4,
The number of the image forming threads is determined according to a paper size on which the image data is printed.
請求項1乃至請求項4のいずれか1つに記載の印刷装置において、
更に、前記画像形成スレッドの各々の1頁当りの処理時間を計測する計測手段と、
前記処理時間を元に算出される平均処理時間を記録する記憶手段と、を含むことを特徴とする印刷装置。
The printing apparatus according to any one of claims 1 to 4,
And measuring means for measuring a processing time per page of each of the image forming threads;
Storing means for recording an average processing time calculated based on the processing time.
請求項9に記載の印刷装置において、
前記記録手段は、前記平均処理時間を前記画像形成スレッドの数毎に記録し、
前記画像形成スレッドの数は、前記平均処理時間が最も短い数に決定することを特徴とする印刷装置。
The printing apparatus according to claim 9, wherein
The recording unit records the average processing time for each number of the image forming threads,
The number of the image forming threads is determined to be the number with the shortest average processing time.
請求項9に記載の印刷装置において、
前記記録手段は、前記平均処理時間を用紙サイズ毎且つ前記画像形成スレッドの数毎に記録し、
前記画像形成スレッドの数は、前記平均処理時間が最も短い数に決定することを特徴とする印刷装置。
The printing apparatus according to claim 9, wherein
The recording means records the average processing time for each sheet size and for each number of the image forming threads,
The number of the image forming threads is determined to be the number with the shortest average processing time.
JP2008092517A 2008-03-31 2008-03-31 Printing device Expired - Fee Related JP5141338B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008092517A JP5141338B2 (en) 2008-03-31 2008-03-31 Printing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008092517A JP5141338B2 (en) 2008-03-31 2008-03-31 Printing device

Publications (2)

Publication Number Publication Date
JP2009241485A true JP2009241485A (en) 2009-10-22
JP5141338B2 JP5141338B2 (en) 2013-02-13

Family

ID=41303957

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008092517A Expired - Fee Related JP5141338B2 (en) 2008-03-31 2008-03-31 Printing device

Country Status (1)

Country Link
JP (1) JP5141338B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010125713A (en) * 2008-11-27 2010-06-10 Kyocera Mita Corp Image forming apparatus
JP2012000917A (en) * 2010-06-18 2012-01-05 Konica Minolta Business Technologies Inc Print data generation device, print data generation method, and print data generation program
JP2012185697A (en) * 2011-03-07 2012-09-27 Canon Inc Image processing system, image processing method, and program
JP2012236353A (en) * 2011-05-12 2012-12-06 Fuji Xerox Co Ltd Image processor and image processing program
WO2013097693A1 (en) * 2011-12-30 2013-07-04 浙江大学 Multi-core processor-based system and method for processing high-speed printing machine image data rotation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09314930A (en) * 1996-05-31 1997-12-09 Canon Inc Printing controller, control method for printer, printing system and storage medium
JP2000293674A (en) * 1999-04-12 2000-10-20 Seiko Epson Corp Image processing method, printer, image processing system and recording medium
JP2001096854A (en) * 1999-09-28 2001-04-10 Fuji Xerox Co Ltd Apparatus and method for printing processing
JP2004227530A (en) * 2002-02-27 2004-08-12 Ricoh Co Ltd Apparatuses for image forming and billing calculation, method for image forming and billing, and program for image forming and billing
JP2004341996A (en) * 2003-05-19 2004-12-02 Dainippon Screen Mfg Co Ltd Task control for printing processing
JP2009116450A (en) * 2007-11-02 2009-05-28 Casio Electronics Co Ltd Print data processing method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09314930A (en) * 1996-05-31 1997-12-09 Canon Inc Printing controller, control method for printer, printing system and storage medium
JP2000293674A (en) * 1999-04-12 2000-10-20 Seiko Epson Corp Image processing method, printer, image processing system and recording medium
JP2001096854A (en) * 1999-09-28 2001-04-10 Fuji Xerox Co Ltd Apparatus and method for printing processing
JP2004227530A (en) * 2002-02-27 2004-08-12 Ricoh Co Ltd Apparatuses for image forming and billing calculation, method for image forming and billing, and program for image forming and billing
JP2004341996A (en) * 2003-05-19 2004-12-02 Dainippon Screen Mfg Co Ltd Task control for printing processing
JP2009116450A (en) * 2007-11-02 2009-05-28 Casio Electronics Co Ltd Print data processing method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010125713A (en) * 2008-11-27 2010-06-10 Kyocera Mita Corp Image forming apparatus
JP2012000917A (en) * 2010-06-18 2012-01-05 Konica Minolta Business Technologies Inc Print data generation device, print data generation method, and print data generation program
JP2012185697A (en) * 2011-03-07 2012-09-27 Canon Inc Image processing system, image processing method, and program
US9218554B2 (en) 2011-03-07 2015-12-22 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium
JP2012236353A (en) * 2011-05-12 2012-12-06 Fuji Xerox Co Ltd Image processor and image processing program
WO2013097693A1 (en) * 2011-12-30 2013-07-04 浙江大学 Multi-core processor-based system and method for processing high-speed printing machine image data rotation
US8970891B2 (en) 2011-12-30 2015-03-03 Zhejiang University Multi-core processor based image data rotating processing system for high-speed digital textile printer and method

Also Published As

Publication number Publication date
JP5141338B2 (en) 2013-02-13

Similar Documents

Publication Publication Date Title
US8416430B2 (en) Information processing apparatus
JP5333259B2 (en) Image forming apparatus, program, and image forming method
KR100757154B1 (en) Information processing apparatus and its control method
JP3977356B2 (en) Information processing apparatus and control method thereof
JP5141338B2 (en) Printing device
US8159709B2 (en) Method for canceling a print job submitted to a printer
JP5594470B2 (en) Printing control apparatus, printing system, and program
US8625133B2 (en) Print data processing apparatus, print data processing method, and storage medium
JP2000085210A (en) Printer and printing method
JP2005352697A (en) Computer system, and allocating method for job of the system
JP4371128B2 (en) Image forming apparatus, image forming method, and program
US8767247B2 (en) Print data generation device, print data generation method and computer-readable medium for controlling rasterization processing
JP2011046034A (en) Image processor, image processing method, image processing program, and recording medium
JP5392153B2 (en) Image processing apparatus, image processing method, and program
JP3724536B2 (en) Image output control device and process execution control method thereof
JP5740913B2 (en) Image forming apparatus and control method thereof
JP3438710B2 (en) Printer and recording medium recording program for controlling the printer
JP4095581B2 (en) Information processing apparatus and control method thereof
JP2007140952A (en) Distributed processing system and its processing method
JP6485699B2 (en) Image forming apparatus and image forming system
JP2007328737A (en) Host device, data processor, and data processing system
JP6161458B2 (en) Image forming apparatus, image forming system, cleaning method and program
JP2012008838A (en) Print document conversion device and program
JP7191713B2 (en) Printer controller, printer control program, and printer
JP5984350B2 (en) Printing apparatus, control method therefor, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100816

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120724

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120924

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20121023

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121105

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151130

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees