CSNB224 Tutorial 5

Objective: • To observe the behaviour of processes using ______

Task manager is one of the tools that can be used to manage system processes and applications. Task manager is a program used to provide information about the processes and programs running on a computer, as well as the general status of the computer. It can also be used to terminate processes and programs, as well as change the processes' priority. In Windows operating systems, the task manager is a program named "Windows Task Manager" (taskmgr.exe).

Task Manager can be started with: 1. Press Ctrl+Shift+Esc 2. Press Ctrl+Alt+Del, and then select the Task Manager button 3. Enter taskmgr into the Run utility or a command prompt 4. Right-click on the and select Task Manager from the pop-up menu

There are three important tabs in Task Manager Window: 1. Application 2. Processes 3. Performance

Application It shows the status of the programs that are currently running on the system. Application status tells you if the application is running normally or if the application has gone off into the ozone. A status of Not Responding is an indicator that an application may be frozen and you may want to end its related task.

You can use the buttons on the bottom of this tab as follows:

• End Task: Stop an application • Switch To: Switch to an application and make it active • New Task: Start a new program and then enter a command to run the application.

1

Processes It shows the processes that are currently running. Each process is listed, along with their PID, the fraction of the total processor (CPU) time it has recently used, the CPU time the process has used since it was created and the process’s current memory utilization. You can actually select what types of information that you want to display by selecting View in the menu bar, then select column.

The fields of the Processes tab provide lots of information about running processes. You can use this information to determine which processes are hogging system resources such as CPU time and memory. Additional uses for the tab include:

• End Process: Stopping a process • Set Priority (right-clicking on a process) : Setting a process's priority (except System Idle Process)

You can't set the priority of this System Idle Process. Unlike other processes that track resource usage, System Idle Process tracks the amount of system resources that aren't used. Thus, a 99 in the CPU column for the process means 99% of the system resources currently aren't being used. Priority determines how much of the system resources are allocated to a process. Most processes have a normal priority by default. To increase priority, set the priority to high. To decrease priority, set the priority to low. The highest priority is given to real-time processes. This can be performed by right-clicking of the said process and choose the priority.

Performance Task Manager's Performance tab provides an overview of CPU and memory usage. This information provides a quick check on system resource usage. The graphs on the Performance tab provide the following information:

• CPU Usage: The percentage of processor resources being used • CPU Usage History: A history graph on CPU usage plotted over time • Memory Usage: The amount of memory currently being used on the system • Memory Usage History: A history graph on memory usage plotted over time

2

Beneath the graphs you'll find several lists of statistics. These statistics provide the following information:

: Provides information on the total memory used by the . Total lists all physical and virtual memory currently in use. Limit lists the total physical and virtual memory available. Peak lists the maximum memory used by the system since bootup.

• Kernel Memory : Provides information on the memory used by the operating system kernel. Critical portions of kernel memory must operate in RAM and cannot be paged to virtual memory. This type of kernel memory is listed as Nonpaged. The rest of kernel memory can be paged to virtual memory and is listed as Paged. The total amount of memory used by the kernel is listed under Total. • Physical Memory : Provides information on the total RAM on the system. Total shows the amount of physical RAM. Available shows the RAM not currently being used and available for use. System Cache shows the amount of memory used for caching. • Totals : Provides information on CPU usage. Handles shows the number of I/O handles in use. Threads shows the number of threads in use. Processes shows the number of processes in use.

EXERCISE: (in order to answer the question, you might have to do you own research)

1. Why are there more processes listed in processes tab as compared to the number of applications running as shown in the Applications tab?

2. What is the function of System Idle Process and System process?

3. Which part of Windows XP that is running as the processes?

4. Run Word for windows. Check the size of winword.exe process. Compare it with the size of winword.exe file in the hard disk (the C drive - you have to search for the file by using the find files program). Why are they of different size?

3

5. How many threads does the winword.exe process have? In your opinion, what can be the functions of each that are running? Explain your point.

6. Explain the meaning of page faults. Observe the page fault of the winword.exe process. Open a new file in word, type in the word test, copy the word and paste it back into the document to fill up one page. Save the page. Observe the page fault for winword.exe. Any changes?Why?

7. What does the number under handles mean? (This is under management)

9. For all other processes in the processes tab, try to explain the uses of each of them. In particular .EXE, SERVICES.EXE, explorer.exe. Does the total handles, total threads and total processes indicated in performance tab tally with the total added in the processes tab? Can they be different? Why

10. What is the difference between the non-paged and paged kernel memory (listed in kernel memory box).

11. Under physical memory box, what is the use of the file cache?

12. In the status bar at the bottom of the Task manager window, memory usage is given as 2 values: value 1/value 2. Are both values greater than physical memory size? Why?

13. Run the following applications in order: XP explorer, calculator, notepad, command prompt, telnet, another copy of XP explorer. Observe the number of applications, processes and their threads and memory usage. Exit each application in reverse order and observe the changes each time you exit the application.

14. Logoff your computer and reboot. Run the task manager as soon after you logon. Observe all the information under processes tab and the memory usage under performance tab.

4