Thursday, September 17, 2009

Setup and installation considerations for Windows x64 Edition-based computers
This article describes how the Microsoft Windows x64 Edition-based operating system installation process has changed from the Windows x86 installation process.


Installation and configuration

The Windows x64 installation process is similar to...
loadTOCNode(1, 'moreinformation');

Installation and configuration
loadTOCNode(2, 'moreinformation');

The Windows x64 installation process is similar to the installation process for the Windows x86 operating system. The x64 installation still copies the needed files to temporary folders, restarts the computer into graphical user interface (GUI) mode, performs Plug and Play (PnP) detection and installation, and then finishes the set up process. However, some GUI mode graphics have been updated to profile new features in x64. To the end user, the installation procedure appears almost the same as the Windows x86 installation .

The following list describes the key changes between the Windows x64 Edition installation process and the Windows x86 installation process:
  • Windows Startup floppy disks cannot be used to install x64 Edition-based version of Windows Server 2003 and Windows XP Professional. This is because the kernel that is supplied with x64 Edition-based operating systems is now over 2 MB and does not fit on a standard floppy disk.
  • You cannot use Winnt.exe to install Windows x64 Edition. Winnt.exe is not included on the Windows x64 Edition installation CD-ROM.
  • The installation process for x86 32-bit operating systems cannot be started from within the x64 operating system environment. For example, you cannot install Windows XP Professional x64 Edition from within the 32-bit version of Windows XP Professional.
  • The x86 versions of the Windows operating system cannot be upgraded to the x64 Edition version of the Windows operating system. However, Windows Server 2003 x64 Standard Edition can be upgraded to Windows Server 2003 x64 Enterprise Edition.
  • The installation process for x64 Edition operating systems does not support MS-DOS based mechanisms. For example, you cannot install Windows XP Professional x64 Edition from a command prompt.
  • The layout of the x64 Edition-based version of Windows Server 2003 and Windows XP installation CD-ROM has changed. The primary installation folder for Windows x64 Editions is the AMD64 folder. However, the i386 folder still exists and contains files that are required to install the Windows x64 Edition-based operating system. Therefore, before you can successfully start the installation of the Windows x64 Edition operating system either locally or from a network share, you must make sure that the AMD64 folder and the other folders that are contained on the Windows x64 Edition installation CD-ROM are either copied locally or copied to the network share.
  • The installation of the Windows x64 Edition-based operating system must be performed by starting the computer by using the Windows x64 Edition installation CD-ROM or by starting the installation from within another Windows 64-bit operating system.
    The Windows x64 Edition operating system is not currently available as a retail product. At release the Windows x64 Edition operating system will only be distributed for evaluation or through MSDN, Software Assurance, volume channels and OEM channels.

  • The Windows x64 Edition operating system supports "sticky" hotfixes. "Sticky" hotfixes are not overwritten or uninstalled when other updates are applied unless those updates are a more current version than the file that is currently installed on the computer.

  • Because of these changes, we recommend that you perform a clean installation of the Windows x64 Editions operating systems from the CD-ROM. The Windows x64 Editions operating systems may also be deployed by using an unattended installation, System Preparation Tool (Sysprep), and Remote Installation Services (RIS) methods. For more information about how to use these tools, visit the following Microsoft Web site:
How to install or upgrade to Windows XP

This article describes how to install Windows XP. You may find it easier to follow the steps if you print this article first.


Before you start, you must have your Windows XP installation CD and the product key available.


If you cannot find your Windows XP CD or you cannot contact your computer manufacturer, you may have to purchase a new copy of Windows XP. Visit following link for more information:

http://support.microsoft.com/contactus/ (http://support.microsoft.com/contactus/)

Depending on the installation method that you select, you might need a boot CD or boot disks. If you do not have your Windows XP CD or boot disks, you must obtain them in order to install or upgrade to Windows XP by using certain methods. Review the methods to determine what media you will need. For more information about how to obtain the Windows XP Setup boot disks, click the following article number to view the article in the Microsoft Knowledge Base:
310994 (http://support.microsoft.com/kb/310994/ ) How to obtain Windows XP Setup boot disks You may have to troubleshoot product-key activation problems. For more information about how to troubleshoot installation problems, click the following article numbers to view the articles in the Microsoft Knowledge Base:
310637 (http://support.microsoft.com/kb/310637/ )


You receive an error message after you enter the product key when you try to install Windows XP If the installation method that you select requires you to start your computer from the Windows XP CD, your CD or DVD drive must be configured to do this. For information about how to configure your computer to start from the CD or DVD drive, see the documentation that is included with your computer or contact the computer manufacturer. For more information about how to start Setup from MS-DOS or a Windows 98/Windows Millennium Edition startup disk, click the following article number to view the article in the Microsoft Knowledge Base:
307848 (http://support.microsoft.com/kb/307848/ ) How to start the Setup program from MS-DOS in Windows XP
Methods to install Windows XP
loadTOCNode(1, 'resolution');

There are five methods for installing Windows XP. Review the following methods and select the method that is appropriate for your installation.

Method 1: Perform a clean install of Windows XPUse this method for a clean installation of Windows XP. A clean installation removes all data from your hard disk by repartitioning and reformatting your hard disk and reinstalling the operating system and programs to an empty (clean) hard disk.
Method 2: Upgrade to Windows XPUse this method if you are upgrading to Windows XP from Microsoft Windows 98, Microsoft Windows Millennium Edition, or Microsoft Windows 2000 Professional.
Method 3: Install Windows XP to a new hard diskUse this method to install Windows XP to a new hard disk. This is typically done when a new hard disk is installed on your computer.
Method 4: Install Windows XP to a new folder (parallel installation)Use this method to install Windows XP to a new folder (parallel installation) to either run two operating systems, or to access, repair, or retrieve data from a damaged disk.
Method 5: Perform a multiple boot operationUse this method to install Windows XP as a separate operating system on your computer. This lets you install more than one operating system on your computer and select which operating system that you want to use every time that you start your computer.

Method 1: Perform a clean install of Windows XP
loadTOCNode(2, 'resolution');

A clean installation consists of removing all data from your hard disk by repartitioning and reformatting your hard disk and reinstalling the operating system and programs to an empty (clean) hard disk. For more information about important things to consider before you partition and format you hard disk and how to partition and format your hard disk by using the Windows XP Setup program, click the following article number to view the article in the Microsoft Knowledge Base:
313348 (http://support.microsoft.com/kb/313348/ ) How to partition and format a hard disk in Windows XP To perform a clean installation of Windows XP, follow these steps:
1.Back up all important information before you perform a clean installation of Windows XP. Save the backup to an external location, such as a CD or external hard disk.

2.Start your computer from the Windows XP CD. To do this, insert the Windows XP CD into your CD drive or DVD drive, and then restart your computer.Note To boot from your Windows XP CD, the BIOS settings on your computer must be configured to do this.

3.When you see the "Press any key to boot from CD" message, press any key to start the computer from the Windows XP CD.

4.At the Welcome to Setup screen, press ENTER to start Windows XP Setup.

5.Read the Microsoft Software License Terms, and then press F8.

6.Follow the instructions on the screen to select and format a partition where you want to install Windows XP.

7.Follow the instructions on the screen to complete the Windows XP Setup.

If you have successfully installed Windows XP, you are finished. If these steps did not help you install Windows XP, go to the "Next Steps" section.


Method 2: Upgrade to Windows XP
loadTOCNode(2, 'resolution');

This section describes how to upgrade to Windows XP from Windows 98, Windows Millennium Edition, and Windows 2000 Professional.


Note Windows 2000 and Windows 2000 Professional can only be upgraded to Windows XP Professional. You cannot upgrade Windows 2000 to Windows XP Home.

Important Before you start the upgrade process, contact your computer manufacturer to obtain the latest BIOS upgrades for your computer and then install the upgrades. If you update the BIOS after you upgrade the computer, you may have to reinstall Windows XP to take advantage of features such as Advanced Configuration and Power Interface (ACPI) support in the BIOS. If you can do this, update the firmware in all the hardware devices before you start the upgrade.

You may want to disconnect from the Internet during the installation. This step is not necessary, but disconnecting from the Internet during the installation helps protect your computer. For added protection, you may also want to enable the Microsoft Internet Explorer firewall. For more information, see the "Enable or disable Internet Connection Firewall" topic in your Windows operating system Help.

For more information about how to prepare Windows 98 or Windows Millennium Edition for an upgrade to Windows XP, click the following article number to view the article in the Microsoft Knowledge Base:
316639 (http://support.microsoft.com/kb/316639/ )

How to prepare to upgrade Windows 98 or Windows Millennium Edition to Windows XP


To upgrade to Windows XP, follow these steps:

1.Start your computer, and then insert the Windows XP CD into the CD or DVD drive.

2.If Windows automatically detects the CD, click Install Windows to start the Windows XP Setup Wizard. If Windows does not automatically detect the CD, click Start. Then click Run. Type the following command, and then click OK:
CD drive letter:\setup.exe

3.When you are prompted to select an installation type, select Upgrade (the default setting), and then click Next.

4.Follow the instructions on the screen to complete the upgrade.If you have successfully upgraded to Windows XP, you are finished. If these steps did not help you upgrade to Windows XP, go to the "Next Steps" section.

Method 3: Install Windows XP to a new hard disk
loadTOCNode(2, 'resolution');

This method describes how to install Windows XP to a new hard disk. This is typically done when a new hard disk is installed on your computer.


Note You will need the CD for your previous operating system in order to complete this method.

Before you start, start your computer by using one of the following media:
  • Microsoft Windows 98/Windows Millennium startup disk
  • Windows XP CD or Windows XP boot disks

Note The Windows XP CD is the preferred media in the following steps:

However, the Windows XP boot disks will work if you do not have the CD.

To install Windows XP to a new hard disk, follow these steps:

1.Start your computer from the Windows XP CD (or boot disks). To do this, insert the Windows XP CD into your CD or DVD drive, and then restart your computer.

2.When the "Press any key to boot from CD" message appears on the screen, press any key to start the computer from the Windows XP CD.

3.At the Welcome to Setup screen, press ENTER to begin Windows XP Setup.

4.Read the Microsoft Software License Terms, and then press F8.

5.When you are prompted for the Windows XP CD, insert your Windows XP CD.

6.Restart your computer.

7.When you see the "Press any key to boot from CD" message, press any key to start the computer from the Windows XP CD.

8.At the Welcome to Setup screen, press ENTER to start Windows XP Setup.

9.Follow the instructions on the screen to select and format a partition where you want to install Windows XP.

10.Follow the instructions on the screen to complete Windows XP Setup.

If you have successfully installed Windows XP, you are finished. If these steps did not help you install Windows XP to a new hard disk, go to the "Next Steps" section.

Method 4: Install Windows XP to a new folder (parallel installation)
loadTOCNode(2, 'resolution');

This method describes how to install Windows XP to a new folder (parallel installation) to either run two operating systems, or to access, repair, or retrieve data from a damaged disk.Before you start, start your computer by using one of the following media:
Microsoft Windows 98/Windows Millennium Edition startup disk
Windows XP CD or Windows XP boot disksNote The Windows XP CD is the preferred media in the following steps. However, the Windows XP boot disks will work if you do not have the CD.To install Windows XP to a new folder (also known as a parallel installation), follow these steps:
Start your computer from the Windows XP CD (or boot disks). To do this, insert the Windows XP CD into your CD or DVD drive, and then restart your computer.
When the "Press any key to boot from CD" message appears on the screen, press any key to start the computer from the Windows XP CD.
At the Welcome to Setup screen, press ENTER to begin Windows XP Setup.
Read the Microsoft Software License Terms, and then press F8.
Select the partition in which you want to install Windows XP, and then press ENTER.
Select the Leave the current file system intact (no changes) option, and then press ENTER to continue.
Press ESC to install to a different folder.If the Setup program detects another operating system folder, it prompts you to type the name for the new folder after the backslash (\), for example, \WINXP. If there are no other operating systems detected, the Setup program automatically names the folder \Windows. For more information about how to change the folder name on new installations, click the following article number to view the article in the Microsoft Knowledge Base:
315242 (http://support.microsoft.com/kb/315242/ ) How to designate the original folder name for a reinstallation of Windows XP
Press ENTER to continue.
Follow the instructions on the screen to complete Windows XP Setup.If you have successfully installed Windows XP, you are finished. If these steps did not help you install Windows XP to a new folder, go to the "Next Steps" section.
Method 5: Perform a multiple boot operation
loadTOCNode(2, 'resolution');

Use this method to install Windows XP as a separate operating system on your computer. This lets you install more than one operating system and select which operating system that you want to use every time that you start your computer. For more information about how to multiple boot Windows XP and other versions of Windows and MS-DOS, click the following article number to view the article in the Microsoft Knowledge Base:
217210 (http://support.microsoft.com/kb/217210/ ) How to multiple boot Windows XP, Windows 2000, Windows NT, Windows 95, Windows 98, Windows Me, and MS-DOS If you have successfully installed Windows XP, you are finished. If these steps did not help you install Windows XP, go to the "Next Steps" section.
TROUBLESHOOTING
loadTOCNode(1, 'whattotry');

For more information about how to troubleshoot installation problems, click the following article numbers to view the articles in the Microsoft Knowledge Base:
310637 (http://support.microsoft.com/kb/310637/ ) You receive an error message after you enter the product key when you try to install Windows XP
310064 (http://support.microsoft.com/kb/310064/ ) How to troubleshoot problems during installation when you upgrade from Windows 98 or Windows Millennium Edition to Windows XP For more information about Windows XP troubleshooting and Support, see the Windows XP Solution Center. Visit the following Microsoft Web site:
http://support.microsoft.com/ph/1173 (http://support.microsoft.com/ph/1173)
NEXT STEPS
loadTOCNode(1, 'moreinformation');

If these methods did not work for you, you can use the Microsoft Customer Support Services Web site to find other solutions to your problem. Some services that the Microsoft Customer Support Services Web sites provide include the following:
Searchable Knowledge Base (http://support.microsoft.com/search/?adv=1) : Search technical support information and self-help tools for Microsoft products.
Solution Centers (http://support.microsoft.com/select/?target=hub) : View product-specific frequently asked questions and support highlights.
Microsoft Customer Support Newsgroups (http://www.microsoft.com/communities/newsgroups/default.mspx) : Contact counterparts, peers, and Microsoft Most Valuable Professionals (MVPs).
Other Support Options (http://support.microsoft.com/default.aspx?pr=csshome) : Use the Web to ask a question, contact Microsoft Customer Support Services, or provide feedback.If you continue to have problems, you might want to contact Support:
http://support.microsoft.com/contactus (http://support.microsoft.com/contactus)
MORE INFORMATION
loadTOCNode(1, 'moreinformation');

For more information about how to install Windows XP Professional, click the following article number to view the article in the Microsoft Knowledge Base:
286463 (http://support.microsoft.com/kb/286463/ ) Release notes for Windows XP Setup contained in the Pro.txt file For more information about how to install Windows XP Home Edition, click the following article number to view the article in the Microsoft Knowledge Base:
306824 (http://support.microsoft.com/kb/306824/ ) Release notes for Windows XP Setup contained in the Home.txt file For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
307726 (http://support.microsoft.com/kb/307726/ ) Description of the Windows XP Upgrade Advisor
314062 (http://support.microsoft.com/kb/314062/ ) The latest Windows XP Hardware Compatibility List
295322 (http://support.microsoft.com/kb/295322/ ) How to determine if hardware or software is compatible with Windows XP If these Microsoft Knowledge Base articles do not help you resolve the problem, or if you experience symptoms that differ from those that this article describes, please search the Microsoft Knowledge Base for more information. To search the Microsoft Knowledge Base, visit the following Microsoft Web site:
http://support.microsoft.com (http://support.microsoft.com/) Then, type the text of the error message that you receive, or type a description of the problem in the Search Support (KB) field.

Thursday, August 27, 2009

Resource - allocation Graph
> A set of vertices and a set edges E.

- V is partition into two types:
P={P1,P2,...Pm}, the set consisting all the processes in the system.
R= {R1,R2,...,Rm}, the set consisting of all resources types in th system.
>request edge-directed edge P1->R1
>assignment edge-directed- directed edge R1 ->P1

Resource allocation graph (cont.)

> Process




>resource type with 4 instances

>P1 is request an instance of R1

>P1 is holding an instance of R1


Example of Resource allocation Graph




process 1 request instances of resource 1
resource 1 is holding an instances of process 2
process 2 request instance of resource 3
resource 3 is holding an instance of process 3
resource 2 request instances of process 1 and process
resource 4 is a resource type with 4 instances.




Resource allocation graph With deadlock




















Resource allocation graph with a cycle but no deadlock




















Deadlock Characterization
>mutual exclusion
>Hold and Wait
>No preemption
>Circular wait
2.Methods for handling deadlocks
>Ensure that the system will never enter a deadlock state.
>Alow the system to enter a dealock state and then recover.
>Ignore the problem and pretend that dealocks never occur in the system; used by most opearting systems, including unix.
3.Deadlock Prevention
>Mutual Exclusion- Not required for sharable resources;
must hold for nonshareable resources.
>Hold and Wait- must guarantee that whenever a process request a resource, it does not hold any other resources.
-require process to request and be allocated all its resource before it begins execution, or allow process to request a resource only when the process has none.
- low resource utilization: starvation possible.

>No Preemption
if a process that is holding some resoureces requests
another resource that cannot be immediately allocated to it,
then all resources currently being held are released
- preemted 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 incresing order of enumeration..,


Thursday, August 20, 2009

4.Deadlock Detection























Detection with One Resource of Each Type (1)

























•Note the resource ownership and requests
•A cycle can be found within the graph, denoting deadlock



Detection with One Resource of Each Type (2)



Data structures needed by deadlock detection algorithm


Deadlock


5.Deadlock Recovery



•Deadlock must be untangled once detected, so the system returns to normal quickly
•All recovery methods have at least one victim
•Recovery Methods:
–Terminate every job that’s active in the system and restart them from the beginning
–Terminate only the jobs involved in the deadlock and ask their users to resubmit them
–Identify jobs involved in deadlock and terminate them one at a time



–Jobs that keep a record (snapshot) of their progress can be interrupted
–Select a nondeadlocked job, preempt its resources, allocate them to a deadlocked process
–Stop new jobs from entering system, which allows nondeadlocked jobs to run to completion so they’ll release their resources (no victim)




•Select the victim that will have the least-negative effect on the system
•Factors to be considered to select a victim:
–Priority of job under consideration: high-priority jobs are usually untouched
–CPU time used by job: jobs close to completion are usually left alone
–Number of other jobs that would be affected if this job were selected as the victim
–Jobs that are modifying data shouldn’t be selected for termination



-By flushing one or more process that involved in deadlock until there is no deadlock





Thursday, August 13, 2009

thread Scheduling


Process/Thread structure


Fundamental schedulable entity in the system
Represented by ETHREAD that includes a KTHREAD
Queued to the process (both E and K thread)
IRP list
Impersonation Access Token
Unique thread ID
Associated User-mode Thread Environment Block (TEB)
User-mode stack
Kernel-mode stack
Processor Control Block (in KTHREAD) for cpu state when not running

Monday, August 10, 2009

SUBSTANTIAL INFORMATION ABOUT THREAD OF AT LEAST THREE OS
=Java Thread
Java thread are managed by the JVM
Java thread may created by:
> Extending thread class> Implementing the Runnable inteface
In Java, each thread is represented by an object of class java.lang.Thread, which handles the necessary bookkeeping and provides methods for controlling the thread.

=Windows 2000Implements the one-to-one mappingEach thread contains
A thread ID
Register set
Separate user and kernel stacks for user and kernel modes
Private data storage area used by various run-time libraries and dynamic link libraries (DDLs)
The latter three are known as the context of the thread and are architecture-specific to HW

=LINUX THREADS
- Linux refers to them as tasks rather than threads
- Thread creation is done through clone() system call
- clone() allows a child task to share the address space of the parent task (process)

Sunday, August 9, 2009

Different cpu scheduling algorithms



CPU Scheduling of Batch Processes
-Submitted with a good estimate of their resource needs, via job control statements
-Upper limits the OS is expected to enforce
-Generally expected that the OS will give preferential treatment to processes with lower resource needs.
-Resource estimates may also include the specification of an initial priority for a job


For batch processesscheduling occurs at 2 levels:Long-term and short term
Job Scheduling (long term)


-Job scheduling involves deciding which job (job step) to admit into the system as a process. A job is a program which has been submitted to the system, but which has not been loaded into memory.
-Initial resource estimates play an important role of scheduling at the job level. A job can not be loaded until sufficient resources are available.


A “Job”

1) typically consists of multiple steps

2) Job control statements provide information about the resource needs of each step. Including program to execute, maximum memory requirements, and cpu time limits, and user information

3) Waiting jobs are stored in one or more job queues, ordered by priority or class, which is determined by their announced resource needs.

4) System processes called initiators, examine the job queues and selects jobs when the system is ready for more work.

5) Jobs are admitted only when sufficient resources are available to begin the first “step”. Also each additional step is admitted only when resources are available.

6) Once a step has been admitted, it holds all of its resources until it is complete. A timer is set to ensure that it does not exceed its planned processor time.

Short term scheduling

-When the processor (CPU) is available, a process from the ready queue(s) is selected according to some type of algorithm.
-The process is then given control of the CPU and continues running until:


-The process terminates
-The process voluntarily suspends itself (sleep)
-The process requests an I/O transfer or other service for which it must wait
-The process is stopped because it has exceeded its processor time quantum (maximum CPU time for the entire job, or step!)
-IF preemption is allowed: a higher priority process becomes ready. (preemption is usually not used in a batch environment.)


Thursday, July 30, 2009

operating system 5


Thread


*Single Threaded Process & *Multi-threaded Proces








-Benefits of Multi-threaded Programming
*Responsiveness - Parts of a program can continue running even if parts of it are blocked. Book points out that a multi-threaded web browser could still allow user interaction in one thread while downloading a gif in another thread…
*Resource Sharing – pros and cons here. By sharing memory or other resources (files, etc.) the threads share the same address space. (there are issues here…)
*Economy – since threads share resources, it is easier to context-switch threads than context-switching processes. This should be clear.
*Utilization of MP Architectures – there will be significant increases in performance in a multiprocessor system, where different threads may be running simultaneously (in parallel) on multiple processors.
*Of course, there’s never ‘a free lunch,’ as we will see later. (There’s always a cost…; nothing this good comes free. J )

-User Thread


^Thread management done by user-level threads library
^Three primary thread libraries:
-POSIX Pthreads
-Win32 threads


-Kernel Thread


*Supported by the Kernel
*Examples
-Windows XP/2000
-Solaris
-Linux
-Tru64 UNIX
-Mac OS X


-Thread Library


-Programmers need help and receive development help via thread libraries germane to specific development APIs..
*A thread library provides an API for creating and managing threads. Java has an extensive API for thread creation and management.
-There are two primary ways to implement thread libraries:
1. Provide thread library entirely in user space – no kernel support
-All code and data structures for the library exist in user space.
-And, invoking a local function call to the library in user space is NOT a system call, but rather a local function call. (this is good).
2. Implement a kernel-level library supported by the OS.
-Here, code and data structures exist in kernel space.
-Unfortunately, in invoking a function call to the library, there is a system call to the kernel for support.
-Multithreading Model
+Many-to-one Model

•Each user thread maps to one kernel thread
•Is this implementation good (concurrency vs. efficiency)?
–Good concurrency, why? (blocking syscall does not affect other threads)
–Expensive, why? (user-thread creation -> kernel-thread creation)
•How to have both good concurrency and efficiency?






+One-to-one model

*Each user-level thread maps to kernel thread
*Examples
-Windows NT/XP/2000
-Linux
-Solaris 9 and later


+Many-to-many model


•Many user threads are mapped to a smaller or equal number of kernel threads. –Why is this better than Many-to-one? (concurrency & multi-processor) –Why is this better than one-to-one? (efficiency) •Like one-to-one concurrency? –Two-level model



















operating system 4

Interprocess Communication
-Inter-process communication (IPC) is a set of techniques for the exchange of data among multiple
threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC techniques are divided into methods for message passing, synchronization, shared memory, and remote procedure calls (RPC). The method of IPC used may vary based on the bandwidth and latency of communication between the threads, and the type of data being communicated.
-Derict Communication
*Processes must name each other explicitly:
-send (P, message) – send a message to process P
-receive(Q, message) – receive a message from process Q
*Properties of communication link
-Links are established automatically
-A link is associated with exactly one pair of communicating processes
-Between each pair there exists exactly one link
-The link may be unidirectional, but is usually bi-directional
-Indirect Communication
*Operations
-create a new mailbox
-send and receive messages through mailbox
-destroy a mailbox
*Primitives are defined as:
send(A, message) – send a message to mailbox A
receive(A, message) – receive a message from mailbox A
-Synchronization
- Message passing may be either blocking or non-blocking

*Blocking send has the sender block until the message is received
*Nonblocking send
-Non-blocking send has the sender send the message and continue
*blocking recieve
- Blocking receive has the receiver block until a message is available
*Nonblocking recieve
-Non-blocking receive has the receiver receive a valid message or null

Buffering
*Zero capacity - 0 messagesSender must wait for receiver (rendezvous)
*Bounded Capacity - finite length of n messagesSender must wait if link full
*Unbounded Capacity- infinite length Sender never waits

Producer
*producer

a person who produces.
*consumer
a person or thing that consumes.

Thursday, July 16, 2009

Operating system 4

1.The concept of process

-An operating system executes a variety of programs:
=Batch system – jobs
=Time-shared systems – user programs or tasks
-Textbook uses the terms job and process almost interchangeably.
-Process – a program in execution; process execution must progress in sequential fashion.
-A process includes:
=program counter
=tack
=data section
.


A-Process State

-As a process executes, it changes state
-new: The process is being created.
-running: Instructions are being executed.
-waiting: The process is waiting for some event to occur.
-ready: The process is waiting to be assigned to a process.
-terminated: The process has finished execution.








B-Process Control Blocked

Information associated with each process.
-Process state
-Program counter
-CPU registers
-CPU scheduling information
-Memory-management information
-Accounting information
-I/O status information






Process Control Block (PCB)



CPU Switch From Process to Process





C-Threads

A thread of execution results from a fork of a computer program into two or more concurrently running tasks. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process. Multiple threads can exist within the same process and share resources such as memory, while different processes do not share these resources.










A process with two threads of execution

On a single processor, multithreading generally occurs by time-division multiplexing (as in multitasking): the processor switches between different threads. This context switching generally happens frequently enough that the user perceives the threads or tasks as running at the same time. On a multiprocessor or multi-core system, the threads or tasks will generally run at the same time, with each processor or core running a particular thread or task. Support for threads in programming languages varies: a number of languages simply do not support having more than one execution context inside the same program executing at the same time. Examples of such languages include Python, and OCaml, because the parallel support of their runtime support is limited by the use of a central lock, called "Global Interpreter Lock" in Python, "master lock" in Ocaml. Other languages may be limited because they use threads that are user threads, which are not visible to the kernel, and thus cannot be scheduled to run concurrently. On the other hand, kernel threads, which are visible to the kernel, can run concurrently.
Many modern
operating systems directly support both time-sliced and multiprocessor threading with a process scheduler. The kernel of an operating system allows programmers to manipulate threads via the system call interface. Some implementations are called a kernel thread, whereas a lightweight process (LWP) is a specific type of kernel thread that shares the same state and information.


Operating system 4



2.Process Sheduling
Scheduling is a key concept in
computer multitasking and multiprocessing operating system design, and in real-time operating system design. In modern operating systems, there are typically many more processes running than there are CPUs available to run them. Scheduling refers to the way processes are assigned to run on the available CPUs. This assignment is carried out by software known as a scheduler.

A-Scheduling Queues
-Job queue – set of all processes in the system.
-Ready queue – set of all processes residing in main memory, ready and waiting to execute.
-Device queues – set of processes waiting for an I/O device.
-Process migration between the various queues.

Representation of Process Scheduling







B-Schedulers



Types of operating system schedulers




-Long-term scheduler (or job scheduler) – selects which processes should be brought into the ready queue.

-Mid-term Scheduler

The mid-term scheduler, present in all systems with
virtual memory, temporarily removes processes from main memory and places them on secondary memory (such as a disk drive) or vice versa. This is commonly referred to as "swapping out" or "swapping in" (also incorrectly as "paging out" or "paging in"). The mid-term scheduler may decide to swap out a process which has not been active for some time, or a process which has a low priority, or a process which is page faulting frequently, or a process which is taking up a large amount of memory in order to free up main memory for other processes, swapping the process back in later when more memory is available, or when the process has been unblocked and is no longer waiting for a resource.

-Short-term scheduler (or CPU scheduler) – selects which process should be executed next and allocates CPU.


Addition of Medium Term Scheduling

-Short-term scheduler is invoked very frequently (milliseconds) Þ (must be fast).
-Long-term scheduler is invoked very infrequently (seconds, minutes) Þ (may be slow).
-The long-term scheduler controls the degree of multiprogramming.
-Processes can be described as either:
-I/O-bound process – spends more time doing I/O than computations, many short CPU bursts.
-CPU-bound process – spends more time doing computations; few very long CPU bursts.

C-Context Swicth
-When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process.
-Context-switch time is overhead; the system does no useful work while switching.
-Time dependent on hardware support.

Operating system 4

3.Operations on Processes

A-Process Creation
-Parent process create children processes, which, in turn create other processes, forming a tree of processes.
-Resource sharing
-Parent and children share all resources.
-Children share subset of parent’s resources.
-Parent and child share no resources.
-Execution
-Parent and children execute concurrently.
-Parent waits until children terminate.

Process creation(cont.)
-Address space
-Child duplicate of parent.
-Child has a program loaded into it.
-UNIX examples
-fork system call creates new process
-exec system call used after a fork to replace the process’ memory space with a new program.


B-Process Termination

-Process executes last statement and asks the operating system to decide it (exit).
-Output data from child to parent (via wait).
-Process’ resources are deallocated by operating system.
-Parent may terminate execution of children processes (abort).
-Child has exceeded allocated resources.
-Task assigned to child is no longer required.
-Parent is exiting.
-Operating system does not allow child to continue if its parent terminates.
-Cascading termination.



Thursday, July 9, 2009

Operating system 4


4.Cooperating Process
- Independent process cannot affect or be affected by the execution of another process.
-Cooperating process can affect or be affected by the execution of another process
-Advantages of process cooperation
-Information sharing
-Computation speed-up
-Modularity
-Convenience


5.Inter Process Communication



-Mechanism for processes to communicate and to synchronize their actions.
-Message system – processes communicate with each other without resorting to shared variables.
-IPC facility provides two operations:
-send(message) – message size fixed or variable
-receive(message)
-If P and Q wish to communicate, they need to:
-establish a communication link between them
-exchange messages via send/receive
-Implementation of communication link
-physical (e.g., shared memory, hardware bus)
-logical (e.g., logical properties)


-------------------------------------------------------------------------------------------------

1.What are the major activities of the operating system with regards to Process management.
-process creation and deletion
-process suspension and resumption
-provision of mechanism for:
>process synchronization
>process communication
>deadlock handling

2.What are the major activities of the Operating system regards to Memory Management.
-keep track of which parts of memory are currently being used and by whom
-decide which processes to load when memory space becomes available
-allocate and deallocate memory space as needed.

3.What are the major activities of the Operating system Secondary Storage Management.
-Free space memory
-Large allocation
-disk scheduling

4.What are the major activities of the Operating system File Management.
-File creation and deletion
-Directory creation and deletion
-support of primitives for manipulating files and directories
-Mapping files onto secondary storage -
-File backup on stable (nonvolatile) storage media

5.What is the purpose of the Command Interpreter.
-process creation and management
-I/O handling
-Secondary Storage Management
-File system access
-Protection
-Networking


Tuesday, July 7, 2009

Virtual Machine

In
computer science, a virtual machine (VM) is a software implementation of a machine (computer) that executes programs like a real machine.A virtual machine was originally defined by Popek and Goldberg as "an efficient, isolated duplicate of a real machine". Current use includes virtual machines which have no direct correspondence to any real hardware.[1]
Virtual machines are separated into two major categories, based on their use and degree of correspondence to any real machine. A system virtual machine provides a complete
system platform which supports the execution of a complete operating system (OS). In contrast, a process virtual machine is designed to run a single program, which means that it supports a single process. An essential characteristic of a virtual machine is that the software running inside is limited to the resources and abstractions provided by the virtual machine -- it cannot break out of its virtual world.

-Implementation

is the realization of an application, or execution of a
plan, idea, model, design, specification, standard, algorithm, or policy.
In
computer science, an implementation is a realization of a technical specification or algorithm as a program, software component, or other computer system. Many implementations may exist for a given specification or standard. For example, web browsers contain implementations of World Wide Web Consortium-recommended specifications, and software development tools contain implementations of programming languages.

-Benefits

Virtual Machines, AKA "Virtualization," is currently a popular topic in computerization. For the benefit of people who are unfamiliar with using this computer technology, this article will explain the benefits of using virtualization.

-Examples


Zones are not virtual machines, but an example of "operating-system virtualization".
This includes other "virtual environments" (also called "virtual servers") such as Virtuozzo, FreeBSD Jails, Linux-VServer, chroot jail, and OpenVZ. These provide some form of encapsulation of processes within an operating system. These technologies have the advantages of being more resource-efficient than full virtualization and having better observability into multiple guests simultaneously; the disadvantage is that, generally, they can only run a single operating system and a single version/patch level of that operating system - so, for example, they cannot be used to run two applications, one of which only supports a newer OS version and the other only supporting an older OS version on the same hardware. However, Sun Microsystems has enhanced Solaris Zones to allow some zones to behave like Solaris 8 or Solaris 9 systems by adding a system call translator.





-System Generation

*A group of interdependent items that interact regularly to perform a task.

*An established or organized procedure or a method.



-System Boot

The typical computer system
boots over and over again with no problems, starting the computer's operating system (OS) and identifying its hardware and software components that all work together to provide the user with the complete computing experience In order for a computer to successfully boot, its BIOS, operating system and hardware components must all be working properly; failure of any one of these three elements will likely result in a failed boot sequence.








Thursday, July 2, 2009


System Structure


-Simple Structure

View the OS as a series of levels
Each level performs a related subset of functions
Each level relies on the next lower level to perform more primitive functions
This decomposes a problem into a number of more manageable subproblems

-Layered Approach

The operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface. With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layersProperties
Simplicity of construction.
Simplicity of Debugging
Problems
Precise definition of layers
Example: Memory manager requires device driver of backing store (due to virtual memory) The device driver requires CPU scheduler (since if the driver waits for IO, another task should be scheduled) CPU scheduler may require virtual memory for large amount of information of some processes Less efficiency: due to the number of layers a request should pass .
System Calls
In computing, a system call is the mechanism used by an application program to request service from the operating system based on the monolithic kernel or to system servers on operating systems based on the microkernel-structure.

-Process Control
Process control is a statistics and engineering discipline that deals with architectures, mechanisms, and algorithms for controlling the output of a specific process. See also control theory.
For example, heating up the temperature in a room is a process that has the specific, desired outcome to reach and maintain a defined
temperature (e.g. 20°C), kept constant over time. Here, the temperature is the controlled variable. At the same time, it is the input variable since it is measured by a thermometer and used to decide whether to heat or not to heat. The desired temperature (20°C) is the setpoint. The state of the heater (e.g. the setting of the valve allowing hot water to flow through it) is called the manipulated variable since it is subject to control actions.
A commonly used control device called a
programmable logic controller, or a PLC, is used to read a set of digital and analog inputs, apply a set of logic statements, and generate a set of analog and digital outputs. Using the example in the previous paragraph, the room temperature would be an input to the PLC. The logical statements would compare the setpoint to the input temperature and determine whether more or less heating was necessary to keep the temperature constant. A PLC output would then either open or close the hot water valve, an incremental amount, depending on whether more or less hot water was needed. Larger more complex systems can be controlled by a Distributed Control System (DCS) or SCADA system.
In practice, process control systems can be characterized as one or more of the following forms:
Discrete – Found in many manufacturing, motion and packaging applications. Robotic assembly, such as that found in automotive production, can be characterized as discrete process control. Most discrete manufacturing involves the production of discrete pieces of product, such as metal stamping.
Batch – Some applications require that specific quantities of raw materials be combined in specific ways for particular durations to produce an intermediate or end result. One example is the production of adhesives and glues, which normally require the mixing of raw materials in a heated vessel for a period of time to form a quantity of end product. Other important examples are the production of food, beverages and medicine. Batch processes are generally used to produce a relatively low to intermediate quantity of product per year (a few pounds to millions of pounds).
Continuous – Often, a physical system is represented though variables that are smooth and uninterrupted in time. The control of the water temperature in a heating jacket, for example, is an example of continuous process control. Some important continuous processes are the production of fuels, chemicals and plastics. Continuous processes, in manufacturing, are used to produce very large quantities of product per year(millions to billions of pounds).

File management
-In computing, a file system (often also written as filesystem) is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. File systems may use a data storage device such as a hard disk or CD-ROM and involve maintaining the physical location of the files, they might provide access to data on a file server by acting as clients for a network protocol (e.g., NFS, SMB, or 9P clients), or they may be virtual and exist only as an access method for virtual data (e.g., procfs). It is distinguished from a directory service and registry.
More formally, a file system is a special-purpose
database for the storage, organization, manipulation, and retrieval of data.
Device Management
Device Management is a set of technologies, protocols and standards used to allow the remote management of mobile devices, often involving updates of firmware over the air (FOTA). The network operator, handset OEM or in some cases even the end-user (usually via a web portal) can use Device Management, also known as Mobile Device Management, or MDM, to update the handset firmware/OS, install applications and fix bugs, all over the air. Thus, large numbers of devices can be managed with single commands and the end-user is freed from the requirement to take the phone to a shop or service center to refresh or update.
For companies, a Device Management system means better control and safety as well as increased efficiency, decreasing the possibility for device downtime. As the number of smart devices increases in many companies today, there is a demand for managing, controlling and updating these devices in an effective way. As mobile devices have become true computers over the years, they also force organizations to manage them properly. Without proper management and security policies, mobile devices pose threat to security: they contain lots of information, while they may easily get into wrong hands. Normally an employee would need to visit the IT / Telecom department in order to do an update on the device. With a Device Management system, that is no longer the issue. Updates can easily be done "over the air". The content on a lost or stolen device can also easily be removed by "wipe" operations. In that way sensitive documents on a lost or a stolen device do not arrive in the hands of others.

Information Maintenance