Prev | Current Page 269 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

The process is still important, but as
a collection of resources. Threads are what get executed, and threads are what enter the states of Ready,
Running, and Waiting.
Since threads resemble processes, some operating systems refer to threads as ???lightweight processes???
(e.g., SunOS). And just as OSs came to be described as multiprogrammed when they began to support multiple
processes simultaneously, OSs that support threads are described as ???multithreaded.???
Threads are useful because many applications benefit from separating the whole job into semi-independent
parts. Earlier we mentioned the word-processor/spell-checker example. Another example could be a timeand-
attendance application where one thread does a quick check of the employee ID as the employee enters or
leaves the plant, and another thread updates the payroll data base in the background. In this threaded design, the
quick gate-check thread can keep people moving through the gates, even if the more complex data-base thread
takes a little more time.
Web servers are almost universally multithreaded. The main server thread waits for a request to arrive, and,
when one does, it creates a new ???worker thread??? which then handles the request and provides the reply.


Pages:
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
drukarki fiskalne kraków willa karmazyn międzyzdroje www.books61.hobbitstory.com terapia magnetyczna Informacje o hostingu