Courses/Computer Science/CPSC 457.F2013/Lecture Notes/Creation

= Process Creation =

In this session, we consider a definition of the term 'process' and what a process's main properties and characteristics are. We will observe how processes are created and destroyed; we will do these activities from the perspective of the system call layer.

We will also touch on the topic of OS--level concurrency via fork(2), vfork(2), and clone(2). This forecasts later topics like IPC (interprocess communication). In fact, the way Linux represents a process and a thread are exactly the same, and Linux uses the term "lightweight process" to represent this idea: a thread is a process and a process is a thread. The only real difference is that a group of threads may share access to the same process address space (i.e., set of memory regions).

Up until this point, we have been working with an intuitive notion of what processes are: they are running software application. Userland processes are "programs in execution." We have seen a few tools for observing the set of running programs and their properties, e.g., top(1), ps(1). We've seen how to interact with and control them through command line utilities like kill(1).

In this session, we will continue building our understanding of the process abstraction as a virtual CPU context (i.e., a snapshot of the execution state of a program) and a processes other properties. We will focus on an examination of how processes come to exist. We will start by considering what a process is (see task_struct for how Linux maintains metadata about a process).

We will also have a multi-perspective look at the routines


 * fork(2) / clone(2) / vfork(2)
 * execve(2)

Scribe Notes

 * s1
 * s2
 * s3

= Readings =


 * LDK Chapter 3
 * MOS: Section 2.1: Processes (this should be partly review of what we've talked about in class)
 * MOS: Section 10.2.5 (Linux kernel structure)
 * MOS: Section 10.3.1 (about processes in Linux) should reinforce some class discussion