📄 rse-pmt.ps
字号:
744 642 a 1010 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 1010 642 a Fw(Implementation)18b(Space)1010 642 y currentpoint grestore moveto 1010 642 a 1404 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 1404 642 a Fw(Thr)o(ead)g(Mapping)1404 642 y currentpoint grestore moveto 1404 642 a 1562 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 1562 642 aFw(Acti)o(v)o(e)h(De)o(v)o(elopment)1562 642 y currentpoint grestore moveto 1562 642a 1703 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 1703 642 a Fw(Experimental)f(State)1703642 y currentpoint grestore moveto 1703 642 a 1844 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 1844 642 a Fw(Open)g(Sour)o(ce)1844642 y currentpoint grestore moveto 1844 642 a 1985 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 1985 642 a Fw(Pthr)o(ead)g(API)1985642 y currentpoint grestore moveto 1985 642 a 2126 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 2126 642 a Fw(Pthr)o(ead)g(Shar)o(ed)g(Memory)2126 642 y currentpoint grestore moveto 2126 642 a 2267 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 2267 642 a Fw(Nati)o(v)o(e)i(API)2267 642 y currentpoint grestore moveto 2267 642 a 2408 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 2408 642 a Fw(Nati)o(v)o(e)g(API)e Fo(\025)h Fw(Pthr)o(ead)f(API)2408 642 y currentpoint grestore moveto 2408 642 a2550 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 2550 642 a Fw(Nati)o(v)o(e)h(API)g(is)f(Pthr)o(ead)g(API)2550 642 y currentpoint grestore moveto 2550 642 a 2765 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 2765 642 a Fw(Pr)o(eempti)o(v)o(e)h(Scheduling)2765 642 y currentpoint grestore moveto 2765 642 a 2906 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 2906 642a Fw(P)o(ortability)2906 642 y currentpoint grestore moveto 2906 642 a 3360 642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate3360 642 a Fw(Assembly)f(Code)3360 642 y currentpoint grestore moveto 3360 642 a 3509642 a gsave currentpoint currentpoint translate 45 neg rotate neg exch negexch translate 3509 642 a Fw(SysCall)g(Wrap.)3509 642 y currentpoint grestore moveto 3509 642a 47 673 3658 4 v 68 737 a Fv(gnu-pth)254 b(1999)43 b(1.3.5)117b(user)270 b(n:1)63 b(yes)42 b(no)67 b(yes)42 b(yes)g(no)67b(yes)42 b(yes)h(no)141 b(no)67 b(full/mcsc+sjlj)42 b(no)75b(partly)68 820 y(cmu-l)o(wp)221 b(1984)43 b(1.4)173b(user)270 b(n:1)63 b(yes)42 b(no)67 b(yes)42 b(no)67b(-)116 b(yes)42 b(yes)h(partly)e(no)67 b(semi/\002x)o(ed:8)86b(yes)50 b(no)68 903 y(fsu-pthread)146 b(1992)43 b(3.13)136b(user)270 b(n:1)63 b(no)k(no)g(yes)42 b(yes)g(no)67b(no)g(-)117 b(-)190 b(yes)42 b(semi/\002x)o(ed:6)86b(yes)50 b(yes)68 986 y(mit-pthread)137 b(1993)43 b(1.8.9)117b(user)270 b(n:1)63 b(no)k(no)g(yes)42 b(yes)g(no)67b(no)g(-)117 b(-)190 b(yes)42 b(semi/\002x)o(ed:17)49b(yes)h(yes)68 1069 y(ptl)406 b(1997)43 b(990622)h(user)270b(n:1)63 b(no)k(no)g(yes)42 b(yes)g(no)67 b(no)g(-)117b(-)190 b(yes)42 b(semi/\002x)o(ed:10)49 b(yes)h(yes)681152 y(linuxthreads)117 b(1997)43 b(2.1.2)117 b(user+k)o(ernel)43b(1:1)63 b(yes)42 b(no)67 b(yes)42 b(yes)g(no)67 b(no)g(-)117b(-)190 b(yes)42 b(semi/\002x)o(ed:5)86 b(yes)50 b(yes)681235 y(uthread)262 b(1998)43 b(3.4)173 b(user)270 b(n:1)63b(yes)42 b(no)67 b(yes)42 b(yes)g(no)67 b(no)g(-)117b(-)190 b(yes)42 b(semi/\002x)o(ed:2)86 b(yes)50 b(yes)681318 y(cthread)266 b(1991)43 b(991115)h(user)270 b(n:1)63b(no)k(no)g(yes)42 b(no)67 b(-)116 b(yes)42 b(yes)h(no)141b(no)67 b(semi/\002x)o(ed:8)86 b(yes)50 b(yes)68 1401y(openthreads/qt)d(1996)c(2.0)173 b(user)270 b(n:1)63b(no)k(no)g(yes)42 b(no)67 b(-)116 b(yes)42 b(no)68 b(no)141b(no)67 b(semi/\002x)o(ed:9)86 b(yes)50 b(no)68 1484y(rt++/qt)276 b(1996)43 b(1.0)173 b(user)270 b(n:1)63b(no)k(no)g(yes)42 b(no)67 b(-)116 b(yes)42 b(yes)h(no)141b(no)67 b(semi/\002x)o(ed:9)86 b(yes)50 b(no)68 1567y(rsthreads)216 b(1996)43 b(980331)h(user)270 b(n:1)63b(no)k(yes)42 b(yes)g(no)67 b(-)116 b(yes)42 b(no)68b(no)141 b(no)67 b(semi/\002x)o(ed:9)86 b(yes)50 b(no)681650 y(pcthread)229 b(1996)43 b(1.0)173 b(user)270 b(n:1)63b(no)k(yes)42 b(yes)g(yes)g(no)67 b(no)g(-)117 b(-)190b(yes)42 b(semi/\002x)o(ed:1)86 b(yes)50 b(no)68 1733y(bbthreads)196 b(1996)43 b(0.3)173 b(k)o(ernel)209 b(1:1)63b(no)k(yes)42 b(yes)g(no)67 b(-)116 b(yes)42 b(no)68b(-)190 b(yes)42 b(semi/\002x)o(ed:1)86 b(yes)50 b(no)681816 y(jkthreads)212 b(1998)43 b(1.2)173 b(k)o(ernel)209b(1:1)63 b(no)k(yes)42 b(yes)g(no)67 b(-)116 b(yes)42b(no)68 b(-)190 b(yes)42 b(semi/\002x)o(ed:1)86 b(yes)50b(no)68 1899 y(nthreads)233 b(1997)43 b(970604)h(user)270b(n:1)63 b(no)k(yes)42 b(yes)g(no)67 b(-)116 b(yes)42b(no)68 b(-)190 b(no)67 b(semi/\002x)o(ed:9)86 b(yes)50b(partly)68 1982 y(re)o(xthreads)176 b(1993)43 b(930614)h(user)270b(n:1)63 b(no)k(yes)42 b(yes)g(no)67 b(-)116 b(yes)42b(no)68 b(-)190 b(no)67 b(semi/\002x)o(ed:4)86 b(yes)50b(no)68 2065 y(coro)353 b(1999)43 b(1.0.3)117 b(user)270b(n:1)63 b(no)k(yes)42 b(yes)g(no)67 b(-)116 b(yes)42b(no)68 b(-)190 b(no)67 b(semi/\002x)o(ed:1)86 b(yes)50b(no)68 2148 y(greenthreads)105 b(1995)43 b(1.2)173 b(user)270b(n:1)63 b(no)k(no)g(no)g(no)g(-)116 b(yes)42 b(yes)h(-)190b(yes)42 b(full/mcsc)176 b(no)75 b(no)68 2231 y(solaris-pthread)42b(NN)83 b(2.7)173 b(user+k)o(ernel)43 b(n:m)f(yes)g(no)67b(no)g(yes)42 b(yes)g(yes)g(yes)h(no)141 b(yes)42 b(NN)346b(NN)41 b(yes)68 2314 y(tru64-pthread)80 b(NN)j(5.0)173b(user+k)o(ernel)43 b(n:m)f(yes)g(no)67 b(no)g(yes)42b(yes)g(no)67 b(no)h(no)141 b(yes)42 b(NN)346 b(NN)41b(yes)68 2397 y(aix-pthread)146 b(NN)83 b(4.3)173 b(user+k)o(ernel)43b(1:1)63 b(yes)42 b(no)67 b(no)g(yes)42 b(yes)g(no)67b(no)h(no)141 b(yes)42 b(NN)346 b(NN)41 b(yes)p 38602441 4 2439 v 0 2444 3864 4 v 0 2532 a Fn(T)-6 b(able)18b(1:)67 b Fm(Summary)20 b(of)h(e)n(v)n(aluated)j(multithreading)g(packages)f(and)e(some)g(of)f(their)i(determined)h(characteristics.)36b(Notice)22 b(that)g(mostly)f(all)h(packages)g(contain)2952600 y(assembly)17 b(code)h(and)g(are)g(just)f(semi-portable,)jFl(i.e)o(.)p Fm(,)c(the)o(y)i(support)g(only)g(a)f(\002x)o(ed)g(set)g(of)g(platforms)i(and)e(do)g(not)h(automatically)j(adjust)d(for)f(ne)n(w)h(ones.)p Black 208 2864 a Fr(sf)p 268 2864 25 4 v30 w(ar)m(g)p Fx(,)36 b(and)d(a)h(stack)f(starting)g(at)hFr(sk)p 1343 2864 V 30 w(addr)p Fx(,)i(which)d(is)2082963 y Fr(sk)p 282 2963 V 30 w(size)21 b Fx(bytes)f(in)g(size.)pBlack 95 3115 50 50 v Black 208 3115 a(A)i(function)f(\223)pFq(v)o(oid)h Fp(mctx)p 1006 3115 25 4 v 30 w(save\(mctx)p1486 3115 V 28 w(t)h(*)p Fr(mctx)p Fp(\))p Fx(\224)2083215 y(which)j(sa)n(v)o(es)i(the)g(current)e(machine)g(conte)o(xt)g(into)i(the)208 3314 y(machine)19 b(conte)o(xt)g(structure)gFr(mctx)p Fx(.)p Black 95 3466 50 50 v Black 208 3466a(A)78 b(function)e(\223)p Fq(v)o(oid)i Fp(mctx)p 11733466 25 4 v 30 w(restore\(mctx)p 1803 3466 V 27 w(t)2083566 y(*)p Fr(mctx)p Fp(\))p Fx(\224)40 b(which)g(restores)g(the)h(ne)n(w)f(machine)f(con-)208 3666 y(te)o(xt)18 b(from)g(the)h(machine)e(conte)o(xt)h(structure)g Fr(mctx)p Fx(.)24 b(This)2083765 y(function)29 b(does)i(not)g(return)f(to)h(the)h(caller)-5b(.)58 b(Instead)31 b(it)208 3865 y(does)18 b(return)g(at)i(the)f(location)g(stored)f(in)i Fr(mctx)f Fx(\(which)g(is)2083964 y(either)d Fr(sf)p 474 3964 V 30 w(addr)i Fx(from)e(a)h(pre)n(vious)f Fp(mctx)p 1415 3964 V 29 w(create)g Fx(call)2084064 y(or)j(the)i(location)e(of)h(a)g(pre)n(vious)f Fp(mctx)p1365 4064 V 29 w(save)h Fx(call\).)p Black 95 4216 5050 v Black 208 4216 a(A)95 b(function)e(\223)p Fq(v)o(oid)hFp(mctx)p 1223 4216 25 4 v 29 w(switch\(mctx)p 1802 4216V 28 w(t)208 4316 y(*)p Fr(mctx)p 420 4316 V 29 w(old)pFx(,)19 b Fp(mctx)p 796 4316 V 29 w(t)h(*)p Fr(mctx)p1102 4316 V 30 w(ne)o(w)p Fp(\))p Fx(\224)f(which)g(switches)2084415 y(from)59 b(the)i(current)e(machine)g(conte)o(xt)h(\(sa)n(v)o(ed)f(to)208 4515 y Fr(mctx)p 370 4515 V 29 w(old)28 b Fx(for)e(later)g(use\))g(to)g(a)h(ne)n(w)f(conte)o(xt)f(\(restored)2084615 y(from)c Fr(mctx)p 554 4615 V 30 w(ne)o(w)p Fx(\).)31b(This)22 b(function)f(returns)g(only)h(to)h(the)2084714 y(caller)39 b(if)h Fp(mctx)p 728 4714 V 30 w(restore)fFx(or)g Fp(mctx)p 1456 4714 V 29 w(switch)h Fx(is)2084814 y(again)19 b(used)h(on)f Fr(mctx)p 846 4814 V 30w(old)p Fx(.)0 5045 y FA(2.2)99 b(T)-9 b(echnical)26b(P)n(ossibilities)0 5201 y Fx(Poking)18 b(around)f(in)i(the)f(references)g(of)g(the)h(ANSI-C)g(language)0 5300 y(reference)36b(and)i(the)g(Unix)f(standards)g(sho)n(w)h(the)g(follo)n(wing)05400 y(functions)19 b(on)h(which)f(an)h(implementation)e(can)i(be)g(based:)p Black 2120 2864 50 50 v Black 2233 2864 a(There)55b(is)h(the)g Fp(ucontext)p Fx(\(3\))e(f)o(acility)i(with)g(the)22332963 y(functions)34 b Fp(getcontext)p Fx(\(3\),)j Fp(makecontext)pFx(\(3\),)2233 3063 y Fp(swapcontext)p Fx(\(3\))31 b(and)jFp(setcontext)p Fx(\(3\))e(which)2233 3162 y(conform)21b(to)j(the)g Fr(Single)f(Unix)h(Speci\002cation)p Fx(,)e(V)-9b(ersion)2233 3262 y(2)38 b(\()p Fr(SUSv2)e Fx([20)o(],)42b(aka)c Fr(Unix95/98)p Fx(\).)76 b(Unfortunately)22333362 y(these)16 b(are)g(a)n(v)n(ailable)f(on)h(modern)e(Unix)h(platforms)g(only)-5 b(.)p Black 2120 3625 V Black 22333625 a(There)87 b(are)h(the)h Fp(jmp)p 3051 3625 25 4v 29 w(buf)f Fx(based)g(functions)2233 3724 y Fp(setjmp)pFx(\(3\))29 b(and)h Fp(longjmp)p Fx(\(3\))f(which)i(conform)d(to)22333824 y(ISO)41 b(9899:1990)c(\(ISO-C\))k(and)f(the)h Fp(sigjmp)p3727 3824 V 29 w(buf)2233 3924 y Fx(based)71 b Fp(sigsetjmp)pFx(\(3\))f(and)i Fp(siglongjmp)p Fx(\(3\))2233 4023 y(functions)17b(which)h(conform)f(to)i(IEEE)f(Std1003.1-1988)2233 4123y(\()p Fr(POSIX)t Fx(\),)f(and)j Fr(Single)f(Unix)h(Speci\002cation)pFx(,)d(V)-9 b(ersion)19 b(2)2233 4222 y(\()p Fr(SUSv2)jFx([20)o(],)j(aka)f Fr(Unix95/98)p Fx(\).)35 b(The)24b(\002rst)h(tw)o(o)g(func-)2233 4322 y(tions)17 b(are)h(a)n(v)n(ailable)f(really)h(on)f(all)h(Unix)g(platforms,)f(the)22334422 y(last)k(tw)o(o)f(are)g(a)n(v)n(ailable)g(only)f(on)h(some)g(of)g(them.)2233 4603 y(On)h(some)h(platforms)e Fp(setjmp)pFx(\(3\))g(and)i Fp(longjmp)p Fx(\(3\))2233 4703 y(sa)n(v)o(e)45b(and)h(restore)f(also)h(the)f(signal)h(mask)f(\(if)h(one)22334802 y(does)e(not)g(w)o(ant)g(this)h(semantics,)50 b(one)44b(has)h(to)f(call)p 2233 4902 V 2257 4902 a Fp(setjmp)pFx(\(3\))36 b(and)p 2854 4902 V 67 w Fp(longjmp)p Fx(\(3\))g(there\))g(while)i(on)2233 5001 y(others)23 b(one)h(has)g(to)g(e)o(xplicitly)g(use)g(the)g(superset)g(func-)2233 5101 y(tions)36 bFp(sigsetjmp)p Fx(\(3\))f(and)h Fp(siglongjmp)p Fx(\(3\))e(for)22335201 y(this.)115 b(In)50 b(our)f(discussion)h(we)g(can)g(assume)g(that)2233 5300 y Fp(setjmp)p Fx(\(3\))40 b(and)j Fp(longjmp)pFx(\(3\))d(sa)n(v)o(e)j(and)f(restore)2233 5400 y(the)36b(signal)f(mask,)40 b(because)35 b(if)h(this)h(is)g(not)e(the)h(case)pBlack 1929 5700 a(3)p Black eop%%Page: 4 44 3 bop Black Black 208 83 a Fx(in)46 b(practice,)53b(one)46 b(easily)h(can)f(replace)g(them)g(with)208 183y Fp(sigsetjmp)p Fx(\(3\))41 b(and)i Fp(siglongjmp)p
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -