Tải bản đầy đủ (.pdf) (80 trang)

Tài liệu Module 4: Managing Applications and Services by Using Process Control pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.47 MB, 80 trang )







Contents
Overview 1
Process Execution Environment 3
Job Objects 11
Process Control Concepts 13
Rules, Processes, and Process Groups 19
Configuring the Process Control Service 21
Demonstration: Tuning the Process
Scan Interval 23
Rules 24
Defining Process Alias Rules 25
Demonstration: Defining and Testing a
Process Alias Rule 27
Defining Process Execution Rules 29
Setting Process Group Execution
Rule Properties 37
Managing Processes and Process Groups 55
Managing Processes by Using the
Command Line 56
Backing Up and Restoring Process
Control Information 58
Best Practices 59
Lab A: Managing Applications and
Services by Using Process Control 60
Review 71



Module 4: Managing
A
pplications and Services
by Using Process Control



Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only
means of access is electronic, permission to print one copy is hereby granted.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2001 Microsoft Corporation. All rights reserved.

Microsoft, Active Directory, BackOffice, FrontPage, Outlook, PowerPoint, Visual Studio,
Windows, Windows Media, and Windows NT are either registered trademarks or trademarks of
Microsoft Corporation in the U.S.A. and/or other countries.

Other product and company names mentioned herein may be the trademarks of their respective
owners.


Program Manager: Don Thompson
Product Manager: Greg Bulette
Instructional Designers: April Andrien, Kelley Umphrey
Subject Matter Experts: Conrad Cahill (Entirenet), Jack Creasey
Classroom Automation: Lorrin Smith-Bates
Graphic Designer: Andrea Heuston (Artitudes Layout & Design)
Editing Manager: Lynette Skinner
Editor: Lori Kane
Copy Editor: Gwen Bloomsburg (S&T Consulting)
Production Manager: Miracle Davis
Build Manager: Julie Challenger
Print Production: Lori Walker (S & T Consulting)
CD Production: Eric Wagoner
Test Manager: Eric R. Myers
Test Lead: Robertson Lee (Volt)
Creative Director: David Mahlmann
Media Program Manager: Scott Daniels
Media Producer: Dean Connolly
Lead Production Artist: Scott Serna
Localization Manager: Rick Terek
Operations Coordinator: John Williams
Manufacturing Support: Laura King; Kathy Hershey
Lead Product Manager, Release Management: Bo Galford
Lead Technology Manager: Sid Benavente
Lead Product Manager: Ken Rosen
Group Manager, Courseware Infrastructure: David Bramble
Group Product Manager, Content Development: Julie Truax
Director, Training & Certification Courseware Development: Dean Murray
General Manager: Robert Stewart




Module 4: Managing Applications and Services by Using Process Control iii


Instructor Notes
This module provides students with the ability to use Process Control—a tool
included with Microsoft
® Windows® 2000 Datacenter Server that you can use
to organize, control, and manage the processes on a system and the resources
they use.
After completing this module, students will be able to manage applications and
services by using Process Control, including:
 Describing the process execution environment
 Describing how job objects function
 Describing Process Control concepts such as components, functionality, and
user interface
 Identifying rules, processes, and process groups
 Configuring the Process Control service by using Process Control properties
 Identifying Process Alias rules, Process Execution rules, and Process Group
Execution rules
 Defining and testing Process Alias rules
 Defining and testing Process Execution rules
 Setting Process Group Execution rule properties
 Managing processes and process groups
 Managing processes by using the command line
 Backing up and restoring process control information from the command
line
 Identifying best practices for using Process Control


Materials and Preparation
This section provides the materials and preparation tasks that you need to teach
this module.
Required Materials
To teach this module, you need the following materials:
 Microsoft PowerPoint® file 2089a_04.ppt
 Module 4, “Managing Applications and Services by Using Process Control”
 The Trainer Materials compact disc for two executable files, including
leakyapp.exe and cpustres.exe

Preparation Tasks
To prepare for this module, you should:
 Read all of the materials for this module.
 Complete the demonstrations.
 Complete the labs.

Presentation:
90 Minutes

Lab:
90 Minutes
iv Module 4: Managing Applications and Services by Using Process Control


Module Strategy
Use the following strategy to present this module:
 Process Execution Environment
This topic introduces the concepts of priority, affinity, and scheduling that
will be applied when using the Process Control tool later in this module.
This topic covers processes, threads, fibers, base priority, dynamic priority,

scheduler, and processor and thread affinity.
 Job Objects
This topic introduces the concept of job objects that will be applied when
using the Process Control tool later in this module. This is followed by a
discussion of accounting information and controlling child processes within
a job object.
 Process Control Concepts
This topic begins by introducing the Process Control components that
control and manage processes. This is followed by a discussion on how
Process Control depends on these components to function. The section
concludes with a discussion on how the Process Control user interface can
be scripted, managed with graphical tools, or controlled from the command
line.
 Rules, Processes, and Process Groups
This topic defines rules, processes, and process groups. It introduces the
Process Control console tree and explains how you can use this console tree
to define, view, and manage rules, processes, and process groups.
 Configuring the Process Control Service
This topic describes Process Control properties, explaining scan interval and
request timeout interval.
 Demonstration: Tuning the Process Scan Interval
In this demonstration, the instructor modifies the process scan interval so
that Process Control checks for new processes more frequently than the 60-
second default interval. This demonstration supports the Configuring the
Process Control Service topic in this module and can be conducted
simultaneously.
 Rules
This topic introduces three types of rules created in Process Control: Process
Alias rules, Process Execution rules, and Process Group Execution rules.
 Defining Process Alias Rules

This topic explains the purpose of defining Process Alias rules. It discusses
types of names, match string, and process alias assigned on a match.
 Demonstration: Defining and Testing a Process Alias Rule
In this demonstration, the instructor defines and tests a new Process Alias
rule for the process called notepad.exe. This demonstration supports the
Defining Process Alias Rules topic in this module and can be conducted
simultaneously.
Module 4: Managing Applications and Services by Using Process Control v


 Defining Process Execution Rules
This topic explains the purpose of defining Process Execution rules. It
describes how to assign a process to a process group, apply affinity, apply
priority, and apply memory limits.
 Demonstration: Defining and Testing a Process Execution Rule to Control
Memory Usage
In this demonstration, the instructor defines and tests a Process Execution
rule for the process alias called Notepad Alias. This demonstration supports
the Defining Process Execution Rules topic in this module and can be
conducted simultaneously.
 Setting Process Group Execution Rule Properties
This topic explains the purpose of creating Process Group Execution rules.
It describes limiting process count within a single processor group, applying
scheduling class, setting group memory limits, setting time limits, and
configuring advanced process group controls.
 Demonstration: Creating and Testing a Process Group Execution Rule to
Control Memory Usage
In this demonstration, the instructor creates and tests a Process Group
Execution rule for the process alias called Notepad Alias. This
demonstration supports the Setting Process Group Execution Rule

Properties topic in this module and can be conducted simultaneously.
 Demonstration: Creating and Testing a Process Group Execution Rule to
Control Processor Affinity
In this demonstration, the instructor creates and tests the affinity setting of a
Process Group Execution rule. This demonstration supports the Setting
Process Group Execution Rule Properties topic in this module.

This demonstration can be completed only if a server with two or
more processors is available.

 Managing Processes and Process Groups
There are many ways that students can use the Process Control console to
manage processes and process groups. This topic explains three different
ways.
 Managing Processes by Using the Command Line
The Process Control command-line utility uses a series of switches that
describe the operation to perform and supply the required data. This topic
covers a summary of command-line operations including where, verbs, and
objects.
 Backing Up and Restoring Process Control Information
This topic covers the syntax used at the command prompt to back up and
restore Process Control rules.
 Best Practices
This topic explains the recommended range of operation, maintained by
Process Control, for Microsoft SQL Server

, Microsoft Internet Explorer,
and Microsoft Project.
Note
vi Module 4: Managing Applications and Services by Using Process Control



 Lab A: Managing Applications and Services by Using Process Control
In this lab, students have an opportunity to manage applications and services
by using Process Control. Exercises include tuning the process scan interval,
defining and testing a Process Alias rule, defining and testing a Process
Execution rule to control memory usage, creating and testing a Process
Group Execution rule to control memory usage, and creating and testing a
Process Group Execution rule to control processor affinity.


Exercise 5, “Creating and Testing a Process Group Execution Rule to
Control Processor Affinity,” can be completed only if a server with two or more
processors is available.


Note
Module 4: Managing Applications and Services by Using Process Control 1


Overview
 Process Execution Environment
 Job Objects
 Process Control Concepts
 Rules, Processes, and Process Groups
 Configuring the Process Control Service
 Rules
 Defining Process Alias Rules

*****************************I

LLEGAL FOR NON-TRAINER USE*****************************
Process Control is a tool included with Microsoft
® Windows® 2000 Datacenter
Server that helps you organize, control, and manage the processes on your
system and the resources they use.
After completing this module, you will be able to manage applications and
services by using Process Control, including:
 Describing the process execution environment
 Describing how job objects function
 Describing Process Control concepts such as components, functionality, and
user interface
 Identifying rules, processes, and process groups
 Configuring the Process Control service by using Process Control properties
 Identifying Process Alias rules, Process Execution rules, and Process Group
Execution rules
 Defining and testing Process Alias rules
 Defining and testing Process Execution rules
 Setting Process Group Execution rule properties
 Managing processes and process groups
 Managing processes by using the command line
 Backing up and restoring process control information from the
command line
 Identifying best practices for using Process Control

Topic Objective
To provide an overview of
the module topics and
objectives.
Lead-in
Process Control is a tool

included with Windows 2000
Datacenter Server that
helps you organize, control,
and manage the processes
on your system and the
resources they use.
Explain the purpose of the
module.

Describe the list of learning
objectives.
2 Module 4: Managing Applications and Services by Using Process Control


Overview (continued)
 Defining Process Execution Rules
 Setting Process Group Execution Rule Properties
 Managing Processes and Process Groups
 Managing Processes by Using the Command Line
 Backing Up and Restoring Process Control Information
 Best Practices

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
Topic Objective
To provide an overview of
the module topics and
objectives.
Lead-in
Process Control is a tool

included with Windows 2000
Datacenter Server that
helps you organize, control,
and manage the processes
on your system and the
resources they use.
Explain the purpose of the
module.

Describe the list of learning
objectives.
Module 4: Managing Applications and Services by Using Process Control 3




 Process Execution Environment
 Processes, Threads, and Fibers
 Scheduling Thread Priorities
 Scheduler
 Processor and Thread Affinity

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
The purpose of this section is to make sure that you understand priority,
affinity, and scheduling. Later in the module, you will apply these concepts
when using the Process Control tool.
This section begins with a discussion of processes, threads, and fibers. Next,
you will have an opportunity to determine how base priority is assigned. This
leads into an explanation of how scheduler uses the assigned base priority to

allocate processor time. This section concludes with a discussion about
processor and thread affinity.
Topic Objective
To describe the process
execution environment.
Lead-in
The purpose of this section
is to make sure that you
understand priority, affinity,
and scheduling.
Introduce the topic, Process
Execution Environment.

The following four
supportive slides discuss
Processes, Threads, and
Fibers; Scheduling Thread
Priorities; Scheduler; and
Processor and Thread
Affinity.

This section provides the
students with an opportunity
to learn about the concepts
of priority, affinity, and
scheduling. These concepts
will be applied later in the
module when they use the
Process Control tool.
4 Module 4: Managing Applications and Services by Using Process Control



Processes, Threads, and Fibers
1 Thread
Fibers
+1 Thread
+1 Thread
Process
Process
Process Tree
Process Tree
Example.exe
Code
Data
Fibers
Fibers
Thread
Thread
Thread
Thread

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
To understand the concepts and control that the Process Control tool uses, you
must understand how code is executed in a computer running Windows 2000-
based operating systems.
There are several key elements:
 Processes
 Threads
 Fibers

 Scheduling

A process provides the resources needed to execute an application or program,
including a collection of allocated virtual memory space, executable code, data,
threads, and system resources.
A thread is executable code that is to be serially executed within a process. A
processor or CPU executes threads, not processes, so each 32-bit application
must have at least one process and one thread.
A process always has at least one thread of execution, known as the primary
thread, and can have multiple threads in addition to this. After a thread is
scheduled to execute, the thread continues to run until it is complete, is ended
by some event, or is interrupted by a thread with higher priority (by a user
action or the kernel's thread scheduler). Each thread can run separate sections of
code, or multiple threads can execute the same section of code. Threads that
execute the same block of code maintain separate stacks.
All threads of a process share its virtual address space and system resources. In
addition, each thread maintains exception handlers, a scheduling priority, and a
set of structures that the operating system uses to save the thread context until it
is scheduled. The thread context includes the thread's set of machine registers,
the kernel stack, a thread environment block, and a user stack in the address
space of the thread's process.
Topic Objective
To identify processes,
threads, and fibers.
Lead-in
To understand the concepts
and control that the Process
Control tool uses, the
student must understand
how code is executed in a

computer running
Windows 2000-based
operating systems.
Describe processes,
threads, and fibers. Briefly
introduce scheduling, which
will be covered in the next
two slides.

In the graphic, the entire box
represents a process. The
left column, including
Example.exe, with code and
data, represents a thread.
The middle circle represents
a process tree. The right
column represents fibers in
a thread.
Module 4: Managing Applications and Services by Using Process Control 5


A fiber is a unit of execution that must be scheduled by the application code.
Fibers run in the context of the threads that create and schedule them. Each
thread can schedule multiple fibers. In general, fibers do not provide more
advantages than a well-designed multithreaded application. However, by using
fibers you can make it easier to port applications that were designed to schedule
their own threads. From a system standpoint, a fiber assumes the identity of the
thread that created it.
6 Module 4: Managing Applications and Services by Using Process Control



Scheduling Thread Priorities
Priority Level = 7
Priority Class = 5
Base Priority = 12
Dynamic Priority = 14
Priority Boost
Priority Boost

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
Each thread is assigned a scheduling priority, which is used by the scheduler to
decide which threads should be executed at any given time. The priority levels
range from 0 (lowest priority) to 31 (highest priority). The priority of each
thread is determined by the following criteria.
The priority classes of its process are:
 Idle
 Below
 Normal
 Above normal
 High
 Realtime

The priority levels of the thread in the priority class of its process are:
 Idle
 Lowest
 Below normal
 Normal
 Above normal
 Highest

 Time critical


For additional information, see Appendix C, “Base Priority Levels,”
which shows a complete list of the base priority levels for combinations of
priority class and priority levels.

Topic Objective
To describe how thread
priorities are scheduled.
Lead-in
Each thread is assigned a
scheduling priority, which is
used by the scheduler to
decide which threads should
be executed at any given
time.
Define priority.

Explain how base priority is
determined.

For a more in-depth
discussion of base priority
level, see the appendix.

Define dynamic priority and
explain how the system can
boost and lower dynamic
priority.

Note
Module 4: Managing Applications and Services by Using Process Control 7


By default, the priority class of a process is NORMAL. If a process creates a
child process and is IDLE_PRIORITY_CLASS or
BELOW_NORMAL_PRIORITY_CLASS, the new child process inherits this
class.
Priority Boosts
Each thread has a dynamic priority. This is the priority the scheduler uses to
determine which thread to execute. Initially, a thread's dynamic priority is the
same as its base priority. The system can boost and lower the dynamic priority
to ensure that it is responsive and that threads are receiving processor time. The
system does not boost the priority of threads with a base priority level between
16 and 31. Only threads with a base priority between 0 and 15 receive dynamic
priority boosts.
The system boosts the dynamic priority of a thread to enhance its
responsiveness as follows:
 When a process that uses NORMAL_PRIORITY_CLASS is brought to the
foreground, the scheduler boosts the priority class of the process associated
with the foreground window so that it is greater than or equal to the priority
class of any background processes. The priority class returns to its original
setting when the process is no longer in the foreground.
 When a window receives input, such as timer messages, mouse messages, or
keyboard input, the scheduler boosts the priority of the thread that owns the
window.

The user can control the boosting of processes that use
NORMAL_PRIORITY_CLASS through the System application in the control
panel.

After the wait conditions for a blocked thread are satisfied, the scheduler boosts
the priority of the thread. For example, after a wait operation associated with
disk or keyboard I/O finishes, the thread receives a priority boost.
After raising a thread's dynamic priority, the scheduler reduces that priority by
one level each time the thread completes a time slice, until the thread drops
back to its base priority. A thread's dynamic priority is never less than its base
priority.
8 Module 4: Managing Applications and Services by Using Process Control


Scheduler
Threads in Queue with Assigned Priority from Highest to Lowest
Threads in Queue with Assigned Priority from Highest to Lowest
17
Scheduler
Scheduler
Ready Tasks
In Queue
Ready Tasks
In Queue
12 7 6 6 5 4

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
A multitasking operating system divides the available processor time among the
processes or threads that need it. A system designed for preemptive
multitasking uses a scheduler to allocate a processor time slice to each thread it
executes. When the system switches from one thread to another, the system
saves the context of the preempted thread and restores the saved context of the
next thread in the queue.

Windows 2000 supports preemptive multitasking, which creates the effect of
simultaneous execution of multiple threads from multiple processes. On a
multiprocessor computer, Windows 2000 can simultaneously execute as many
threads as there are processors on the computer.
Fibers are not preemptively scheduled. The system only schedules threads to
run. You schedule a fiber by switching to it from another fiber. When a thread
running fibers is preempted, its currently running fiber is preempted. The fiber
runs when its thread runs.
Scheduling Execution
The operating system is designed for preemptive multitasking, and it allocates a
processor time slice or quantum to each thread it executes. The currently
executing thread is suspended when its time slice elapses, allowing another
thread to run. Threads waiting to be executed are called ready threads, and each
thread has a priority level allocated to it. The scheduler maintains queues of
threads with the same priority and will schedule a thread from one of the queues
based on a scheduling algorithm.
The length of the time slice or quantum depends on the operating system,
configuration, and the processor. Because each time slice is small
(approximately 20 milliseconds), multiple threads appear to be executing at the
same time. On multiprocessor systems, where the executable threads are
distributed among the available processors, several threads can be executed
simultaneously.
Topic Objective
To describe how scheduler
allocates a processor time
slice to each thread it
executes.
Lead-in
A system designed for
preemptive multitasking

uses a scheduler to allocate
a processor time slide to
each thread it executes.
Explain preemptive
multitasking.

Describe how scheduling is
executed.

Describe priority inversion.
Module 4: Managing Applications and Services by Using Process Control 9


The scheduler maintains a queue of executable threads for each priority level.
When a processor becomes available, the system performs a context switch.
The steps in a context switch are:
1. Save the context of the thread that just finished executing.
2. Place the thread that just finished executing at the end of the queue for its
priority.
3. Find the highest priority queue that contains ready threads.
4. Remove the thread at the head of the queue, load its context, and execute it.

Until threads that are suspended or blocked become ready to run, the scheduler
does not allocate any processor time to them, regardless of their priority.
The most common reasons for a context switch are:
 The time slice has elapsed.
 A thread with a higher priority has become ready to run.
 A running thread needs to wait.

When a running thread needs to wait, it relinquishes the remainder of its time

slice. For example, the running thread needs to wait when it makes an operating
system call for input.
Priority Inversion
Priority inversion occurs when two or more threads with different priorities are
in contention to be scheduled. For example, a high-priority thread waiting for
resources from a low-priority thread can result in the low-priority thread not
being scheduled, while the high-priority thread consumes all its allocated time
waiting for the low-priority thread to return data.
The scheduler solves this problem by randomly boosting the priority of the
ready threads (in this case, the low-priority lock-holders). The low-priority
thread runs long enough to exit the critical section, and the high-priority thread
can enter the critical section. If the low-priority thread does not get enough
CPU time to exit the critical section the first time, it gets another chance during
the next round of scheduling.
10 Module 4: Managing Applications and Services by Using Process Control


Processor and Thread Affinity
Limit thread execution to a
subset of the available CPUs
Limit thread execution to a
subset of the available CPUs
Thread 1 - Affinity 6
Thread 2 - Affinity 1,2,3,4
Thread 3 - Affinity 6,7,8
Processor
1
Processor
2
Processor

3
Processor
4
Processor
5
Processor
6
Processor
7
Processor
8

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
Windows 2000 uses a symmetric multiprocessing (SMP) model to schedule
threads on multiple processors. With this model, any thread can be assigned to
any processor. Therefore, scheduling threads on a computer with multiple
processors is similar to scheduling threads on a computer with a single
processor. However, the scheduler has a pool of processors so that it can
schedule threads to run concurrently. Scheduling is still determined by thread
priority. However, on a multiprocessor computer, you can also affect
scheduling by setting thread affinity.
Thread affinity forces a thread to run on a specific subset of processors. A mask
function is used to specify thread affinity for all threads of the process.
Setting thread affinity should generally be avoided, because it can interfere with
the scheduler's ability to schedule threads effectively across processors. This
can decrease the performance gains produced by parallel processing. An
appropriate use of thread affinity is testing each processor.
Topic Objective
To describe processor and

thread affinity.
Lead-in
Datacenter Server uses a
symmetric multiprocessing
(SMP) model to schedule
threads on multiple
processors.
Explain how a thread can be
assigned to any processor.
Module 4: Managing Applications and Services by Using Process Control 11


Job Objects
Job Object A
Job Object A
Job Object B
Job Object B
Process
B
Process
A
Process
Group 1
Process
Group 2
Process
D
Process
E


*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
When managing the applications on a server, it is often necessary to treat a set
of processes as a single group. For example, if an application has several
dependent processes, you can group those processes together so that you have a
single point of management for the application.
Process Control uses job objects to group together one or more processes.
Grouping related processes enables management and tracking of the process
group as a single unit. Job objects can be created programmatically on all
versions of Windows 2000 and can be created by the Process Control tool in
Windows 2000 Datacenter Server.
A job object is a kernel object that is:
 Namable. Each job object can have a unique name.
 Securable. Each job object is separate and secure.
 Sharable. Each job object is accessible to other objects and to the operating
system.
 Inheritable. Properties of job objects can be inherited.

Job objects control attributes of the processes associated with them; for
example, a mask attribute defines the processors on which a thread can run.
Operations performed on the job object affect all the processes associated with
the job object.
A job object can enforce limits on each associated process. For example, limits
can be defined for working set size, process priority, and end-of-job time limit.
You can create Process Control rules that prevent processes from consuming
too much memory or CPU time. If a process associated with a job object
attempts to acquire resources that would exceed a set limit, the function calls
are ignored. After you associate a process with a job object, the association
cannot be broken.
Topic Objective

To describe job objects.
Lead-in
When managing the
applications on a server, it is
often necessary to treat a
set of processes as a single
group.
Explain the purpose of job
objects.

Define job object.

Describe how job objects
collect and retain accounting
information.

Describe how to control
child processes in a job
object.
12 Module 4: Managing Applications and Services by Using Process Control


Job objects prevent processes from changing their own limits. Although a given
process may be able to alter its own priority and affinity under normal
circumstances, that same process cannot do so from within a job object.
Accounting Information
A job object collects and retains accounting information (statistics) for all its
associated processes, including those that have terminated. This gives you the
ability to view meaningful data about a group of processes or across a series of
process executions or both.

This information is available only while the job object exists. After the job
object terminates, the accounting information is lost. Process Control in
Datacenter Server includes a monitoring facility that retains the accounting
information from job objects that have terminated. The information is available
for administrative purposes for all job objects that have run. The job object
retains accounting information for the following:
 Per process user time limit
 Per job user time limit
 Limit flags
 Minimum working set size
 Maximum working set size
 Active process limit
 Affinity
 Priority class
 Scheduling class

Controlling Child Processes in a Job Object
A child process is created by a process associated with a job object. By default,
child processes are also associated with the job object.
Processes running in a job object can create child processes, which by default
are part of the process tree controlled by the job object. The job object has
parameters that allow control of the child processes, so a process that is not part
of the same process tree can be created. Following is a list of parameters.
 Breakaway OK. Controls what happens when a process in the group
requests that a child process break away from the group. If enabled, the
child process begins execution outside the group. If not enabled, the child
process fails.
 Breakaway From Job. When enabled, the child process begins execution
outside the group
 Silent Breakaway OK. When enabled, a process started within the group

always breaks away. After the process leaves the group, it is eligible to be
placed in a group by Process Control during a management scan.

If the job has the extended limit JOB_OBJECT_LIMIT_BREAKAWAY_OK
and the process was created with the CREATE_BREAKAWAY_FROM_JOB
flag, its child processes are not associated with the job. If the job has the
extended limit JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK, no child
processes are associated with the job.
Module 4: Managing Applications and Services by Using Process Control 13




 Process Control Concepts
 Process Control Components
 Process Control Functionality
 Process Control User Interface

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
Process Control is made up of a user interface (UI) and services for controlling
and managing processes. You can use Process Control to manage individual
processes, group these processes together, and manage the grouped processes to
help maintain availability as defined by the applicable service level agreements
(SLAs).
The services that make up Process Control use the job objects to limit, report,
and constrict the activity of processes on a server running Datacenter Server.
With Process Control, you can manage application performance by limiting the
memory available to processes, setting process priority, and assigning processes
to run only on certain processors.

Enforcing limits at the process level ensures that a number of heterogeneous
applications can successfully coexist on a single server. Because you are
creating reserved spaces for certain processes, these processes will not consume
system resources beyond what you have allowed them. This guarantees
application performance within the boundaries you have set.
Process Control helps to ensure a specified level of performance when running
heterogeneous applications on a single server that is running Datacenter Server
by:
 Increasing application isolation. Processes are constrained by the job
objects in which processes are created. If a process fails, it can affect only
those processes created in the same job object.
 Managing large system resources. In systems with very large memory sizes
and multiple CPUs, it is possible to constrain the memory and CPU
resources available to a process group.
 Improving server management. Process groups allow an application’s
processes to be constrained. For example, management controls such as
time limits can be imposed on the process groups.
Topic Objective
To describe Process Control
concepts such as
components, functionality,
and user interface.
Lead-in
Process Control is made up
of a user interface (UI) and
services for controlling and
managing processes.
Introduce the Process
Control tool.


Explain how Process
Control ensures a specified
level of performance when
running heterogeneous
applications on a single
server that is running
Datacenter Server.

The following three
supportive slides discuss
Process Control
components, Process
Control functionality, and the
Process Control user
interface.
14 Module 4: Managing Applications and Services by Using Process Control


 Preventing processes from consuming too much memory or CPU time. Hard
limits can be set on memory consumed by processes, and soft limits can be
applied to process groups. Process groups can have their execution time
limited.
 Scaling applications to the appropriate number of CPUs. Process groups
can be limited to run on a subset of available CPUs.

This section begins by introducing the Process Control components that control
and manage processes. This is followed by a discussion about how Process
Control depends on these components to function. The section concludes with a
discussion about how the Process Control UI can be scripted, managed with
graphical tools, or controlled from the command line.

Module 4: Managing Applications and Services by Using Process Control 15


Process Control Components
 Process Control Service
 Process Control Mediator
 Process Control Snap-in
 Process Control Command-line Utility
 Process Control Console
 Process Control Help Files

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
Process Control is made up of several components that control and manage
processes. These components include a service, user interface (UI), and
command-line utility. The services that make up Process Control use job
objects to limit, report, and constrict the activity of processes on a server
running Datacenter Server. Process Control retains information about running
and completed process groups. The following table explains the Process
Control components.
Component File name Description

Process Control
service
ProcConSvc.exe A service in Windows 2000 Datacenter Server
that must be installed and started on the target
computer.
Process Control
mediator
ProcConMD8.exe A process that is controlled by the Process

Control service and is used to preserve
information when the service starts and stops.
Process Control
snap-in
ProcCon.dll A Microsoft Management Console (MMC)
snap-in that is a client of the Process Control
service. It is a graphical user interface from
which you can configure and manage processes
and process groups.
Process Control
command-line
utility
ProcCon.exe A command-line or console utility that is a
client of the Process Control service. It provides
a command-line interface from which you can
configure and manage processes and process
groups.
Process Control
console
ProcCon.msc A preconfigured, saved MMC console (.msc)
file for Process Control that runs in MMC.
Process Control
Help
ProcCon.chm An HTML Help file that contains conceptual,
procedural, and troubleshooting information
about Process Control.

Topic Objective
To describe the components
of Process Control.

Lead-in
Process Control is made up
of several components that
control and manage
processes.
Briefly explain the
components in the table.
The following slide provides
more details about how the
components function,
except for Process Control
Help.
16 Module 4: Managing Applications and Services by Using Process Control


Process Control Functionality
 The Process Control Service
 The Process Control Mediator
 Files to Manage a Server from a Workstation

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
Process Control functionality depends on the Process Control service, the
Process Control mediator, and the user interface. The service and mediator are
started by default on all servers running Datacenter Server and the user
interface can connect either locally or remotely to the running services.
The Process Control Service
The central component of Process Control is the Process Control service.
ProcConSvc.exe, the Process Control service, runs on each computer running
Datacenter Server. The service monitors all processes starting and stopping on

the system and applies the rules you have defined. In the case of process
groups, the service creates job objects. The job objects then enforce the rules
you have defined.
The Process Control Mediator
To preserve process group and accounting information across all service start
and stop events, the Process Control mediator, ProcConMD8.exe, maintains a
copy of the group and accounting information used to create a job object. If a
process group (controlled by a job object) starts, runs to completion, and stops
without the mediator, then the accounting information is lost when the job
object exits. The Process Control mediator copies the information from the job
object at completion and retains this information for display in the Process
Control UI.
If you stop both the service and the mediator:
 You lose accounting information about running process groups.
 Names are deleted.
 The processes appear as if they were no longer in their groups.

Topic Objective
To describe how the
components function.
Lead-in
Process Control functionality
depends on the Process
Control service, the Process
Control mediator, and the
user interface.
Explain how the Process
Control service monitors all
starting and stopping on the
system and applies the rules

you have defined.

Explain how the Process
Control mediator preserves
process groups across all
service start and stop
events.

Explain which files must be
installed to manage a server
from a workstation.
Key Points
To avoid losing data, do not
stop the mediator and the
service at the same time.
Module 4: Managing Applications and Services by Using Process Control 17


Windows 2000 continues to control the processes according to the group’s
rules, but the processes cannot be reassigned to their properly named groups
when Process Control restarts. In addition, system log notifications are lost for
those groups.

To avoid losing data, do not stop the Process Control mediator and
service at the same time.

Files to Manage a Server from a Workstation
The following table specifies which files must be installed before you can
manage a server from a workstation.
Computer Requirements


Server All Process Control files; that is, a standard installation of
Windows 2000 Datacenter Server.
Client workstation ProcCon.exe (command-line utility) or ProcCon.dll (graphical
user interface). If you want Help to be available from the MMC
snap-in, copy ProcCon.chm to the client as well (by default, the
\Winnt\Help directory).


To use the Process Control snap-in on the client workstation, you
must register the dynamic-link library (.dll) file in MMC. To do this, at a
command prompt, type regsvr32 proccon.dll and then start MMC. On the
Console menu, click Add/Remove Snap-in, and then add the Process Control
snap-in.

Importan
t
Im
p
ortan
t
18 Module 4: Managing Applications and Services by Using Process Control


Process Control User Interface
 MMC Console and Snap-in
 Command-Line Utility

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************

You can access the Process Control service by using either the MMC console
and snap-in or the command-line utility.
The MMC Console and Snap-in
ProcCon.msc is a preconfigured MMC console file that opens and loads the
Process Control snap-in (ProcCon.dll).
Starting Process Control from the Administrative Tools menu launches the
preconfigured MMC snap-in. You can use this snap-in to graphically view and
manage:
 Rules
 Processes
 Process groups

The Command-Line Utility
ProcCon.exe is a stand-alone command-line utility that runs on Windows 2000
clients but has no special dependencies. The command-line utility can be used
for both local and remote Process Control.
The Process Control command-line utility uses a series of command-line
switches that supply the required data to describe the operation to be performed.
The Process Control command-line utility also allows the scripting of Process
Control configurations and changes to those configurations.
Topic Objective
To describe the Process
Control user interface.
Lead-in
You can access the Process
Control service by using
either the MMC console and
snap-in or the command-line
utility.
Explain how students can

manage the Process Control
service by using the MMC
snap-in or the command-line
utility.

Explain how students can
use the MMC snap-in to
graphically view and
manage rules, processes,
and process groups. Rules,
processes, and process
groups are covered later in
this module.

Explain how the command-
line utility allows the
scripting of Process Control
configurations and changes
to those configurations.
Module 4: Managing Applications and Services by Using Process Control 19


Rules, Processes, and Process Groups
Process Control
A
ction View
Tree
Name
Rules
Processes

Process Groups
Process Control (Local)
Rules
Processes
Process Groups

*****************************I
LLEGAL FOR NON-TRAINER USE*****************************
Process Control helps you manage and control the resources that processes use
on your system by applying rules that you define. You can apply alias and
execution rules to a process, and you can group those processes into one or
more process groups.
In the Process Control console tree, you can define, view, and manage rules,
processes, and process groups.
Rules
Rules define process limitations and display information that is applied by
Process Control when your process starts.
Rules appear in the expanded Process Control console tree.
Processes
A process is an instance of a program running in a computer. When
applications run, they create processes that use system resources. On a
computer managed by Process Control, each process has an alias assigned to it
by a user-defined Process Alias rule or by the default rule that associates a
process with its image name.
By using the Process Control MMC snap-in or the command-line utility, you
can view, manage, and control the processes running on your system.
Processes appear in the expanded Process Control console tree. When you click
Processes, the details pane displays a list of processes running on the target
computer, as well as information about each process. If you click the processes,
you can configure the list to view:

 All processes (the default view).
 Only processes that are running.
 Only managed processes (processes that are associated with a Process
Control rule).
Topic Objective
To identify rules, processes,
and process groups.
Lead-in
Process Control helps you
manage and control the
resources that processes
use on your system by
applying rules that you
define.
Define rules, processes, and
process groups.

Introduce the user interface
for Process Control. You
can present the slide or
demonstrate the actual
screen by opening Process
Control.

×