ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaks_5.4.0.1/rzaksthreadstructure.htm

86 lines
6.6 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Threads" />
<meta name="abstract" content="The term thread is shorthand for &#34;thread of control&#34;. A thread is the path taken by a program while running, the steps performed, and the order in which the steps are performed. A thread runs code from its starting location in an ordered, predefined sequence for a given set of inputs." />
<meta name="description" content="The term thread is shorthand for &#34;thread of control&#34;. A thread is the path taken by a program while running, the steps performed, and the order in which the steps are performed. A thread runs code from its starting location in an ordered, predefined sequence for a given set of inputs." />
<meta name="DC.Relation" scheme="URI" content="rzaksjobcharacter.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaksthreadpropauth.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaksthreadstatus.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaksvwthreadprop.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaksthreadrununderjob.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaksendthread.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzahw/rzahwendco.htm" />
<meta name="DC.Relation" scheme="URI" content="../apis/users_g4.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004-2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004-2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaksthreadstructure" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Threads</title>
</head>
<body id="rzaksthreadstructure"><a name="rzaksthreadstructure"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Threads</h1>
<div><p>The term thread is shorthand for "thread of control". A thread
is the path taken by a program while running, the steps performed, and the
order in which the steps are performed. A thread runs code from its starting
location in an ordered, predefined sequence for a given set of inputs.</p>
<p>The use of threads within a job allows many things to be done at once.
For example, while a job is processing, a thread may retrieve and calculate
data needed by the job to finish processing</p>
<p> Every active job has at least one thread, which is called an initial thread.
The initial thread is created as part of starting the job. In the threads
on iSeries™ Navigator,
by default, you will see <span class="uicontrol">Initial</span> as the type of the
first thread in the list. The initial thread is the first thread created within
the job when it starts.</p>
<div class="section"><h4 class="sectiontitle">Thread types</h4><div class="p">The thread type determines how the
thread was created on the system.<dl><dt class="dlterm">User</dt>
<dd>The thread can be created by the customer application. The initial thread
in a job is always a user thread. The Allow multiple threads field must be
set to yes for multiple user threads to be used. </dd>
<dt class="dlterm">System</dt>
<dd>The thread is created by the system on behalf of the user. Some system
functions use system threads to complete processing. If a customer's application
uses a system function that uses threads, system threads are used.</dd>
</dl>
</div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzaksthreadpropauth.htm">Proper thread authority</a></strong><br />
Certain authority levels are required before you can work with threads.</li>
<li class="ulchildlink"><strong><a href="rzaksthreadstatus.htm">Thread status</a></strong><br />
The current status of a thread is viewed from the General page in the Thread Properties window, under Detailed status.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaksjobcharacter.htm" title="Work management provides a way for you to control the work done on your system through a job's attributes. However, before you can control the various aspects of a job, you need to understand the different characteristics of a job.">Job characteristics</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="rzaksvwthreadprop.htm" title="Threads allow jobs to do more than one thing at a time. If a thread stops processing, it can stop the job from running. The iSeries Navigator Thread Properties windows allow you to view various thread and thread performance attributes that can aid in understanding why a thread is not running.">View thread properties</a></div>
<div><a href="rzaksthreadrununderjob.htm" title="Every active job running on an iSeries system has at least one thread running under it. A thread is an independent unit of work running within a job that uses the same resources as the job. Because a job depends on the work done by a thread, it is important to know how to find the threads running within a specific job.">View threads running under a specific job</a></div>
<div><a href="rzaksendthread.htm" title="An initial thread, which is created when the job starts, can never be deleted or ended. However, sometimes it is necessary to end a secondary thread so that a job can continue to run. Be aware of the thread you intend to end because the job it runs within might not be able to complete without that thread's work.">End or delete threads</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../rzahw/rzahwendco.htm">Example: End a thread using Java</a></div>
<div><a href="../apis/users_g4.htm">Thread management APIs</a></div>
</div>
</div>
</body>
</html>