资源简介
WRK-v1.2,WRK的全称是“Windows Research Kernel”,它是微软为高校操作系统课程提供的可修改和跟踪的操作系统教学平台。它给出了Windows这个成功的商业操作系统的内核大部分代码,可以对其进行修改、编译,并且可以用这个内核启动Windows操作系统。可让学生将操作系统基本原理和商业操作系统内核联系起来,进一步加深对操作系统整体的理解。
代码片段和文件信息
/*++
Copyright (c) Microsoft Corporation. All rights reserved.
You may only use this code if you agree to the terms of the Windows Research Kernel Source Code License agreement (see License.txt).
If you do not agree to the terms do not use the code.
Module Name:
cachedat.c
Abstract:
This module implements the Memory Management based cache management
routines for the common Cache subsystem.
--*/
#include “cc.h“
//
// Global SharedCacheMap lists and resource to synchronize access to it.
//
//
// extern KSPIN_LOCK CcMasterSpinLock;
LIST_ENTRY CcCleanSharedCacheMapList;
SHARED_CACHE_MAP_LIST_CURSOR CcDirtySharedCacheMapList;
SHARED_CACHE_MAP_LIST_CURSOR CcLazyWriterCursor;
//
// Worker thread structures:
//
// A spinlock to synchronize all three lists.
// A count of the number of worker threads Cc will use
// A count of the number of worker threads Cc in use
// A listhead for preinitialized executive work items for Cc use.
// A listhead for an express queue of WORK_QUEUE_ENTRYs
// A listhead for a regular queue of WORK_QUEUE_ENTRYs
// A listhead for a post-tick queue of WORK_QUEUE_ENTRYs
//
// A flag indicating if we are throttling the queue to a single thread
//
// extern KSPIN_LOCK CcWorkQueueSpinLock;
ULONG CcNumberWorkerThreads = 0;
ULONG CcNumberActiveWorkerThreads = 0;
LIST_ENTRY CcIdleWorkerThreadList;
LIST_ENTRY CcExpressWorkQueue;
LIST_ENTRY CcRegularWorkQueue;
LIST_ENTRY CcPostTickWorkQueue;
BOOLEAN CcQueueThrottle = FALSE;
//
// Store the current idle delay and target time to clean all. We must calculate
// the idle delay in terms of clock ticks for the lazy writer timeout.
//
ULONG CcIdleDelayTick;
LARGE_INTEGER CcNoDelay;
LARGE_INTEGER CcFirstDelay = {(ULONG)-(3*LAZY_WRITER_IDLE_DELAY) -1};
LARGE_INTEGER CcIdleDelay = {(ULONG)-LAZY_WRITER_IDLE_DELAY -1};
LARGE_INTEGER CcCollisionDelay = {(ULONG)-LAZY_WRITER_COLLISION_DELAY -1};
LARGE_INTEGER CcTargetCleanDelay = {(ULONG)-(LONG)(LAZY_WRITER_IDLE_DELAY * (LAZY_WRITER_MAX_AGE_TARGET + 1)) -1};
//
// Spinlock for controlling access to Vacb and related global structures
// and a counter indicating how many Vcbs are active.
//
// extern KSPIN_LOCK CcVacbSpinLock;
ULONG_PTR CcNumberVacbs;
//
// Pointer to the global Vacb vector.
//
PVACB CcVacbs;
PVACB CcBeyondVacbs;
LIST_ENTRY CcVacbLru;
LIST_ENTRY CcVacbFreeList;
ULONG CcMaxVacbLevelsSeen = 1;
ULONG CcVacbLevelEntries = 0;
PVACB *CcVacbLevelFreeList = NULL;
ULONG CcVacbLevelWithBcbsEntries = 0;
PVACB *CcVacbLevelWithBcbsFreeList = NULL;
//
// Deferred write list and respective Thresholds
//
extern ALIGNED_SPINLOCK CcDeferredWriteSpinLock;
LIST_ENTRY CcDeferredWrites;
ULONG CcDirtyPageThreshold;
ULONG CcDirtyPageTarget;
ULONG CcPagesYetToWrite;
ULONG CcPagesWrittenLastTime = 0;
ULONG CcDirtyPagesLastScan = 0;
ULONG CcAvailablePagesThreshold = 100;
ULONG Cc
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-05-15 11:13 WRK-v1.2\
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\WS03SP1HALS\
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halacpim\
文件 83968 2006-06-18 13:51 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halacpim\halacpim.dll
文件 224256 2006-06-18 13:51 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halacpim\halacpim.pdb
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halmacpi\
文件 118272 2005-03-25 08:28 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halmacpi\halmacpi.dll
文件 183296 2005-03-25 12:03 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halmacpi\halmacpi.pdb
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halmps\
文件 124928 2005-03-25 08:28 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halmps\halmps.dll
文件 183296 2005-03-25 12:03 WRK-v1.2\WRK-v1.2\WS03SP1HALS\x86\halmps\halmps.pdb
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\ba
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\ba
文件 3477 2005-05-07 04:53 WRK-v1.2\WRK-v1.2\ba
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\ba
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\ba
目录 0 2018-05-15 11:27 WRK-v1.2\WRK-v1.2\ba
文件 2526 2006-06-17 09:43 WRK-v1.2\WRK-v1.2\ba
文件 2670 2006-06-16 14:07 WRK-v1.2\WRK-v1.2\ba
目录 0 2018-05-15 11:27 WRK-v1.2\WRK-v1.2\ba
目录 0 2018-05-15 11:27 WRK-v1.2\WRK-v1.2\ba
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\ba
目录 0 2018-05-15 11:13 WRK-v1.2\WRK-v1.2\ba
文件 3776 2005-08-09 09:58 WRK-v1.2\WRK-v1.2\ba
文件 14690 2005-05-07 09:21 WRK-v1.2\WRK-v1.2\ba
文件 1502 2006-06-23 02:16 WRK-v1.2\WRK-v1.2\ba
文件 3066 2005-08-09 09:59 WRK-v1.2\WRK-v1.2\ba
文件 10324 2006-06-23 02:16 WRK-v1.2\WRK-v1.2\ba
文件 111364 2006-06-23 02:16 WRK-v1.2\WRK-v1.2\ba
............此处省略940个文件信息
评论
共有 条评论