Priority Inheritance...
20/04/2018 10:46
Hello all, I just want to know whether i understand Priority Inheritance correctlyin QNX...

Let's say i'll have two threads T_high (priority = 255, RR) and T_low(priority =1, FIFO).

Both share a Mutex --> Mx T_low has acquired the Mx and now T_High is Ready and tries to takeMx....(and blocks) Now.....

Priority = 255; And since T_Low is FIFO scheduled it will block all other threads atpriority 255 !!! is it Priority Inversion at its best!!! Way out: Never have a low priority thread FIFO sch if u gonna share amutex with high priority thread....

I am on the right track....


Source is Usenet: comp.os.qnx
Sign in to add a comment

Answer score: 5
20/04/2018 10:46 - I meant... Am i on the right track :-)

Source is Usenet: comp.os.qnx
Sign in to add a comment

Answer score: 5
20/04/2018 10:46 - Well you apparently understood the priority inheritance protocolimplemented in QNX, but you did not understand priority inversion.

Two threads don't share a mutex for fun, a critical section has to besecured, so the behaviour you described can be regarded as programmingmistake.

Priority inversion means the following: - thread low_prio acquires mutex m- thread low_prio is preempted by thread high_prio- thread high_prio tries to acquire mutex m and blocks- thread low_prio runs again- thread low_prio is preempted by another thread mid_prio- thread mid_prio prevents thread low_prio from releasing the mutex andtherefore delays thread high_prio this cannot happen with priority inheritance Ciao, Fabian

Source is Usenet: comp.os.qnx
Sign in to add a comment

eDiscover
Helpforce eDiscover provides technical articles updated each dayHelpforce eDiscover RSS feed contains the latest technical articles in RSS
Click the logo to go back to the main page
Search eDiscover
  
Categories

Click an icon to go to that category

Helpforce eDiscover contains articles about Microsoft Windows Helpforce eDiscover contains articles about Apple products and MacOS Helpforce eDiscover contains articles about Linux and POSIX operating systems Helpforce eDiscover contains articles about Helpforce Helpforce has a large variety of technical information and articles for you to read Helpforce eDiscover contains articles about databases, MYSQL, SQL Server Oracle Helpforce eDiscover contains articles about Java, JVM and the JRE Helpforce eDiscover contains articles about the QNX operating system Helpforce eDiscover contains articles about Oracle Solaris and Open Solaris Helpforce eDiscover contains articles about RISC OS, Acorn and the BBC Micro Helpforce eDiscover contains articles about Amiga and AmigaOS

Type your comment into the box below