<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 3, 2020 at 1:32 AM Peter Dufault <<a href="mailto:dufault@hda.com">dufault@hda.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I finally have gotten to reviewing Utkarsh's work in GSOC.  One item that I don't like is that there is a linked list management of the threads that have access to the stack.<br>
I think this access is similar to the file descriptors that are blocked in a select call.  On a given architecture I don't know exactly how many file descriptors I can block, I don't know exactly what the FD_SET macro does, but I have access to multiple file descriptors through the FD_* macros.<br>
<br></blockquote><div> </div><div>Hello, thank you for the feedback. If I understand your suggestion correctly, we can specify a file descriptor set 'fd_set' and then register the stack attributes to this set, and then check for the 'current stack' through select() and FD_ISSET()?<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Using FD_SET and friends for specifying thread access could be a good model to specify which threads need access to which thread.<br></blockquote><div><br></div><div>My question is,  what benefit do we get by using FD_SET and friends? Ultimately we will have to iterate through the set to check for the 'current stack'. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
However, it won't scale infinitely.  Linked lists won't scale infinitely in real-time either.</blockquote><div><br></div><div>An optimization that I had in mind was to use the LRU model. This way we can mark the stack attributes of the last thread as 'not current' without iterating through the list or the set.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Peter<br>
-----------------<br>
Peter Dufault<br>
HD Associates, Inc.      Software and System Engineering<br>
<br>
This email is delivered through the public internet using protocols subject to interception and tampering.<br>
<br>
</blockquote></div></div>