ENVS 1800 Lecture Notes - Lecture 12: Transaction Processing, Program Counter
ENVS 1800 Lecture 12 Notes – Threads
Introduction
• The transition from the suspended state to the ready state is known as resumption.
• Some operating systems also allow a user to suspend a process.
• On UNIX systems, for example, typing Control-z is one way in which to suspend a
process.
• The process may be resumed by issuing the command fg, together with the process
identification number of the process.
• Some operating systems will also swap out a suspended process from memory to
secondary storage when the system becomes overloaded and will swap it back in when
the load is lighter.
• Particularly in small systems, the use of swap files for this purpose is common.
• Even in large computer systems, transaction processing software often contains
interactive processes that are used infrequently.
• These processes are often swapped out when they are not being used and returned to
memory when they are activated by a user request.
• This technique is called roll-out, roll-in.
• The suspend resume, and swap states have been left off the diagram for clarity.
• It is common in modern systems to provide capability for a sort of mini process, known
as a thread.
• A thread represents a piece of a process that can be executed independently of other
parts of the process.
• Think of the spell-checker in a word processor that checks words as you type, for
example.
• Each thread has its own context, consisting of a program counter value, register set, and
stack space, but shares program code, and data, and other system resources such as
open files with the other member threads in the process.
• Threads can operate concurrently.
find more resources at oneclass.com
find more resources at oneclass.com