User guide

August 2001 11
Application Architecture
Application Architecture
Processes and Threads
An instance of an executing application is a process. For
example, a word processing program and a spreadsheet that are
executing simultaneously are both processes. You can have
many processes running at once. Each process consists of data,
code, and one or more threads. The processes cannot share data
directly.
Each process can have associated threads that execute
functions of the process. Each process can have more than one
thread, each of which has CPU registers and a stack. The
threads share data as shown in Figure 3.
For example, within the word processing process, you can have
threads for printing, saving, and receiving keyboard data. These
threads can execute simultaneously. The first thread, called the
primary thread, is created when the application starts and
starts executing from the program’s entry point. This thread
can generate new threads, which can generate threads of their
own.