|
Computer Science 322 Operating Systems Mount Holyoke College Spring 2010
|
|
Lecture 03: Processes, Unix Systems Programming
Date: Wednesday, February 3, 2010
http://xkcd.com/149/
Agenda
- Announcements
- Lab 1 continues. You should know how to do it all today.
- Chapters 1 and 2: read and send along questions
- Lecture assignment recap
- Processes
- What is a process?
- Process states
- Process Control Block, context switching
- Process creation, fork() system call
Lecture Assignment 03
Due at the start of class, Monday, February 8.
Please submit answers to these questions
either as a hard copy (typeset or handwritten are OK) or by email to
jteresco AT mtholyoke.edu by the start of class. We will discuss these questions at
the start of class, so no late submissions are accepted.
- SG&G Exercise 3.7, p. 142
- SG&G Exercise 3.9, p. 142
Examples
- FreeBSD Process Control Block: see /usr/src/sys/sys/proc.h
(line 493) and /usr/src/sys/sys/user.h (line 231) for
architecture-independent parts of the structure, /usr/src/sys/i386/pcb.h for the i386-specific parts.
- forking
- forkbomb
- FreeBSD fork code: /usr/src/sys/kern/kern_fork.c
- FreeBSD run/ready queues: /usr/src/sys/kern/kern_switch.c
- FreeBSD context switch: /usr/src/sys/i386/i386/swtch.s