Index
Symbols
| |
| __errno | 108 |
| __t_errno | 108 |
| _r | 115 |
| _REENTRANT | 108, 137 |
| .....managing incompatibilities | 121 |
A
| |
| Ada | 93 |
| adb | 110 |
| adding |
| .....to LWP pool | 30 |
| .....signals to mask | 17 |
| aio_errno | 98 |
| AIO_INPROGRESS | 98 |
| aio_result_t | 97, 98 |
| aiocancel(3) | 97, 98 |
| aioread(3) | 97, 98 |
| aiowait(3) | 98 |
| aiowrite(3) | 97, 98 |
| alarm | 9, 81 |
| algorithms |
| .....faster with MT | 3 |
| .....parallel | 129 |
| .....sequential | 129 |
| alternate signal stacks | 9, 86 |
| ANSI C | 111 |
| application-level threads |
| .....Seeuser-level threads |
| architecture |
| .....MT system | 7 |
| .....multiprocessor | 124 |
| .....SPARC | 38, 126, 128 |
| assert statement | 58, 118 |
| assert(3X) | 146 |
| asynchronous |
| .....event notification | 68 |
| .....I/O | 96, 97, 98 |
| .....semaphore use | 68 |
| .....signals | 86 to 91 |
| Async-Safe |
| .....category | 103 |
| .....functions | 90, 105 |
| .....and signal handlers | 93 |
| atomic, defined | 43 |
| automatic |
| .....arrays, problems | 110 |
| .....local variable | 115 |
| .....LWP number adjustments | 84 |
| .....stack allocation | 28 |
| .....termination, daemon threads | 19 |
B
| |
| barrier synchronization | 129 |
| benefits, multithreading | 1, 3 |
| binary semaphores | 67 |
| binding |
| .....See also bound threads |
| .....reasons to bind | 9, 85, 123, 124 |
| .....threads to LWPs | 30 |
| .....values to keys | 22, 23 |
| bound threads | 6, 9, 10, 85 |
| .....See alsobinding |
| .....alternate signal stacks | 86 |
| .....concurrency | 123 |
| .....defined | 2 |
| .....mixing with unbound threads | 10 |
| .....no LWP caching | 123 |
| .....priority | 83 |
| .....realtime timer and alarm | 81 |
| .....reasons to bind | 9, 85, 123, 124 |
| .....scheduling class | 83 |
| .....andTHR_BOUND | 13 |
| .....and timers | 82 |
C
| |
| C++ | 111 |
| cache, defined | 125 |
| caching |
| .....not for bound thread LWPs | 123 |
| .....threads data structure | 122 |
| changing the signal mask | 16 |
| coarse-grained locking | 117 |
| code lock | 117, 118 |
| code monitor | 117, 119 |
| completion semantics | 92 |
| concurrency | 2, 117, 121, 122, 123 |
| .....excessive | 121 |
| .....level | 30 |
| .....unbound threads | 33 |
| cond_broadcast(3T) | 50, 54, 56, 87 |
| .....example | 54 |
| cond_destroy(3T) | 55 |
| cond_init(3T) | 49, 75 |
| cond_signal(3T) | 50, 51, 56, 57, 87 |
| ......example | 52 |
| cond_timedwait(3T) | 52, 53, 94 |
| ......example | 53 |
| cond_wait(3T) | 50, 56, 57, 87, 94, 95 |
| ......example | 52 |
| condition variables | 37, 48 to 59, 94 |
| coroutine linkage | 8 |
| counting semaphores Seesemaphores |
| creating |
| ......new signal mask (example) | 31 |
| ......stacks | 12, 28, 29 |
| ......threads | 12 to 14, 27 to 31, 123 |
| ......thread-specific keys | 22, 23, 24, 27 |
| critical section | 127 |
| custom stack | 28, 29, 32 |
D
| |
| -D _REENTRANT | 108, 121 |
| daemon threads | 19, 30 |
| data |
| ......global | 22 |
| ......local | 22 |
| ......lock | 117, 118 |
| ......profile | 82 |
| ......races | 101 |
| ......shared | 6, 127 |
| ......thread specific,Seethread-specificdata |
| dbx | 111 |
| deadlock | 109, 119 |
| debugging | 10, 109 to 112 |
| ......adb | 110 |
| ......dbx | 111 |
| definitions of MT terms | 2 |
| deleting signals from mask | 17 |
| destructor function | 23, 27 |
| detached threads | 18, 21, 30 |
| Dijkstra, E. W. | 66 |
E
| |
| EAGAIN | 13, 23, 31, 34 |
| EBUSY | 63, 64, 71 |
| EDEADLK | 20 |
| EFAULT | 17, 39 to 42, 50 to 52, 53, 55, 61, 62 to 65, 69 to 72 |
| EINTR | 51, 53, 71, 80, 86, 87, 94, 95 |
| EINVAL | 14, 16, 17, 23, 24, 31, 34, 35, 39 to 42, 50, 53, 61 to 65, 69 to 72 |
| ENOMEM | 14, 23, 31 |
| errno | 25, 108, 114 |
| errno.h | 107 |
| error checking | 16 |
| ESRCH | 15, 16, 20, 34, 35 |
| ETIME | 53 |
| event notification | 68 |
| examining the signal mask | 16 |
| exec(2) | 79, 80, 81 |
| execution resources | 33, 122 |
| exit(2) | 18, 30, 81 |
F
| |
| finding |
| .....minimum stack size | 32 |
| .....thread concurrency level | 33 |
| .....thread priority | 34 |
| fine-grained locking | 117 |
| flockfile(3S) | 99 |
| fork cleanup handler | 80 |
| fork(2) | 50, 53, 79, 80, 81 |
| fork1(2) | 79, 80, 81 |
| FORTRAN | 111 |
| funlockfile(3S) | 99 |
G
| |
| getc(3S) | 99 |
| getc_unlocked(3S) | 99 |
| gethostbyname(3N) | 115 |
| gethostbyname_r(3N) | 115 |
| getrusage(3B) | 82 |
| global |
| ......data | 117 |
| ......memory | 109 |
| ......state | 116 |
| ......thread scheduling | 9 |
| ......variables | 24, 25, 109, 113, 114 |
H
| |
| heap,malloc(3C) storage from | 21 |
| hreads | 11 |
I
| |
| I/O |
| ......asynchronous | 96, 97 |
| ......nonsequential | 98 |
| ......standard | 99 |
| ......synchronous | 96 |
| inheriting priority | 12 |
| interrupt | 86 |
| interval timer | 81, 82, 123 |
| invariants | 58, 118 |
J
K
| |
| kernel context switching | 6 |
| kernel-level threads | 6 |
| keys |
| ......bind value to key | 23 |
| ......destructor function | 23 |
| ......get specific key | 24 |
| ......global into private | 26 |
| ......storing value of | 22, 24 |
| ......for TSD | 22 |
| kill(2) | 86, 89 |
L
| |
| libC | 106 |
| libc | 105, 107, 108, 109 |
| libdl_stubs | 105 |
| libintl | 105, 107 |
| libm | 105, 107 |
| libmalloc | 105, 107 |
| libmapmalloc | 105, 107 |
| libnsl | 105, 107, 108 |
| library |
| .....C routines | 113 |
| .....threads | 7, ?? to 77, 107 |
| .....threads<$startrange.> | 11 |
| libresolv | 106 |
| libsocket | 106 |
| libthread | 5, 7, 11, 107, 108 |
| libw | 106, 107 |
| libX11 | 106 |
| lightweight processes | 8, 9, 82 to 85, 89 |
| .....adding an LWP | 30 |
| .....creation | 9 |
| .....debugging | 110 |
| .....defined | 2 |
| .....independence | 9 |
| .....multiplexing | 8 |
| .....no time-slicing of threads | 36 |
| .....not supported | 8 |
| .....profile state | 82 |
| .....shortage | 85 |
| .....special capabilities | 9 |
| .....in SunOS 4.0 | 8 |
| .....and system calls | 10 |
| .....and thread scheduling | 35 |
| limits, resources | 82 |
| linking | 107 |
| local variable | 109, 115 |
| lock hierarchy | 120 |
| lock_lint | 44 |
| locking |
| .....See alsolocks |
| .....coarse grained | 117 |
| .....code | 117 |
| .....data | 117 |
| .....fine-grained | 117 |
| ......guidelines | 120 |
| ......invariants | 118 |
| locks |
| ......See alsolocking |
| ......mutual exclusion | 37 to 48, 80, 94 |
| ......readers/writer | 37, 60 to 66 |
| longjmp(3C) | 82, 93 |
| lseek(2) | 99 |
| -lthread | 108, 109 |
| LWPs,Seelightweight processes |
M
| |
| main() | 121 |
| maintaining thread-specific data | 22 |
| malloc(3C) | 21 |
| MAP_NORESERVE | 28 |
| MAP_SHARED | 81 |
| memory |
| ......global | 109 |
| ......ordering, relaxed | 127 |
| ......strongly ordered | 126 |
| mmap(2) | 28, 39, 81 |
| monitor, code | 117, 119 |
| mprotect(2) | 29 |
| MT-Safe libraries | 105 |
| multiple-readers, single-writer locks | 60 to 66, 77 |
| multiplexing with LWPs | 8 |
| multiprocessors | 124 to 129 |
| multithreading |
| ......See alsothreads |
| ......benefits | 1 |
| ......defined | 2 |
| mutex Seemutual exclusion locks |
| mutex_destroy(3T) | 42 |
| mutex_init(3T) | 39, 75 |
| mutex_lock(3T) | 40 |
| ......example | 43, 45, 47, 48 |
| mutex_trylock(3T) | 40, 45, 120 |
| mutex_unlock(3T) | 41 |
| ......example | 43, 45, 47, 48 |
| |
| mutual exclusion locks | 37 to 48, 80, 94 |
N
| |
| nametoaddr | 106 |
| NDEBUG | 58 |
| netdir | 105 |
| netselect | 105 |
| nice(2) | 83, 84 |
| nondetached threads | 18 to 21 |
| nonsequential I/O | 98 |
| nsswitch | 106 |
| null |
| .....procedures | 108 |
| .....threads | 29, 32 |
P
| |
| P operation | 67 |
| parallel |
| .....algorithms | 129 |
| .....array computation | 9 |
| parallelism, defined | 2 |
| Pascal | 111 |
| PC | 6 |
| PC_GETCID | 83 |
| PC_GETCLINFO | 83 |
| PC_GETPARMS | 83 |
| PC_SETPARMS | 83 |
| performance times | 4 |
| per-process signal handler | 86 |
| per-thread signal handler | 86 |
| Peterson's Algorithm | 127 |
| PL/1 | 88 |
| portability | 38 |
| POSIX 1003.4a | 10, 80 |
| pread(2) | 97, 99 |
| printf problem | 115 |
| printf(3S) | 93 |
| priocntl(2) | 36, 83, 84 |
| priority | 6, 9, 82, 83, 84 |
| ......finding for a thread | 34 |
| ......inheritance | 12, 34 |
| ......andpriocntl(2) | 36 |
| ......range | 35 |
| ......and scheduling | 34, 35 |
| ......setting for a thread | 35 |
| process |
| ......terminating | 18 |
| ......traditional UNIX | 1 |
| producer/consumer problem | 75, 126 |
| profil(2) | 82 |
| profile | 82 |
| profiling an LWP | 82 |
| programmer-allocated stack | 28, 29, 32, 109 |
| prolagen | 67 |
| pthread_atfork() | 80 |
| putc(3S) | 99 |
| putc_unlocked(3S) | 99 |
| pwrite(2) | 97, 99 |
R
| |
| raw device | 133 |
| read(2) | 98, 99 |
| readers/writer locks | 37, 60 to 66, 77 |
| realtime | 10 |
| ......schedule threads globally | 9 |
| ......scheduling | 82, 84 |
| red zone | 28, 29 |
| reentrant | 117 |
| ......See also_REENTRANT |
| ......described | 116 |
| ......functions | 103, 104 |
| ......strategies for making | 117 |
| register state | 6 |
| relaxed memory ordering | 127 |
| remote procedure call SeeRPC |
| replacing signal mask | 17 |
| RPC | 4, 105, 122 |
| RT,Seerealtime |
| rw_rdlock(3T) | 62 |
| |
| rw_tryrdlock(3T) | 62 |
| rw_trywrlock(3T) | 64 |
| rw_unlock(3T) | 64 |
| rw_wrlock(3T) | 63 |
| rwlock_destroy(3T) | 65 |
| rwlock_init(3T) | 61, 75 |
S
| |
| SA_RESTART | 95 |
| safety, threads interfaces | 101 to 106 |
| scheduling |
| .....class | 82 to 85 |
| .....compute-bound threads | 33 |
| .....globally for threads | 9 |
| .....libthread routines | 35 |
| .....preemptive | 35 |
| .....priorities | 34 |
| .....realtime | 82, 84 |
| .....system class | 82 |
| .....timeshare | 82, 83 |
| sema_destroy(3T) | 72 |
| sema_init(3T) | 69, 75 |
| .....example | 73 |
| sema_post(3T) | 67, 70, 105 |
| .....example | 74 |
| sema_trywait(3T) | 67, 71 |
| sema_wait(3T) | 70 |
| .....example | 74 |
| semaphores | 37, 66 to 77 |
| .....binary | 67 |
| .....counting, defined | 2 |
| sending signal to thread | 16 |
| sequential algorithms | 129 |
| setjmp(3C) | 82, 92, 93 |
| setting |
| .....thread concurrency level | 33 |
| .....thread priority | 34 |
| shared data | 6, 117 |
| shared-memory multiprocessor | 126 |
| SIG_BLOCK | 17 |
| SIG_DFL | 86 |
| SIG_IGN | 86 |
| SIG_SETMASK | 17 |
| SIG_UNBLOCK | 17 |
| sigaction(2) | 86, 87, 95 |
| sigaltstack(2) | 86 |
| SIGFPE | 87, 92 |
| SIGILL | 87 |
| SIGINT | 31, 87, 91, 95 |
| SIGIO | 87, 98 |
| siglongjmp(3C) | 92, 93 |
| signal(2) | 86 |
| signal(5) | 86 |
| signal.h | 16 |
| signals |
| ......access mask | 16 |
| ......add to mask | 17 |
| ......asynchronous | 86 to 91 |
| ......create new mask (example) | 31 |
| ......delete from mask | 17 |
| ......handler | 86, 90 |
| ......inheritance | 12 |
| ......masks | 6 |
| ......pending | 12 |
| ......replace current mask | 17 |
| ......send to thread | 16 |
| ......SIG_BLOCK | 17 |
| ......SIG_SETMASK | 17 |
| ......SIG_UNBLOCK | 17 |
| ......SIGSEGV | 28 |
| ......stack | 9, 86 |
| ......unmasked and caught | 94 |
| sigprocmask(2) | 89 |
| SIGPROF | 82 |
| SIGSEGV | 28, 87 |
| sigsend(2) | 86 |
| sigsetjmp(3C) | 93 |
| sigtimedwait(2) | 90 |
| SIGVTALRM | 82 |
| sigwait(2) | 89, 90, 91, 93 |
| SIGWAITING | 85 |
| single-threaded |
| ......assumptions | 113 |
| ......code | 38 |
| ......defined | 2 |
| |
| single-threaded(continued) |
| .....processes | 81 |
| size of stack | 12, 27, 29, 32 |
| stack | 122, 123 |
| .....address | 12, 27 |
| .....boundaries | 28 |
| .....creation | 12 |
| .....custom | 29 |
| .....deallocation | 29 |
| .....minimum size | 29, 32 |
| .....overflows | 28 |
| .....parameters | 21 |
| .....pointer | 6 |
| .....programmer-allocated | 27, 28, 29, 109 |
| .....reclaiming | 19 |
| .....red zone | 28, 29 |
| .....returning a pointer to | 103 |
| .....size | 12, 27, 29, 32 |
| stack_base | 12, 27 |
| stack_size | 12, 27 |
| standard I/O | 99 |
| standards | 10, 80 |
| start_routine | 13, 29 |
| static storage | 108, 113 |
| stdio | 25, 108 |
| store buffer | 128 |
| storing thread key value | 22, 24 |
| streaming a tape drive | 97 |
| strongly ordered memory | 126 |
| suspending a new thread | 30, 36 |
| swap space | 28 |
| synchronization objects | 37 to 77 |
| .....condition variables | 37, 48 to 59 |
| .....mutex locks | 37 to 48 |
| .....readers/writer locks | 60 to 66 |
| .....semaphores | 37, 66 to 76 |
| synchronous I/O | 96, 97 |
| system calls |
| .....handling errors | 114 |
| .....and LWPs | 10 |
| system scheduling class | 82 |
T
| |
| tape drive, streaming | 97 |
| terminating |
| ......a process | 18 |
| ......threads | 20 |
| terms, defined | 2 |
| THR_BOUND | 30 |
| thr_continue(3T) | 30, 36 |
| thr_create(3T) | 12, 24, 27, 29, 36, 85 |
| THR_DAEMON | 19, 30 |
| THR_DETACHED | 18, 30 |
| thr_exit(3T) | 17, 18, 20, 30 |
| thr_getconcurrency(3T) | 33 |
| thr_getprio(3T) | 34, 35 |
| thr_getspecific(3T) | 22, 24, 25, 27 |
| thr_join(3T) | 19, 20, 28, 96 |
| thr_keycreate(3T) | 22, 26, 27 |
| ......example | 26 |
| thr_kill(3T) | 89, 105 |
| thr_min_stack(3T) | 27, 29 |
| THR_NEW_LWP | 30, 34, 85, 123 |
| thr_self(3T) | 14 |
| thr_setconcurrency(3T) | 30, 33, 85, 122, 124 |
| thr_setprio(3T) | 35, 83, 85 |
| thr_setspecific(3T) | 22, 23, 27 |
| ......example | 26 |
| thr_sigsetmask(3T) | 31, 89, 105 |
| thr_suspend(3T) | 15, 36 |
| THR_SUSPENDED | 13, 30, 36 |
| thr_yield(3T) | 14, 36, 120 |
| thread.h | 107 |
| thread-directed signal | 90 |
| thread-private storage | 6 |
| threads |
| ......binding Seebound threads |
| ......bound Seebound threads |
| ......compute-bound | 33 |
| ......concurrency Seeconcurrency |
| ......creating | 12 to 14, 27 to 31, 123 |
| ......daemon | 19, 30 |
| |
| threads(continued) |
| .....defined | 2 |
| .....detached | 18, 21, 30 |
| .....exit codes | 20 |
| .....identifiers | 14, 18 to 20, 30, 31 |
| .....initial | 18 |
| .....joining | 18, 19 |
| .....kernel-level | 6 |
| .....keys Seekeys |
| .....library | 7, 11 to 77, 107 |
| .....lightweight processes Seelightweightprocesses |
| .....maintaining TSD | 22 |
| .....nondetached | 18 to 21 |
| .....null | 29, 32 |
| .....priority Seepriority |
| .....private data | 22 |
| .....safety | 101 to 106 |
| .....signals Seesignals |
| .....stacks Seestack | 103 |
| .....suspending | 30, 36 |
| .....synchronizing | 37 to 77 |
| .....terminating | 17 to 20 |
| .....thread-specific data Seethread-specific data | 114 |
| .....unbound Seeunbound threads |
| .....user-level | 2, 5, 6 |
| thread-specific data | 22 to 26 |
| .....global | 24, 25, 27 |
| .....global into private | 25 |
| .....maintaining | 22 |
| .....new storage class | 114 |
| .....private | 24 |
| time slicing | 84 |
| time-out | 53 |
| timer | 9, 81 |
| times, performance | 4 |
| timeshare scheduling class | 82, 83, 84 |
| tiuser.h | 108 |
| TLI | 105, 108 |
| tools |
| .....adb | 110 |
| .....dbx | 111 |
| .....debugger | 10, 111 |
| tools(continued) |
| ......lock_lint | 44 |
| ......truss | 10 |
| total store order | 128 |
| trap | 86 |
| truss | 10 |
| TS,Seetimeshare scheduling class |
| TSD,Seethread-specific data |
U
| |
| unbound threads | 82 |
| ......alternate signal stacks | 86 |
| ......caching | 122 |
| ......concurrency | 33, 123 |
| ......defined | 2, 9 |
| ......disadvantage | 9 |
| ......floating | 9 |
| ......mixing with bound threads | 10 |
| ......priorities | 34, 82 |
| ......reasons not to bind | 122, 123 |
| ......and scheduling | 82, 84, 85 |
| ......andTHR_NEW_LWP | 13 |
| ......andthr_setconcurrency(3T) | 122 |
| ......andthr_setprio(3T) | 83, 85 |
| UNIX | 1, 5, 10, 87, 96, 98, 114 |
| user space | 6 |
| user-level threads | 2, 5, 6 |
| USYNC_PROCESS | 39, 49, 61, 69, 75, 123 |
| USYNC_THREAD | 39, 49, 61, 69, 75 |
V
| |
| V operation | 67 |
| variables |
| ......condition | 37, 48 to 66, 77 |
| ......global | 109, 114 |
| ......local | 109 |
| ......primitive | 38 |
| verhogen | 67 |
| vfork(2) | 81 |
W
X
|