什么是文件控制块?(a file control block?)

文件控制块(FCB),也称为文件描述符,是一种由计算机操作系统临时分配的数据结构,用于维护正在创建或以其他方式操作的数据文件的状态。在大多数情况下,文件控制块用于存储有关文件的基本信息,如文件名、扩展名和逻辑驱动器上的位置,以及动态信息,如正在读取的文件中的当前地址。最初,在某些操作系统下,文件控制块是一种定义非常明确的结构,但此后,它已成为用于跟踪主动处理文件信息的结构的更通用术语。...

文件控制块(FCB),也称为文件描述符,是一种由计算机操作系统临时分配的数据结构,用于维护正在创建或以其他方式操作的数据文件的状态。在大多数情况下,文件控制块用于存储有关文件的基本信息,如文件名、扩展名和逻辑驱动器上的位置,以及动态信息,如正在读取的文件中的当前地址。最初,在某些操作系统下,文件控制块是一种定义非常明确的结构,但此后,它已成为用于跟踪主动处理文件信息的结构的更通用术语。

A file control block stores basic information about a computer program that is being used.

文件控制块的一个重要用途是帮助文件系统跟踪文件的状态,以防止不同的操作试图以冲突的方式修改文件,例如从当前正在写入的文件区域读取。该结构不仅用于数据文件,还可用于跟踪有关目录的信息,尽管数据结构通常会缩短以删除不必要的字段,因为目录不能包含数据。

两个操作系统,特别是Microsoft®磁盘操作系统(MS-DOS)和微处理器控制程序(CP/M),是第一个使用块模式管理文件的操作系统。这些系统使用非常相似的结构来帮助管理正在访问的文件。随着其他操作系统和文件系统的开发,块的概念仍然存在,但实现发生了变化,不同系统的数据结构也有很大差异。2011年使用的大多数计算机操作系统都使用某种形式的文件控制块,特别是在为可移动硬件使用自定义文件系统时,尽管所使用的数据结构与没有仿真的早期版本不兼容,并且通常更大,并且对大多数高级编程应用程序隐藏。

一般来说,文件控制块包含操作系统在使用文件期间可以更改的信息。除了名称和位置之外,还保留指向文件本身内不同点的内存指针。这允许顺序读写,以及与FCB中存储随机访问记录大小的变量配对时的随机访问读写。文件权限(如只读或可执行状态)也会被跟踪。FCB的使用还提供了一种机制,以防止两个或多个进程以不可预知的方式在同一文件上运行,例如在将同一文件复制到另一个位置时尝试将信息附加到文件的末尾。

  • 发表于 2021-12-10 13:00
  • 阅读 ( 142 )
  • 分类:互联网

你可能感兴趣的文章

您应该知道的基本windows cmd命令

... BCDEDIT - Sets properties in boot database to control boot loading. ...

  • 发布于 2021-03-15 18:07
  • 阅读 ( 334 )

如何在linux上使用stat命令

...。我们会教你怎么使用它。 stat带你到幕后 ls命令在做什么方面做得很好,而且做得很多,但是对于Linux,似乎总有一种方法可以更深入地了解表面之下的内容。通常,这不仅仅是一个掀开地毯边缘的例子。你可以把地板撕开,...

  • 发布于 2021-04-02 19:25
  • 阅读 ( 172 )

如何从另一台计算机控制crashplan的备份应用程序

...’s the hiccup. I want to run the old desktop machine headless and remote control the Crashplan client for those rare time I need to make any changes. The problem is I can’t find a single setting to allow me to do so. When I install Crashplan on my home office computer the only instance of Crashp...

  • 发布于 2021-04-09 01:13
  • 阅读 ( 158 )

硬盘上的数据会在没有损坏警告的情况下降级吗?

...ve), then the hard drive will give up, reallocate the sector, and tell the controller that there was a problem. It relies on the RAID controller to rec***truct the sector from the other RAID members and write it back to the failed hard drive, which then stores it in the reallocated sector (that hope...

  • 发布于 2021-04-09 15:31
  • 阅读 ( 279 )

如何理解那些令人困惑的Windows7文件/共享权限

...s and subdirectories, delete subfolders and change data in the files. Full Control is the “do anything” of the classic permissi***, as it allows for you to do any and all of the previous permissi***. In addition it gives you the advanced changing NTFS Permission, this only applies on NTFS Folder...

  • 发布于 2021-04-10 01:21
  • 阅读 ( 213 )

当数据从回收站中删除时会发生什么?

...删除的文件,但当我们删除这些文件时,这些文件会发生什么呢?今天的超级用户问答帖子回答了一位好奇的读者关于删除过程的问题。 今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的...

  • 发布于 2021-04-11 06:22
  • 阅读 ( 189 )

ftps和sftp有什么区别?

...mpletely different protocols. FTPS is FTP with SSL for security. It uses a control channel and opens new connecti*** for the data transfer. As it uses SSL, it requires a certificate. SFTP (SSH File Transfer Protocol/Secure File Transfer Protocol) was designed as an extension of SSH to provide file t...

  • 发布于 2021-04-11 07:36
  • 阅读 ( 197 )

您可以使用虚拟操作系统访问被阻止在主机操作系统的hosts文件中的网站吗?

... I can physically touch a computer system, then given time I can have full control over it. Kids have lots of free time, and by no means are they an exception to this rule. It is trivial to reboot a system into safe mode and remove Net Nanny or any other piece of software installed upon it. If you w...

  • 发布于 2021-04-11 07:56
  • 阅读 ( 291 )

极客学校:学习Windows7–资源访问

...用了一种新的“轻松”共享技术。选项从Read、Change和Full Control更改为Read和Read/Write。这个想法是整个家庭小组思想的一部分,让不懂电脑的人很容易共享一个文件夹。这是通过上下文菜单完成的,可以轻松地与您的家庭组共享。...

  • 发布于 2021-04-11 23:42
  • 阅读 ( 201 )

什么是磁盘碎片?我还需要碎片整理吗?

... memories, and sometimes substantial buffering on the hard drive or in the controller. Plus sector sizes have gotten larger (or files are allocated in larger blocks) so that more data is inherently contiguous. Operating systems have gotten **arter as well. Whereas DOS 1.x would have fetched each sec...

  • 发布于 2021-04-12 03:43
  • 阅读 ( 229 )
fhwo9824
fhwo9824

0 篇文章

相关推荐