Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
một vài hướng dẫn trong khi nó đang cập nhật biến hoặc danh sách. Nếu một ngắt xảy ra trong khi danh sách của các quá trình sẵn sàng, ví dụ, trong một trạng thái không phù hợp, điều kiện chủng tộc có thể xảy ra. Kết luận là: vô hiệu hóa ngắt thường là một kỹ thuật hữu ích trong hệ điều hành riêng của mình nhưng không phải là | 2 Simpo PDF Merge and Split Unregistered Version - http www.simpopdf.com When the driver receives a message to read or write a block it just computes where in the RAM disk memory the requested block lies and reads from it or writes to it instead of from or to a floppy or hard disk. Ultimately the system task is called to carry out the transfer. This is done by phys_copy an assembly language procedure in the kernel that copies to or from the user program at the maximum speed of which the hardware is capable. Figure 3-20. A RAM disk. Main Memory RAM User programs RAM disk Operating system of RAM block 0 A RAM disk driver may support several areas of memory used as RAM disk each distinguished by a different minor device number. Usually these areas are distinct but in some fairly specific situations it may be convenient to have them overlap as we shall see in the next section. Page 273 3.6.2. Overview of the RAM Disk Driver in MINIX 3 The MINIX 3 RAM disk driver is actually six closely related drivers in one. Each message to it specifies a minor device as follows 0 dev ram 2 dev kmem 4 dev boot 1 dev mem 3 dev null 5 dev zero The first special file listed above dev ram is a true RAM disk. Neither its size nor its origin is built into the driver. They are determined by the file system when MINIX 3 is booted. If the boot parameters specify that the root file system is to be on the RAM disk but the RAM disk size is not specified a RAM disk of the same size as the root file system image device is created. A boot parameter can be used to specify a RAM disk larger than the root file system or if the root is not to be copied to the RAM the specified size may be any 2 Simpo PDF Merge and Split Unregistered Version - http www.simpopdf.com 3 value that fits in memory and leaves enough memory for system operation. Once the size is known a block of memory big enough is found and removed from the memory pool by the process manager during its initialization. This strategy makes it .