-
Notifications
You must be signed in to change notification settings - Fork 5
/
faqblockingio.html
100 lines (100 loc) · 6.11 KB
/
faqblockingio.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!-- received="Thu Jan 23 11:01:39 1997 PST" -->
<!-- sent="Thu, 23 Jan 1997 11:02:57 -0800" -->
<!-- name="David Brown" -->
<!-- email="[email protected]" -->
<!-- subject="re: blocking threads on Solaris" -->
<!-- id="[email protected]" -->
<!-- inreplyto="blocking threads on Solaris" -->
<!DOCTYPE html>
<title>advanced-java archive for 01/97: re: blocking threads on Solaris</title>
<h1>re: blocking threads on Solaris</h1>
David Brown (<i>[email protected]</i>)<br>
<i>Thu, 23 Jan 1997 11:02:57 -0800</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#811">[ date ]</a><a href="index.html#811">[ thread ]</a><a
href="subject.html#811">[ subject ]</a><a href="author.html#811">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0812.html">Matt R. MacKinnon: "re: blocking threads on Solaris"</a>
<li> <b>Previous message:</b> <a href="0810.html">Randy Chapman: "re: blocking threads on Solaris"</a>
<li> <b>Maybe in reply to:</b> <a href="0771.html">Matt R. MacKinnon: "blocking threads on Solaris"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0812.html">Matt R. MacKinnon: "re: blocking threads on Solaris"</a>
</ul>
<!-- body="start" -->
<i>> </i><br>
<i>> </i><br>
<i>> There are some certain bugs on the Solaris runtime (and the Liux runtime</i><br>
<i>> as well) that will cause the entire runtime to block on an IO. If it were</i><br>
<i>> to work correctly, only the calling thread would block.</i><br>
<i>> </i><br>
<p>
There is currently one bug in this area of green threads that we know about:<br>
reading from standard input (System.in.read()) will indeed block all green<br>
threads. The reason: green threads IO relies on making all fd's non-blocking,<br>
and it seems that if the runtime exits while file descriptor 0 is O_NONBLOCK<br>
the shell that exec'd the runtime dies (ugly). We're going to dork with this<br>
for FCS still.<br>
<p>
That one known bug pointed out: was this what you were referring to, or are<br>
their *other* bugs you've seen where the runtime blocks? With a reproducible<br>
test case perhaps?<br>
<p>
-Dave Brown<br>
<p>
<i>> --randy</i><br>
<i>> </i><br>
<i>> On Wed, 22 Jan 1997, Robert Nicholson wrote:</i><br>
<i>> </i><br>
<i>> > Correct me if I'm wrong but won't it only block all thread of the same or</i><br>
<i>> > lesser priority? Higher priority threads still get a crack? Unlike</i><br>
<i>> > WIN32 where is will timeslice b/w threads of the same and lesser priority?</i><br>
<i>> > </i><br>
<i>> > </i><br>
<i>> > On Wed, 22 Jan 1997, Matt R. MacKinnon wrote:</i><br>
<i>> > </i><br>
<i>> > > </i><br>
<i>> > > It is my understanding that a when a thread blocks</i><br>
<i>> > > on I/O under Solaris, it blocks all threads, not</i><br>
<i>> > > just the thread doing the I/O (JDK 1.0.2). </i><br>
<i>> > > </i><br>
<i>> > > Can someone confirm this for me? </i><br>
<i>> > > If I'm correct, is there any work-around? </i><br>
<i>> > > Is this fixed in 1.1 ?</i><br>
<i>> > > </i><br>
<i>> > > Thanks,</i><br>
<i>> > > Matt</i><br>
<i>> > > --------------------------------------------</i><br>
<i>> > > Matthew R. MacKinnon [email protected]</i><br>
<i>> > > Netsation Corp. <a
href="http://www.netsation.com">http://www.netsation.com</a></i><br>
<i>> > > [ for list faq/archive/add/deletes see <a
href="http://www.xcf.berkeley.edu/lists.html">http://www.xcf.berkeley.edu/lists.html</a>
]</i><br>
<i>> > > </i><br>
<i>> > </i><br>
<i>> > [ for list faq/archive/add/deletes see <a
href="http://www.xcf.berkeley.edu/lists.html">http://www.xcf.berkeley.edu/lists.html</a>
]</i><br>
<i>> > </i><br>
<i>> </i><br>
<i>> [ for list faq/archive/add/deletes see <a
href="http://www.xcf.berkeley.edu/lists.html">http://www.xcf.berkeley.edu/lists.html</a>
]</i><br>
<i>> </i><br>
[ for list faq/archive/add/deletes see <a
href="http://www.xcf.berkeley.edu/lists.html">http://www.xcf.berkeley.edu/lists.html</a> ]<br>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0812.html">Matt R. MacKinnon: "re: blocking threads on
Solaris"</a>
<li> <b>Previous message:</b> <a href="0810.html">Randy Chapman: "re: blocking threads on
Solaris"</a>
<li> <b>Maybe in reply to:</b> <a href="0771.html">Matt R. MacKinnon: "blocking threads on
Solaris"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0812.html">Matt R. MacKinnon: "re: blocking threads on
Solaris"</a>
</ul>