Appeal 2007-2127 Reexamination Control No. 90/006,621 DosCreateThread call."); Petzold, Programming the OS/2 Presentation Manager, page 786 ("A process running under OS/2 consists of one or more threads of execution. Each thread has a thread ID number that uniquely identifies the thread within the process. The thread that begins execution in the process always has an ID number of 1. A thread can create additional threads in the process by a call to DosCreateThread."). The special instruction is the mechanism the program uses to inform the operating system to create the necessary data structures for another thread. o. Asynchronous execution of threads "Threads execute independently of one another; they are said to be asynchronous, meaning that they run simultaneously but without timing relationships. (That is, when a thread is executing a particular instruction, it cannot be predicted what instruction any other thread is currently executing.)" Young, Programmer's Guide to OS/2, page 178. It is possible to make threads execute synchronously using special instructions. p. A simple multithreading example The following is a simple example of a multithreading program from LaFore, Peter Norton's Inside OS/2, page 135. The first thread starts another using the DosCreateThread function (annotations at the right have been added). The first thread then prints a series of Xs during its timeslice, while the second thread prints a series of dashes during its timeslice. 43Page: Previous 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 Next
Last modified: September 9, 2013