copy (2) of lab-manual-os(2).doc1393

Upload: greatalltime

Post on 07-Apr-2018

222 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    1/127

    OperatingSystemsLaboratory Manual

    Student NameGovernment College University Faisalabad

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    2/127

    Preface

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    3/127

    Table of contents

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    4/127

    Lab # 1

    Hard Disk Drive Setup - Partition and Format

    This procedure explains how to setup a new hard disk. Warning - if you are setting up a harddisk which contains data, the following procedure would completely erase your hard disk andthe data would be unrecoverable.

    Before a new hard disk can be used it needs to be setup. This involves partitioning andformatting the hard disk. Windows 98 or ME boot disk contains the required software to

    perform this procedure. FDISK.EXE and FORMAT.COM are the files required in yourbootable floppy disk. Start the partition and format procedure by booting your PC using aWindows boot disk. Make sure you set the BIOS so that the boot sequence is set to detect thefloppy disk first. If your system has no problems booting you will be presented with aWindows boot disk menu. This gives you the option to start the system with or without CD-ROM support. At this stage you do not need the CD-ROM support, so choose the option to

    boot without CD-ROM support. You should end up in the MS DOS prompt A: (A drive).From A: command prompt type FDISK. You will be presented with following message:

    Choose "Y" to enable large disk support. You will now be presented with the FDISK mainmenu as shown below.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    5/127

    From the menu, choose option 1 - Create DOS partition or Logical DOS drive. Another menuwill present the following options.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    6/127

    Choose option 1 - Create primary DOS Partition. FDISK verifies the integrity of your driveand will ask you if want to use the maximum available size of your hard disk to create the

    primary partition and set it active. To keep things simple we will create one large partition.

    Choose "Y" to use maximum available space. When the partition has been createdsuccessfully you will be notified by the system. Your drive is now known as C: (C drive).Press "Esc" to return to the menu. Press "Esc" again to exit FDISK. You need to restart yoursystem for the changes to take effect. Leave boot disk in the drive. When the system reboots,choose start without CD-ROM from the boot disk menu. While booting from floppy disk youmight get error message like "Invalid media type reading drive C" this is OK for this stage asthe hard disk is not formatted.

    From A: command prompt type format c: You will get a message saying "WARNING, ALLDATA ON NON-REMOVABLE DISK DRIVE C: WILL BE LOST. Proceed with Format(Y/N)?

    Don't worry about the message as you do not have any data in the new hard disk. Choose"Y". The format will proceed and would show you a progress indicator. The time it takes toformat a hard disk depends on the size and speed of the drive. This could be around 5-30minutes. Once the format is complete you need to reset your system. You are now ready toinstall an operating system.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    7/127

    Lab # 2

    Windows Seven Installation

    The best way to install Windows 7 is to do a clean install. It is not difficult to perform a cleaninstallation. If you don't have Windows 7 drivers for all your hardware, it is a good idea todownload all the drivers from the hardware manufacturers website and save all the necessarydrivers on a CD-R or a USB drive before you start the installation.

    Windows 7 DVD is bootable. In order to boot from the DVD you need to set the bootsequence. Look for the boot sequence under your BIOS setup and make sure that the first

    boot device is set to CD-ROM/DVD-ROM.

    Step 1 - Place Windows 7 DVD in your DVD-ROM drive and start your PC. Windows 7 willstart to boot up and you will get the following progress bar.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    8/127

    Step 2 - The next screen allows you to setup your language, time and currency format,keyboard or input method. Choose your required settings and click next to continue.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    9/127

    Step 3 - The next screen allows you to install or repair Windows 7. Since we are doing aclean install we will click on "install now".

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    10/127

    Step 4 - Read the license terms and tick I accept license terms. Then click next to continue.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    11/127

    Step 5 - You will now be presented with two options. Upgrade or Custom (Advanced). Sincewe are doing a clean install we will select Custom (Advanced).

    Step 6 - Choose where you would like to install Windows 7. If you have one harddrive you will get a similar option to the image below. You can click next tocontinue. If you have more than one drive or partition then you need to selectthe appropriate drive and click next. If you need to format or partition a drivethen click Drive options (advance) before clicking next.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    12/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    13/127

    Step 9 - When your PC reboots it attempts to boot from DVD as its the first boot device. Donot press any key during the boot prompt so Windows 7 will continue with the installation by

    booting from the hard drive.

    Step 10 - After the reboot your computer will be prepared for first use.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    14/127

    Step 11 - At this stage you need to choose a user name and computer name. Click next tocontinue. The user account you create here is the Administrator account which is the mainaccount for your Windows 7 that has all the privileges.

    Step 12 - Choose your password and password hint just incase you forget yourpassword and need to jog your memory.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    15/127

    Step 13 - You can now type the product key that came with Windows 7 and click next. If youdo not enter the product key you can still proceed to the next stage. However Windows 7 willrun in trial mode for 30 days. You must therefore activate Windows within 30 days otherwise

    you cannot access your computer after 30 days.

    Step 14 - Help protect your computer and improve Windows automatically.Choose Use recommended settings.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    16/127

    Step 15 - Review your time and date settings. Select your time zone, correct the date andtime and click next to continue.

    Step 16 - Select your computer's current location. If you are a home user thenchoose Home network otherwise select the appropriate option.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    17/127

    Step 17 - Windows will now finalize the settings for your computer and restart.

    Step 18 - After the final restart Windows 7 will start to boot up.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    18/127

    Step 19 - Finally you have the logon screen. Just type your password and press enter or clickon the arrow to logon to Windows 7 for the first time.

    Step 20 - After you have logged on to Windows 7 for the first time, you will seesimilar desktop to the image below. At this point you can start using yourcomputer. However it may not be fully configured. You need to make sure thatall the hardware is detected correctly and the necessary device drivers are

    installed. This can be done from the device manager.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    19/127

    Step 21 - To go to device manager click - Start Menu -> Control Panel -> System andSecurity -> System -> Device Manager. You will see all your hardware listed as shown onthe image below. You need to check if you have any yellow exclamation marks next to the

    name of the devices, similar to "Multimedia Audio Controller" on the image below. Thisindicates that the driver has not been installed for this device.

    At this stage you can install the driver for this device. To do so, Right Mouse click onMultimedia Audio Controller -> Update Driver Software...

    Step 22 - You can choose to "Search automatically for updated driver software"or "Browse my computer for driver software". If you have the driver CD or if thedriver is on a USB drive then choose "browse my computer for driver software".Window 7 will search and install the driver from the CD or you can locate thedriver manually.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    20/127

    Once you have removed all the yellow exclamation marks from the device manager yourWindows 7 configuration would be fully complete.

    Step 23 - Finally check if you have successfully activated Windows 7. Click StartMenu -> Control Panel -> System and Security -> System. You will get a windowsimilar to the image below. Towards the bottom you will see Windows isactivated followed by your product ID. This shows that your copy of Windows 7 is

    fully activated.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    21/127

    Lab # 3

    Installing Fedora 10Fedora 10, also known as Cambridge, was released on November 25th, 2008, and it bringsGNOME 2.24 and KDE 4.1, faster boot experience with Plymouth, better printing, betterwebcam support, improved wireless network connection sharing, better software maintenanceand update (powered by PackageKit and RPM 4.6), and virtualization storage. Plus, it adds anew security tool for IDS (Intrusion Detection System) called SecTool.

    What do I need to get started?

    You will need the Fedora 10 DVD image that corresponds to your hardware architecture(i386 or amd64), and which can be downloaded from here. When the download is over, burnthe ISO image with your favourite CD/DVD burning application (Brasero on Linux or Nero,CDBurnerXP, Roxio on Windows) on a blank DVD at 4x speed.

    It is always recommend having an empty hard drive for a Linux installation (that means noother operating system on it, no Windows), and you must have a minimum of 10 GB freespace for the Fedora installation.

    Great, now let's begin. Insert or leave the DVD in your CD/DVD-ROM device, and rebootthe computer in order to boot from the DVD. Hit the F8 or F12 key (depending on yourBIOS) to select the CD/DVD-ROM as the boot device.

    You'll be presented with a very nice Fedora artwork GRUB splash and some options.

    http://linux.softpedia.com/get/System/Operating-Systems/Linux-Distributions/Fedora-41.shtmlhttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_001.jpghttp://linux.softpedia.com/get/System/Operating-Systems/Linux-Distributions/Fedora-41.shtml
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    22/127

    At this stage, we simply suggest you press Enter, and wait for the system to load.

    Select the "Skip" option when you're asked if you want to check the media before installation,and press "Enter".

    Anaconda (the Fedora installer) will load and you'll see the welcome screen. Click "Next"..

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_003.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_002.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    23/127

    Choose your language.

    Choose your keyboard layout.

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_005.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_004.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    24/127

    Type a name for the computer. It can be anything you want.

    Select your location (country/city).

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_007.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_006.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    25/127

    Enter the root (System Administrator) password. The longer, the better (WRITE ITSOMEWHERE).

    Here comes the partitioning part! If you have an empty hard drive, all you have to do is click"Next," but make sure the "Remove all partitions on selected drives and create defaultlayout"option is selected. If you don't have an empty hard drive and you still want to install

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_009.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_008.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    26/127

    Fedora 10 on your machine, then make sure you select the "Use free space on the selecteddrives and create default layout" option (10 GB minimum of free space is required). Click"Next".

    We also recommend selecting the "Encrypt system" option. Enter a password (the longer, thebetter) for the encrypted partition.

    Click the "Write changes to disk" button when asked.

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_011.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_010.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    27/127

    The hard drive will be formatted and the partitions will be created.

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_013.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_012.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    28/127

    Now, you can select the desired packages.

    Hit the "Next" button and everything will be done automatically from now on, just sit backand watch how the packages are copied to your hard drive or you can read the latest newswhile enjoying a cup of coffee. The installation process will take about 8-10minutes(depending on your computer specs and the selected packages).

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_015.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_014.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    29/127

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_017.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_016.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    30/127

    When the installation is over, you will get a "Congratulations, the installation is complete"screen. Click the "Reboot" button and your computer will automatically restart.

    Remove the DVD from your optical drive. Your brand new Fedora 10 operating system willboot for the first time.

    If you've chosen to encrypt your partition, then you'll be prompted for the passphrase.

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_019.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_018.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    31/127

    The system will continue to boot and in a few seconds you will see the First BootConfiguration Wizard. Click "Forward" on the Welcome screen.

    Click "Forward" on the License screen.

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_021.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_020.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    32/127

    Create a regular user for the system.

    Set the date and time.

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_023.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_022.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    33/127

    Send your hardware profile to the Fedora Project (optional).

    Click "Finish" and you will see the login screen. Enter the password for the regular useryou've just created.

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_024a.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_024.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    34/127

    That's it! Enjoy the ultimate and breathtaking Fedora 10 Linux distribution!

    http://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_026.jpghttp://i1-news.softpedia-static.com/images/extra/LINUX/large/fedora10installguide-large_025.jpg
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    35/127

    Lab # 4Process MonitorProcess Monitor is an advanced monitoring tool for Windows that shows real-time filesystem, Registry and process/thread activity. Process Monitor runs on Windows XP SP2,

    Windows Server 2003 SP1, and Windows Vista as well as x64 versions of Windows XP,Windows Server 2003 and Windows Vista.

    Using Process Monitor

    Executing Process Monitor requires local Administrative group membership. When youlaunch Process Monitor it immediately starts monitoring three classes of operation: filesystem, Registry and process.

    FileSystem

    Process Monitor displays file system activity for all Windows file systems, includinglocal storage and remote file systems. Process Monitor automatically detects thearrival of new file system devices and monitors them. All file system paths aredisplayed relative to the user session in which a file system operation executes. Toremove file system operations from the display de-select the file system push-buttonin the Process Monitor toolbar and to add back file system operations depress the

    button.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    36/127

    RegistryProcess Monitor logs all Registry operations and displays Registry paths usingconventional abbreviations for Registry root keys (e.g. HKEY_LOCAL_MACHINEis represented as HKLM). To remove Registry operations from the display de-selectthe Registry push-button in the Process Monitor toolbar and to add back Registry

    operations depress the button. Process

    In its process/thread monitoring subsystem Process Monitor tracks all process andthread creation and exit operations as well as DLL and device driver load operations.To remove Process operations from the display de-select the process push-button inthe Process Monitor toolbar and to add back process operations depress the button.

    Network

    Process Monitor uses Event Tracing for Windows (ETW) to trace and record TCP andUDP activity. Each network operation includes the source and destination addresses,as well as the amount of data sent or received, but does not include the actual data. Toremove Network operations from the display de-select the network push-button in the

    Process Monitor toolbar and to add back network operations depress the button. Profiling

    This event class can be enabled from the Options menu. When active, ProcessMonitor scans all the active threads in the system and generates a profiling even foreach one that records the kernel and user CPU time consumed, as well as the numberof context switches executed, by the thread since its previous profiling event.

    There are a number of basic options that control basic Process Monitor operation:Capture: Use the Capture Events menu item in the File menu, capture toolbar buttonor Ctrl+E hotkey to toggle Process Monitor's monitoring.Autoscroll: Select Autoscroll entry in the Edit menu, the autoscroll toolbar button orCtrl+A hotkey to toggle Process Monitor's autoscroll behavior, which causes it toensure that the most recent operation is visible in the display.Clear: To clear the display of all items choose Clear Display from the Edit menu oruse the Ctrl+X hotkey.

    Column SelectionWe can drag columns to rearrange their order and customized the columns displayed bychoosing Select Columns from the Options menu to open the column selection dialog.Columns that are available for selection include:

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    37/127

    Application Details

    Process Name The name of the process in which an event occurred. Image Path The full path of the image running in a process. Command Line The command line used to launch a process. Company Name The text of the company name version string embedded in a process

    image file. This text is optionally defined by the application developer. Description The text of the product description string embedded in a process image

    file. This text is optionally defined by the application developer. Version The product version number embedded in a process image file. This

    information is optionally specified by the application developer.

    Event Details

    Sequence Number The relative position of the operation with respect to all eventsincluded in the current filter. Event Class The class (File, Registry, Process) of the event. Operation The specific event operation (e.g. Read, RegQueryValue, etc.). Date & Time Both the date and the time of an operation. Time of Day Only the time of an operation. Path The path of the resource that an event references. Detail Additional information specific to an event. Result The status code of a completed operation. Relative Time The time of the operation relative to Process Monitor's start time or

    the last time that the Process Monitor display was cleared.

    Duration The duration of an operation that has completed.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    38/127

    Process Management

    User Name The name of the user account in which the process that performed anoperation is executing.

    Session ID The Windows session in which the process that executed an operation is

    executing. Authentication ID The logon session in which the process that executed an operation

    is executing. Process ID The Process ID (PID) of the process that executed an operation. Thread ID The Thread ID (TID) of the thread that executed an operation. Integrity Level The integrity level at which the process that executed an operation is

    running (Windows Vista only). Virtualized The virtualization status of the process that executed an operation

    (Windows Vista only).

    Experiments

    Experiment #1

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    39/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    40/127

    Experiment #2

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    41/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    42/127

    Lab # 5

    Process Explorer

    Process Explorer is an advanced process management utility that picks up where TaskManager leaves off. It will show us detailed information about a process including its icon,command-line, full image path, memory statistics, user account, security attributes, and more.When we zoom in on a particular process we can list the DLLs it has loaded or the operatingsystem resource handles it has open. A search capability enables us to track down a processthat has a resource opened, such as a file, directory or Registry key, or to view the list of

    processes that have a DLL loaded.

    The Process Explorer display consists of two sub-windows. The top always shows a list ofthe currently active processes, including the names of their owning accounts, whereas theinformation displayed in the bottom window, which we can close, depends on the mode thatProcess Explorer is in: if it is in handle mode we will see the handles that the process selectedin the top window has opened; if Process Explorer is in DLL mode we will see the DLLs andmemory-mapped files that the process has loaded.

    Process Explorer also has a powerful search capability that will quickly show us whichprocesses have particular handles opened or DLLs loaded. The unique capabilities of ProcessExplorer make it useful for tracking down DLL-version problems or handle leaks, and

    provide insight into the way Windows and applications work.

    Process Explorer does not require administrative privileges to run and works on clients

    running Windows XP and higher (Including IA64) and servers running Windows Server2003 and higher (Including IA64).

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    43/127

    The Main Window

    Views

    The Process Explorer window shows by default two panes: the upper pane is always a process list andthe bottom either shows the list of DLLs loaded into the process selected in the upper pane, or the listof operating system resource handles (files, Registry keys, synchronization objects) the process hasopen; the view mode determines which information is shown in the bottom pane. To switch the view,use the View|Lower Pane View menu item, the corresponding toolbar button (which toggles), or theCtrl+D (DLL view) and Ctrl-H (handle view) accelerator keys.

    If we are only interested in seeing the processes running on our system we can hide the lower pane byselecting View|Hide Lower Pane, the corresponding toolbar button, the Ctrl+L accelerator, or bydragging the pane divider to the bottom of the Process Explorer window. We can bring back the lower

    pane by selecting View|Show Lower Pane, typing Ctrl+L or selecting the toolbar button again.

    Mini Graphs

    Process Explorer includes a toolbar and mini graphs for CPU, memory, and if on Windows2000 or higher, I/O history, at the top of the main window. They can be resized with respectto one another or dragged such that each is on a separate row. The mini-graphs show historyof system activity and hovering the mouse over a point on a graph displays in a tooltip theassociated time and the process information for point in time.

    Refresh Rate and Difference Highlighting

    Configure the rate at which Process Explorer refreshes its window by using the View|UpdateSpeed menu item. we can refresh the view manually at any time with View|Refresh, therefresh toolbar button, or by pressing F5. Some checks, such as whether a process is part of aJob object or uses the .NET runtime, only occur during process startup. Press F5 to haveProcess Explorer recheck the status of all processes.

    Process Explorer uses difference highlighting to help us, see what items change betweenrefreshes. Items, including processes, DLLs, and handles, that exit or are closed show in redand new items show in green. If the refresh rate is not paused the highlighting remains ineffect for the interval specified by the Options|Difference Highlight Duration dialog, which

    has a default value of 1 second. If we pause the display the difference highlighting is in effectonly until the next time we manually refresh.

    Opacity

    We can make the Process Explorer window partially transparent so that windows beneath itshow through on systems that support it by making a selection under the View|Opacity menuitem.

    Saving

    When we choose File|Save Process Explorer saves the contents of the Process and lowerpane, if it is showing, as a tab-delimited text file.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    44/127

    Shutting Down or Logging Off

    Use the File|Shutdown menu items to shutdown, reboot, lock or logoff the system. Whenavailable, the menu also offers options for hibernating and suspending the system.

    RunUse this option to run other applications from Process Explorer using the standard WindowsRun dialog.

    Runas

    This variant on the Run command allows us to enter alternate credentials for the launchingapplication. Process Explorer leverages the same Windows functionality as the RunasWindows command to provide this support. The Runas menu item is not present on Windows9x.

    Run as Limited User

    This variant on the Run command runs the application we specify in the same account as thatof Process Explorer, but without administrative privileges or membership in the localadministrators group. This option restricts the exposure of our system from applications, suchas Internet Explorer, that might be compromised through access of untrusted data.

    System InformationOn Windows NT and higher the System Information entry in the View menu and typingCtrl+I opens a dialog box that shows global system performance metrics like those shown inTask Manager. The information includes the amount of committed and available virtual and

    physical memory as well as paged and nonpaged kernel buffer usage.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    45/127

    Graphs show the CPU usage history of the system as well as the committed virtual memoryusage, and on Windows 2000 or higher systems an I/O graph shows I/O throughput history.

    Red in the CPU usage graph indicates CPU usage in kernel-mode whereas green is the sumof kernel-mode and user-mode execution. When committed virtual memory, which TaskManager labels in its graphs on Windows 2000 and higher as "PF Usage" and on NT 4 as"Mem Usage", reaches the system Commit Limit, applications and the system becomeunstable. The Commit Limit is the sum of most of physical memory and the sizes of any

    paging files. In the I/O graph the blue line indicates total I/O traffic, which is the sum of allprocess I/O reads and writes, between refreshes and the pink line shows write traffic.

    When we move the mouse over the CPU graph a popup displays either on the far left or rightof the graph that shows the CPU usage and name of the process that had the largestcontribution to CPU usage at the corresponding point in time, as well as the time of the point.

    Similarly, time stamp information for a point is shown in the Commit graph. Finally, on theI/O graph the tooltip shows the process performing the most I/O at the time of the point,including the amount of data it read and wrote. The popups update as data moves under themouse, but we can freeze a popup by left clicking and the move the mouse to unfreeze the

    popup.

    On systems with multiple CPUs the System Information dialog includes a Show one graphper CPU checkbox. Checking it switches the display into a per-processor view.Hyperthreaded (SMT) processors sharing the same core and NUMA processors sharing thesame node are grouped together and the mouse tooltip shown when hovering over a graphdisplays the processor and core or node numbers. Note that the mouse tooltips for a processor

    graph show the name of the process that consumed the most CPU on the entire system at theassociated time, not the process that consumed the most CPU on the particular CPU.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    46/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    47/127

    Experiments

    Experiment # 1

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    48/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    49/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    50/127

    Experiment # 2

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    51/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    52/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    53/127

    Lab # 6Handle

    Handle is targeted at searching for open file references, so if you do not specify any

    command-line parameters it will list the values of all the handles in the system that refer toopen files and the names of the files. It also takes several parameters that modify thisbehaviour.

    usage: handle [[-a] [-u] | [-c [-l] [-y]] | [-s]] [-p |> [name]

    -a Dump information about all types of handles, not just those that refer to files. Othertypes include ports, Registry keys, synchronization primitives, threads, and processes.

    -c Closes the specified handle (interpreted as a hexadecimal number). You must specifythe process by its PID.WARNING: Closing handles can cause application or system instability.

    -l Dump the sizes of pagefile-backed sections.-y Don't prompt for close handle confirmation.

    -s Print count of each type of handle open.

    -u Show the owning user name when searching for handles.

    -p Instead of examining all the handles in the system, this parameter narrows Handle'sscan to those processes that begin with the name process. Thus:handle -p exp

    would dump the open files for all processes that start with "exp", which wouldinclude Explorer.

    name This parameter is present so that you can direct Handle to search for references to anobject with a particular name.

    For example, if you wanted to know which process (if any) has"c:\windows\system32" open you could type:handle windows\system

    The name match is case-insensitive and the fragment specified can be anywhere in thepaths you are interested in.

    Handle Output

    When not in search mode (enabled by specifying a name fragment as a parameter), Handledivides its output into sections for each process it is printing handle information for. Dashed

    lines are used as a separator, immediately below which you will see the process name and itsprocess id (PID). Beneath the process name are listed handle values (in hexadecimal), thetype of object the handle is associated with, and the name of the object if it has one.

    When in search mode,Handle prints the process names and id's are listed on the left side andthe names of the objects that had a match are on the right.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    54/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    55/127

    Lab # 7

    Scheduling Simulator

    Installation on Windows 95/98/Me/NT/2000 Systems

    Purpose

    This document provides instructions for the installation of the Scheduling Simulator onMicrosoft Windows operating systems. This procedure should be the same or similar onWindows 95, 98, Me, NT, and 2000 systems. The software is designed for use with AndrewS. Tanenbaum, Modern Operating Systems, 2nd Edition (Prentice Hall, 2001). TheScheduling Simulator was written by Alex Reeder([email protected]).

    This installation guide only provides information about installing the software and testing theconfiguration for Windows operating systems.

    Requirements

    The following software components are required to install and use the Scheduling Simulator.

    Microsoft Windows 95, 98, Me, NT, or 2000 Java Development Kit (JDK) 1.0 or greater Text program editor (e.g., notepad)

    Pre-Installation

    Before installation, you should verify:

    that you have a working java runtime environment, that you have a working java development environment, and that the working directory is in the classpath for the runtime environment.

    If you're using a standard command-line java compiler, the following instructions will helpdetermine if your environment is configured correctly.

    1. Verify that you have java installed and configured in your environment.2. C:\WINDOWS> java -version

    You should see a message like this with possibly a different version number.

    java version "1.1.8"

    If you get a message like:

    Bad command or file name

    Then java may not be installed on your system, or may not be configured for your use.

    http://www.cs.vu.nl/~ast/http://www.cs.vu.nl/~ast/http://vig.prenhall.com/catalog/academic/product/1,4096,0130313580,00.htmlhttp://www.prenhall.com/http://www.cs.earlham.edu/~odo/http://www.cs.earlham.edu/~odo/mailto:[email protected]://www.cs.vu.nl/~ast/http://www.cs.vu.nl/~ast/http://vig.prenhall.com/catalog/academic/product/1,4096,0130313580,00.htmlhttp://www.prenhall.com/http://www.cs.earlham.edu/~odo/mailto:[email protected]
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    56/127

    If you think that Java may already be installed on your system but may not be in your"path", you can find it by choosing Start -> Find -> Files or Folders and enter"java.exe" in the "Named:" field and click the Find Now button. If found, make noteof the directory folder in which it resides (e.g., "C:\jdk1.1.8\bin").

    While you're at it, also search for javac.exe to see if the Java compiler is installed andwhether it's in the same directory as the java.exe file.

    If Java isn't available on your system, you should check with your instructor or systemadministrator. If you administer your own system, then you should be able to find acopy of Java for your operating system.

    If you find that java is installed but not configured for your use, then perhaps youneed to add it to your path. Consult your instructor or system administrator if youneed help adding this to your path.

    3. Verify that the java compiler is installed and configured in your environment.4. C:\WINDOWS> javac

    If you're using a standard java command-line compiler, you should see a messagesimilar to this.

    use: javac [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath path][-nowrite][-deprecation][-ddir][-J] file.java...

    If you get a message like:

    Bad command or file name

    then the java compiler may not be installed on your system, or may not be configuredfor your use. Consult your instructor or system administrator.

    5. Verify that that the current directory is in your classpath.6. C:\WINDOWS> echo "%CLASSPATH%"

    You should see a list of directories separated by semi-colons (";") or possibly just "".If you don't see the directory "." (a single period, which stands for the currentdirectory), then you should add it to the classpath.

    C:\WINDOWS> set CLASSPATH=.;%CLASSPATH%

    If you have a working java runtime environment, a working java compiler, and the currentdirectory is in your path, then you're ready to proceed with the installation.

    Installation

    Installation of the software can be accomplished with these simple steps:

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    57/127

    1. Create a directory folder in which you wish to install the simulator (e.g., "C:\\sched").You can do this using the Windows explorer, or from the MS-DOS prompt. To createthe directory from the MS-DOS prompt:

    2. C:\WINDOWS> cd \3. C:\> mkdir 4. C:\> cd5. C:\> mkdir sched6. C:\> cd sched7. C:\\sched>

    8. Download the self-extracting ZIP archive (sched.exe) into the directory folder.9. Double-click on the file you downloaded (sched.exe), or invoke it using Start ->

    Run..., or invoke it from an MS-DOS command prompt:10. C:\\sched> sched.exe

    Files

    The directory should now contain the following files:

    Files Description

    sched.exe Self-extracting ZIP archive which contains all the other files.

    Common.javaProcess.javaResults.javaScheduling.javaSchedulingAlgorithm.javasProcess.java

    Java source files (*.java)

    Common.classProcess.classResults.classScheduling.classSchedulingAlgorithm.class

    sProcess.class

    Compiled Java class files (*.class)

    scheduling.conf Sample configuration file

    install_unix.htmlinstall_windows.html

    user_guide.html

    Documentation

    COPYING.TXTGnu General Public License: Terms and Conditions for Copying,Distribution, and Modification

    Compilation

    The distribution includes compiled class files as well as the source java files. You should notneed to recompile unless you decide to change the code. If you wish to compile the code, thefollowing commands should work if you're using a Java compiler that accepts the normal"javac" command line.

    C:\\sched> javac -nowarn *.java

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    58/127

    The -nowarn flag suppresses warning messages, of which there may be several. For backwardcompatibility we use only those features of Java which have been present from the beginning,some of which are deprecated and are usually reported by the compiler with warningmessages.

    Test

    To test the program, enter the following commands.

    C:\\sched> java Scheduling scheduling.conf

    The program will simply run the simulation based on the information provided inscheduling.conf and write its output to the Summary-Results and Summary-Processes files. Youshould see the following output.

    Working...Completed.

    The simulation configuration information is read from a file called "scheduling.conf". The"scheduling.conf" file looks something like this:

    // # of Processnumprocess 3

    // mean deivationmeandev 1100

    // standard deviationstanddev 510

    // process # I/O blockingprocess 100process 500process 30

    // duration of the simulation in millisecondsruntime 5000

    If things are working correctly, the "Summary-Results" file should look something like this:

    Scheduling Type: Batch (Nonpreemptive)Scheduling Name: First-Come First-ServedSimulation Run Time: 2750Mean: 1100Standard Deviation: 510Process # CPU Time IO Blocking CPU Completed CPU Blocked0 1372 (ms) 100 (ms) 1372 (ms) 13 times1 689 (ms) 500 (ms) 689 (ms) 1 times2 689 (ms) 30 (ms) 689 (ms) 22 times

    and the "Summary-Processes" file should look something like this:Process: 0 registered... (1372 100 0 0)

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    59/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    60/127

    Process: 2 I/O blocked... (689 30 450 450)Process: 2 registered... (689 30 450 450)Process: 2 I/O blocked... (689 30 480 480)Process: 2 registered... (689 30 480 480)Process: 2 I/O blocked... (689 30 510 510)Process: 2 registered... (689 30 510 510)

    Process: 2 I/O blocked... (689 30 540 540)Process: 2 registered... (689 30 540 540)Process: 2 I/O blocked... (689 30 570 570)Process: 2 registered... (689 30 570 570)Process: 2 I/O blocked... (689 30 600 600)Process: 2 registered... (689 30 600 600)Process: 2 I/O blocked... (689 30 630 630)Process: 2 registered... (689 30 630 630)Process: 2 I/O blocked... (689 30 660 660)Process: 2 registered... (689 30 660 660)Process: 2 completed... (689 30 689 689)

    Scheduling Simulator

    Purpose

    This document is a user guide for the Scheduling Simulator. It explains how to use thesimulator and describes the various input and output files used by the simulator. The softwareis designed for use with Andrew S. Tanenbaum, Modern Operating Systems, 2nd Edition(Prentice Hall, 2001). The Scheduling Simulator was written by Alex Reeder (alexr@e-

    sa.org).

    Introduction

    The scheduling simulator illustrates the behaviour of scheduling algorithms against asimulated mix of process loads. The user can specify the number of processes, the mean andstandard deviation for compute time and I/O blocking time for each process, and the durationof the simulation. At the end of the simulation a statistical summary is presented. Studentsmay also be asked to write their own scheduling algorithms to be used with process loadsdefined by the instructor.

    Running the Simulator

    The program reads a configuration file (scheduling.conf) and writes two output files

    (Summary-Results and Summary-Processes).

    To run the program, enter the following command line.

    $ java Scheduling scheduling.conf

    The program will display "Working..." while the simulation is working, and "Completed."when the simulation is complete.

    Working...Completed.

    http://www.cs.vu.nl/~ast/http://vig.prenhall.com/catalog/academic/product/1,4096,0130313580,00.htmlhttp://www.prenhall.com/http://www.cs.earlham.edu/~odo/mailto:[email protected]:[email protected]://www.cs.vu.nl/~ast/http://vig.prenhall.com/catalog/academic/product/1,4096,0130313580,00.htmlhttp://www.prenhall.com/http://www.cs.earlham.edu/~odo/mailto:[email protected]:[email protected]
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    61/127

    The simulator reads parameters from the configuration file ("scheduling.conf"). It creates aspecified number of processes, each of which blocks for input or output after a number ofmilliseconds that can be specified for each process. Each process is allowed to run for arandomly generated amount of time, with the amount of time constrained by a specifiedaverage (mean) in milliseconds, and standard deviations from that average. The simulation

    may also be bounded in the total length of its run.

    After reading the configuration file, the scheduling algorithm then "runs" the processes,causing each to block for input or output after the specified interval until all processes havecompleted their randomly generated amount of runtime, or until the maximum amount ofruntime for the simulation is exceeded.

    As the simulation proceeds, a log file ("Summary-Processes") is generated which shows theactivity of the scheduling algorithm as it considers each process in the process queue.

    After the simulation halts, a summary report ("Summary-Results") is generated which shows

    statistics for each process and for the simulation as a whole.

    The Configuration File

    The configuration file (scheduling.conf) is used to specify various parameters for the

    simulation, including:

    the number of processes, the mean runtime for a process, the standard deviation in runtime for a process, for each process, how long the process runs before it blocks for input or output, and how long the simulation should run.

    Configuration File Options

    There are a number of options which can be specified in the configuration file. These aresummarized in the table below.

    Keyword Values Description

    numprocess n The number of processes to create for the simulation.

    meandev n The average length of time in milliseconds that a process should execute beforeterminating.

    standdev n The number of standard deviations from the average length of time a processshould execute before terminating.

    process n The amount of time in milliseconds that the process should execute beforeblocking for input or output. There should be a separate process directive for eachprocess specified by the numprocess directive.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    62/127

    runtime n The maximum amount of time the simulation should run in milliseconds.

    Sample Configuration File

    The "scheduling.conf" configuration file looks like this:

    // # of Processnumprocess 3// mean deivationmeandev 1100// standard deviationstanddev 510// process # I/O blocking

    process 100process 500process 30// duration of the simulation in milliseconds

    runtime 5000

    The Summary-Results File

    The Summary-Results file contains a summary report describing the simulation and includesone line of summary information for each process. The fields and columns in the report aredescribed in the following table.

    Field Description

    SchedulingType:

    The type of the scheduling algorithm used. The value displayed is "hard coded" in theSchedulingAlgorithm.java file.

    SchedulingName:

    The name of the scheduling algorithm used. The value displayed is "hard coded" in theSchedulingAlgorithm.java file.

    SimulationRun Time:

    The number of milliseconds that the simulation ran. This may be less than or equal tothe total amount of time specified by the "runtime" configuration parameter.

    Mean: The average amount of runtime for the processes as specified by the "meandev"configuration parameter.

    StandardDeviation:

    The standard deviation from the average amount of runtime for the processes asspecified by the "standdev" configuration parameter.

    Process # The process number assigned to the process by the simulator. The process number isbetween 0 and n-1, where n is the number specified by the "numprocess" configurationparameter.

    CPU Time The randomly generated total runtime for the process in milliseconds. This isdetermined by the "meandev" and "standdev" parameters in the configuration file.

    IO Blocking The amount of time the process runs before it blocks for input or output. This is

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    63/127

    specified for each process by a "process" directive in the configuration file.

    CPUCompleted

    The amount of runtime in milliseconds completed for the process. Note that this may beless than the CPU Time for the process if the simulator runs out of time as specified bythe "runtime" configuration parameter.

    CPU Blocked The number of times the process blocked for input or output during the simulation.

    Sample Summary-Results File

    The output "Summary-Results" file looks something like this:

    Scheduling Type: Batch (Nonpreemptive)Scheduling Name: First-Come First-ServedSimulation Run Time: 2750Mean: 1100

    Standard Deviation: 510Process # CPU Time IO Blocking CPU Completed CPU Blocked0 1372 (ms) 100 (ms) 1372 (ms) 13 times1 689 (ms) 500 (ms) 689 (ms) 1 times2 689 (ms) 30 (ms) 689 (ms) 22 times

    The Summary-Processes File

    The Summary-Processes file contains a log of the actions taken by the scheduling algorithmas it considers each process in the scheduling queue.

    Each line in the log file is of the following form:

    Process:process-numberprocess-status... (cpu-timeblock-timeaccumulated-timeaccumulated-time)

    The fields in the line are described in the table below.

    Field Description

    process-number

    The process number assigned to the process by the simulator. This is a number between0 and n-1, where n is the value specified for the "numprocess" configuration parameter.

    process-status The status of the process at this point in time. If "registered" then the process is underconsideration by the scheduling algorithm. If "I/O blocked", then the schedulingalgorithm has noticed that the process is blocked for input or output. If "completed",then the scheduling algorithm has noticed that the process has met or exceeded itsallocated execution time.

    cpu-time The total amount of run time allowed for this process. This number is randomlygenerated for the process based on the "meandev" and "standdev" values specified inthe configuration file.

    block-time The amount of time in milliseconds to execute before blocking process. This number is

    specified for the process by the "process" directive in the configuration file.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    64/127

    accumulated-time

    The total amount of time process has executed in milliseconds. (This number appearstwice in the log file; one should be removed).

    Sample Summary-Processes File

    The output "Summary-Processes" file looks something like this:

    Process: 0 registered... (1372 100 0 0)Process: 0 I/O blocked... (1372 100 100 100)Process: 1 registered... (689 500 0 0)Process: 1 I/O blocked... (689 500 500 500)Process: 0 registered... (1372 100 100 100)Process: 0 I/O blocked... (1372 100 200 200)Process: 1 registered... (689 500 500 500)Process: 1 completed... (689 500 689 689)Process: 0 registered... (1372 100 200 200)Process: 0 I/O blocked... (1372 100 300 300)

    Process: 2 registered... (689 30 0 0)Process: 2 I/O blocked... (689 30 30 30)Process: 0 registered... (1372 100 300 300)Process: 0 I/O blocked... (1372 100 400 400)Process: 2 registered... (689 30 30 30)Process: 2 I/O blocked... (689 30 60 60)Process: 0 registered... (1372 100 400 400)Process: 0 I/O blocked... (1372 100 500 500)Process: 2 registered... (689 30 60 60)Process: 2 I/O blocked... (689 30 90 90)Process: 0 registered... (1372 100 500 500)Process: 0 I/O blocked... (1372 100 600 600)Process: 2 registered... (689 30 90 90)Process: 2 I/O blocked... (689 30 120 120)Process: 0 registered... (1372 100 600 600)Process: 0 I/O blocked... (1372 100 700 700)Process: 2 registered... (689 30 120 120)Process: 2 I/O blocked... (689 30 150 150)Process: 0 registered... (1372 100 700 700)Process: 0 I/O blocked... (1372 100 800 800)Process: 2 registered... (689 30 150 150)Process: 2 I/O blocked... (689 30 180 180)Process: 0 registered... (1372 100 800 800)Process: 0 I/O blocked... (1372 100 900 900)Process: 2 registered... (689 30 180 180)Process: 2 I/O blocked... (689 30 210 210)Process: 0 registered... (1372 100 900 900)Process: 0 I/O blocked... (1372 100 1000 1000)Process: 2 registered... (689 30 210 210)Process: 2 I/O blocked... (689 30 240 240)Process: 0 registered... (1372 100 1000 1000)Process: 0 I/O blocked... (1372 100 1100 1100)Process: 2 registered... (689 30 240 240)Process: 2 I/O blocked... (689 30 270 270)Process: 0 registered... (1372 100 1100 1100)Process: 0 I/O blocked... (1372 100 1200 1200)Process: 2 registered... (689 30 270 270)Process: 2 I/O blocked... (689 30 300 300)

    Process: 0 registered... (1372 100 1200 1200)Process: 0 I/O blocked... (1372 100 1300 1300)Process: 2 registered... (689 30 300 300)

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    65/127

    Process: 2 I/O blocked... (689 30 330 330)Process: 0 registered... (1372 100 1300 1300)Process: 0 completed... (1372 100 1372 1372)Process: 2 registered... (689 30 330 330)Process: 2 I/O blocked... (689 30 360 360)Process: 2 registered... (689 30 360 360)

    Process: 2 I/O blocked... (689 30 390 390)Process: 2 registered... (689 30 390 390)Process: 2 I/O blocked... (689 30 420 420)Process: 2 registered... (689 30 420 420)Process: 2 I/O blocked... (689 30 450 450)Process: 2 registered... (689 30 450 450)Process: 2 I/O blocked... (689 30 480 480)Process: 2 registered... (689 30 480 480)Process: 2 I/O blocked... (689 30 510 510)Process: 2 registered... (689 30 510 510)Process: 2 I/O blocked... (689 30 540 540)Process: 2 registered... (689 30 540 540)Process: 2 I/O blocked... (689 30 570 570)

    Process: 2 registered... (689 30 570 570)Process: 2 I/O blocked... (689 30 600 600)Process: 2 registered... (689 30 600 600)Process: 2 I/O blocked... (689 30 630 630)Process: 2 registered... (689 30 630 630)Process: 2 I/O blocked... (689 30 660 660)Process: 2 registered... (689 30 660 660)Process: 2 completed... (689 30 689 689)

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    66/127

    Lab # 8

    Deadlock Simulator

    Installation on Windows 95/98/Me/NT/2000 Systems

    Purpose

    This document provides instructions for the installation of the Deadlock Simulator onMicrosoft Windows operating systems. This procedure should be the same or similar onWindows 95, 98, Me, NT, and 2000 systems. The software is designed for use with AndrewS. Tanenbaum,Modern Operating Systems, 2nd Edition (Prentice Hall, 2001).

    This installation guide only provides information about installing the software and testing theconfiguration for Windows operating systems.

    Requirements

    The following software components are required to install and use the Deadlock Simulator.

    Microsoft Windows 95, 98, Me, NT, or 2000 Java Development Kit (JDK) 1.0 or greater Text program editor (e.g., notepad)

    Pre-Installation

    Before installation, you should verify:

    that you have a working java runtime environment, that you have a working java development environment, and that the working directory is in the classpath for the runtime environment.

    If you're using a standard command-line java compiler, the following instructions will helpdetermine if your environment is configured correctly.

    1. Verify that you have java installed and configured in your environment.2. C:\WINDOWS> java -version

    You should see a message like this with possibly a different version number.

    java version "1.1.8"

    If you get a message like:

    Bad command or file name

    Then java may not be installed on your system, or may not be configured for your use.

    If you think that Java may already be installed on your system but may not be in your"path", you can find it by choosing Start -> Find -> Files or Folders and enter

    http://www.cs.vu.nl/~ast/http://www.cs.vu.nl/~ast/http://www.cs.vu.nl/~ast/http://vig.prenhall.com/catalog/academic/product/1,4096,0130313580,00.htmlhttp://www.prenhall.com/http://www.cs.vu.nl/~ast/http://www.cs.vu.nl/~ast/http://vig.prenhall.com/catalog/academic/product/1,4096,0130313580,00.htmlhttp://www.prenhall.com/
  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    67/127

    "java.exe" in the "Named:" field and click the Find Now button. If found, make noteof the directory folder in which it resides (e.g., "C:\jdk1.1.8\bin").

    While you're at it, also search for javac.exe to see if the Java compiler is installed andwhether it's in the same directory as the java.exe file.

    If Java isn't available on your system, you should check with your instructor or systemadministrator. If you administer your own system, then you should be able to find acopy of Java for your operating system.

    If you find that java is installed but not configured for your use, then perhaps youneed to add it to your path. Consult your instructor or system administrator if youneed help adding this to your path.

    3. Verify that the java compiler is installed and configured in your environment.4. C:\WINDOWS> javac

    If you're using a standard java command-line compiler, you should see a messagesimilar to this.

    use: javac [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath path][-nowrite][-deprecation][-ddir][-J] file.java...

    If you get a message like:

    Bad command or file name

    then the java compiler may not be installed on your system, or may not be configuredfor your use. Consult your instructor or system administrator.

    5. Verify that that the current directory is in your classpath.6. C:\WINDOWS> echo "%CLASSPATH%"

    You should see a list of directories separated by semi-colons (";") or possibly just "".If you don't see the directory "." (a single period, which stands for the currentdirectory), then you should add it to the classpath.

    C:\WINDOWS> set CLASSPATH=.;%CLASSPATH%

    If you have a working java runtime environment, a working java compiler, and the currentdirectory is in your path, then you're ready to proceed with the installation.

    Installation

    Installation of the software can be accomplished with these simple steps:

    1. Create a directory folder in which you wish to install the simulator (e.g.,"C:\\deadlock"). You can do this using the Windows explorer, or from the MS-DOS

    prompt. To create the directory from the MS-DOS prompt:2. C:\WINDOWS> cd \3. C:\> mkdir

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    68/127

    4. C:\> cd5. C:\> mkdir deadlock6. C:\> cd deadlock7. C:\\deadlock>

    8. Download the self-extracting ZIP archive (deadlock.exe) into the directory folder.9. Double-click on the file you downloaded (deadlock.exe), or invoke it using Start ->

    Run..., or invoke it from an MS-DOS command prompt:10. C:\\deadlock> deadlock.exe

    Files

    The directory should now contain the following files:

    Files Description

    deadlock.exe Self-extracting ZIP archive which contains all the other files.

    Command.javaCommandParser.javaControlPanel.javaDatFilenameFilter.javaDeadlockManager.javaKernel.javaOptionsDialog.javaProcess.javaProcessesDialog.javaProcessesPanel.javaResource.java

    ResourcesDialog.javaResourcesPanel.javadeadlock.java

    Java source files (*.java)

    Command.classCommandParser.classControlPanel.classDatFilenameFilter.class

    DeadlockManager.class

    Kernel.classOptionsDialog.classProcess.classProcessesDialog.classProcessesPanel.classResource.classResourcesDialog.classResourcesPanel.classdeadlock.class

    Compiled Java class files (*.class)

    a0.data1.dat

    b0.datb1.dat

    Sample input files

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    69/127

    install_unix.htmlinstall_windows.htmluser_guide.htmluser_guide_1.gif

    Documentation and associated images

    copying.txtGnu General Public License: Terms and Conditions for Copying,Distribution, and Modification

    Compilation

    The distribution includes compiled class files as well as the source java files. You should notneed to recompile unless you decide to change the code.

    If you wish to compile the code, the following commands should work if you're using a Javacompiler that accepts the normal "javac" command line.

    C:\\deadlock> javac -nowarn *.java

    The -nowarn flag suppresses warning messages, of which there may be several. For backwardcompatibility we use only those features of Java which have been present from the beginning,some of which are deprecated and are usually reported by the compiler with warningmessages.

    Test

    To test the installed program, enter the following command line.

    C:\\deadlock> java deadlock a 2 1 >a.log

    The program will display a window allowing you to run the simulator. When the windowpresents itself, click on the "run" button. You should see the program "execute" cycles, aboutone per second. When the simulation completes, click the "exit" button.

    The program simulated the creation of two processes and read commands for each processfrom the files "a0.dat" and "a1.dat". It also simulated creation of a resource with an availablequantity of 1. During the execution of the simulator, a process executes, or requests or frees aresource. If there are no available instances of the resource, the process blocks. The

    simulation runs until all processes halt.

    The input file "a0.dat" looks like this:

    /*a0.dat

    The "a" collection of process data files is meant to simulatetwo processes competing for a single resource. If you runthe simulator with one resource available, one of the processeswill block until the other is done using the resource.*/

    C 10 // compute for 10 millisecondsR 0 // request resource 0

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    70/127

    C 10 // compute for 10 millisecondsF 0 // free resource 0H // halt process

    The input file "a1.dat" looks like this:

    /*a1.dat

    The "a" collection of process data files is meant to simulatetwo processes competing for a single resource. If you runthe simulator with one resource available, one of the processeswill block until the other is done using the resource.*/C 10 // compute for 10 millisecondsR 0 // request resource 0C 10 // compute for 10 milliseconds

    F 0 // free resource 0H // halt process

    If things are working correctly, the "a.log" output file should look something like this:

    time = 0 available = 1 blocked = 0time = 1 available = 1 blocked = 0time = 2 available = 1 blocked = 0time = 3 available = 1 blocked = 0time = 4 available = 1 blocked = 0time = 5 available = 1 blocked = 0time = 6 available = 1 blocked = 0time = 7 available = 1 blocked = 0time = 8 available = 1 blocked = 0time = 9 available = 1 blocked = 0time = 10 available = 0 blocked = 1time = 11 available = 0 blocked = 1time = 12 available = 0 blocked = 1time = 13 available = 0 blocked = 1time = 14 available = 0 blocked = 1time = 15 available = 0 blocked = 1time = 16 available = 0 blocked = 1time = 17 available = 0 blocked = 1time = 18 available = 0 blocked = 1

    time = 19 available = 0 blocked = 1time = 20 available = 0 blocked = 0time = 21 available = 0 blocked = 0time = 22 available = 0 blocked = 0time = 23 available = 0 blocked = 0time = 24 available = 0 blocked = 0time = 25 available = 0 blocked = 0time = 26 available = 0 blocked = 0time = 27 available = 0 blocked = 0time = 28 available = 0 blocked = 0time = 29 available = 0 blocked = 0time = 30 available = 1 blocked = 0

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    71/127

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    72/127

    When all processes are halted, the simulation stops.

    Running the Simulator

    To run the program, enter the following command line.

    $ java deadlock a 2 1 >a.log

    In this example,

    a

    is the prefix for the names of the files containing the commands, (the actual names of the filesare "a0.dat", and "a1.dat"),

    2

    is the number of processes to be created,

    1

    is the number of instances to create for the first resource, and

    a.log

    is the name of the output file.

    The program will display a window allowing you to run the simulator. You will notice a rowof command buttons across the top, and an informational display below. The left side of theinformation display lists the resources and the number of available instances for each, and theright side lists the processes and the current status for each.

    Typically you will use the step button to execute a cycle of the simulation and observe the

    effect on the resources and processes. When you're done, quit the simulation using the exitbutton.

    The Command Line

    The general form of the command line is

    $ java deadlockfile-name-prefixinitial-number-of-processesinitial-available-for-resource ...

    where

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    73/127

    Parameter Description

    file-name-prefix

    Specifies the name prefix for the process command files. The default command filenames are generated from this prefix, followed by the number of the process, followed

    by ".dat" (e.g, "a0.dat", "a1.dat" if "a" is the prefix). The actual names of the files may

    be entered or modified in the Processes Dialog (see below).

    initial-number-of-processes

    Specifies the number of processes to create for the simulation. This should be a non-negative number, usually greater than one. This number may also be entered ormodified using the Options Dialog (see below).

    initial-available-for-resource...

    Specifies the initial number of instances available for each resource. This should be asequence of non-negative numbers. For example, "2 1 2 0" indicates that there are fourresources, and there are initially two instances of resource 0, one instance of resource1, two instances of resource 2, and zero instances of resource 3. The number ofresources may also be entered or modified using the Options Dialog (see below). Theinitial number of instances available for each resource may be entered or modifiedusing the Resources Dialog (see below).

    The Control Panel

    The main control panel for the simulator includes a row of command buttons, and aninformational display.

    The buttons:

    Button Description

    run runs the simulation to completion. Note that the simulation pauses and updates the screenbetween each step.

    stop stops the simulation if it is running. This button is only active if the run button has beenpressed.

    step runs a single setup of the simulation and updates the display.

    reset initializes the simulator and starts from the initial values for each process and resource.

    options allows you to change various options for the simulator, including the number of resources and

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    74/127

    the number of processes.

    resources allows you to change the configuration for each resource, including the initial and currentnumber of instances available for each resource.

    processes allows you to change the configuration for each process, including current state and the nameof the command file for that process.

    exit exits the simulation.

    The informational display:

    Field Description

    Time: number of "milliseconds" since the start of the simulation.

    Resource Id: A number which identifies the particular resource. Resources are numbered starting withzero.

    ResourceAvailable:

    The number of instances available for the particular resource. This is a non-negativenumber.

    Process Id: A number which identifies the particular process. Processes are numbered starting withzero.

    Process

    State:

    The current state of the process. This may be U (unknown), C (computable), W (waiting),

    or H (halted). At the beginning of the simulation, all processes have U status. While aprocess is computable, it has a C status. If it requests a resource which is unavailable, itenters W status until the resource becomes available. When a process has completed all thecommands in its command file or performs a halt command, it enters H status.

    ProcessResource:

    The resource for which this process is waiting, if any. This field only has a value if theprocess is in W status.

    The Options Dialog Box

    The Options Dialog Box allows you to set general options for the simulator.

    The options:

    Field Description

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    75/127

    Number of Processes:

    The number of processes to use in the simulation. This should be a non-negativenumber, usually at least two. Although the program does not enforce a limit, you maynot be able to view more than about 10 processes on the informational display on your

    display screen. The initial value for this option is obtained from the second parameter onthe command line, or zero, if not specified. Keep in mind that each process should havea process command file. To set properties for individual processes, use the ProcessesDialog (see below).

    Number of Resources:

    The number of resources available in the simulation. This should be a non-negativenumber, usually at least one. Although the program does not enforce a limit, you maynot be able to view more than about 10 resources on the informational display on yourdisplay screen. The initial value for this option is obtained from the number of initialinstances for each resource specified on the command line (see above), or zero, if noneare specified. This number should be one more than the largest resource numbermentioned in any of the process command files for the simulation. To set properties for

    individual resources, use the Resources Dialog (see below).

    Millisecondsper step:

    The number of real-time milliseconds to pause between each cycle of the simulator in"run" mode. This is the pause between cycles when you hit the run button. The defaultvalue is 1000 milliseconds, or, one second.

    The Processes Dialog Box

    The Processes Dialog Box allows you to enter or modify properties for each process.

    The process properties:

    Field Description

    Number ofProcesses:

    The number of processes in the simulation. To change this value, use the Options Dialog(see above).

    Process Id The id number for the process. These numbers are used to identify each process and areassigned by the simulator, starting with zero. These numbers cannot be changed.

    Process FileName

    The name of the file from which process commands are read. This may be any validfilename. For convenience, there is a choose button which allows you to browse the file

    system to choose the file. By default, the name is the prefix string, followed by the

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    76/127

    process number, followed by ".dat".

    The Resources Dialog Box

    The Resources Dialog Box allows you to enter and modify properties for each resource.

    The resource properties:

    Field Description

    Number ofresources:

    The number of resources available in the simulation. To change this value, use theOptions Dialog (see above).

    Resource Id The id number assigned to the resource. This number is used to identify the resource andis assigned by the simulator and cannot be changed. This is the number which appears inthe R (request resource) and F (free resource) commands in the process command files.

    ResourceInitial The initial number of available instances of the resource. This number is used when thesimulator starts or is reset.

    ResourceCurrent

    The current number of available instances of the resource. This number may be changedduring the simulation to see the effect it may have on processes waiting for the resource.

    The Process Command Files

    The process command files for the simulator specifies a sequence operations to be performed by the process or processes which use the file. There are four operations defined C

    (compute), R (request resource), F (free resource) and H (halt).

    Operation Description

    Cmsec Compute for the specified number of milliseconds (cycles).

    R resource-id

    Request an instance of the specified resource. If none are available, block the process untilthe resource becomes available. The resource id should be a non-negative number lessthan the total number of resources available.

    F resource-

    id

    Free an instance of the specified resource. This is usually a resource that was previously

    requested by the process. The resource id should be a non-negative number less than thetotal number of resources available.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    77/127

    H Halt the process. This is usually the last operation in the file. Any commands which followit in the file are ignored. Any file that does not end with this operation is implicitly halted.

    Sample Process Command Files

    The "a0.dat" input file looks like this:

    /*a0.dat

    The "a" collection of process data files is meant to simulatetwo processes competing for a single resource. If you runthe simulator with one resource available, one of the processeswill block until the other is done using the resource.*/C 10 // compute for 10 millisecondsR 0 // request resource 0

    C 10 // compute for 10 millisecondsF 0 // free resource 0H // halt process

    Note that the "a1.dat" file is identical. In other words, both files request the same resources atapproximately the same time.

    The Output File

    The output file contains a log of the simulation since the simulation started.

    The output file contains one line per cycle executed. The format of each line is:

    time = tavailable = r0r1 ... rn blocked = n

    where

    t

    is the number of milliseconds since the start of the simulation,

    ri

    is the number of available instances of each resource, and

    n

    is the number of blocked processes.

    Sample Output

    The output file "a.log" looks something like this:

    time = 0 available = 1 blocked = 0time = 1 available = 1 blocked = 0time = 2 available = 1 blocked = 0time = 3 available = 1 blocked = 0time = 4 available = 1 blocked = 0

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    78/127

    time = 5 available = 1 blocked = 0time = 6 available = 1 blocked = 0time = 7 available = 1 blocked = 0time = 8 available = 1 blocked = 0time = 9 available = 1 blocked = 0time = 10 available = 0 blocked = 1

    time = 11 available = 0 blocked = 1time = 12 available = 0 blocked = 1time = 13 available = 0 blocked = 1time = 14 available = 0 blocked = 1time = 15 available = 0 blocked = 1time = 16 available = 0 blocked = 1time = 17 available = 0 blocked = 1time = 18 available = 0 blocked = 1time = 19 available = 0 blocked = 1time = 20 available = 0 blocked = 0time = 21 available = 0 blocked = 0time = 22 available = 0 blocked = 0time = 23 available = 0 blocked = 0

    time = 24 available = 0 blocked = 0time = 25 available = 0 blocked = 0time = 26 available = 0 blocked = 0time = 27 available = 0 blocked = 0time = 28 available = 0 blocked = 0time = 29 available = 0 blocked = 0time = 30 available = 1 blocked = 0

    In this example, the simulation runs for a total of 30 "milliseconds" and then halts. During thesimulation, all processes are computable for 10 milliseconds. During the next 10milliseconds, the one instance of the resource is allocated to one process, while the other

    process is blocked. During the final 10 milliseconds, the first process frees the resource, but itis immediately allocated by the second process, which then continues to compute, unblocked,to the end of the simulation.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    79/127

    Lab # 9

    VMMap

    VMMap is a process virtual and physical memory analysis utility. It shows a breakdown of a process's committed virtual memory types as well as the amount of physical memory(working set) assigned by the operating system to those types. Besides graphicalrepresentations of memory usage, VMMap also shows summary information and a detailed

    process memory map. Powerful filtering, refresh and snapshot comparison capabilities allowyou to identify the sources of process memory usage and the memory cost of applicationfeatures.

    VMMap works on Windows XP and higher, including x64 64-bit versions of Windows.

    Memory Types

    VMMap categorizes memory into one of several types:

    Image

    The memory represents an executable file such as a .exe or .dll and has been loaded into aprocess by the image loader. It does not include images mapped as data files, which would beincluded in the Mapped File memory type. Image mappings can include shareable memorylike code. When data regions, like initialized data, is modified, additional private memory iscreated in the process. The Details column shows the file's path.

    Private

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    80/127

    Private memory is memory allocated by VirtualAlloc and not suballocated either by the HeapManager or the .NET run time. It cannot be shared with other processes, is charged againstthe system commit limit, and typically contains application data.

    Shareable

    Shareable memory is memory that can be shared with other processes, is backed by thepaging file (if present), is charged against the system commit limit and typically contains datashared between DLLs in different processes or inter-process communication messages. TheWindows APIs refer to this type of memory as pagefile-backed sections.

    Mapped File

    The memory is shareable and represents a file on disk. The Details column shows the file'spath. Mapped files typically contain application data.

    Heap

    Heaps represent private memory managed by the user-mode heap manager and, like thePrivate memory type, is charged against the system commit limit and contains applicationdata. Application memory allocations using the C runtime malloc library, HeapAlloc andLocalAlloc, use Heap memory.

    Managed Heap

    Managed heap represents private memory that's allocated and used by the .NET garbage

    collector and, like the Private memory type, is charged against the system commit limit andcontains application data.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    81/127

    Stack

    Stacks are private memory used to store function parameters, local function variables andfunction invocation records for individual threads. Stacks are charged agains the commit limit

    and typically grow on demand.

    System

    System memory is private kernel-mode physical memory associated with the process. Thevast majority of System memory consists of the process page tables.

    Free

    Free memory regions are spaces in the process address space that are not allocated.

    Unknown

    Process private memory that can't be attributed to any other category. This typically includesprocess page tables and copy-on-write pages that have been modified, but that are no longerwritable.

    Note: The VirtualProtect API can change the protections of any page to something different

    than that implied by the original allocation's memory type. That means that there can

    potentially be pages of memory private to the process in a shareable memory region, forinstance, because the region was created as a pagefile-backed section, but then the

    application changed the protection on some pages to copy-on-write and modified them. Theprotection shown for a region isn't necessarily the protection it had since it's creation.

    The VMMap Window

    When you run VMMap, it will present a process selection dialog. After you select a process itanalyzes the process and presents the graphs:

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    82/127

    Commit Summary Graph This graph shows the committed (memory that representsdata or code) memory usage of the process by type. The graph's scale is the totalcommitted virtual memory usage of the process.

    Private Summary Graph This graph shows the committed private virtual memory.This memory is backed by the paging file and charged against the system commit

    limit. It corresponds to the PrivateBytes performance counter. Working Set Summary Graph This graph shows the working set usage of the

    process by memory type. Working set represents the amount of commited virtualmemory that's in physical memory and owned by the process. The graph's scale is thetotal committed virtual memory.

    The color key for the regions in the graphs is presented in the Summary View. Below thegraphs VMMap shows two windows:

    Summary View This shows a summary of the virtual and physical usage of theprocess by type.

    Details View This shows the memory regions of the process address space.

    For each region, VMMap displays the memory type, memory protection, and virtual andphysical memory usage. Selecting a type in the Summary View filters the Details View tojust show regions of the selected type. Select Total to show all memory types in the DetailsView. In order to reduce noise in the output, VMMap does not show entries that have a valueof 0.

    Both windows include the following columns of information:

    Size

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    83/127

    Total size of the allocated type or region. For the Summary View and regions in the DetailsView that do not have reserved areas, this is equal to the maximum amount of physicalmemory required to store the region's data.

    Committed

    The amount of the allocation backed by system virtual memory (RAM and paging files) andcharged against the system commit limit.

    Private

    The amount of the allocation that, if modified, is private to the process (copy-on-write pagesthat have not been modified are included). This represents the charge to the system commitlimit (sum of RAM plus the paging files) of the region.

    Total WS

    The amount of physical memory assigned to the type or region.

    Private WS

    The amount of physical memory assigned to the type or region that cannot be shared withother processes.

    Shareable WS

    The amount of physical memory assigned to the type or region that can be shared with otherprocesses.

    Shared WS

    The amount of Shareable WS that is currently shared with other processes.

    LargestThe largest block of the particular size.

    Note: Because of limitations in the APIs provided by the operating system, on 64-bit

    Windows XP or 64-bit Windows Server 2003, Vmmap does not show the regionscorresponding to 32-bit thread stacks when analyzing 32-bit processes.

    Strings

    In some cases, the purpose of a memory region can be revealed by the string data storedwithin it. To view printable strings (ASCII or UNICODE strings of three or more charactersin length), select a region and then the Strings menu item from the Edit menu.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    84/127

    Refreshing a Scan

    You can refresh a scan by hitting F5 or selecting Refresh from the Refresh Menu. The EmptyWorking Set menu item in the Refresh menu releases all physical memory assigned to the

    process and then refreshes the scan. This feature is useful for measuring the memory cost of

    an application feature where you would empty the working set, exercise the feature and thenrefresh the display to look at how much physical memory the application referenced.

    Viewing Changes

    VMMap saves the two most recent refresh snapshots and allows you to view the differencesby selecting the Show Changes entry in the Options menu. When you toggle to that mode, thestatus bar shows the times of the refreshes being compared and the summary and details listsshows the differences between them. VMMap shows address ranges that are in the mostrecent snaphot but not the previous one with a green highlight color and those that weredeleted in red. You can toggle back to viewing the statistics of the most recent snapshot by

    deselecting the option.

    Options

    The options menu contains the following items:

    Expand All This expands all memory regions in the Details View Collapse All This collapses all memory regions in the Details View Show Free Regions Selecting this causes Details View to include free memory

    regions

    Font Use this to change the font of the Summary and Details Views.

    Saving, Loading and Copying

    Saving and Loading Scan Results

    The Save menu item in the File menu includes several ways to save output from a VMMapscan. The Save dialog has options for the following output format:

    .MMP This is the native VMMap file format. Use this format if you want to load theoutput back into the VMMap display.

    .CSV This is comma-seperated value output, which is ideal for generating output thatyou can easily import into Excel.

    .TXT This format is ideal for sharing the text form of scan results in a readable form.

    Note that a saved .MMP file includes the two most recent snapshots, enabling you to viewdifferences with the Refresh Shows Changes option when you load the file back intoVMMap.

    Copying

    The Edit menu includes two selections for copying output to the clipboard

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    85/127

    Copy Address This menu item copies just the address of the currently selected line inthe Details View.

    Copy All This copies the text from the display, including the process name and ID,Summary View and Details View.

    Command Line Options

    VMMap supports the following command-line options:

    usage: vmmap [-64] [-p [outputfile]] [-o inputfile]

    -64 Use the 64-bit version to analyze a 32-bit process instead of the 32-bit version.

    -p Process ID or process name. If you specify a name, VMMap will match i tagainst the first process that has a name that begins with the specified text.

    output file If you specify an output file, VMMap will scan the target process and then

    terminate. If you don't include an extension, VMMap will add .mmp and save inits native format. Add a .csv extension to save as CSV format; any otherextension will save as .txt.

    inputfile Has VMMap open the specified .mmp file on startup.

  • 8/6/2019 Copy (2) of Lab-Manual-OS(2).Doc1393

    86/127

    Lab #10

    File System Simulator

    Installation on Windows 95/98/Me/NT/2000 Systems

    Purpose

    This document provides instructions for the installation of the File System Simulator onMicrosoft Windows operating systems. This procedure should be the same or similar onWindows 95, 98, Me, NT, and 2000 systems.

    The software is designed for use with Andrew S. Tanenbaum, Modern Operating Systems,2nd Edition (Prentice Hall, 2001).

    Requirements

    The following software components are required to install and use the File System Simulator.

    Java Development Kit (JDK) 1.0 or greater Text program editor (e.g., notepad)

    Installation

    Installation of the software can be accomplished with these simple steps:

    1. Create a directory folder in which you wish to install the simulator (e.g.,"C:\moss\filesys").

    2. Download the self-extracting ZIP archive (filesys.exe) into the directory folder.3. Double-click on the file you downloaded (filesys.exe), or invoke it using the Start ->

    Run..., or invoke it from an MS-DOS command prompt:4. C:\moss\filesys> filesys.exe

    Files

    The directory should now contain the following files:

    Files Description

    filesys.exe Self-extracting ZIP archive which contains all the other files.

    BitBlock.javaBlock.javaDirectoryEntry.javaFileDescriptor.javaFileSystem.javaIndexNode.javaKernel.java

    ProcessContext.javaStat.java

    Java source files (*.java)

    http: