1 / 30

MINIX

MINIX. Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk. MINIX Presentation Summary. Overview MINIX Trivia Processes Input/Output Memory Management File Systems. MINIX Overview.

hallowell
Download Presentation

MINIX

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk

  2. MINIX Presentation Summary • Overview • MINIX Trivia • Processes • Input/Output • Memory Management • File Systems

  3. MINIX Overview • “MINIX is a free UNIX clone that is available with all the source code. Due to its small size, microkernel-based design, and ample documentation, it is well suited to people who want to run a UNIX-like system on their personal computer and learn about how such systems work inside. It is quite feasible for a person unfamiliar with operating system internals to understand nearly the entire system with a few months of use and study. “

  4. MINIX Overview (cont.) • “MINIX has been written from scratch, and therefore does not contain any AT&T code--not in the kernel, the compiler, the utilities, or the libraries. For this reason the complete source can be made available (by FTP or via the WWW).“

  5. MINIX Trivia • Written by Andrew S. Tanenbaum in 1987 • Modeled after UNIX version 7 • 12,649 lines of code, with over 3,000 comments • Written in C

  6. Processes • Overview • Processes fall into four different “layers” • Process management • I/O tasks • Server Processes • User Processes

  7. Processes (cont.) • Internal Structure of a process • Process Control Block: • No data structure specifically called the “process control block” • The process control block is an entry in the process table

  8. Processes (cont.) • Process Management • Occurs in layer 1. • All processes are stored in a tree with the init process at the root

  9. Processes (cont.) • Inter-process Communication • Is handled by the kernel • A process sends a destination and a message to the kernel, which then copies the message to destination process • A process must be waiting for the message in order to recieve

  10. Processes (cont.) • Process Scheduling • Hybrid round-robin/priority scheduler • The system sets a time quantum for every process • There are three priority settings for every process

  11. Input/Output Overview: • Interrupt Handlers • Device Drivers • Device-Independent Software • User-Level Software • Deadlock Handling

  12. User Processes Device-independent software Device drivers Interrupt handlers Hardware I/O Request I/O Reply

  13. Input/Output (cont.) • Interrupt Handlers: • Eventually handled by coding stored in mpx88.s • Saves contents in the registers of the current process • Creates a message and calls the interrupt process • After checking for the ability to send the message, the message is sent to the accepting device

  14. File System User Process Device Driver Input/Output (cont.) • Device Drivers: Processes

  15. Input/Output (cont.) • Device-Independent Software: • Uniform interfacing for the device drivers • Device naming • Device protection • Providing a device-independent block size • Buffering • Storage allocation on block devices • Error Reporting

  16. Input/Output (cont.) • User-Level Software: • Library procedures present • Ability to make system calls • Ability for conversions/formatting of text • No spooling/daemons present in the system

  17. Input/Output (cont.) • Deadlock Handling: • No dedicated I/O devices • Deadlocks occur only with implicitly shared resources • Deadlock is ignored

  18. Memory Management • Structure • Records holes • First Fit • Reasoning • Structured for a personal computer • Able to port with other systems • Memory Layout • Not located in Kernel • Message Handling • Messaging system used to communicate between memory manager and kernel

  19. File System • Responsible for mapping logical file onto physical drive • Allocates space • Manages free space • Provides file protection • Self contained C program • Can be stored on any block device (floppy, hard drive, etc.) • Can be used as a network file server

  20. File System (Cont.) • Accepts 29 different messages • How it works • Loops, waiting for a message • Uses message type to index procedure in a table • Runs procedure • Returns a value indicating failure or success

  21. File System (Cont.) • The components (always present) • Boot block • Super-block • I-node bit map • Zone bit map • I-node • Block

  22. File System (Cont.) Super block Zone bit map Block … Boot block I-node bit map I-nodes Data

  23. File System (Cont.) • Block • Manageable pieces of a file that may or may not be contiguous • Standard size is 1K • Synonymous with zone when both are the same size (standard is 1K for block and zone)

  24. File System (Cont.) • I-node • Each I-node is associated with a single file • Contains information about the file, such as owner, file size, and date modified • Stores the first 7 disk block numbers • Stores pointers to other blocks if there are more than 7 • With 1K blocks and 16-bit addresses, can store up to 64M

  25. File System (Cont.) • I-node (cont.) • Read into I-node table when a file is opened • Only one I-node in the table, no matter how many instances of the file are open • A counter in the table is used to keep track of how many instances of the file are opened • Modifications are written to disk when the counter reaches 0

  26. File System (Cont.) • Boot block • Very first thing in file system • Read into memory when the computer is first booted • Present even if the device is not bootable

  27. File System (Cont.) • Super-block • Describes the layout and structure of the file system (number of I-nodes, max. file size, etc.) • On boot or mount, read into the super-block table • Stores information not in the super-block, such as originating device

  28. File System (Cont.) • I-node / zone bit map • Read into memory on boot or mount • When a file is deleted, pointer array is used to find I-node in bit map, and bit is set to 1 • When a file is created, searches through bit map to find a free I-node • If no free I-nodes, a value of 0 is returned (I-node 0 is never used)

  29. File System (Cont.) • Directory structure • Root directory • Paths are looked up one directory at a time • Protection • Read, write, and execute bits • Owner, owner’s group, and others

  30. MINIX: Conclusion • Multi-user, multi-tasking, single threaded • Ignores deadlock • 3 levels of I/O: interrupt handling, device drivers, device-independent software • Memory managed in a sorted list of holes • 6 parts of file system: boot block, super-block, I-node bit map, zone bit map, I-nodes, blocks

More Related