[COMPANY NAME] | [Company address]


disk drives. the kernel translates it into instructions for the CPU or other electronic components of the computer to execute. The kernel resides at the core of a computer operating system.Question 1 i. and managing storage. [6marks] . VM allows users to extend the use of physical memory by disk it also allows users to have memory protection. Explain the concept of virtual memory and why it is useful. It also provides an interface identical to the underlying bare hardware. such as the central processing unit. What is an Operating System Kernel and where does is reside within the computer system? Justify why the Kernel resides where it does. and describe how they could be used together to protect the operating system. The kernel makes it possible for software to interact with the hardware of the operating system. iv. and communication resources. because each virtual address is translated to a physical address. [2marks] An operating system kernel is a computer program that serves as an intermediary layer between the hardware and the application programs. Its core functions (1) manage the computer's resources. ii. Name three hardware aids for writing an operating system. when a service request is received. iii. Writing an operating system that can operate without interference from malicious or undebugged user programs requires some hardware assistance. (2) establish a user interface. memory. [5marks] An Operating Systems is a collection of software that directs a computer's operations. input/output. [2marks] Virtual memory is a memory management technique that is implemented using hardware and software. Define an Operating Systems and explain two (2) of its core functions in a computer system. controlling and scheduling the execution of other programs. and printers.

Differentiate between User goals and System goals when designing Operating Systems. Question 2 i. and one that is executed on behalf of the user. Memory protection with base and limit registers. This protection is accomplished by the CPU hardware comparing every address generated in user mode with the registers. Before turning over control to the user. the limit register contains the size of the range. [4marks] User goal Convenience Security Speed Reliability User-friendliness Ease of learning Fault tolerant Usability System goal Ease of design implementation . 1: user mode. the operating system ensures that the timer is set to interrupt. If the timer interrupts. Any attempt by a program executing in user mode to access monitor memory or other user’s memory results in a trap to the monitor. The base register holds the smallest legal physical memory address. Monitor/user mode With the mode bit. which treats the attempt as a fatal error. 0: monitor mode. control transfers automatically to the operating system d. which would ensure that the operating system maintains control. Timer c.a. We can use the timer to prevent a user program from running too long. b. we are able to distinguish between a take that is executed on behalf of the operating system.

[5marks] The separation of mechanism and policy is important to provide flexibility to a system. caching is used to improve application performance (TechTarget. to increase its efficiency or to move to a new platform. the same mechanism can be used to implement a variety of policies. if interfaces between these two are vague or not well-defined. Why is caching an important principle is computing? [2marks] Since almost all application workload is dependent upon I/O operations. 2015) The main reason cache is important is that it increases the real speed of a processor by providing the processor with data more quickly. [4marks] Direct memory access is a feature of computer systems that allows certain hardware subsystems to access main system memory (RAM) independently of the CPU. iv. without changing the overall policy iii. Second. it might involve much deeper change to the system.Maintenance Portability Minimum number of errors Adaptability Well-defined Interfaces ii. A processor can only crank through data if it is being given data and any delay that exists between when the processor requests data and when the processor receives it means that clock cycles are being left idle which could have otherwise been used. the mechanism can be changed for example. If the interface between mechanism and policy is well-defined. but just a change in parameters for that mechanism from a library of mechanisms. so changing the policy might not require the development of a new mechanism. QUESTION 3 . What is direct memory access (DMA)? For what types of operations is DMA useful? Explain your answer. the change may affect only a few parameters. On the other hand. Once the policy has been decided it gives the programmer the choice of using his/her own implementation. separating these two policies provides flexibility in a variety of ways. It eliminates the need for the CPU to be involved in the transfer. DMA is useful for transferring large quantities of data between memory and devices. First. Explain using an example why separation of policy from mechanism is an important design principle for Operating Systems. Specifically. allowing the transfer to complete more quickly and the CPU to perform other tasks concurrently.

write() b. [10marks] When you install a 32-bit operating system on a 64-bit computer. ii. the effect is an instant conversion of a 64-bit processor to a 32-bit processor. even if there is more memory installed. Computer system performance may be affected by the Operating System version which sits on top of hardware. read() iii. Discuss. [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.i.  Hardware memory such as video memory will consume a portion of the addressable memory instead of being moved above it or having RAM remapped around the hardware memory addresses. Examples of system calls include: a.  The amount of physical memory that can be accessed drops to 4 GB. State one (1) advantage and one (1) disadvantage of symmetric and Asymmetric multiprocessing [2marks] Symmetric multiprocessing Advantage A symmetric cryptosystem uses password authentication to prove the receiver’s identity.  All other software you wish to run on the system must be 32-bit and will be constrained by these same parameters. hence all native math functions are similarly limited regarding their range and precision. Disadvantage Treats all processes as equal and I/O can be processed on any CPU. Asymmetric Advantage The primary advantage of public-key cryptography is increased security: the private keys do not ever need to be transmitted or revealed to anyone .  All of the processor-level instructions are limited to using 32-bit registers..What are system calls? Give two (2) examples of system calls.

These libraries implement most of the functionalities of the operating system and do not requires kernel module's code access rights. Explain why. ii. Kernel provides the required abstraction to hide low level hardware details to system or application programs.Disadvantage A disadvantage of using public-key cryptography for encryption is speed there are popular secret-key encryption methods which are significantly faster than any currently available public-key encryption method. It consists of various modules and it interacts directly with the underlying hardware. Its purpose is to alert the operating system when a special event occurs so that it can suspend is current activity and deal appropriately with the new situation.  System Library − System libraries are special functions or programs using which application programs or system utilities accesses Kernel's features. as a sequence appropriate to the interruption is stated in its place. Operating system is interrupt driven. It is responsible for all major activities of this operating system.  System Utility − System Utility programs are responsible to do specialized. To effectively manage many processes the kernel makes use of interrupts. . Here the current sequence of instruction is temporarily suspended. individual level tasks. [4marks] An interrupt is a signal from a device attached to a computer or from a program within the a computer that causes the main program that operates the operating system to stop and figure out what next to do. QUESTION 4 i. This signal to a processor indicating that an asynchronous event has occurred. [4marks] Linux Operating Linux Operating System has primarily three components  Kernel − Kernel is the core part of Linux. Discuss the structure of one Operating System example.

This code represents a single process. POSIX. such that older applications may run on newer versions of Windows using an executable-specific setting called “Compatibility Mode. Microsoft has shown a strong commitment to a backward compatible API. particularly within the windows API (Win32) library. Linux and Berkeley Software Distribution are examples of operating systems that implement the POSIX APIs. provides protected access to hardware to processes. What is the role of application program interface (APIs) and why use APIs rather than making direct system calls to the kernel?[3marks] Role of application program interface: Operating Systems An API can specify the interface between an application and the operating system. executes in single address space and do not require any context switch and hence is very efficient and fast. Design an interrupt timeline and describe what happens at each stage on the . Kernel runs each processes and provides system services to processes. iv. iii.Kernel Mode vs User Mode Kernel component code executes in a special privileged mode called kernel mode with full access to all resources of the computer. for example. specifies a set of common APIs that aims to enable an application written for a POSIX conformant operating system to be complied for another POSIX conformant operating system.

for a single I/O device. This is the peak for I/O device. The CPU curve shows a peak when the transfer is done because the CPU is notified by the device through an interrupt (Stack Exchange Inc. It goes back to idle when the transfer is done until the next request.timeline. References . 2016). It goes from idle to transferring. [4 marks] An I/O device (controller) is busy transferring data from the device buffer to the device.

(2015. "Open Source Standardization: The rise of Linux in the network era"(pdf). (2016). Jason (2001).com/ http://www. technology and Policy. POSIX Programmer's Guide (pdf).com: http://www.com https://www.com Stack Exchange Inc.umd.com: https://www.1. April).Retrieved 2 August 2016.Springer. (1991). MakeUseOf. Retrieved from techopedia. (n.p.cs.html http://www. Retrieved from http://unix.14 (2):88112. Inc.).allinterview.com TechTarget.com/ Shankar. Joel. Retrieved from searchstorage.techtarget: searchstorage.slideshare. (2016).com http://www. O'Reilly and Associates. Lewine. Retrieved from ALLInterview.stackexchange.techopedia. Donald A.makeuseof.com Techopedia Inc.edu/class/sum2003/cmsc311/Notes/Memory/virtual. Retrieved from http://www.tutorialspoint. (2016).compiletimeerror.brighthub.net/MELJUN2009/meljun-cortes-operating-system . Retrieved 2 August 2016.com http://www.West. Knowledge. Dedrick.techtarget.d.

. .