Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How does Windows NT supports Multitasking?

Answer Posted / asd

Preemptive multitasking differs from non-preemptive
multitasking in that the operating system can take control
of the processor without the task's cooperation. (A task can
also give it up voluntarily, as in non-preemptive
multitasking.) The process of a task having control taken
from it is called preemption. Windows NT uses preemptive
multitasking for all processes except 16-bit Windows 3.1
programs. As a result, a Window NT application cannot take
over the processor in the same way that a Windows 3.1
application can.

A preemptive operating system takes control of the processor
from a task in two ways:

When a task's time quantum (or time slice) runs out. Any
given task is only given control for a set amount of time
before the operating system interrupts it and schedules
another task to run.

When a task that has higher priority becomes ready to run.
The currently running task loses control of the processor
when a task with higher priority is ready to run regardless
of whether it has time left in its quantum or not.

Switching Among Tasks

At any given time, a processor (CPU) is executing in a
specific context. This context is made up of the contents of
its registers and the memory (including stack, data, and
code) that it is addressing. When the processor needs to
switch to a different task, it must save its current context
(so it can later restore the context and continue execution
where it left off) and switch to the context of the new
task. This process is called context switching .

When Windows NT switches tasks, it saves all of the
registers of the task it's leaving and re-loads the
registers of the task to which it's switching. This process
also enables the proper address space for the task to which
Windows NT is switching.

Processes and Threads

In addition to being a preemptive multitasking operating
system, Windows NT is also multithreaded, meaning that more
than one thread of execution (or thread ) can execute in a
single task at once.

A process comprises:

A private memory address space in which the process's code
and data are stored.

An access token against which Windows NT makes security checks.

System resources such as files and windows (represented as
object handles).

At least one thread to execute the code.

A thread comprises:

A processor state including the current instruction pointer.

A stack for use when running in user mode.

A stack for use when running in kernel mode.

Since processes (not threads) own the access token, system
resource handles, and address space, threads do NOT have
their own address spaces nor do they have their own access
token or system resource handles. Therefore, all of the
threads in a process SHARE the same memory, access token,
and system resources (including quota limits) on a
"per-process" rather than a "per-thread" basis. In a
multithreaded program, the programmer is responsible for
making sure that the different threads don't interfere with
each other by using these shared resources in a way that
conflicts with another thread's use of the same resource.
(As you might suspect, this can get a little tricky.)

Sources:
http://technet.microsoft.com/en-us/library/cc767883.aspx

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the limit of ram capacity in a 32bit os?

1001


Is 8gb ram good?

951


Explain briefly about assembler and its functioning?

998


List the issues related to the handheld system.

915


When would you choose bottom-up methodology?

2531


WHATE IS DIFFERENT BETWEEN ANLOG , PLC & DCS OR EXPLAIN ANALOG / PLC / DCS SYSTEME

2937


What do you mean by threads in Operating System?

1074


What are the various components of a computer system?

974


Explain the difference between load-time dynamic linking and run-time dynamic linking?

1009


How do I get the ie tab in chrome?

980


What is the purpose of the command interpreter? Why is it usually separate from the kernel?

1211


How do I go to a specific line in vi?

979


When the pipe is used?

938


What is tcl timing?

924


Explain the concept of the multi-processor systems or parallel systems?

942