<!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>Hello:</DIV>
<DIV> </DIV>
<DIV>Druing the implementation of the MrsP. I need to build the ceiling for each
cpu. All the tasks' priority lower than the ceiling are not allowed to execute.
So the following situation may occur: one task holds the ceiling but is blocked
by waiting resource. There are some normal tasks which are
not waiting for resource in that cpu. They are not allowed to execute
because their's priorities are lower than the ceiling. That means this cpu is
idle eventhough there are some tasks are ready to execute. In that situation,
how can I deal with the logic inside the pfp_schedule(). Can I set the next as
NULL to set the cpu in idle state?</DIV>
<DIV>Another question is about the cpu_ceiling. In the multiprocessor
environment, different semaphores can be allocated to different processors,
which can update the loacl cpu ceiling. How can I deal with such data
transmission between different semaphore and different processors? Add the
structure mrsp_semaphore and mrsp_state into the pfp_domain_t or you have other
effective solution? </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> </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-07
<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-04 11:33</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 03 Oct 2016, at 16:00, shijunjie92 <shijunjie92@gmail.com> wrote: </DIV>
<DIV>> </DIV>
<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> </DIV>
<DIV>I’m not sure I understand. If a task is spinning, it can't be suspended, so it will be in the ready queue. If it is truly blocked, then it is not spinning and must not be in the ready queue. </DIV>
<DIV> </DIV>
<DIV>If you want to keep around pointers to suspended tasks in the scheduler’s data structures, then make sure you clear those pointers if the task happens to terminate while it is suspended. </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>