260 likes | 822 Views
QNX Neutrino Microkernel System Architecture. 914396 林承昆 904363 方國州. Outline. Introduction Architecture overview Processes and Threads Message-passing system Conclusion. Introduction.
E N D
QNX Neutrino Microkernel System Architecture 914396林承昆 904363方國州
Outline • Introduction • Architecture overview • Processes and Threads • Message-passing system • Conclusion
Introduction • Neutrino is a microkernel implementation of the core POSIX features used in embedded real-time systems, alone with the fundamental QNX message-passing services
Architecture overview • Definition of “Microkernel” from QNX“A microkernel OS is structured as a tiny kernel that provides the minimal services used by a team of optional cooperating processes, which in turn provide the high-level OS functionality”
A true kernel should ONLY provide • Thread services • Signal services • Message-passing services • Synchronization services • Scheduling services • Timer services
Modularity of kernel • Kernel becomes open and easily extensible • Make it possible to “hot-plug” kernel components – HA (High availability)
Thread scheduling • The thread scheduler • schedules threads across processes • makes scheduling decision whenever the execution status of any thread changes • performs context switch from one thread to another whenever the running thread: • Is blocked • Is preempted • yields
Scheduling algorithm • FIFO scheduling • Round-robin scheduling • Adaptive scheduling • Sporadic scheduling
Sporadic scheduling • Normal priority (N) • Initial budget (C) • Low priority (L) • Replenishment period (T) T = 40 C = 10
Message-passing system • Synchronous message passing • The primary form of IPC in QNX and Neutrino • Other forms of IPC are built over this native message passing • Non-blocking pulses • Pulses are often used as a notification mechanism within interrupt handlers
Synchronous message passing • Channels and connections • Client connection map directly into file descriptors • The channel has three queues associated with threads • waiting for message • have sent a message that hasn’t yet been receive • have sent a message that has been received but not yet replied to
Synchronous message passing • Message copying • IOV (input/output vector) or pointer to buffer
Non-blocking pulses • Fixed size – four bytes for data and one plus a single byte code