1. LPU MCA Semester 1
  2. CAP366
  3. Unit 1

CAP366 · Unit 1: Introduction to operating systems

System components and operating system services

11 practice questions · in the MTE and ETE syllabus

Key points

  • Services: execution, I/O, files, communication, error detection
  • Resource allocation, accounting and protection serve the system
  • Microkernel moves services to user space
  • Microkernel costs more message passing

OS services help users and also keep the system efficient.

For the user: user interface, program execution, I/O operations, file-system manipulation, communication (shared memory or message passing), error detection. For efficient operation: resource allocation, accounting, protection and security.

Kernel structures

DesignIdeaTrade-off
MonolithicEverything in the kernelFast, harder to maintain
LayeredLayers call only the layer belowClean, some overhead
MicrokernelMinimal kernel; file system, drivers in user spaceSafer/portable, more message passing

Example: a read in a microkernel goes user program, then file-server process, then driver process, by messages, so it costs more context switches than a monolithic kernel's single system call.

Exam pitfall: compiling programs is not an OS service, and the kernel is not the same as the GUI or utility programs. In a microkernel the file system lives in user space.

Try two questions

Question 1 · Tier 4, Analyse

Which OS function exists mainly to keep the system itself efficient rather than to help a user program directly?

  1. Program execution by loading and running a program
  2. I/O operations on devices on behalf of a program
  3. File-system manipulation for reading and writing files
  4. Resource allocation among concurrent jobs
Show the answer

D. Resource allocation, accounting and protection serve system efficiency and fairness, whereas execution, I/O and file services directly help programs.

Why not A: Loading and running programs is a direct service to the user.

Why not B: Performing I/O for a program is a direct user-helpful service.

Why not C: File access is a service the program asks for directly.

Question 2 · Tier 3, Apply

A program needs to read the bytes of a file named notes.txt. Which OS service does it request?

  1. Inter-process communication service
  2. File-system manipulation service
  3. Error detection service
  4. Accounting service
Show the answer

B. Reading, writing, creating and deleting files and directories is the file-system manipulation service.

Why not A: Communication services move data between processes, not read stored files.

Why not C: Error detection reports faults such as device failures; it does not read files.

Why not D: Accounting only records which users consume which resources.