ENVS 1800 Lecture Notes - Lecture 13: Graphical User Interface

14 views2 pages
ENVS 1800 Lecture 13 Notes Single Flow of Control
Introduction
Like processes, threads can be created and destroyed and can be in ready, running, and
blocked states.
Context switching among threads is easier for the operating system to manage because
there is no need to manage memory, files, and other resources and no need for
synchronization or communication within the process
Since this is handled within the process itself
This advantage suggests, however, that more care needs to be taken when the program
is written, to assure that threads do not interact with each other in subtle ways that can
create conditions that cause the program to fail.
Note that there is no protection among the threads of a process, since all the threads
are using the same program code and data space.
Some systems even provide a mechanism for context switching of threads independent
of the process switching mechanism.
This means that in these systems threads can be switched without the involvement of
the operating system kernel.
If a process becomes I/O blocked, it cannot proceed until the block is resolved.
On the other hand, if a thread becomes blocked, other threads in the process may be
ale to otiue exeutio withi the proess’s allotted tie, resultig i ore rapid
execution.
Because the inner layers of the operating system are not even aware of thread context
switching in these systems, thread switching is extremely rapid and efficient.
Threads in these systems are commonly known as user-level threads.
Threads came about as a result of the advent of event-driven programs.
In older programs with traditional text-based displays and keyboard input, there was a
single flow of control.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions