OS Primitives: Overview#

Interrupts#

  • Interrupt lines (“interrupts”) referenced by numbers

  • Interrupt service routines (ISR) associated with those numbers

  • Called asynchronously

Spinlocks#

  • Used to protect short critical sections

  • On a multiprocessor, the locker spins until lock is free

Schedulable Context (Threads)#

  • Threads

  • Context switches

  • Blocking

  • Realtime priorities

  • Zephyr: cooperative (voluntary yield) or preemptive (timeslices)

Polling#

  • k_poll_signal_raise() jjj

Optional#

Deadlock Scenarios#

  • fifo, rr wiederholung jjj

  • prio inher jjj

  • prio inversion jjj

Random Stuff#

  • Terminlogy

    • isr, interrupt number

    • spinlock

    • mutex

    • scheduling, realtime

    • message queue

    • pipe

    • workqueue?

    • condition variables -> cannot be polled

    • poll

  • mutex

    • blocks, as opposed to spinlock

    • recursive

    • lock in isr bad

    • prio inher -> wtf?