Question 1: (23 marks) 1. Operating Systems vary in terms of design and structure. Discuss any Three (3) Operating System structures, stating scenarios that best suite each of the design and structure of choice. 9 marks Simple Structure: Many operating systems do not have clearly described structures. The simple structured system started as small, undemanding, and restricted systems and then grew beyond their original scope. MS-DOS is an example of such a system. It was written to provide the most functionality in the least space, so it was not carefully divided into independent units.
In this structure application programs are able to access the basic I/O routines to write directly to the display and disk drives.Layered Approach: With proper hardware support, operating systems can be broken into pieces that are smaller and more appropriate than those allowed by the original MS-DOS and UNIX systems. The operating system can then retain much greater control over the computer and over the applications that make use of that computer. Implementers have more freedom in changing the inner workings of the system and in creating modular operating systems. Under a top-down approach, the overall functionality and features are determined and are separated into components. Information hiding is also important, because it leaves programmers free to implement the low-level routines as they see fit, provided that the external interface of the routine stays unchanged and that the routine itself performs the advertised task.
- Thesis Statement
- Structure and Outline
- Voice and Grammar
Microkernel: We have already seen that as UNIX expanded, the kernel became large and difficult to manage. In the mid-1980s, researchers at Carnegie Mellon University developed an operating system called Mach that modularized the kernel using the microkernel approach. This method structures the operating system by removing all nonessential components from the kernel and implementing them as system and user-level programs. The result is a smaller kernel. There is little consensus regarding which services should remain in the kernel and which should be implemented in user space. Typically, however, microkernels provide minimal process and memory management, in addition to a communication facility.2. Differentiate between User goals and System goals when designing Operating Systems.
4marksUser goals; are obvious properties in the system that a user expects to be convenient to use, easy to learn and to use, reliable, safe, and fast. While System goals; operation system should be easy to design implement and maintain as well as flexible, reliable, error-free and efficient. 3. Explain using an example why separation of policy from mechanism is an important design principle for Operating Systems.
5marks Policies are ways to choose which activities to perform. Mechanisms are the implementations that enforce policies, and often depend to some extent on the hardware on which the operating system runs. For instance, a processes may be granted resources using the first come, first serve policy. This policy may be implemented using a queue of requests. Often the kernel provides mechanisms that are used to implement policies in servers.4.
We have stressed the need for an Operating System to make efficient use of the computing hardware. Why is it appropriate for the Operating System to abide by this principle and not “waste” resources? Why is it appropriate sometimes for the Operating System to forsake this principle and “waste” resources? 5marksIt may be appropriate for operating systems to forsake the principle to make efficient use of the computer hardware and waste resources in case of single-user systems. In such systems, the use of computer resources must be maximized for the user.
Such a system is not really wasteful because although a graphical user interface may waste CPU cycles, but by maximizing the use of the system, it optimizes the user’s interaction with the system. Question 2: (25 marks) 1. Operating system design may influence the design of application programs and similarly application program design might affect the design of an Operating System.
Discuss. 10marks 2. List Five (5) services provided by an operating system, and explain how each creates convenience for users. In which cases would it be impossible for user-level programs to provide these services? Explain your answer. 10marksProgram execution. The system must be able to load a program into memory and to run that program.
The program must be able to end its execution, either normally or abnormally (indicating error).Resource allocation. When there are multiple users or multiple jobs running at the same time, resources must be allocated to each of them.
The operating system manages many different types of resources. Some (such as CPU cycles, main memory, and file storage) may have special allocation Code, whereas others (such as I/O devices) may have much more general request and release code. For instance, in determining how best to use the CPU, operating systems have CPU-scheduling routines that take into account the speed of the CPU, the jobs that must be executed, the number of registers available, and other factors. Factors. There may also be routines to allocate printers, USB storage drives, and other peripheral devices.File-system manipulation. The file system is of particular interest.
Obviously, programs need to read and write files and directories. They also need to create and delete them by name, search for a given file, and list file information. Finally, some operating systems include permissions management to allow or deny access to files or directories based on file ownership.
Many operating systems provide a variety of file systems, sometimes to allow personal choice and sometimes to provide specific features or performance characteristics.I/O operations. A running program may require I/O, which may involve a file or an I/O device. For specific devices, special functions may be desired (such as recording to a CD or DVD drive or blanking a display screen). For efficiency and protection, users usually cannot control I/O devices directly. Therefore, the operating system must provide a means to do I/O.I/O operations. A running program may require I/O, which may involve a file or an I/O device.
For specific devices, special functions may be desired (such as recording to a CD or DVD drive or blanking a display screen). For efficiency and protection, users usually cannot control I/O devices directly. Therefore, the operating system must provide a means to do I/O. 3. Define the concept of virtual machine (VM). Suppose you get a virtual machine, VM2, running on the same hardware machine with that of your peer. What problems may affect your applications and that of your peer simultaneously? 5marksVirtual machine, guest operating systems and applications run in an environment that appears to them to be native hardware and that behaves toward them as native hardware would but that also protects, manages, and limits them.
Question 3: (22 marks)What are system calls? Give two (2) examples of system calls. 3marks System call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. This may include hardware-related services (for example, accessing a hard disk drive), creation and execution of new processes, and communication with integral kernel services such as process scheduling.Process control Device manipulation 2. What is the role of Application Program Interface (APIs) and why use APIs rather than making direct system calls to the Operating System kernel?3marks 3. Operating System is Interrupt Driven. What does this mean? Discuss scenarios that could trigger an interrupt, how various OS’s handles interrupts resulting in smooth program execution. 6marks 4.
There exist three (3) modes of I/O data transfer between CPU and memory. Discuss each mode, explicitly stating how it works using an example. Discuss two advantages and one disadvantage of each mode which led to the inception of its successor.10 marksReferenceshttp://www.cs.unc.edu/~dewan/242/s07/notes/intro/node15.htmlOperating systems concepts Abraham silbershataz, peter baer Galvin, Greg Gagne nine edition http://www.cs.unc.edu/~dewan/242/s07/notes/intro/node15.htmlhttps://github.com/Criviere/os/blob/master/Chapter1.md