A1.3 Operating systems and control systems Flashcards

Operating systems and control systems (55 cards)

1
Q

Role of an operating system

A

Abstracts hardware complexity and manages system resources (CPU, memory, I/O, storage, devices) to provide a stable platform for applications.

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

Kernel vs user-space

A

Kernel performs privileged operations and manages hardware; user-space runs applications without direct hardware access.

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

System call

A

Mechanism by which user programs request services from the kernel (e.g., open file, allocate memory).

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

Main functions of an operating system

A

Process management, memory management, file system, device management, scheduling, security, GUI, virtualization, networking, accounting.

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

User interface vs programming interface

A

GUI/CLI are interfaces for users
APIs/system calls are interfaces for programs.

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

Process states

A

New, Ready, Running, Waiting (Blocked), Terminated - typical process lifecycle.

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

Context switch

A

Saving and restoring CPU state (registers, program counter) when switching processes; introduces overhead.

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

Preemption

A

Interrupting a running process to run a higher-priority one; essential for RTOS and fairness.

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

Purpose of process scheduling

A

Optimize CPU usage, ensure responsiveness, meet deadlines (in RTOS) and fairness between processes.

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

FCFS (First-Come First-Served) characteristics

A

Simple: tasks served in arrival order; drawback: convoy effect (long job blocks short ones).

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

Round Robin characteristics

A

Time-sliced scheduling (quantum) for fairness; quantum size affects latency and context-switch overhead.

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

Priority scheduling

A

Higher-priority processes run before lower-priority ones; risk of starvation for low-priority processes.

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

Multilevel queue scheduling

A

Processes are divided into queues (e.g., interactive, batch), each with its own policy and priority level between queues.

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

EDF (Earliest Deadline First)

A

Dynamic scheduling for real-time systems: job with closest deadline runs first.

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

RMS (Rate Monotonic Scheduling)

A

Static priority scheduling for periodic tasks: shorter period = higher priority, with schedulability guarantees under assumptions.

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

Comparing Round Robin vs Priority

A

RR: fairness and responsiveness for interactive tasks
Priority: better for time-critical tasks but requires starvation mitigation

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

Convoy effect explanation

A

A long job at the head of the queue delays many short tasks, reducing responsiveness.

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

What is an interrupt?

A

Hardware or software signal that temporarily halts CPU execution to run an interrupt handler.

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

Advantages of interrupts

A

Lower CPU overhead, immediate reaction to events, suitable for I/O and real-time tasks.

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

Polling - what and when

A

CPU repeatedly checks device status; simple but CPU-intensive; used when interrupts are unavailable or polling cost is acceptable.

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

Polling vs interrupts comparison

A

Polling: simple but wastes CPU
Interrupts: efficient and responsive but more complex to handle and manage context switching

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

Virtual memory concept

A

Mapping logical addresses to physical memory using pages, providing isolation and ability to use disk as extension of RAM.

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

Paging vs segmentation

A

Paging: fixed-size pages
Segmentation: logical segments of variable length (code, data, stack)

24
Q

Swapping and thrashing

A

Swapping: moving processes between RAM and disk
Thrashing: excessive swapping causing low throughput and high overhead

25
Memory allocation in RTOS constraints
Avoid unpredictable dynamic allocation; use static pools and deterministic algorithms to prevent jitter.
26
Device drivers role
Bridge between hardware and OS: configure devices, handle interrupts, perform data transfer, and expose safe APIs.
27
Race condition
Incorrect program behavior due to uncontrolled ordering of operations on shared data; requires synchronization.
28
Mutual exclusion
Mechanisms (mutexes, semaphores) to ensure only one thread/process executes a critical section at a time.
29
Benefits of multitasking
Better CPU utilization, responsiveness, ability to run multiple applications concurrently.
30
Challenges of multitasking
Synchronization, security, memory management, priority inversion, deadlocks, determinism in RTOS.
31
Resource management in OS
Allocate and free resources, accounting, policy enforcement, fairness and limits.
32
What is an RTOS?
A Real-Time Operating System designed to provide predictable, deterministic responses to events within strict timing constraints.
33
Determinism and jitter
Determinism: predictable response times; Jitter: variability in response times which degrades predictability.
34
Hard vs soft real-time
Hard: missing a deadline is catastrophic (e.g., airbag) Soft: occasional misses degrade quality but are tolerable (e.g., video streaming).
35
Priority-based preemptive scheduling in RTOS
Higher-priority tasks preempt lower ones to ensure critical tasks meet deadlines.
36
Timers and clocks in RTOS
Hardware timers schedule periodic tasks and measure deadlines; essential for deterministic behavior.
37
Control system components
Setpoint (desired value), sensor (measurement), comparator, controller, actuator, process output, feedback path.
38
Open-loop control
No feedback; controller sends commands without measuring the output. Simple but cannot correct disturbances.
39
Closed-loop control
Uses feedback to compare output with setpoint and adjusts control signals to minimize error.
40
Examples of open-loop and closed-loop systems
Open-loop: washing machine cycle based on time. Closed-loop: thermostat controlling room temperature.
41
Role of feedback
Reduces error between setpoint and output and improves robustness to disturbances.
42
Sensor function
Convert a physical quantity (temperature, pressure) into an electrical signal for measurement.
43
Factors affecting control stability
Loop gain, delays, sampling rate, and process dynamics; high gain or delays can destabilize.
44
Effects of delay and jitter
Delays and variable timing can introduce phase lag and oscillations, reducing stability and accuracy.
45
PLC (Programmable Logic Controller) - purpose
Ruggedized controller for industrial automation; programmable, reliable, tolerant to harsh environments.
46
SCADA - role
Supervisory control and data acquisition: gather telemetry, visualize processes, and control remote systems.
47
OS-control integration requirements
Predictable scheduling, bounded interrupt latencies, deterministic memory allocation, security and redundancy.
48
Example integration problem - OS delays
OS-induced delay in interrupt handler causes missed safety event (e.g., collision sensor) leading to unsafe behavior.
49
How OS can improve control precision
Priority critical tasks, minimize jitter, use DMA, hardware timers, and reduce dynamic allocation in critical paths.
50
OS security in ICS - methods
Network segmentation, authentication, encryption, monitoring, redundancy, and secure update mechanisms.
51
Consequences of poor security in ICS
Sabotage, process disruption, equipment damage, safety hazards, and financial loss.
52
RTOS in autonomous vehicles - example
RTOS ensures deterministic sensor handling (lidar, radar), motor control, and emergency braking within deadlines.
53
Compare open-loop vs closed-loop (short)
Open-loop: simple and cheap but cannot correct disturbances. Closed-loop: accurate and robust but more complex and costly.
54
Compare GPOS vs RTOS (short)
GPOS: designed for throughput and user experience; RTOS: designed for determinism and meeting deadlines.
55
Quick definition: Jitter
Variation in timing of events or responses that degrades deterministic behavior.