X:\GMIT\OpSys\LABS\Lab05-WindowsTaskManager\Lab05- Windows - The Task Manager .doc
• Press CTRL+SHIFT+ESC
• Press CTRL+ALT+DEL and then select the Task Manager prompt • Type taskmgr into the Run utility or the command prompt.
• Right-click the taskbar and select task manager from the menu as shown here.
The Windows Task Manager window should appear.
Right click on any application to bring up a useful menu of options for that application.
Exercise #1
Start two separate instances of the notepad
application using the Run utility. Confirm that the Task Manager Window shows both applications running. Select one of the notepad applications and then click the ‘Switch to’ button. Describe what happens.
Then click the ‘End Task’ button and describes what happens.
Finally start an instance of WordPad using the ‘New Task’ button.
Exerise #2
Select the processes tab. Identify the process that is using most of the CPU time. Comment on what this may be the case.
Exercise #3
Write, compile and run a simple c program with an infinite loop while it performs some simple math calculation ( a runaway process).
While it is running check the Processes tab of the Task Manager and identify your runaway process and write down the percentage of CPU time it’s using. Discuss the result.
Finally select the runaway process and right click and navigate to the Set Priority menu option and set the priority to ‘low’. Discuss the result.
X:\GMIT\OpSys\LABS\Lab05-WindowsTaskManager\Lab05- Windows - The Task Manager .doc
Select the Performance Tab. Double click on the graph to enlarge as required. Select the menu item ‘View’|‘Show Kernel Times’ to add an additional kernel related red line to the graph.
Click and hold the left mouse button over the Task Manager window title. Move the window rapidly over around the screen and watch the CPU usage graph change. Discuss why this may be happening.
Also note the Physical memory and kernel memory reported. Calculate the percentage of total memory used by the Kernel. Start 10 instances of Wordpad and describe and discuss what happens to kernel level memory.
Beneath the graphs you'll find several lists of statistics. These statistics provide the following information:
• Totals
o Provides information on CPU usage. Handles shows the number
input/output 0/0) handles in use. Threads show the number of threads use.
Processes show the number of processes in use.
• Physical Memory
o 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 memory used for system caching.
• Commit Charge
o Provides information on the total memory used by the operating system.
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
o Provides information on the memory used by the operating system kernel. Critical portions of kernel memory must operate in RAM and can't be paged to virtual memory. This type of kernel memory is list 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.
Why/How is the value of Limit in Current Charge greater than Total Physical Memory? Will the amount of paged memory always be greater than Nonpaged memory?
Identify processes running on the system.
Task Manger Identifying the processes
With the aid of http://www.answersthatwork.com/Tasklist_pages/tasklist.htm identify and understand all the tasks (aka processes) that are running on your machine.
• In particular identify those tasks which could be 1. Unwise to stop
2. Stopped
3. Appear suspicious
Your hand-up must identify and describe the processes and state your opinion as to whether it is type 1, 2 or 3
X:\GMIT\OpSys\LABS\Lab05-WindowsTaskManager\Lab05- Windows - The Task Manager .doc
• Windows 2000 / XP
o Control Panel | System
o Right Click ‘My Computer’ and select ‘Properties’
The ‘System’ utility helps you manage system environments, profiles and properties. Although the Computer Management console is great for remote management of network resources, you also need a tool that gives you fine control over system environment settings and properties. This is where the System utility comes into the picture. You'll use this utility to
• Configure application performance, virtual memory, and registry settings Manage system and user environment variables
• Set system startup and recovery options • Manage hardware and user profiles
Consider the Advanced Tab | Performance Settings.| Virtual Memory. Virtual memory allows you to extend the amount of available memory on the system. Intel 386 (and later) processors write RAM to disks using a technique called paging. When paging is initiated a certain amount of RAM (possibly that which is least frequently used) is swapped out onto the hard-disk – later it can be retrieved and placed back in RAM as required. The place where Windows stores the RAM contents on the hard disk is pagefile.sys otherwise known as the swapfile. If you have multiple drives (e.g. a C:\ drive and a D:\ drive for example) note that Windows only creates a swapfile on the primary (i.e. that one that contains the OS) partition. Other drive’s paging files must be created manually. If you wish to see your page file then you will have to tell Windows to (a) Show hidden files and folders and (b) not to hide protected operating system files in the folder options. Set is using the View menu item in Explorer.
For best performance the following is recommended:
Set the initial paging file size equal to the maximum size. If the systems ‘grows’ the paging file as it needs then the result is a fragmented page file (this results in slower system performance). A reasonable size for this file is three times the amount of actual RAM1. On my laptop I have ~1GB RAM and a 3GB swapfile.
Exercise:
Part 1
• Check that the PC you are using has the swapfile configured with
o Fixed size swapfile
o Swapfile is approx. three times the amount of RAM on the system
X:\GMIT\OpSys\LABS\Lab05-WindowsTaskManager\Lab05- Windows - The Task Manager .doc
Part 2
If you increase the allowable size of the pagefile.sys the pagefile.sys may itself be defragmented (leading to a system performance deterioration). Disk Defragmenter is not capable of defragmenting the swapfile itself (however Norton’s Speed Disk is capable of doing this).
If you have more than 256 MB of RAM then you could disable virtual memory
temporarily (click No paging file and press Set in the Virtual Memory window). Restart Windows, run Disk Defragmenter. When this completes go back to the re-enable a
suitable constant size paging file.
Defragmentation of the hard-disk
Frequent use of a hard-drive can cause fragmentation of files (i.e. The files are all broken up and saved as pieces all over the hard-disk, wherever space is available). Here we see four files all saved consecutively on the hard disk. Later File 3 is deleted. A new file, File 5, is created and then saved by the OS in two place – the space vacated by File 3 and after File 4. Thus File 5 has become fragmented.
Windows comes with a utility called Disk Defragmenter (dfrg.mcs) which re-arranges the files on the hard disk to make them contiguous (not broken into pieces). You can locate the program from Start | Programs | Accessories | System Tools | Disk
Defragmenter or select a drive letter in Windows Explorer and right-click and from the pop-up menu select Properties| Tools | Defragmentation. Don’t work on the PC while it’s defragmenting.
Sometimes Disk Defragmenter does so much and then stops. Typically this is solved by: • Stopping all unnecessary programs and background processes which may write to
the hard-disk during a defrag (causing defrag to start all over again).
• Additionally you can select a drive letter in Windows Explorer and right-click and from the pop-up menu select Properties| Tools | General and uncheck the Allow
indexing Service to index this disk for fast file searching.
Exercise:
File 1 File 2 File 3 File 4
File 1 File 2 File 4
After reading the Virtual memory section we will defragment one of your PC’s disk drives.