MS-DOS:修订间差异

跳转到导航 跳转到搜索
删除518字节 、​ 2025 年 6 月 24 日 (星期二)
第 38 行: 第 38 行:


=== DOS 内核 ===
=== DOS 内核 ===
DOS 内核是 MS-DOS 的较高层,提供的进程控制、内存管理、外设支持和文件系统访问等服务。
从 [[Windows 9x 中的 MS-DOS|MS-DOS 7]] 开始,内核作为配置文件被合并到 <code>IO.SYS</code> 和 <code>MSDOS.SYS</code>。
DOS 内核是 MS-DOS 的更高层,提供包括进程控制、内存管理和文件系统访问在内的服务。它等效于 CP/M 的基本磁盘操作系统组件。
DOS 内核是 MS-DOS 的更高层,提供包括进程控制、内存管理和文件系统访问在内的服务。它等效于 CP/M 的基本磁盘操作系统组件。


Process control functionality is very limited due to the system's single-tasking nature. A program can execute another program, although control will not return to the original program until the other program exits. A program can, however, choose to terminate and stay resident (TSR), which leaves a portion of the program present in memory. If the program hooks an interrupt handler before terminating this way, the resident part can get called even when other programs are running, creating an illusion of multitasking.
由于系统的单一任务性质,进程控制功能非常有限。一个程序可以执行另一个程序,尽管在另一个程序退出之前,控制权不会返回到原始程序。但是,程序可以选择终止并保持驻留(Terminate and Stay Resident,TSR),这会将程序的一部分留在内存中。如果程序在以这种方式终止之前挂接中断处理程序,即使其他程序正在运行,也可以调用常驻部分,从而产生多任务的错觉。


Memory management allows programs to allocate conventional memory at runtime as needed. It is necessary when multiple programs are loaded to make sure that the active program does not overwrite the data of the other programs. However, as MS-DOS runs in real mode, there is no memory protection and therefore the allocations are not actually enforced, unlike protected mode operating systems.
内存管理允许程序在运行时根据需要分配常规内存。在加载多个程序时,必须确保活动程序不会覆盖其他程序的数据。但是,由于 MS-DOS 在实模式下运行,因此没有内存保护,因此与保护模式操作系统不同,实际上并未强制执行分配。


The kernel implements support for File Allocation Table (FAT) family file systems. The original FAT12 file system was adapted from the file system used by Microsoft Standalone Disk BASIC and used 12-bit cluster indices. In the following versions, it was further improved by adding support for subdirectories and larger volumes, and by extending the FAT to use 16-bit and later 32-bit cluster indices. The file system implementation in the MS-DOS kernel is completely bypassed when running DOS applications under [[Windows for Workgroups 3.11]] or later with 32-bit file access enabled; the VFAT virtual driver that implements the feature was later improved in [[Windows 95]] to support [[w:long file names|long file names]].
内核实现了对文件分配表(File Allocation Table,FAT)系列文件系统的支持。最初的 FAT12 文件系统改编自 Microsoft Standalone Disk BASIC 使用的文件系统,并使用 12 位群集索引。在以下版本中,通过添加对子目录和更大卷的支持,以及扩展 FAT 以使用 16 位和更高版本的 32 位群集索引,它得到了进一步的改进。在启用了 32 位文件访问的 [[Windows for Workgroups 3.11]] 或更高版本下运行 DOS 应用程序时,完全绕过 MS-DOS 内核中的文件系统实现;实现此功能的VFAT虚拟驱动程序后来在 [[Windows 95]] 中得到了改进,以支持长文件名。


The redirector interface, introduced with MS-DOS 3.1, allows bypassing the FAT file system code to implement a custom file system. This was originally intended to be used by network clients as a means of enabling access to files on other networked computers, although it was eventually also used to implement support for the CD-ROM file system in the Microsoft CD-ROM Extensions (MSCDEX).
MS-DOS 3.1 中引入的重定向器接口允许绕过 FAT 文件系统代码来实现自定义文件系统。这最初旨在供网络客户端用作允许访问其他联网计算机上的文件的方法,尽管它最终还用于在 Microsoft CD-ROM 扩展(MSCDEX)中实现对 CD-ROM 文件系统的支持。


Since [[MS-DOS in Windows 9x|MS-DOS 7]], the kernel has been merged into <code>IO.SYS</code>, while <code>MSDOS.SYS</code> serves as a configuration file.
[[Windows 9x 中的 MS-DOS|MS-DOS 7]] 开始,内核合并到 <code>IO.SYS</code> 中,而 <code>MSDOS.SYS</code> 则用作配置文件。


== Source code ==
== Source code ==

导航菜单