Operating Systems Sample Questions and Answers

Institution: College

Course: ICT

Content Category: eBooks

Posted By: Nocher

Document Type: PDF

Number of Pages: 16

Price: KES 30
Buy with Email    Buy via WhatsApp
    

Views: 443     Downloads: 2

Summary

Operating Systems Sample Questions and Answers.

1. Describe the two general roles of an operating system, and elaborate why these roles are
important.
The first general role of an operating system is to provide an ABSTRACTION layer for software to run on
a machine without needing to know hardware-specific implementation details. It is important in order to
reduce the burden on application software developers, extend the basic hardware with added
functionality and provided a common base for all applications. The second general role of an operating
system is to provide RESOURCE MANAGEMENT to the machine’s users, by ensuring progress,
fairness and efficient usage of computing resources.
2. Using a simple system call as an example (e.g. getpid, or uptime), describe what is
generally involved in providing the result, from the point of calling the function in the C
library to the point where that function returns.
A system call is completed as follows:
- As the function is called, an interrupt of the type “software exception” is placed on the processor,
causing a Context Switch to take place between the calling function and the kernel.
- The exception handler will clear out and save user registers to the kernel stack so that control may be
passed on to the C function corresponding to the syscall.
- The syscall is executed.
- The value(s) returned by the syscall is placed into the correctly corresponding registers of the CPU (the
same ones that a user function normally places its return values in).
- The handler takes this value, restores user registers and returns said value to the user programme that
called it.
...............................


Below is the document preview. Purchase to access the complete document.

  • 11395_0.jpg
  • 11395_1.jpg
  • 11395_2.jpg
........

This is the end of this document preview. Buy to download the complete document.


More Resources



View all resources