4003-440 and 4003-713 Operating Systems Homework #2 Due December 18, 2006 Name: ___David Oguns____________________________Section: ___02_____________________ 1. List five services provided by an operating system that are designed to make it more convenient for users to use the computer system. In what cases it would be impossible for user-level programs to provide these services? Explain. User interface, I/O operations, file system manipulation, communications, error detection. If the service require kernel mode access to hardware like a hard disk main memory access, user level programs could never provide the service because they do not have kernel mode. They would have to make system calls to accomplish the task. 2. What is the purpose of the command interpreter? Why is it usually separate from the kernel? Would it be possible for the user to develop a new command interpreter using the system-call interface provided by the operating system? The purpose of the command line interpreter is to allow the user to perform certain operations or run programs simply by typing in commands. It is usually separate from the kernel so the user can choose what interpreter to use based on preference. The users could develop a new command interpreter using system calls because that is how they are made. A command interpreter is simply program that forward commands and arguments to the necessary programs, or make the necessary system calls directly. 3. In what ways is the modular kernel approach similar to the layered approach? In what ways does it differ from the layered approach? A modular kernel is similar to the layered approach in that modifying one part of the kernel does not affect the other parts. As long as the interface of a certain section(or layer) stays the same, the other’s do not have to be chanced. The parts are loosely coupled. A modular kernel differs from a layered approach in that there is less overhead in making a call to a lower level part of the kernel. The call doesn’t have to jump through numerous layers before work gets done and parts are aware of any other parts of the kernel and not just what is below them. 4. What is the relationship between a guest operating system and a host operating system in a system like VMware? What factors need to be considered in choosing the host operating system? A host operating system is the operating system that is in direct communication with the hardware. It has direct hardware access to kernel mode and all of the devices on the physical machine. The guest operating system runs on top of a virtualization layer and all of the physical devices are virtualized. A host operating system should be as modular and thin as possible to allow the virtualization of the hardware to be as close to the physical hardware as possible, and so that dependencies that exist in the host operating don’t restrict operation in the guest operating system. 5. What is the main advantage for an operating-system designer of using a virtualmachine architecture? What is the main advantage for a user? There is complete protection of various system resources because it is completely isolated. The designer can make changes without worry that they will destroy the machine and render it unusable to others. For a user, this means that the applications they run will work on any hardware the virtual machine is available for.