Thursday, September 17, 2009




















Install Windows XP






Published: September 7, 2006










Most new computers come with Windows XP installed, so many people never have to install it. However, you may need to install Windows XP if:





























































You replaced your hard disk drive with a new hard disk drive that does not have Windows XP installed.






You are reinstalling Windows XP on a computer because you want to clean off your hard drive and remove any unwanted programs, such as spyware.






You purchased a computer without an operating system.






Fortunately, you do not need to be a computer expert to install Windows XP. Installing Windows XP is a straightforward process that takes between one to two hours. Of that time, you need to be present for only about 30 minutes.














































Pre-installation checklist






Install Windows XP






Note: If you have a computer with an older operating system, such as Windows 98, Windows ME, or Windows 2000, you should upgrade to Windows XP instead of performing a clean installation.











Pre-installation checklist






Before you begin the installation process, use this checklist to make sure that you are prepared:

Check




You have the Windows XP CD.

Check




You have the product key available. The product key is located on your Windows XP CD case and is required to install and activate Windows XP.

Check




Your computer hardware is set up. At a minimum, you should connect your keyboard, mouse, monitor, and CD drive. If available, you should connect your computer to a wired network.

Check




You have Windows XP drivers available. Drivers are software that Windows XP uses to communicate with your computer’s hardware. Most new computers include a CD containing drivers. If you do not have drivers available, Windows XP may already include drivers for your hardware. If not, you should be able to download them from your hardware manufacturer’s Web site after you set up Windows XP.

Check




If you are reinstalling Windows XP on an existing computer, you need a backup copy of your files and settings. The installation process will delete all of your files. You can use the File and Settings Transfer Wizard to store your files and settings on removable media and then restore them after installation is complete.











Installation process






Installing Windows XP can take up to two hours. To make the process more manageable, it has been broken up into several sections. When you are ready, install Windows XP:
















Part 1: Begin the installation















































1.



Insert the Windows XP CD into your computer and restart your computer.






2.






If prompted to start from the CD, press SPACEBAR. If you miss the prompt (it only appears for a few seconds), restart your computer to try again.






3. Windows XP Setup begins. During this portion of setup, your mouse will not work, so you must use the keyboard. On the Welcome to Setup page, press ENTER.

4. On the Windows XP Licensing Agreement page, read the licensing agreement. Press the PAGE DOWN key to scroll to the bottom of the agreement. Then press F8.











Installation Process of Linux

Linux Installation, Step by Step

If you have come directly to this page hoping to install Linux without doing any more reading, I suggest that you reconsider. Without the proper knowledge and preparation, attempting to install any operating system (whether Linux or any other) can be a disaster. So before I launch into the resources for your step by step Linux installation, here are some things you should already have read:

Before You Begin... I have created a backgrounder for new users in the form of several brief articles that cover the bare necessities of technical skills required to install Linux. You should read through the articles before you install, and make sure you understand all the concepts involved. The articles also cover in detail the several preparatory steps required before you install, which are often missing from other documentation.

Each Linux installation has its own setup utility, every one vastly different from all the others. This makes it very difficult if not impossible to write a step by step Linux installation manual. The closest thing in existence is the Linux Installation and Getting Started Guide, which should be included in HTML format with every Linux distribution, and is available online thanks to the Linux Documentation Project. This book contains a fairly good comparison of the major distributions and an outline of the installation process for each one. It also covers the basic technical concepts you need to understand during installation, and covers some issues of usability following your install. I highly recommend that new users at least skim through this book, and preferably absorb every word.

Also well worth the time it takes to read it is the Linux Installation HOW-TO. This document will give you some invaluable background knowledge about what is involved in the installation process.

Now that you are armed with the knowledge you need, it is time to present you with your map to Linux. Below are links to the official installation documentation for the various Linux distributions. I had originally intended to add my own reviews, comments and tips to this documentation, but with each vendor releasing two new versions every year, I just can't keep up.

Ubuntu Linux

Ubuntu Documentation page

Debian GNU/Linux

Installation Manual - Also the Online Support Page lists mailing lists and chat channels.

Mandriva Linux

Mandriva Documentation Page gives access to install guides for all recent versions of Mandriva in multiple languages. Wow!

Red Hat Linux

Red Hat Linux Manuals Page includes install guides for all recent versions of Red Hat Linux.

Slackware Linux

Friday, August 28, 2009

Resource-Allocation Graph
  • Process



  • Resource Type w/ 4 instances


  • Pi requests instance of Rj



  • Pi is holding an instance of Rj







QUESTION:
  • How would you know if there's a DEADLOCK based on the resource allocation graph?

ANSWER:
If graph contains no cycles => no deadlock.
If graph contains a cycle
  • if only one instance per resource type, then deadlock (meaning if the cycle goes on a single path, it will result to a DEALOCK).
  • if several instances per resource type, possibility of deadlock (meaning if the resource allocation graph has several cycles it has a POSSIBILITY for DEADLOCK).

Thursday, August 27, 2009

Unsafe State in Resource-Allocation Graph
· The RAG above is compose of 2 resources and 2 processes
· P1 holds an instance of R1
· P2 is requesting an instance of R1
· P2 holds an instance of R2
· P1 may request an instance of R2


Resource-Allocation Graph For Deadlock Avoidance

· The Resource Allocation Graph (RAG) above is composed of 2 processes and 2 resources.
· P1 holds an instance of R1
· P2 requests an instance of R1
· P1 and P2 may request an instance of R2

Resource-Allocation Graph With A Cycle But No Deadlock



  • P1 is holding an instance of R2 and requests instance of R1.
  • P2 is holding an instance of of R1.
  • P3 is holding an instance of R1 and requests instance of R2.
  • P4 is holding instance of R2.


Resource-Allocation Graph With A Deadlock

  • P1 is holding an instance of R2 and requests instance of R2 and requests instance of R1
  • P2 is holding an instance of R1 and R2 then requests of instance of R3
  • P3 is holding an instance of R3 and requests an instance of R2
  • R1 or resource 1 is composed of only one instance
  • R2 has 2 instances
  • R3 has one instance
  • R4 has 3 instances

Example of Resource-Allocation Graph

  • P1 is holding an instance of R2 and requests instance of R1.
  • P2 is holdng an instsnce of R1 and R2 ang requests of instance of R3.
  • P3 is holding an instance of R3.

Thursday, August 20, 2009

Recovery or Deadlock Recovery

  • Abort all deadlock processes and release resource - too drastic - will lead to loss of work
  • Abort one process at a time - releasing resources until no deadlock
    How do we determine which process to abort first ? - priority ordering, process which has done least work
  • Selectively restart processes from a previous checkpoint i.e. before it claimed any resources
    difficult to achieve - sometimes impossible
  • Successively withdraw resources from a process and give to another process until deadlock is broken. How to choose which processes and which resources ?

  1. Complex decisions due to the large number of processes present within a system
  2. Difficult to automate
  3. Use Operator to resolve conflicts - BUT this requires the operator to have skill and understanding of what processes are actually doing
Process Termination:
· Abort all deadlocked processes.
· Abort one process at a time until the deadlock cycle is eliminated.
· In which order should we choose to abort?
 - Priority of the process.
 - How long process has computed, and how much longer to completion.
 - Resources the process has used.
 - Resources process needs to complete.
 - How many processes will need to be terminated.
 - Is process interactive or batch?

Resource Preemption

· Selecting a victim – minimize cost.
· Rollback – return to some safe state, restart process for that state.
· Starvation – same process may always be picked as victim, include
number of rollback in cost factor.
Deadlock Detection

In Operating Systems a special resource-allocation graph algorithm can be used to detect whether there is any deadlock in the system. A resource-allocation graph is a directed graph consisting of two different types of nodes P = P1, P2,..., Pn, the set consisting of all active processes in the system, and R = R1, R2,..., Rm, the set consisting of all resource types in the system.

A directed edge from process Pi to resource Rj is denoted by Pi $ \longrightarrow$ Rj and means that process Pi requested an instance resource type Rj, and is currently waiting for that resource. A directed edge from resource type Rj to process Pi, is denoted by Rj $ \longrightarrow$ Pi and means that an instance of resource type Rj has been allocated to process Pi.

The following figure illustrates a resource-allocation graph where processes are denoted by circles and resources by squares. Notice that if there is a circular wait among the processes, then it implies that a deadlock has occurred.



Given a resource allocation graph in which each resource type has exactly one instance, your job is to determine whether there is a deadlock in the system. In case a deadlock exists, you must also show the sequence of processes and resources involved.

Input

The input begins with a single positive integer on a line by itself indicating the number of the cases following, each of them as described below. This line is followed by a blank line, and there is also a blank line between two consecutive inputs.


We will assume that processes are named by capital letters and resources by small letters, so we limit to 26 the number of processes and/or resources. Therefore, the first line of input consists of three numbers N, M and E, respectively, the number of processes, the number of resources and the number of edges. The edges are given in the following lines as pairs of letters linked by a `-' character. Edges are separated by spaces or newlines.

Output

For each test case, the output must follow the description below. The outputs of two consecutive cases will be separated by a blank line.


The output must be `NO' if no deadlock is detected. In case a deadlock is detected, the output must be `YES' followed by the sequence or sequences of circular waits detected, one per line. If more then one sequence is found, they should all be output in increasing order of their length.

Sample Input

1

2 2 4
A-b B-a
a-A b-B

Sample Output

YES
A-b-B-a-A
Deadlock Prevention

No Preemption –
  • If a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held are released.
  • Preempted resources are added to the list of resources for which the process is waiting.
  • Process will be restarted only when it can regain its old resources, as well as the new ones that it is requesting.
    Circular Wait – impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration.


Circular Wait – impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration.

Deadlock prevention - low device utilization and reduced system throughput.
Deadlock avoidance

  • Given the complete sequence of requests and releases for each process, we can decide for each request whether or not the process should wait.
  • For every request, the system
    tconsiders the resources currently available, the resources currently allocated, and the future requests and releases of each process, and
    decides whether the current request can be satisfied or must wait to avoid a possible future deadlock.

  1. considers the resources currently available, the resources currently allocated, and the future requests and releases of each process, and

  2. decides whether the current avoid a possible future deadlock.