Operating Systems : Design and implementation 读书笔记

MINIX 3 的分区支持代码独立于驱动程序,便于不同硬件环境的移植。键盘和显示器虽然逻辑上分离,但软件负责回显输入以提高编辑器等程序的灵活性。内部缓冲区的存在允许磁盘控制器在传输前校验校验和,并避免在系统总线繁忙时的数据冲突,简化了控制器设计。文件系统从用户角度关注文件的命名、保护和操作,而内部的链接列表或位图等细节则关乎设计者。

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

 Thus the MINIX 3 source code to support partitions on IBM computers is put in drvlib.c, rather than being included in driver.c, for two reasons.  First, not all disk types support partitions. As noted earlier, the memory driver links to driver.o but does not use the functions compiled into drvlib.o. Second, this makes it easier to port MINIX 3 to different hardware. It is easier to replace one small file than to edit a large one with many sections to be conditionally compiled for different environments.


 Although the keyboard and display are logically separate devices, many users have grown accustomed  to seeing the characters they have just typed appear on the screen. Some (older) terminals oblige by automatically displaying (in hardware) whatever has just been typed, which is not only a nuisance when passwords are being entered but greatly limits the flexibility of sophisticated editors and other programs. Fortunately, PC keyborads display nothing when keys are struck. It is therefore up to the software to display the input. This process is called echoing.


P226

Why does it need a internal buffer? There are two reasons. First, by doing internal buffering, the disk controller can verify the checksum before starting a transfer. If the checksum is incorrect, an error is signaled and no transfer to memory is done.

    The second reason is that once a disk has started, the bits keep arriving from the disk at a constant rate, whether the controller is ready for them or not. If the controller tried to write data directly to memory, it would have to go over the system bus for each word transferred. If the bus were busy due to some other device using it, the controller would have to wait. If the next disk word arrived before the previous one had been stored, the controller would have to store it somewhere. If the bus were very busy, the controller might end up storing quite a few words and having a lot of administration to do as well. When the block is buffered internally, the bus is not needed until the DMA begins, so the design of the controller is much simpler because the DMA transfer to memory i not time critical.

 

 P480 

 File Systems

From  the user's standpoint, the most import aspect of a file system is how it appers to them, that is, what consitutes a file, how files are named and pretected, what operations are allowed on files, and so on. The details of whether linked lists or bitmaps are used to keep track of free storage and how many sectors there are in a logical block are of less interest, although they are of great importance to the designers of the file system.

  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值