<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type><!-- flashmail style begin -->
<STYLE type=text/css>
body {border-width:0;margin:0}
img {border:0;margin:0;padding:0}
</STYLE>
<BASE target=_blank><!-- flashmail style end -->
<META name=GENERATOR content="MSHTML 11.00.10570.1001"></HEAD>
<BODY 
style="BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 10.5pt; FONT-FAMILY: times new roman; BORDER-RIGHT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: #000000; MARGIN: 12px; LINE-HEIGHT: 1.5; BORDER-TOP-WIDTH: 0px" 
marginheight="0" marginwidth="0">
<DIV>So how can I let a task spinning on the processor when it is waiting for a 
resource rather than being preempted by a lower priority task?</DIV>
<DIV>1. Enqueue that blocked task in the ready queue and pick up the highest 
priority task as the next scheduled task</DIV>
<DIV>2. Let an 'empty' thread occupy the processor in the blocked task's 
priority to protect the process occupied by lower priority task</DIV>
<DIV>Which solution should I take? Could you give me some suggestion?</DIV>
<DIV> </DIV>
<DIV><STATIONERY>
<DIV>
<STYLE type=text/css>
body {
        font-size:12.1pt; font-family:simsun,serif;
}
</STYLE>
<!-- flashmail style begin -->
<STYLE type=text/css> <!--@import url(D:\网易闪电邮\\data\scrollbar.css); -->
blockquote {
        margin-top:0; margin-bottom:0; margin-left:2em;
}
body {
        padding:0; margin:0;
}
</STYLE>
<BASE target=_blank><!-- flashmail style end -->
<META name=GENERATOR content="MSHTML 11.00.9600.17207"><STATIONERY>
<DIV>
<STYLE type=text/css>
body {
        font-size:12.1pt; font-family:simsun,serif;
}
</STYLE>
<!-- flashmail style begin -->
<STYLE type=text/css> <!--@import url(D:\网易闪电邮\\data\scrollbar.css); -->
blockquote {
        margin-top:0; margin-bottom:0; margin-left:2em;
}
body {
        padding:0; margin:0;
}
</STYLE>
<BASE target=_blank><!-- flashmail style end -->
<META name=GENERATOR content="MSHTML 11.00.9600.16521"><STATIONERY>
<DIV>
<STYLE type=text/css>
body {
        font-size:12.1pt; font-family:simsun,serif;
}
</STYLE>
<!-- flashmail style begin -->
<STYLE type=text/css> <!--@import url(D:\网易闪电邮\\data\scrollbar.css); -->
blockquote {
        margin-top:0; margin-bottom:0; margin-left:2em;
}
body {
        padding:0; margin:0;
}
</STYLE>
<BASE target=_blank><!-- flashmail style end -->
<META name=GENERATOR content="MSHTML 11.00.9600.16521"><STATIONERY>
<DIV>
<STYLE type=text/css>
body {
        font-size:12.1pt; font-family:simsun,serif;
}
</STYLE>
<!-- flashmail style begin -->
<STYLE type=text/css> <!--@import url(D:\网易闪电邮\\data\scrollbar.css); -->
blockquote {
        margin-top:0; margin-bottom:0; margin-left:2em;
}
body {
        padding:0; margin:0;
}
</STYLE>
<BASE target=_blank><!-- flashmail style end -->
<META name=GENERATOR content="MSHTML 11.00.9600.16518"><STATIONERY>
<DIV>
<DIV 
style="WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,17); FONT: 13px Tahoma; LETTER-SPACING: normal; TEXT-INDENT: 2em; -webkit-text-stroke-width: 0px" 
align=right><FONT face="Times New Roman">Best Wishes!</FONT></DIV>
<DIV 
style="WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,17); FONT: 13px Tahoma; LETTER-SPACING: normal; TEXT-INDENT: 2em; -webkit-text-stroke-width: 0px" 
align=right><FONT face=宋体><I><BR></I></FONT></DIV>
<DIV 
style="WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,17); FONT: 13px Tahoma; LETTER-SPACING: normal; TEXT-INDENT: 2em; -webkit-text-stroke-width: 0px" 
align=right><FONT face=宋体><I><BR></I></FONT></DIV>
<DIV 
style="WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,17); FONT: 13px Tahoma; LETTER-SPACING: normal; TEXT-INDENT: 2em; -webkit-text-stroke-width: 0px" 
align=right><FONT face="Times New Roman"><I>You Sincerely!</I></FONT></DIV>
<DIV 
style="WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,17); FONT: 13px Tahoma; LETTER-SPACING: normal; TEXT-INDENT: 2em; -webkit-text-stroke-width: 0px" 
align=right><FONT face="Times New Roman"><B>SHI Junjie</B></FONT></DIV>
<DIV 
style="WHITE-SPACE: normal; WORD-SPACING: 0px; TEXT-TRANSFORM: none; COLOR: rgb(0,0,17); FONT: 13px Tahoma; LETTER-SPACING: normal; TEXT-INDENT: 2em; -webkit-text-stroke-width: 0px" 
align=right><FONT 
face="Times New Roman"></FONT> </DIV></DIV></STATIONERY></DIV></STATIONERY></DIV></STATIONERY></DIV></STATIONERY></DIV></STATIONERY></DIV>
<DIV> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; COLOR: #c0c0c0" 
align=left>2016-10-03 
<HR id=SignNameHR 
style="BORDER-TOP: #c0c0c0 1px solid; HEIGHT: 1px; BORDER-RIGHT: 0px; WIDTH: 122px; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px" 
align=left>
<SPAN id=_FlashSignName>shijunjie92</SPAN> </DIV>
<HR 
style="BORDER-TOP: #c0c0c0 1px solid; HEIGHT: 1px; BORDER-RIGHT: 0px; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px">

<BLOCKQUOTE id=ntes-flashmail-quote 
style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; PADDING-LEFT: 0px; MARGIN-LEFT: 0px">
  <DIV><STRONG>发件人:</STRONG>Björn Brandenburg <bbb@mpi-sws.org></DIV>
  <DIV><STRONG>发送时间:</STRONG>2016-10-03 13:00</DIV>
  <DIV><STRONG>主题:</STRONG>Re: [LITMUS^RT] How to handle the blocked task</DIV>
  <DIV><STRONG>收件人:</STRONG>"litmus-dev"<litmus-dev@lists.litmus-rt.org></DIV>
  <DIV><STRONG>抄送:</STRONG></DIV>
  <DIV> </DIV>
  <DIV>
  <DIV> </DIV>
  <DIV>> On 02 Oct 2016, at 18:44, shijunjie92 <shijunjie92@gmail.com> wrote: </DIV>
  <DIV>>   </DIV>
  <DIV>> I have noticed that, in the pfp_schedule(), only if the prev task is !block, it can be requeued.  </DIV>
  <DIV>> So what happen if the prev_task is blocked? which queue it blongs to? </DIV>
  <DIV>>   </DIV>
  <DIV> </DIV>
  <DIV>None. It suspends, so the scheduler doesn’t keep track of it any longer. A blocked task is most likely on some wait queue, but not necessarily so (see SIGSTOP). But that is not the scheduler’s concern.  </DIV>
  <DIV> </DIV>
  <DIV>- Björn </DIV>
  <DIV> </DIV>
  <DIV> </DIV>
  <DIV>_______________________________________________ </DIV>
  <DIV>litmus-dev mailing list </DIV>
  <DIV>litmus-dev@lists.litmus-rt.org </DIV>
  <DIV>https://lists.litmus-rt.org/listinfo/litmus-dev </DIV></DIV></BLOCKQUOTE></BODY></HTML>