Presentation is loading. Please wait.

Presentation is loading. Please wait.

System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.

Similar presentations


Presentation on theme: "System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices."— Presentation transcript:

1 System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices and hardware to use one kernel and one set of device drivers  The Kernel  The Executive ● Five User Mode Subsystems

2 Kernel ● Operates by using a set of kernel objects whose attributes store kernel data and whose methods perform kernel activities ● Kernel Dispatcher – the object type of all kernel calls  remain in memory  never pre-empted  Software Interrupts

3 First and Second Kernel Responsibilities ● Thread Scheduling  2 classes, variable and real time ● variable – contains threads with priorities from 0 to 15 ● real time – contains threads with priorities from 16 to 31 ● Interrupt and Exception Handling  Trap Handlers deal with simple exceptions  The exception dispatcher creates an exception record containing the reason for the exception and finds an exception handler to deal with it

4 Third and Fourth Kernel Responsibilities ● Low-level processor synchronization ● Recovery after Power Failure

5 Executive ● Object Manager ● Virtual Memory Manager ● Process Manager ● Local Procedure Call Manager ● I/O manager ● Cache manager ● Security Reference Monitor ● Plug and Play and Power Managers ● Registry ● Booting

6 User Mode Subsystems ● OS/2 ● Win 16 ● Win 32 ● MS-DOS ● POSIX ● Protected Subsystems

7 Programmer Interface ● Access to Kernel Objects  Done by CreateXXX() (where XXX is an object name) and terminated by the CloseHandle() function ● Sharing Objects Between Processes ● Process Management ● Interprocess Communication ● Memory Management

8 Sharing Objects Between Processes ● Can be done by one of three methods  Inherited  Passing the Kernel Object a second name (may cause overlapping object names)  DuplicateHandle() function – uses some other method of interprocess message passing to share Kernel Object handles

9 Process Management ● Instance Handles – virtual address where every dynamic link library or executable file loaded into a process ● Scheduling Rule – distinguishes between the foreground program and all background programs tripling the foreground program's time quant ● Thread Priorities – determined by it's class (idle, normal, high, realtime) and can be adjusted more so by use of the SetThreadPriority() function ● Thread Synchronization – if multiple threads attempt to enter the critical section of some specified code only one section will be permitted to proceed

10 Process Management (Continued) ● Fibers  User-mode code that is scheduled according to user-defined scheduling algorithms  Only one fiber may execute concurrently, even in a multiprocessor environment ● Thread Pool – provides user-mode programs with three services in an attempt to increase performance  A Thread Queue  API that can bind callbacks and waitable handles  APIs to bind callbacks and timeouts

11 Interprocess Communication ● Can be handled in several ways  Sharing Kernel Objects  Message passing – particularly popular for GUI applications ● Posting a Message – Asynchronous ● Sending a Message – Synchronous ● Can send Data as well as a Message

12 Memory Management ● Virtual Memory  Processes reserve or commit virtual memory ● A process may lock some committed pages into physical memory so as to not be removed – maxes at 30 unless specifically changed ● Memory Mapping Files  Used for multiple processes to use the same memory without duplicating it into multiple memory spaces

13 Memory Management Continued ● Heaps  Reserved address space for Win32 API processes  Synchronized to prevent the heap's space-allocation data structures from being damaged by concurrent updates by multiple threads ● Thread Local Storage – allocates global storage on a per-thread basis (creating a 'local' global storage for each thread)


Download ppt "System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices."

Similar presentations


Ads by Google