CS计算机代考程序代写 compiler file system Week 5 – Part 2 – Exercise Questions

Week 5 – Part 2 – Exercise Questions

Question #1. Which service is not provided by an OS?

(a) File system manipulation (b) Memory management

(c) Process scheduling (d) Compilation of a program

Some of the services provided by an OS are file system manipulation, CPU scheduling, resource

allocation and memory management, I/O operations and error detection. Compilation of a program is
a service provided by a compiler – a computer program which translates (compiles) a source code
written in a high-level programming language into a low level programming language (object
code/machine language).

Question #2. Why system programmers use APIs instead of system calls?

Using APIs can be significantly easier than invoking the actual system calls directly. The
functions that make up an API typically invoke the actual system calls on behalf of the application
programmer. One of the main reasons for using APIs is to hide the implementation of the actual
system call, so that it can be changed or updated without affecting the users.

Question #3. Explain the difference between a microkernel and a monolithic kernel, provide one
example of each of both architectures and briefly explain the advantages and the limitations of the
microkernel architecture.

The difference between microkernel and monolithic kernel is that the microkernel-based

systems have OS services and kernel in separate address spaces, while the monolithic kernel-based
system has OS services and kernel in the same address space. In a monolithic kernel architecture, the
entire OS works in the kernel space and the services are included in the kernel. The advantages of a
microkernel architecture are that a failure in one component will not affect the other components and
it is easier to customise and to add new functionalities. The limitations of a microkernel are that it is
slower than a monolithic kernel and more code is required to write a microkernel. Example of
microkernel based operating systems are Mac OS X and Symbian. Examples of monolithic kernels are
Linux and BSD.