Operating Systems Structures and Processes Flashcards

1
Q

What are the key services provided by an OS?

A
  • UI: CLI, GUI
  • Program Execution: Loads and runs programs
  • I/O Operations: Manages devices
  • File-System Manipulation: Creates/deletes files, enforces permissions
  • Communication: Shared memory or message passing between processes
  • Error Detection: Handles hardware/software errors
  • Resource Allocation: Manages CPU, memory
  • Accounting & Security: Tracks usage and enforces access control
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a system call?

A

A programming interface to request OS services (e.g. open(), fork())

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are parameters passed to system calls?

A

Via registers, memory blocks or the stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Compare Windows and Unix system calls

A
  • Windows: CreateProcess(), ReadFile()
  • Unix: fork(), read()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the parts of a process?

A
  • Text: Code + program counter
  • Stack: Temporary data
  • Data: Global variables
  • Heap: Dynamically allocated memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the process states?

A
  • New: Created
  • Ready: Waiting for CPU
  • Running: Executing
  • Waiting: Blocked
  • Terminated: Finished
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is stored in a PCB?

A

Process state, PC, registers, scheduling info, memory limits, I/O status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the key queues in process scheduling?

A
  • Job Queue: All processes
  • Ready Queue: Processes in memory ready to execute
  • Device Queue: Processes waiting for I/O
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Compare short-term and long-term schedulers

A
  • Short-term: Selects next process for CPU (frequent, fast)
  • Long-term: Controls multiprogramming by loading processes into memory (infrequent, slow)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Process Lifecycle example

A
  1. Ready -> Running: Dispatched by short-term scheduler
  2. Running -> Waiting: I/O request or event wait
  3. Waiting -> Ready: I/O completion
  4. Running -> Terminated: Process exits
How well did you know this?
1
Not at all
2
3
4
5
Perfectly