Q25, Q26, Q31: system-call interface and APIs
Operating System Services and Structures
OS services, command-line, GUI and touch interfaces, system calls and APIs (POSIX, Win32, Java), parameter passing, types of system calls, and OS structures: monolithic, layered, microkernel, modules and hybrid systems.
How to read this page
Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.
All 27 slides
- 1 Chapter 2
- 2 Outline of this lecture
- 3 Objectives
- 4 Operating System Services
- 5 Additional Operating System Functions
- 6 A View of Operating System Services
- 7 User Operating System Interface - CLI
- 8 Bourne Shell Command Interpreter-
- 9 User Operating System Interface - GUI
- 10 Touchscreen Interfaces
- 11 The Mac OS X GUI
- 12 System Calls
- 13 System Call Implementation
- 14 API – System Call – OS Relationship
- 15 System Call Parameter Passing
- 16 Passing of Parameters As A Table
- 17 Types of System Calls
- 18 Examples of Windows and Unix System Calls
- 19 Standard C Library Example
- 20 Operating System Structure
- 21 Linux System Structure
- 22 2. Layered Approach
- 23 3. Microkernel System Structure
- 24 Microkernel System Structure
- 25 Modules
- 26 Hybrid Systems
- 27 Operating-System Debugging
User Operating System Interface - CLI
Notes
CLI (command interpreter / shell) reads and runs commands; GUI uses windows and a mouse; touch interfaces use gestures.
System Calls
Notes
System calls are the programming interface to OS services; programs usually reach them through an API (Win32, POSIX, Java API).
Trap The JVM is not a system-call API; the Java API is.
Exam angle
The API that Unix-like systems give programmers is:
The three most common APIs for system calls include all EXCEPT:
API – System Call – OS Relationship
Notes
The system-call interface uses a table indexed by system-call number; the caller doesn’t need to know how it is implemented.
System Call Parameter Passing
Exam angle
Which is NOT a way to pass parameters to a system call?
Types of System Calls
Exam angle
Q24, Q27: fork() and system-call categories
Which system call creates a process in UNIX?
- exec() replaces the program in an existing process.
Standard C Library Example
Notes
printf() is a C library function that eventually calls the write() system call; it is not itself a system call.
Exam angle
Q29, Q30: printf and calling system calls directly
printf() in C is a system call.
- It is a library function that invokes write().
2. Layered Approach
Notes
Layered: layer 0 = hardware … layer N = UI; each uses only the layers below. Advantage: easy debugging and maintenance. Disadvantage: hard to define layers, overhead.
Exam angle
Q33: advantage of layering
Give one advantage of the layered approach.
Compare with the model answer
Simple construction and debugging: each layer is debugged on top of already-verified lower layers, so an error is found in the layer being tested; layers can also be changed independently.
Microkernel System Structure
Notes
Microkernel: move most services into user space; communicate by message passing. + easier to extend, port, more reliable and secure. − message-passing overhead.
Exam angle
Q28, Q32: microkernel location and disadvantage
In a microkernel OS, most OS functionality runs:
Give one disadvantage of the microkernel approach.
Compare with the model answer
Performance overhead: user-space services communicate through the kernel by message passing, which costs extra copies and context switches.
Hybrid Systems
Notes
Hybrid systems mix structures: Linux/Solaris monolithic + modules; Windows mostly monolithic + microkernel parts; macOS/iOS Mach + BSD.