search

Home  >  Q&A  >  body text

ubuntu - 一个高优先级的任务向一个低优先级的任务发送消息时会发生什么情况?

这个低优先级的任务会不会接收这个消息呢?
系统会不会发生死锁?

PHP中文网PHP中文网2893 days ago786

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-04-24 09:14:40

    Whether low-priority tasks will receive messages and execute them depends on the specific scheduling algorithm and how the program is written, such as whether the priority is real-time or based on time slices, whether message sending is blocking or non-blocking, etc.
    As for whether a deadlock occurs, it should be definitely not a deadlock. Because the condition for a deadlock to occur must be that both tasks are waiting for each other, and if the high-priority task is blocked after sending a message, the low-priority task will definitely be scheduled for execution, and there will be no waiting for each other.

    reply
    0
  • Cancelreply