Transcription of Concurrency: An Introduction
{{id}} {{{paragraph}}}
26 Concurrency: An IntroductionThus far, we have seen the development of the basic abstractionsthat theOS performs. We have seen how to take a single physical CPU and turnit into multiplevirtual CPUs, thus enabling the illusion of multiple pro-grams running at the same time. We have also seen how to create theillusion of a large, privatevirtual memoryfor each process; this abstrac-tion of theaddress spaceenables each program to behave as if it has itsown memory when indeed the OS is secretly multiplexing addressspacesacross physical memory (and sometimes, disk).In this note, we introduce a new abstraction for a single running pro-cess: that of athread.
issuing further I/O requests. Using threads is a natural way to avoid getting stuck; while one thread in your program waits (i.e., is blocked waiting for I/O), the CPU scheduler can switch to other threads, which are ready to run and do something useful. Threading enables overlap of I/O with other activities within a single program, much like ...
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}