【翻译WINDOWS NT FILE SYSTEM INTERNAL】NT缓存管理器一(3)

本文深入探讨了Windows NT系统中每个打开文件实例的表示方式——文件对象结构,以及任何与其关联的线性字节流如何定义为文件流。详细解释了文件流的类型,如文件数据、目录、文件系统元数据等,并阐述了NT文件系统如何创建、删除、操纵这些文件流。同时,文章还介绍了缓存管理器如何通过文件映射来支持文件流的缓存,以及缓存策略与内存管理器之间的整合。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

文件流

每个打开文件的实例在windows NT里被表示为一个文件对象结构。任何关联一个文件对象的线性字节流可以被定义为文件流。文件流的例子包括给定文件的数据,一个目录(包含关于文件被存储在磁盘上的信息),文件系统元数据(例如卷信息),与该文件关联的访问控制列表(ACL),和文件一起存储的扩展信息。

NT文件系统创建,删除,操纵文件流,这是以下操作的结果,要么外部生成用户请求去读或者写文件数据,或者内部生成请求去操纵文件系统描述数据结构。文件系统识别他们希望支持和缓存的文件流。例如,除非由用户另作说明,文件系统缓存用户数据被包含在一个文件里。对于每一个被缓存的文件流,文件系统支持缓存访问和非缓存访问。

缓存管理器使用文件映射来支持文件流缓存,文件映射把缓存和内存管理器对于分页内存的策略结合起来(and it also integrates caching with the memory manager'spolicies for other uses of pageable memory)。处于对缓存管理器的期望,流是表示多少字节信息将被保持在内存中的一个随机字节数。因此,缓存管理器提供的相同服务集可以被文件系统驱动用来缓存文件数据或者文件系统元数据。

npm ERR! code 1 npm ERR! path D:\work\opscloud4\opscloud4-web-master\node_modules\deasync npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./build.js npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@18.19.0 | win32 | x64 npm ERR! gyp info find Python using Python version 3.12.3 found at "C:\Users\27145\AppData\Local\Programs\Python\Python312\python.exe" npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! gyp ERR! find VS - not found npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS ************************************************************** npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! gyp ERR! find VS ************************************************************** npm ERR! gyp ERR! find VS npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! gyp ERR! stack at VisualStudioFinder.fail (D:\ProgramFile\developTool\nvm\nvm\v18.19.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:113:11) npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio (D:\ProgramFile\developTool\nvm\nvm\v18.19.0\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:69:17) npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5) npm ERR! gyp ERR! stack at async createBuildDir (D:\ProgramFile\developTool\nvm\nvm\v18.19.0\node_modules\npm\node_modules\node-gyp\lib\configure.js:69:26) npm ERR! gyp ERR! stack at async run (D:\ProgramFile\developTool\nvm\nvm\v18.19.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18) npm ERR! gyp ERR! System Windows_NT 10.0.26100 npm ERR! gyp ERR! command "D:\\ProgramFile\\developTool\\nvm_nodejs\\nodejs\\node.exe" "D:\\ProgramFile\\developTool\\nvm\\nvm\\v18.19.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd D:\work\opscloud4\opscloud4-web-master\node_modules\deasync npm ERR! gyp ERR! node -v v18.19.0 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok npm ERR! Build failed
06-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值