CS 3733 Operating Systems
Lecture 5 [1/23/98]: Brief Introduction to Threads
Reading: Sections 2.7, of PUP and 4.3-4.5 of SG
- Notes on Assignment 1:
- Discussion of
makeargv
and its
use for handling MAILPATH
.
- Static storage used by
getpwuid
.
- Role of the console window.
-
Unix creates processes by making a copy of the parent's address space
and then copying a new version of the image. Window's NT can do
it this way or allow the parent to specify name of program to create.
- The
exec
system call in Unix
- Different forms of
exec
- Argument arrays.
- Look at Program 2.8.
- What happens when the call to
makeargv
is moved
before the fork
?
- Attributes that preserved after
exec
.
- Threads
- What is a thread?
- What do you need to represent a thread?
- PC
- Stack
- Private storage
- State
- Types of threads
- User-level:
- low-overhead
- kernel doesn't know about
- limited control
- requires no OS support
- Kernel-level:
- moderate overhead
- requires OS support
- kernel scehdules each thread as though it were seperate process.
SKILL: Understand creation of processes and get a brief overview of threads.
Revision Date: 1/23/98