Preemptive Operating System Flashcards
What are 3 characteristics of reactive systems?
respond to external events, require real-time responses, and may require chain reaction among multiple processors
What is most important in an embedded system?
time
What is a task?
a functional description of a connected set of operations (can also mean a collection of processes)
What is a process?
a unique execution of a program
True or false: Only one copy of a program may run at one time?
false, several copies may run simultaneously or at different times
Fill in the blank: A process has its own _______.
state (registers, memory)
What manages processes?
the operating system
What does multiple tasks mean?
multiple processes
What do processes help with?
timing complexity
How do processes help with timing complexity?
multiple rates and asynchronous input
In multi-rate systems are tasks asynchronous or synchronous?
they can be both
Can synchronous tasks recur at different rates?
yes
Processes run at different rates based on what?
computational needs of tasks
What is an example of tasks with differing rate requirements?
in engine control: spark control, crankshaft sensing, fuel/air mixture, oxygen sensor, and Kalman filter
How do real-time systems conform to external timing constraints?
performing computations
What are the 2 types of deadline frequencies?
periodic and aperiodic
What are 3 types of deadlines?
hard, soft, and firm
What is a hard deadline?
failure to meet deadline causes system failure
What is a soft deadline?
failure to meet deadline causes degraded response
What is a firm deadline?
late response is useless but some late responses can be tolerated
What is an example of a hard deadline application?
braking system control
What are examples of soft deadline applications?
web browsing, video loading
What are examples of firm deadline applications?
video conferencing, satellite-based surveillance
What is the release time?
the time at which the process becomes ready
What is a deadline?
the time at which the process must finish
What is a periodic process?
a process that executes in almost every period
What is an aperiodic process?
a process that executes on demand
Which type of process (periodic or aperiodic) is harder to analyze and why?
aperiodic because you must consider worst-case combinations of process activation
What is a period?
interval between process activations
What is the rate?
reciprocal of period (aka frequency)
Can the initiation rate be higher than the period?
yes, several copies of the process can run at once
What is the process execution time?
execution time in absence of preemption
What are the possible time units for process execution time?
seconds or clock cycles
What are some sources of variation for process execution time?
data dependencies, memory system, and CPU pipeline
What does it mean for a task to have a data dependency?
they must execute in a certain order
What do task graphs show?
data/control dependencies between processes
In the setting of task graphs, what is a task?
a connected set of processes
What is a task set?
one or more tasks
What is CPU utilization?
the fraction of the CPU that is doing useful work
What do we assume when we calculate CPU utilization?
that there is no scheduling overhead
How do you simply calculate CPU utilization?
(CPU time for useful work)/(total available CPU time)
What are the 3 states that a process can be in?
execution on the CPU, ready to run, or waiting for data
What does a task graph assume?
all tasks run at same rate and tasks do not communicate
In reality, do tasks communicate with each other?
yes some communication is necessary
What is interprocess communication (IPC)?
OS provided mechanisms so that processes can pass data
What are the 2 types of semantics for IPC?
blocking and non-blocking
What does blocking mean regarding IPC?
sending process waits for response
What does non-blocking mean regarding IPC?
sending process continues
What are some different IPC styles?
shared memory, message passing, and signal
What is the shared memory IPC style?
processes have some memory in common and must cooperate to avoid destroying/missing messages
What is the message passing IPC style?
processes send messages along a communication channel with no common address space
What is the signal IPC style?
similar to interrupt but a software creation and is generated by a process and passed by the OS
What problem can happen with shared memory?
race conditions
What is a critical region?
a section of code that cannot be interrupted by another process