16

Windows 7 Architecture

Embed Size (px)

Citation preview

Page 1: Windows 7 Architecture
Page 2: Windows 7 Architecture

Operating SystemTopic

Windows 7 Architecture

Presented By

Daniyal Khan

Haris Mobeen Ahmed

Hammad Jameel Syed

Adeel Awan

Nasir Ali

Page 3: Windows 7 Architecture

History

Windows 7 is a personal computer operatingsystem developed by Microsoft. It is a part ofthe Windows NT family of operatingsystems. Windows 7 was released on July22, 2009, and became generally available onOctober 22, 2009.

Page 4: Windows 7 Architecture

Description of Windows Architecture

Page 5: Windows 7 Architecture

Layered Architecture

• Kernel layer runs in protected mode andprovides access to the CPU by supportingthreads, interrupts, and traps.

• Executive runs in protected mode above theKernel layer and, provides the basic systemservices.

• On top of the executive, environmentalsubsystems operate in user mode providingdifferent OS APIs

Page 6: Windows 7 Architecture

Portability• Windows 7 can be moved from on

hardware platform to another with relatively few changes

• Written in C and C++

• Platform-dependent code is isolated in a dynamic link library (DLL) called the “hardware abstraction layer” (HAL)

Page 7: Windows 7 Architecture

System Components

„Four main responsibilities:

1. Thread scheduling

2. Interrupt and exception handling

3. Low-level processor synchronization

4. Recovery after a power failure

Page 8: Windows 7 Architecture

System ComponentsKernel is object-oriented, uses two sets of objects

1. Dispatcher objects control dispatching and synchronization (events, mutants, murexes, semaphores, threads and timers)

2. Control objects (asynchronous procedure calls, interrupts, power notify, process and profile objects)

Page 9: Windows 7 Architecture

Processes & Threads „ The process has a virtual memory address

space, information (such as a base priority), and an affinity for one or more processors.

Threads are the unit of execution scheduled by the kernel’s dispatcher.

Each thread has its own state, including a priority, processor affinity, and accounting information.

A thread can be one of six states: ready, standby, running, waiting, transition, and terminated.

Page 10: Windows 7 Architecture

Kernel Scheduling� Characteristics of Windows 7’s priority strategy:

Gives very good response times to interactive threads that are using the mouse and windows

Enables I/O-bound threads to keep the I/O devices busy

Compute-bound threads soak up the spare CPU cycles in the background

Page 11: Windows 7 Architecture

Object Manager

Windows 7 uses objects for all its services and entities; the object manager supervises the use of all the objects

1. Generates an object handle used by applications to refer to objects

2. Checks security

3. Keeps track of which processes are using each object „

Objects are manipulated by a standard set of methods, namely create, open, close, delete, query-name, parse and security.

Page 12: Windows 7 Architecture

Virtual Memory Management

The design of the VM manager assumes that the underlying hardware supports virtual to physical mapping, a paging mechanism, transparent cache coherence on multiprocessor systems, and virtual address aliasing.

The VM manager in Windows uses a page-based management scheme with a page size of 4 KB for both x86 and AMD64.

Page 13: Windows 7 Architecture

File System The fundamental structure of the Windows 7 file system

(NTFS) is a volume

1. Created by the Windows disk administrator utility

2. Based on a logical disk partition

3. May occupy a portions of a disk, an entire disk, or span across several disks „

All metadata, such as information about the volume, is stored in a regular file „ NTFS uses clusters as the underlying unit of disk allocation

1. A cluster is a number of disk sectors that is a power of two

2. Because the cluster size is smaller than for the older 16-bit FAT file system, the amount of internal fragmentation is reduced

Page 14: Windows 7 Architecture

Memory Management Virtual memory:

1. Virtual Allot reserves or commits virtual memory

2. Virtual Free DE commits or releases the memory

3. These functions enable the application to determine the virtual address at which the memory is allocated

An application can use memory by memory mapping a file into its address space

1. Multistage process.

2. Two processes share memory by mapping the same file into their virtual memory.

Page 15: Windows 7 Architecture

Memory Management A heap in the Win32 environment is a region of reserved

address space.

1. A Win 32 process is created with a 1 MB default heap.

2. Access is synchronized to protect the heap’s space allocation data structures from damage by concurrent updates by multiple threads.

Because functions that rely on global or static data typically fail to work properly in a multithreaded environment, the thread-local storage mechanism allocates global storage on a per-thread basis.

1. The mechanism provides both dynamic and static methods of creating thread-local storage

Page 16: Windows 7 Architecture