Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between kernel mode and user mode caching in IIS 8.0

What is the difference between kernel mode caching and user mode caching and how to track both ?

like image 252
Prasoon Karunan V Avatar asked Apr 04 '16 14:04

Prasoon Karunan V


People also ask

What is kernel mode and user mode in IIS?

A processor in a computer running Windows has two different modes: user mode and kernel mode. The processor switches between the two modes depending on what type of code is running on the processor. Applications run in user mode, and core operating system components run in kernel mode.

What is the difference between kernel mode and user mode?

In kernel mode, the program has direct and unrestricted access to system resources. In user mode, the application program executes and starts. In user mode, a single process fails if an interrupt occurs. Kernel mode is also known as the master mode, privileged mode, or system mode.

What is kernel mode caching?

Cache Kernel caches OS system objects such as threads, address spaces, and application kernels. The higher level application kernels provide the management functions for the application, managing thread priority and address spaces and reducing supervisor-level complexity.

Why is the user mode and kernel mode both needed in an operating system?

Necessity of Dual Mode (User Mode and Kernel Mode) in Operating System. A running user program can accidentaly wipe out the operating system by overwriting it with user data. Multiple processes can write in the same system at the same time, with disastrous results.


1 Answers

Kernal Mode caching is essentially going to handle caching requests at the OS-level, so contents that are stored in it can be accessed without ever going down the rest of the usual pipeline (i.e. it will not have to go down to the ASP.NET or IIS-level caches to check for the contents) :

enter image description here

So the request hits the initial cache (http.sys), finds what it needs and sends it back, all without ever having to proceed further down the pipeline.

As a the result of this, it's usually quite fast. A limitation of it however is that it does not support many user-level features such as authentication and authorization, so it may not fit all scenarios.

User-mode on the other hand is going to fill in the gaps where Kernal-mode cannot be used, which primarily surrounds authorized/authenticated content (as it requires a check to see if the user can actually access the contents), but there are many other scenarios that could cause the http.sys cache to not be used.

With regards to actually checking to see if content is or is not being cached (and possibly why), you can use FREB (Failed Request Event Buffering). The following command can be used to find out which content is cached in kernel mode:

netsh http show cachestate
like image 94
Rion Williams Avatar answered Oct 21 '22 10:10

Rion Williams