this ppt includes these following windows xp ,operating system ,xp interface ,history ,concurrency control ,process schedulling ,thread management in windows xp ,memory management in windows xp ,multiprogramming ,problems related to concurrency ,input output management ,i/o management
3. Content
History
Process concurrency control
Process scheduling
Thread management
I/O management
Memory management
4. History
On 25 August 2001, Microsoft released Windows XP.
The merging of the Windows NT/2000 and Windows
95/98/Me lines was finally achieved with Windows XP.
Windows XP uses the Windows NT 5.1 kernel, marking the
entrance of the Windows NT core to the consumer market, to
replace the aging 16/32-bit branch
5. Process Concurrency & control
“Thread” of execution
Independent Fetch/Decode/Execute loop
Operating in some Address space
Uniprogramming: one thread at a time
Batch processing:
Easier for operating system builder
Get rid concurrency by defining it away
Multiprogramming: more than one thread at a time
Often called “multitasking”, but multitasking has other
meanings
6. The Basic Problem of Concurrency The basic problem of concurrency involves resources:
Hardware: single CPU, single DRAM, single I/O devices
Multiprogramming API: users think they have exclusive
access to machine
OS Has to coordinate all activity
Multiple users, I/O interrupts, …
How can keep this straight?
Basic Idea: Use Virtual Machine abstraction
Decompose hard problem into simpler ones
Abstract the notion of an executing program
Then, worry about multiplexing these abstract machines
7. Process Scheduling
Windows XP uses a quantum-based, preemptive, priority
scheduling algorithm.
Threads are scheduled rather than processes.
Since the preemptive priority algorithm is implemented with
multiple queues, it can also be considered a multiple feedback-
queue algorithm.
Preemption can occur for any of 4 reasons:
-higher-priority thread becomes ready
-thread terminates
-time quantum exhausted
-thread performs a blocking system call, such as for I/O, in which
case it leaves the READY state and enters a WAITING state.
9.
In XP ,32 priority levels are used, where priority 31 is the
highest priority and priority 0 is the lowest priority.
Threads in the real-time class have fixed priorities.
If no ready thread exists, the idle thread is run.
When a thread becomes READY after WAITING, it is given a
priority boost, with the largest boost for waiting for keyboard
I/O and a smaller boost for waiting for disk.
10. Thread Management
The Windows XP API thread library supports the one-to-one
thread model.
It also provides the fiber library, which supports the many-to-
many model.
Thread components include:
-Thread ID
-Registers
A user stack used in user mode, and a kernel stack used in
kernel mode.
11. A private storage area used by various run-time libraries and
dynamic link libraries ( DLLs ).
The key data structures for Windows threads are the
ETHREAD ,KTHREAD, and the TEB.
The ETHREAD and KTHREAD structures exist entirely
within kernel space, and hence are only accessible by the
kernel, whereas the TEB lies within user space.
13. I/O Management
The I/O manager is responsible for file systems, device
,drivers and network drivers.
The I/O manager keeps track of which device drivers, filter
drivers and file systems are loaded and manages buffers for
I/O requests.
It assists in providing memory mapped file I/O and controls
the cache manager for the whole I/O system.
14. I/O Management
Programmed I/O
Processor issues I/O command, waits for the operation to
complete
Often handles I/O transfer details
Interrupt-Driven I/O
Processors issues I/O command, then proceeds to another
process or thread
Device interrupts the CPU when the data is ready to be
moved to memory
Direct Memory Access (DMA)
Processor issues I/O command
Device transfers data to/from memory (CPU will wait for
memory)
Device interrupts the CPU when the I/O transfer is
completed
15. Memory Management
User memory can be allocated according to several schemes:
virtual memory, memory-mapped files, heaps, and thread-
local storage .
Windows XP supports a larger system Virtual Address Space -
1.3 GB, of which the contiguous virtual address space that can
be used by device drivers is 960 MB.
In Windows XP, the Prototype PTEs(Page Table entries) are
allocated for active views only, allowing larger mapped files .
17. Windows XP introduces
the ”CreateMemoryResourceNotification” function which can
notify user mode processes of high or low memory
availability so applications can allocate more memory or free
up memory as necessary.
The kernel page protection limit in Windows XP is enabled
on systems up to 256 MB of RAM beyond which large
pages are enabled for increased address translation
performance.
Windows XP uses the SYSENTER/SYSEXIT mechanisms
which require fewer clock cycles to transition to and
from user mode to kernel mode to speed up system calls.