You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lkmpg.tex
+2-1
Original file line number
Diff line number
Diff line change
@@ -1612,7 +1612,8 @@ \subsection{Sleep}
1612
1612
It can then proceed to set a global variable to tell all the other processes that the file is still open and go on with its life.
1613
1613
When the other processes get a piece of the CPU, they'll see that global variable and go back to sleep.
1614
1614
1615
-
So we will use \sh|tail -f| to keep the file open in the background, while trying to access it with another process (again in the background, so that we need not switch to a different vt).
1615
+
So we will use \sh|tail -f| to keep the file open in the background, and attempt to access it with another background process.
1616
+
This way, we don't need to switch to another terminal window or virtual terminal to run the second process.
1616
1617
As soon as the first background process is killed with kill \%1 , the second is woken up, is able to access the file and finally terminates.
1617
1618
1618
1619
To make our life more interesting, \cpp|module_close| does not have a monopoly on waking up the processes which wait to access the file.
0 commit comments