Part Workbook 9. Managing Processes

Size: px
Start display at page:

Download "Part Workbook 9. Managing Processes"

Transcription

1 Part Workbook 9. Managing Processes

2 Table of Contents 1. An Introduction to Processes... 5 Discussion... 5 Processes are How Things Get Done... 5 What is a Process?... 5 Viewing Processes with the ps Command... 9 Process Selection Output Selection Oddities of the ps Command Monitoring Processes with the top Command Monitoring Processes with the gnome-system-monitor Application Locating processes with the pgrep Command Examples Example 1. Viewing All Processes with the "User Oriented" Format Example 2. Viewing A User's Processes with the "Long" Format Example 3. Viewing A Particular Command with the "job oriented" Format Example 4. Viewing Processes with a Custom Format Online Exercises Specification Deliverables Questions Process States Discussion A Process's Life Cycle How Processes are Started The Lineage of Processes (and the pstree Command) How a Process Dies The 5 Process States Viewing Process States Examples Example 1. Identifying Process States Online Exercises Specification Deliverables Questions Process Scheduling: nice and renice Discussion Process Scheduling Nomenclature Process Scheduling, in Essence Process Priorities Process Niceness Changing a Process's Niceness Using nice to Start a low Priority Command Using renice to Alter a Running Process Using top to Renice a Process Making Processes Greedier Examples Example 1. Viewing Priorities Example 2. Changing Priorities with renice Online Exercises Specification Deliverables

3 Managing Processes Cleaning Up Questions Sending Signals Discussion Signals Why Are Signals Sent? Sending Signals: the kill Command Receiving Signals Using Signals to Terminate Processes Alternatives to the kill Command The pkill Command The killall Command The System Monitor The top Command Examples Example 1. Using Signals to Terminate Processes Example 2. Using Signals to Kill Processes Example 3. Make it Stop! Online Exercises Specification Deliverables Questions Job Control Discussion Running Commands in the Foreground Running Commands in the Background as Jobs Managing Multiple Jobs Listing Current Jobs with jobs Killing Jobs Summary Examples Example 1. Deciding to Background a Command Running in the Foreground Example 2. Using CTRLC to Kill a Background Job Online Exercises Specification Deliverables Clean Up Questions Scheduling Delayed Tasks: at Discussion Daemons The atd Daemon Submitting Jobs with at Delaying Tasks with batch Summary of at Commands Examples Example 1. Submitting an at Job as a File Example 2. Examining the at Spool Syntax Online Exercises Online Exercise 1. Submitting a job for Delayed Execution Specification Deliverables Questions Scheduling Periodic Tasks: cron

4 Managing Processes Discussion Performing Periodic Tasks The cron Service crontab Syntax Using the crontab Command Editing crontab Files in Place Where does the output go? Environment Variables and cron Examples Example 1. Monitoring a Web Site Example 2. Monitoring Large Files Example 3. Running scripts from cron Example 4. Printing fanmail Online Exercises Online Exercise 1. Monitoring Who is on the System Specification Deliverables Questions

5 Chapter 1. An Introduction to Processes Key Concepts A process is an instance of a running executable, identified by a process id (pid). Because Linux implements virtual memory, every process possesses its own distinct memory context. A process has a uid and a collection of gid as credentials. A process has a filesystem context, including a cwd, a umask, a root directory, and a collection of open files. A process has a scheduling context, including a niceness value. A process has a collection of environment variables. The ps command can be used to examine all currently running processes. The top command can be used to monitor all running processes. Discussion Processes are How Things Get Done Almost anything that happens in a Linux system, happens as a process. If you are viewing this text in a web browser, that browser is running as a process. If you are typing at a bash shell's command line, that shell is running as a process. If you are using the chmod command to change a file's permissions, the chmod command operates as a separate process. Processes are how things get done, and the primary responsibility of the Linux kernel is to provide a place for processes to do their stuff without stepping on each other's toes. Processes are an instance of an executing program. In other operating systems, programs are often large, elaborate, graphical applications that take a noticeably long time to start up. In the Linux (and Unix) world, these types of programs exist as well, but so do a whole class of programs which usually have no counterpart in other operating systems. These programs are designed to be quick to start, specialized in function, and play well with others. On a Linux system, processes running these programs are constantly popping into and out of existence. For example, consider the user maxwell performing the following command line. [maxwell@station maxwell]$ ps aux grep httpd > daemons.$(date +%d%b%y) In the split second that the command line took to execute, no less four than processes (ps, grep, bash, and date) were started, did their thing, and exited. What is a Process? By this point, you could well be tired of hearing the answer: a process in an instance of a running program. Here, however, we provide a more detailed list of the components that constitute a process. Execution Context Every process exists (at least to some extent) within the physical memory of the machine. 5

6 An Introduction to Processes Because Linux (and Unix) is designed to be a multiuser environment, the memory allocated to a process is protected, and no other process can access it. In its memory, a process loads a copy of its executable instructions, and stores any other dynamic information it is managing. A process also carries parameters associated with how often it gets the opportunity to access the CPU, such as its execution state and its niceness value (more on these soon). I/O Context Every process interacts to some extent with the filesystem in order to read or write information that exists before or will exist after the lifespan of the process. Elements of a process's input/output context include the following. Open File Descriptors Almost every process is reading informatio from or writing informatio to external sources, usually both. In Linux, open file descriptors act as sources or sinks of informatio Processes read informatio from or write informatio to 6

7 An Introduction to Processes 7 file descriptors which may be connected to regular files, device nodes, network sockets, or even each other as pipes (allowing interproces communic Memory Mapped Files Memory mapped files are files whose contents have been mapped directly into the process's memory. Rather than reading or writing to a file descriptor, the process just accesses the appropriate memory

8 An Introduction to Processes 8 address. Memory maps are most often used to load a process's executable code, but may also be used for other types of nonsequential access to data. Filesystem Context We have encountere several pieces of informatio related to the filesystem that processes maintain, such as the process's current working directory (for translating relative file references)

9 and the process's umask (for setting permission on newly created files). 1 An Introduction to Processes Environment Variables Heritage Information Credentials Every process maintains its own list of name-value pairs, referred to as environment variables, or collectively as the process's environment. Processes generally inherit their environment on startup, and may refer to it for information such as the user's preferred language or favorite editor. Every process is identified by a PID, or process id, which it is assigned when it is created. In a later Lesson, we will discover that every process has a clearly defined parent and possibly well defined children. A process's own identity, the identity of its children, and to some extent the identity of its siblings are maintained by the process. Every process runs under the context of a given user (or, more exactly, a given user id), and under the context of a collection of group id's (generally, all of the groups that the user belongs to). These credentials limit what resources a process can access, such as which files it can open or with which other processes it is allowed to communicate. Resource Statistics and Limits Viewing Processes with the ps Command Every process also records statistics to track the extent to which system resources have been utilized, such as its memory size, its number of open files, its amount of CPU time, and others. The amount of many of these resources that a process is allowed to use can also be limited, a concept called resource limits. We have already encountered the ps command many times. Now, we will attempt to familiarize ourselves with a broader selection of the many command line switches associated with it. A quick ps --help will display a summary of over 50 different switches for customizing the ps command's behavior. To complicate matters, different versions of Unix have developed their own versions of the ps command, which do not use the same command line switch conventions. The Linux version of the ps command 9

10 An Introduction to Processes tries to be as accommodating as possible to people from different Unix backgrounds, and often there are multiple switches for any give option, some of which start with a conventional leading hyphen ( - ), and some of which do not. Process Selection By default, the ps command lists all processes started from a user's terminal. While reasonable when users connected to Unix boxes using serial line terminals, this behavior seems a bit minimalist when every terminal window within an X graphical environment is treated as a separate terminal. The following command line switches can be used to expand (or reduce) the processes which the ps command lists. Table 1.1. Common ps Command Line Switches for Process Selection Switch -A, -e, ax Which Processes are Listed All processes. -C command All instances of command -U, --user, --User user -t, --tty terminal -p, p, --pid N Output Selection All processes belonging to user All processes started from terminal Process with pid N As implied by the initial paragraphs of this Lesson, there are many parameters associated with processes, too many to display in a standard terminal width of 80 columns. The following table lists common command line switches used to select what aspects of a process are listed. Table 1.2. Common ps Command Switches for Output Selection Switch Output Format -f "full" listing -l, l -j, j -o, o, --format str long format jobs format user defined format, using fields specified by str (Available fields for str can be listed with ps L, or by consulting the ps(1) man page.) Additionally, the following switches can be used to modify how the selected information is displayed. Table 1.3. Common ps Command Switches for Output Formatting Switch Output Format -H Show process hierarchy f, --forest Show process hierarchy including ASCII decorations h Do not print header lines -w "wide" output (include longer command names) Oddities of the ps Command The ps command, probably more so than any other command in Linux, has oddities associated with its command line switches. In practice, users tend to experiment until they find combinations that work for them, and then stick to them. For example, the author prefers ps aux for a general purpose listing of all 10

11 An Introduction to Processes processes, while many people prefer ps -ef. The above tables should provide a reasonable "working set" for the novice. The command line switches tend to fall into two categories, those with the traditional leading hyphen ("Unix98" style options), and those without ("BSD" style options). Often, a given functionality will be represented by one of each. When grouping multiple single letter switches, only switches of the same style can be grouped. For example, ps axf is the same as ps a x f, not ps a x -f. Monitoring Processes with the top Command The ps command displays statistics for specified processes at the instant that the command is run, providing a snapshot of an instance in time. In contrast, the top command is useful for monitoring the general state of affairs of processes on the machine. The top command is intended to be run from within a terminal. It will replace the command line with a table of currently running processes, which updates every few seconds. The following demonstrates a user's screen after running the top command. top - 08:18:11 up 2 days, 46 min, 1 user, load average: 0.00, 0.01, 0.00 Tasks: 111 total, 1 running, 110 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: k total, k used, k free, k buffers Swap: k total, 0k used, k free, k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1652 root m 17m 5328 S :08.68 Xorg 1782 gdm m 14m 10m S :12.93 gdm-simple-gree 1765 gdm m 12m 9560 S :04.38 gnome-settings gdm m 11m 9072 S :00.05 plymouth-log-vi 1780 gdm m 10m 8260 S :06.56 gnome-power-man 1778 gdm m S :01.68 metacity 1740 gdm m S :00.16 gnome-session 1779 gdm m S :00.01 polkit-gnome-au 1747 gdm m S :01.34 gconfd root S :00.11 NetworkManager 1385 haldaemo S :01.95 hald 1565 root m S :00.61 abrtd 1764 gdm m S :02.40 at-spi-registry 1794 gdm m S :00.08 pulseaudio 1785 root S :00.15 polkitd 8054 root S :00.09 sshd 1183 root m S :00.07 rsyslogd While the command is running, the keyboard is "live". In other words, the top command will respond to single key presses without waiting for a return key. The following table lists some of the more commonly used keys. Table 1.4. Commonly used top Commands Key Press q h or? s space M P F or O Command quit help set the delay between updates (in seconds) update display Sort processes by Memory Size Sort processes by CPU (Processor) Activity Select a sort field 11

12 An Introduction to Processes Key Press Command < > Move sort field: '<' next col left; '>' next col right u k r Reduce display to processes owned by a specific user Kill a process (send a process a signal) Renice a process The last two command, which either kill or renice a process, use concepts that we will cover in more detail in a later Lesson. Although most often run without command line configuration, top does support the following command line switches. Table 1.5. Command Line Switches for the top Command Switch Effect -d secs Delay secs seconds between refreshes (Default = 5 seconds). -q Refresh as often as possible. -n N Run for N iterations, then exit. -b Run in "batch mode", writing simply as if to a dumb terminal. Monitoring Processes with the gnome-system-monitor Application If running an X server, the GNOME desktop environment provides an application similar in function to top, with the benefits (and drawbacks) of a graphical application. The application can be started from the command line as gnome-system-monitor, or by selecting the System : Administration : System Monitor menu item. Figure 1.1. The GNOME System Monitor 12

13 An Introduction to Processes Like the top command, the System Monitor displays a list of processes running on the local machine, refreshing the list every few seconds. In its default configuration, the System Monitor provides a much simpler interface: it lists only the processes owned by the user who started the application, and reduces the number of columns to just the process's command, owner, Process ID, and simple measures of the process's Memory and CPU utilization. Processes may be sorted by any one of these fields by simply clicking on the column's title. When right-clicking on a process, a pop-up menu allows the user to perform many of the actions that top allowed, such as renicing or killing a process, though again with a simpler (and not as flexible) interface. Figure 1.2. Right Clicking on a Process in the GNOME System Monitor The System Monitor may be configured by opening the Edit : Preferences menu selection. Within the Preferences dialog, the user may set the update interval (in seconds), and configure many more fields to be displayed. Figure 1.3. Configuring Display Fields in the GNOME System Monitor 13

14 An Introduction to Processes Locating processes with the pgrep Command. Often, users are trying to locate information about processes identified by the command they are running, or the user who is running them. One technique is to list all processes, and use the grep command to reduce the information. In the following, maxwell first looks for all instances of the sshd daemon, and then for all processes owned by the user maxwell. maxwell]$ ps aux grep sshd root ? Ss Jul18 0:00 /usr/sbin/sshd maxwell pts/0 S+ 08:51 0:00 grep sshd maxwell]$ ps aux grep maxwell root pts/0 S 08:51 0:00 su - maxwell maxwell pts/0 S 08:51 0:00 -bash maxwell pts/0 Sl 08:52 0:02 /usr/lib64/firefox-3.6/firefox maxwell ? S 08:52 0:00 /usr/libexec/gconfd-2 maxwell pts/0 R+ 08:53 0:00 ps aux maxwell pts/0 S+ 08:53 0:00 grep maxwell While maxwell can find the information he needs, there are some unpleasant issues. 1. The approach is not exacting. Notice that, in the second search, a su process showed up, not because it was owned by maxwell, but because the word maxwell was one of its arguments. 2. Similarly, the grep command itself usually shows up in the output. 3. The compound command can be awkward to type. In order to address these issues, the pgrep command was created. Named pgrep for obvious reasons, the command allows users to quickly list processes by command name, user, terminal, or group. pgrep [SWITCHES] [PATTERN] Its optional argument, if supplied, is interpreted as an extended regular expression pattern to be matched against command names. The following command line switches may also be used to qualify the search. Table 1.6. Common Command Line Switches for Specifying pgrep Process Selection Criteria Switch Effect -n Select only the newest (most recently started) matching process. -u USER Select processes owned by the user USER. -t TERM Select processes controlled by terminal TERM. In addition, the following command line switches can be use to qualify the output formatting of the command. Table 1.7. Formatting Common Command Line Switches for Specifying pgrep Output Switch Effect -d delimiter Use delimiter to delimit each process ID (by default, a newline is used). -l List process name as well as process ID. For a complete list of switches, consult the pgrep(1) man page. 14

15 An Introduction to Processes As a quick example, maxwell will repeat his two previous process listings, using the pgrep command. [maxwell@station maxwell]$ pgrep -l sshd 1474 sshd [maxwell@station maxwell]$ pgrep -lu maxwell bash firefox gconfd-2 Examples Viewing All Processes with the "User Oriented" Format In the following transcript, maxwell uses the ps -e u command to list all processes (-e) with the "user oriented" format (u). [maxwell@station maxwell]$ ps -e u USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root ? S Oct12 0:04 init [ root ? SW Oct12 0:00 [keventd] root ? SW Oct12 0:00 [kapmd]... root ? SW Oct12 0:00 [kjournald] root tty2 S Oct12 0:00 /sbin/mingetty tt root ? S Oct12 0:00 /sbin/dhclient -1 root ? S Oct12 0:00 syslogd -m 0 root ? S Oct12 0:00 klogd -x rpc ? S Oct12 0:00 portmap... maxwell ? S Oct12 0:02 nautilus --no-def maxwell ? S Oct12 0:00 magicdev --sm-cli maxwell ? S Oct12 0:00 eggcups --sm-clie maxwell ? S Oct12 0:00 pam-panel-icon -- maxwell ? S Oct12 0:41 /usr/bin/python / root ? S Oct12 0:00 /sbin/pam_timesta maxwell ? S Oct12 0:00 /usr/libexec/noti maxwell ? S Oct12 15:28 gnome-system-moni apache ? S Oct12 0:00 /usr/sbin/httpd... maxwell pts/5 S 07:35 0:00 -bash maxwell pts/5 R 07:35 0:00 ps -e u The "user oriented" view displays the user who is running the process, the process id, and a rough estimate of the amount of CPU and memory the process is consuming, as well as the state of the process. (Process states will be discussed in the next Lesson). Viewing A User's Processes with the "Long" Format In the following transcript, maxwell uses the ps -U maxwell l command to list his own processes (-U maxwell) with the "long " format (l). [maxwell@station maxwell]$ ps -U maxwell l F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND schedu S? 0:02 /usr/bin/gnom schedu S? 0:00 /usr/bin/ssh schedu S? 0:00 /usr/libexec/ schedu S? 0:00 /usr/libexec/ schedu S? 0:00 gnome-setting schedu S? 0:00 xscreensaver schedu S? 0:08 /usr/bin/meta schedu S? 0:05 gnome-panel schedu S? 0:02 nautilus --no 15

16 An Introduction to Processes schedu S? 0:00 magicdev --sm schedu S? 0:00 eggcups --sm schedu S? 0:00 pam-panel-ico schedu S? 0:43 /usr/bin/pyth schedu S? 0:00 /sbin/pam_tim schedu S? 0:00 /usr/libexec/ schedu S? 15:43 gnome-system wait4 S pts/5 0:00 -bash schedu SN? 0:00 pulsar -root R pts/5 0:00 ps -U maxwell The long format focuses on scheduling parameters, such as the priority and niceness of the process, which will be discussed in a later Lesson. Viewing A Particular Command with the "job oriented" Format In the following transcript, maxwell uses the ps -C bash j command to list all instances of the bash command (-C bash) with the "job oriented " format (j). [maxwell@station maxwell]$ ps -C bash j PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND pts/ S :01 bash pts/ S :04 bash pts/ S :00 bash pts/ S :00 bash pts/ S :00 bash pts/ S :00 bash pts/ S :00 bash pts/ S 515 0:00 -bash The job oriented format focuses on parent processes, process groups, session groups, and controlling terminals. Many of these concepts will be discussed in later workbooks. Curious that the parent process of many of these shells seems to be process ID 1184, maxwell goes on to examine that individual process in detail. [maxwell@station maxwell]$ ps u 1184 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND einstein ? S Oct12 2:51 /usr/bin/gnome-te Apparently, all of the bash shells were started from within a gnome-terminal. Viewing Processes with a Custom Format Curious to see what aspects of a process can be displayed with the ps command, maxwell uses ps L to list all possible headers. [maxwell@station maxwell]$ ps L %cpu %CPU %mem %MEM alarm ALARM args COMMAND blocked BLOCKED bsdstart START bsdtime TIME c C... vsize VSZ vsz VSZ wchan WCHAN 16

17 An Introduction to Processes Curious about the majflt field, maxwell wants to see how many major memory faults processes have had, and uses the -o command line switch to list the number of faults and the command. maxwell]$ ps -e -o majflt,cmd MAJFLT CMD 41 init [5] 0 [migration/0] 0 [ksoftirqd/0] 0 [watchdog/0]... 0 auditd 14 python /sbin/audispd 0 syslogd -m 0 0 klogd -x 0 mcstransd 1 portmap 40 /usr/bin/python -E /usr/sbin/setroubleshootd 0 rpc.statd To better organize the output, he sorts (reverse) numerically, and only lists the top 5 processes. [maxwell@station ~]$ ps -e -o majflt,cmd sort -rn head 42 /usr/bin/python /usr/sbin/yum-updatesd 41 init [5] 40 /usr/bin/python -E /usr/sbin/setroubleshootd 24 /usr/sbin/gdm-binary -nodaemon 14 python /sbin/audispd 12 nautilus --no-default-window --sm-client-id default3 8 /usr/bin/python -E /usr/bin/sealert -s 5 /usr/lib/firefox /firefox-bin 5 cupsd 5 automount Online Exercises Lab Exercise Specification Objective: View Process Information Estimated Time: 20 mins. In order to have a fixed set of processes to examine, you are to take a snapshot of all current processes on your machine. Use the following sequence of commands to first capture the headers for the columns of the ps aux command into a file called snapshot. Next rerun the ps aux command, stripping the header and sorting the remainder of the output by the size of each process's virtual memory. The sorted list of processes will then be appended to the previously captured header in the file snapshot. It's easier than it sounds. [student@station student]$ ps aux head -1 > snapshot [student@station student]$ ps aux --noheader sort -rn -k4 >> snapshot [student@station student]$ head -5 snapshot USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND einstein ? S Oct12 2:01 /usr/bin/galeonroot ? S Oct12 163:48 /usr/x11r6/bin/x einstein ? S Oct12 3:00 /usr/bin/gnome-t einstein ? S Oct12 0:11 /usr/bin/python Use your snapshot file to answer the following questions. 17

18 An Introduction to Processes 1. In the file ~/biggest.pid, store the process ID of the process with the largest size of virtual memory (the VSZ column). 2. Experiment with the cut command, until you can extract the initial single letter column of the STAT Field. It should be filled almost exclusively R 's and S 's, implying that processes are in the Running or Sleeping state. Save this one extracted column (minus the header!) into a file called ~/ pstates.txt. 3. Use the grep command, perhaps with the wc command, to determine how many instances of the program /sbin/mingetty are running. Store the answer as a single number in the file ~/ nmingetty.txt. 4. Use the grep command, perhaps with the wc command, to determine how many processes are running as the user root. Store the answer as a single number in the file ~/nroot.txt. 5. Start the top command in a terminal, and leave it running while you grade your exercise. Do not edit or remove your snapshot file until you have finished grading your exercise. Deliverables The file ~/biggest.pid, which contains the process ID of the process with the largest virtual memory. Questions 2. The file ~/pstates.txt, which contains the extracted column of process states, minus the header line. 3. The file ~/nmingetty.txt, which contains the number of instances of the /sbin/ mingetty program were running on your machine. 4. The file ~/nroot.txt, which contains the number of processes running as the user root on the machine. 5. A running instance of the top command. 1. Which of the following commands can be used to view processes running on a Red Hat Enterprise Linux Machine? a. ps b. top c. gnome-system-monitor d. A and B e. All of the Above 2. Which of the following command lines would list all processes for the user maxwell? a. ps -a maxwell b. ps -k maxwell 18

19 An Introduction to Processes c. ps -U maxwell d. ps -l maxwell e. None of the above 3. When running the top command, which key is used to sort processes by CPU activity? a. C b. A c. P d. U e. None of the above 4. When running the top command, which key is used to sort processes by Memory size? a. M b. S c. V d. T e. None of the above 5. Which of the following command lines would display a listing for every process on the machine? a. ps -e l b. ps ax f c. ps aux d. ps -A j e. All of the above 6. When using the GNOME System Monitor, how does one add new fields to the display? a. By right clicking in any column title, and choosing "Add New Column". b. By choosing the Edit:Preferences menu selection. c. By pressing the C key. d. By clicking the "More Info" button. e. None of the above 7. When using the GNOME System Monitor, how does one change the order in which processes are sorted? a. By pressing the S key. 19

20 An Introduction to Processes b. By clicking in the appropriate column title. c. By choosing the Edit:Preferences menu selection. d. By clicking the "Sort By" button. e. None of the above 8. Which of the following commands lists fields available for custom formatting of the ps command's output? a. ps l b. ps --list c. ps V d. ps --columns e. None of the above 9. Which of the following would list all instances of the httpd command? a. ps --cmd httpd b. ps p httpd c. ps -C httpd d. ps -l httpd e. None of the above 10. Which of the following command line switches to the ps command is used to specify custom formatting? a. -o b. -c c. --custom d. -f e. None of the above 20

21 Chapter 2. Process States Key Concepts In Linux, the first process, /sbin/init, is started by the kernel on bootup. All other processes are the result of a parent process duplicating itself, or forking. A process begins executing a new command through a process called execing. Often, new commands are run by a process (often a shell) first forking, and then execing. This mechanism is referred to as the fork and exec mechanism. Processes can always be found in one of five well defined states: runnable, voluntarily sleeping, involuntarily sleeping, stopped, or zombie. Process ancestry can be viewed with the pstree command. When a process dies, it is the responsibility of the process's parent to collect it's return code and resource usage information. When a parent dies before it's children, the orphaned children are inherited by the first process (usually /sbin/init). Discussion A Process's Life Cycle How Processes are Started In Linux (and Unix), unlike many other operating systems, process creation and command execution are two separate concepts. Though usually a new process is created so that it can run a specified command (such as the bash shell creating a process to run the chmod command), processes can be created without running a new command, and new commands can be executed without creating a new process. Creating a New Process (Forking) New processes are created through a technique called forking. When a process forks, it creates a duplicate of itself. Immediately after a fork, the newly created process (the child) is an almost exact duplicate of the original process (the parent). The child inherits an identical copy of the original process's memory, any open files of the parent, and identical copies of any parameters of the parent, such as the current working directory or umask. About the only difference between the parent and the child is the child's heritage information (the child has a different process ID and a different parent process ID, for starters), and (for the programmers in the audience) the return value of the fork() system call. 21

22 Process States As a quick aside for any programmers in the audience, a fork is usually implemented using a structure similar to the following. int rc, child_pid; rc = fork(); if (rc == -1) { perror("bad fork"); } else if (rc == 0) { do_child(); } else { child_pid = rc; do_parent(child_pid); } When a process wants to create a new process, it calls the fork() system call (with no arguments). Though only one process enters the fork() call, two processes return from in. For the newly created process (the child), the return value is 0. For the original process (the parent), the return value is the process ID of the child. By branching on this value, the child may now go off to do whatever it was started to do (which often involves exec()ing, see next), and the parent can go on to do its own thing. Executing a New Command (Exec-ing) New commands are run through a technique called execing (short for executing). When execing a new command, the current process wipes and releases most of its resources, and loads a new set of instructions from the command specified in the filesystem. Execution starts with the entry point of the new program. After execing, the new command is still the same process. It has the same process ID, and many of the same parameters (such as its resource utilization, umask, current working directory, and others). It merely forgets its former command, and adopts the new one. Again for any programmers, execs are performed through one of several variants of the execve() system call, such as the execl() library call. rc = execl("chmod", "chmod 755 /etc/passwd"); perror("bad exec"); The process enters the the execl(...) call, specifying the new command to run. If all goes well, the execl(...) call never returns. Instead, execution picks up at the entry point (i.e., main()) of the new program. If for some reason execl(...) does return, it must be an 22

23 Process States error (such as not being able to locate the command's executable in the filesystem). Combining the Two: Fork and Exec Some programs may fork without execing. Examples include networking daemons, who fork a new child to handle a specific client connection, while the parent goes back to listen for new clients. Other programs might exec without forking. Examples include the login command, which becomes the user's login shell after successfully confirming a user's password. Most often, and for shell's in particular, however, forking and execing go hand and hand. When running a command, the bash shell first forks a new bash shell. The child then execs the appropriate command, while the parent waits for the child to die, and then issues another prompt. The Lineage of Processes (and the pstree Command) Upon booting the system, one of the responsibilities of the Linux kernel is to start the first process (usually /sbin/init). All other processes are started because an already existing process forked. 1 Because every process except the first is created by forking, there exists a well defined lineage of parent child relationships among the processes. The first process started by the kernel starts off the family tree, which can be examined with the pstree command. [maxwell@station maxwell]$ pstree init-+-apmd -atd -automount -battstat-applet... -evolution-execu -evolution-mail -fetchmail -galeon-bin -gconfd-1-2*[gconfd-2] -gdm-binary-+-gdm-binary-+-x `-gnome-session---ssh-agent `-gdm-binary---gnome-session---ssh-agent -2*[gnome-panel] -2*[gnome-settings-] -gnome-system-mo -gnome-terminal-+-3*[bash] -bash---man---sh---sh---less -bash---mutt -bash---su---bash---pstree `-gnome-pty-helpe -gpm -gvim -httpd---11*[httpd] -kapmd -keventd -khubd 1 Linux also includes kernel threads, which in special situations may fork and exec to become user processes, confusing matters. This behavior is not usually found in traditional Unix, however, and is very much the exception instead of the rule. 23

24 Process States... How a Process Dies Orphans Zombies When a process dies, it either dies normally by electing to exit, or abnormally as the result of receiving a signal. We here discuss a normally exiting process, postponing a discussion of signals until a later Lesson. We have mentioned previously that processes leave behind a status code (also called return value) when they die, in the form of an integer. (Recall the bash shell, which uses the $? variable to store the return value of the previously run command.) When a process exits, all of its resources are freed, except the return code (and some resource utilization accounting information). It is the responsibility of the process's parent to collect this information, and free up the last remaining resources of the dead child. For example, when the bash shell forks and execs the chmod command, it is the parent bash shell's responsibility to collect the return value from the exited chmod command. If it is a parent's responsibility to clean up after their children, what happens if the parent dies before the child does? The child becomes an orphan. One of the special responsibilities of the first process started by the kernel is to "adopt" any orphans. (Notice that in the output of the pstree command, the first process has a disproportionately large number of children. Most of these were adopted as the orphans of other processes). In between the time when a process exits, freeing most of its resources, and the time when its parent collects its return value, freeing the rest of its resources, the child process is in a special state referred to as a Zombie. Every process passes through a transient zombie state. Usually, users need to be looking at just the right time (with the ps command, for example) to witness a zombie. They show up in the list of processes, but take up no memory, no CPU time, or any other system resources. They are just the shadow of a former process, waiting for their parent to come and finish them off. Negligent Parents and Long Lived Zombies Occasionally, parent processes can be negligent. They start child processes, but then never go back to clean up after them. When this happens (usually because of a programmer's error), the child can exit, enter the zombie state, and stay there. This is usually the case when users witness zombie processes using, for example, the ps command. Getting rid of zombies is perhaps the most misunderstood basic Linux (and Unix) concept. Many people will say that there is no way to get rid of them, except by rebooting the machine. Using the clues discussed in this section, can you figure out how to get rid of long lived zombies? You get rid of zombies by getting rid of the negligent parent. When the parent dies (or is killed), the now orphaned zombie gets adopted by the first process, which is almost always /sbin/init. /sbin/init is a very diligent parent, who always cleans up after its children (including adopted orphans). The 5 Process States The previous section discussed how processes are started, and how they die. While processes are alive they are always in one of five process states, which effect how and when they are allowed to have access to the CPU. The following lists each of the five states, along with the conventional letter that is used by the ps, top, and other commands to identify a process's current state. 24

25 Process States Runnable (R) Voluntary (Interruptible) Sleep (S) Involuntary (Non-interruptible) Sleep (D) Processes in the Runnable state are processes that, if given the opportunity to access the CPU, would take it. More formally, this is know as the Running state, but because only one process may be executing on the CPU at any given time, only one of these processes will actually be "running" at any given instance. Because runnable processes are switched in and out of the CPU so quickly, however, the Linux system gives the appearance that all of the processes are running simultaneously. As the name implies, a process which is in a voluntary sleep elected to be there. Usually, this is a process that has nothing to do until something interesting happens. A classic example is a networking daemon, such as the httpd process that implements a web server. In between requests from a client (web browser), the server has nothing to do, and elects to go to sleep. Another example would be the top command, which lists processes every five seconds. While it is waiting for five seconds to pass, it drops itself into a voluntary sleep. When something that the process in interested in happens (such as a web client makes a request, or a five second timer expires), the sleeping process is kicked back into the Runnable state. Occasionally, two processes try to access the same system resource at the same time. For example, one process attempts to read from a block on a disk while that block is being written to because of another process. In these situations, the kernel forces the process into an involuntary sleep. The process did not elect to sleep, it would prefer to be runnable so it can get things done. When the resource is freed, the kernel will put the process back into the runnable state. Although processes are constantly dropping into and out of involuntary sleeps, they usually do not stay there long. As a result, users do not usually witness processes in an involuntary sleep except on busy systems. Stopped (Suspended) Processes (T) Occasionally, users decide to suspend processes. Suspended processes will not perform any actions until they are restarted by the user. In the bash shell, the CTRL+Z key sequence can be used to suspend a process. In programming, debuggers often suspend 25

26 Process States the programs the are debugging when certain events happen (such as breakpoints occur). Zombie Processes (Z) Viewing Process States As mentioned above, every dieing process goes through a transient zombie state. Occasionally, however, some get stuck there. Zombie processes have finished executing, and have freed all of their memory and almost all of their resources. Because they are not consuming any resources, they are little more than an annoyance that can show up in process listings. When viewing the output of commands such as ps and top, process states are usually listed under the heading STAT. The process is identified by one of the following letters. Runnable - R Sleeping - S Stopped - T Uninterruptible sleep - D Zombie - Z Examples Identifying Process States [maxwell@station maxwell]$ ps -alx F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND schedu S? 0:06 init wait4 S tty3 0:00 -bash schedu S tty4 0:00 -bash down D pts/3 0:00 updatedb R pts/3 0:00 updatedb do_sig T tty4 0:00 vim proj1_s schedu S tty3 2:57 top do_exi Z? 0:00 [netstat wait4 S pts/0 0:00 vim c wait4 S pts/0 0:00 /bin/bash wait4 S pts/0 0:00 /bin/bash R pts/0 0:00 ps -alx pipe_w S pts/0 0:00 tail A (voluntarily) sleeping process. The init process is waiting for something "interesting" to happen, such a newly created orphan to inherit. A (involuntarily) sleeping, or "blocked" process. The updatedb command is competing for some resource on the system, probably with the other instance of the updatedb process just below it. A stopped process. This vim editor has probably been manually suspended with the CTRL+Z key sequence. A zombie process, probably left by a negligent galeon web browser. A runnable process, in this case the running ps command. 26

27 Process States Online Exercises Lab Exercise Specification Objective: Explore different process states Estimated Time: 10 mins. 1. In order to explore process states, we must create processes which are competing for the same resources. Use a simple text editor to create the following script, store it as ~/clobber_it.sh, and make it executable. [maxwell@station maxwell]$ cat clobber_it.sh #!/bin/bash for i in $(seq 1000); do echo "hello world" > poor_overworked_file done 2. While this script will write to the poor, overworked file 1000 times, it will do it sequentially, and so will never be competing for access to the file. Because we need multiple processes competing over the same resource, create the following script as well. Name it ~/clobber_it_lots.sh, and make it executable. [maxwell@station maxwell]$ cat clobber_it_lots.sh #!/bin/bash for i in $(seq 1000); do./clobber_it.sh & done That should do the trick. 3. In one terminal, run the command top -q. This should run the top command, updating continuously. While top is running, use the U command to limit the display to your own processes (i.e., type in your own username). 4. When we say go, in a separate terminal (either another terminal window in an X graphical environment, or a separate virtual console), run the script really_clobber_it.sh. This will start about 1000 processes on your machine, which will obviously stress the system, but it should be able to handle it. 2 The system may seem sluggish, but with patience, it should still be responsive. If things get unbearable, the script can be canceled with a CTRL+C. We haven't said go yet. 5. While the script is running, observe the terminal with the top command. You should see many processes starting and stopping, as well as many processes in the D (involuntary sleep) state. If you are lucky, you might even catch a zombie. We haven't said go yet. 6. Also while the script is running, in yet another terminal, run the ps aux command, and redirect the output to the file ~/lotsa_processes.txt. Glance at the contents of the script, and make sure that at lest five processes in the D state have been recorded. We still haven't said go yet. 7. Go. 8. After you have created your ~/lotsa_processes.txt file, and feel that you have gotten the point, you can cancel the clobber_it_lots.sh script with a CTRL+C, and quit the top command. 27

28 Process States Deliverables 1. Questions 1. The file ~/lotsa_processes.txt, which contains the output of the ps aux command, with at least 5 instances of a process in the D (uninterruptible sleep) state. 1. If a process were expecting keyboard input before continuing, which state would it be in? a. voluntary sleep b. involuntary sleep c. runnable d. stopped e. zombie 2. The Apache Web Server uses multiple httpd processes, so it can serve multiple concurrent requests. If hundreds of were to request information stored in the same file concurrently, which state would most of the httpd processes be found in? a. stopped b. voluntary sleep c. zombie d. runnable e. involuntary sleep 3. A physics simulation is performing intensive numerical calculations. What state would the process probably be found in? a. voluntary sleep b. runnable c. involuntary sleep d. stopped e. zombie 4. You have suspended the vi editor with the CTRL+Z key combination. Which state would the process be found in? a. runnable b. voluntary sleep c. involuntary sleep d. stopped 28

29 Process States e. zombie 5. You are running a complicated application (such as evolution), that uses many subprocesses to perform its various tasks. Occasionally, some of the subprocesses seem to be finished (taking no memory or CPU time), but still show up in the process list. What state are these subprocesses in? a. zombie b. stopped c. runnable d. involuntary sleep e. voluntary sleep 6. While observing a list of processes, your friend is concerned about a few zombie processes which show up. What advice should you give her? a. Your friend should reboot the machine when its convenient, because the zombie processes will slowly begin consuming more and more resources. b. Your friend should not be too concerned. They are not consuming resources, and will go away when their parent process dies. Besides, they're fun to talk about. c. Your friend should reboot the machine immediately, before the zombie processes begin infecting other processes, turning them into zombies as well. What a ghoulish nightmare that would be. d. Your friend should log out and log back on again to get rid of the zombies. e. None of the above suggestions apply. 7. What does Linux (and Unix) call the act of creating a new process? a. spawning b. forking c. launching d. execing e. None of the above 8. What does Linux (and Unix) call the act of executing a new command? a. spawning b. forking c. launching d. execing e. None of the above 9. Which letter does ps and top use to represent the involuntary sleep state? 29

30 Process States a. I b. T c. D d. Z e. None of the above 10. Which letter does ps and top use to represent the stopped (suspended) state? a. I b. T c. D d. Z e. None of the above 30

31 Chapter 3. Process Scheduling: nice and renice Key Concepts A primary task of the Linux kernel is scheduling processes. Every process has a niceness value that influences its scheduling. The nice and renice commands can change a process's scheduling priority. Discussion Process Scheduling Nomenclature One of the fundamental tasks of the Linux kernel is ensure that processes share system resources effectively. One of the most fundamental resources which has to be shared is the CPU. How the kernel decides which process gets to execute on the CPU at which time is known as scheduling. Every process has two values which influence its scheduling. The first is a dynamic value which is constantly being changed by the kernel. The second is a fixed value, which is only occasionally (if ever) explicitly changed by a user. In the open source community, the nomenclature used to describe these two values has been inconsistent (at best), which leads to confusion. As much as possible, this text will try to be consistent with the ps and top command, and refer to the first (dynamic) value as the process's priority, and the second (fixed) value as the process's niceness. Process Scheduling, in Essence Recently, much attention has been focused on methods used by the Linux kernel to implement scheduling, and the technique has varied from kernel release to kernel release. While the following discussion is not correct at a detailed level, it nevertheless conveys the essence of how the Linux kernel schedules processes. In order to more easily illustrate scheduling, maxwell will start four versions of the cat command, running in the background. (Processes can be run in the background by appending an ampersand ( & ), as will be discussed in a later Lesson). The cat commands read from /dev/zero (a pseudo device that acts as an infinite source of binary zeros), and write to /dev/null (a pseudo device which throws away everything that is written to it). [maxwell@station maxwell]$ cat /dev/zero > /dev/null & [1] 6698 [maxwell@station maxwell]$ cat /dev/zero > /dev/null & [2] 6699 [maxwell@station maxwell]$ cat /dev/zero > /dev/null & [3] 6700 [maxwell@station maxwell]$ cat /dev/zero > /dev/null & [4] 6701 How long will these cat commands run? Forever. The user maxwell next monitors the processes on his machine using the top command. top - 07:41:10 up 51 min, 2 users, load average: 3.55, 1.39, 0.51 Tasks: 123 total, 8 running, 115 sleeping, 0 stopped, 0 zombie 31

Process Management forks, bombs, zombies, and daemons! Lecture 5, Hands-On Unix System Administration DeCal

Process Management forks, bombs, zombies, and daemons! Lecture 5, Hands-On Unix System Administration DeCal Process Management forks, bombs, zombies, and daemons! Lecture 5, Hands-On Unix System Administration DeCal 2012-10-01 what is a process? an abstraction! you can think of it as a program in the midst of

More information

Chapter 9: Process management. Chapter 9 Process management

Chapter 9: Process management. Chapter 9 Process management Chapter 9: Process management Chapter 9 Process management Last revised: 19/7/2004 Chapter 9 Outline In this chapter we will learn about: Processes and process concepts Examining processes Adjusting process

More information

Linux System Administration

Linux System Administration System Processes Objective At the conclusion of this module, the student will be able to: Describe and define a process Identify a process ID, the parent process and the child process Learn the PID for

More information

Sperimentazioni I LINUX commands tutorial - Part II

Sperimentazioni I LINUX commands tutorial - Part II Sperimentazioni I LINUX commands tutorial - Part II A. Garfagnini, M. Mazzocco Università degli studi di Padova 24 Ottobre 2012 Streams and I/O Redirection Pipelines Create, monitor and kill processes

More information

Unix Processes. What is a Process?

Unix Processes. What is a Process? Unix Processes Process -- program in execution shell spawns a process for each command and terminates it when the command completes Many processes all multiplexed to a single processor (or a small number

More information

Process States. Controlling processes. Process states. PID and PPID UID and EUID GID and EGID Niceness Control terminal. Runnable. Sleeping.

Process States. Controlling processes. Process states. PID and PPID UID and EUID GID and EGID Niceness Control terminal. Runnable. Sleeping. Controlling processes PID and PPID UID and EUID GID and EGID Niceness Control terminal 1 Process States Process states Runnable The process can be executed Waiting for CPU Sleeping The process is waiting

More information

CSN09101 Networked Services. Module Leader: Dr Gordon Russell Lecturers: G. Russell

CSN09101 Networked Services. Module Leader: Dr Gordon Russell Lecturers: G. Russell CSN09101 Networked Services Week 3 : Users, Permissions, Processes, and Pipes Module Leader: Dr Gordon Russell Lecturers: G. Russell This lecture Users File permissions Processes Hard and soft links USERS

More information

Processes. System tasks Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

Processes. System tasks Campus-Booster ID : **XXXXX.  Copyright SUPINFO. All rights reserved Processes System tasks Campus-Booster ID : **XXXXX www.supinfo.com Copyright SUPINFO. All rights reserved Processes Your trainer Presenter s Name Title: **Enter title or job role. Accomplishments: **What

More information

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu

CPSC 341 OS & Networks. Processes. Dr. Yingwu Zhu CPSC 341 OS & Networks Processes Dr. Yingwu Zhu Process Concept Process a program in execution What is not a process? -- program on a disk A process is an active object, but a program is just a file It

More information

Operating Systems Lab 1 (Users, Groups, and Security)

Operating Systems Lab 1 (Users, Groups, and Security) Operating Systems Lab 1 (Users, Groups, and Security) Overview This chapter covers the most common commands related to users, groups, and security. It will also discuss topics like account creation/deletion,

More information

Review of Fundamentals

Review of Fundamentals Review of Fundamentals 1 The shell vi General shell review 2 http://teaching.idallen.com/cst8207/14f/notes/120_shell_basics.html The shell is a program that is executed for us automatically when we log

More information

Systems Programming/ C and UNIX

Systems Programming/ C and UNIX Systems Programming/ C and UNIX Alice E. Fischer Lecture 6: Processes October 9, 2017 Alice E. FischerLecture 6: Processes Lecture 5: Processes... 1/26 October 9, 2017 1 / 26 Outline 1 Processes 2 Process

More information

Bamuengine.com. Chapter 7. The Process

Bamuengine.com. Chapter 7. The Process Chapter 7. The Process Introduction A process is an OS abstraction that enables us to look at files and programs as their time image. This chapter discusses processes, the mechanism of creating a process,

More information

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Week 03 Lecture 12 Create, Execute, and Exit from a Process

More information

The Unix Shell & Shell Scripts

The Unix Shell & Shell Scripts The Unix Shell & Shell Scripts You should do steps 1 to 7 before going to the lab. Use the Linux system you installed in the previous lab. In the lab do step 8, the TA may give you additional exercises

More information

Removing files and directories, finding files and directories, controlling programs

Removing files and directories, finding files and directories, controlling programs Removing files and directories, finding files and directories, controlling programs Laboratory of Genomics & Bioinformatics in Parasitology Department of Parasitology, ICB, USP Removing files Files can

More information

CPSC 457 OPERATING SYSTEMS MIDTERM EXAM

CPSC 457 OPERATING SYSTEMS MIDTERM EXAM CPSC 457 OPERATING SYSTEMS MIDTERM EXAM Department of Computer Science University of Calgary Professor: Carey Williamson March 9, 2010 This is a CLOSED BOOK exam. Textbooks, notes, laptops, calculators,

More information

Most of the work is done in the context of the process rather than handled separately by the kernel

Most of the work is done in the context of the process rather than handled separately by the kernel Process Control Process Abstraction for a running program Manages program s use of memory, cpu time, and i/o resources Most of the work is done in the context of the process rather than handled separately

More information

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1 Review of Fundamentals Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 GPL the shell SSH (secure shell) the Course Linux Server RTFM vi general shell review 2 These notes are available on

More information

elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at

elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at Processes 1 elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at 2 elinks is a text-based (character mode) web browser we will use it to enable

More information

PROCESSES. Jo, Heeseung

PROCESSES. Jo, Heeseung PROCESSES Jo, Heeseung TODAY'S TOPICS What is the process? How to implement processes? Inter-Process Communication (IPC) 2 WHAT IS THE PROCESS? Program? vs. Process? vs. Processor? 3 PROCESS CONCEPT (1)

More information

Processes. Jo, Heeseung

Processes. Jo, Heeseung Processes Jo, Heeseung Today's Topics What is the process? How to implement processes? Inter-Process Communication (IPC) 2 What Is The Process? Program? vs. Process? vs. Processor? 3 Process Concept (1)

More information

elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at

elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at Processes 1 elinks, mail processes nice ps, pstree, top job control, jobs, fg, bg signals, kill, killall crontab, anacron, at 2 elinks is a text-based (character mode) web browser we will use it to enable

More information

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1 Review of Fundamentals Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 The CST8207 course notes GPL the shell SSH (secure shell) the Course Linux Server RTFM vi general shell review 2 Linux

More information

bash, part 3 Chris GauthierDickey

bash, part 3 Chris GauthierDickey bash, part 3 Chris GauthierDickey More redirection As you know, by default we have 3 standard streams: input, output, error How do we redirect more than one stream? This requires an introduction to file

More information

APPLIED INFORMATICS Processes. Bash characteristics. Command type. Aliases.

APPLIED INFORMATICS Processes. Bash characteristics. Command type. Aliases. Lab 3 APPLIED INFORMATICS Processes. Bash characteristics. Command type. Aliases. Today... /proc /run 1. PROCESSES 2. BASH CHARACTERISTICS 3. COMMAND TYPES 4. ALIASES $$ $PPID pidof ps pgrep kill killall

More information

Checking Resource Usage in Fedora (Linux)

Checking Resource Usage in Fedora (Linux) Lab 5C Checking Resource Usage in Fedora (Linux) Objective In this exercise, the student will learn how to check the resources on a Fedora system. This lab covers the following commands: df du top Equipment

More information

Managing Processes Process: A running program

Managing Processes Process: A running program Managing Processes Process: A running program User Process: The process initiated by a User while logged into a terminal (e.g. grep, find, ls) Daemon Process: These processes are usually initiated on system

More information

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017 ECE 550D Fundamentals of Computer Systems and Engineering Fall 2017 The Operating System (OS) Prof. John Board Duke University Slides are derived from work by Profs. Tyler Bletsch and Andrew Hilton (Duke)

More information

Programs. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic

Programs. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic Programs Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic Types of Processes 1. User process: Process started

More information

PROCESSES. At least they re not ISO-9001 processes

PROCESSES. At least they re not ISO-9001 processes PROCESSES At least they re not ISO-9001 processes STRUCTURE In Linux, a Process wraps up everything that is needed to know about a running piece of software The meta information not only includes the machine

More information

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3 CS162 January 19, 2017 Contents 1 Make 2 1.1 More details about Make.................................... 2 2 Git 3 2.1 Commands to know....................................... 3 3 GDB: The GNU Debugger

More information

Chapter 4 Controlling Processes

Chapter 4 Controlling Processes Chapter 4 Controlling Processes Program to Process Program is dead Just lie on disk grep is a program /usr/bin/grep % file /usr/bin/grep ELF 32-bit LSB executable When you execute it It becomes a process

More information

07 - Processes and Jobs

07 - Processes and Jobs 07 - Processes and Jobs CS 2043: Unix Tools and Scripting, Spring 2016 [1] Stephen McDowell February 10th, 2016 Cornell University Table of contents 1. Processes Overview 2. Modifying Processes 3. Jobs

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus INTERNAL ASSESSMENT TEST - 2 Date : 20/09/2016 Max Marks : 0 Subject & Code : Unix Shell Programming (15CS36) Section : 3 rd Sem ISE/CSE Name of faculty : Prof Ajoy Time : 11:30am to 1:00pm SOLUTIONS 1

More information

Please note that CNE 216 is a brand new course that has never been taught on the George campus; it will be taught for the first time in the fall of

Please note that CNE 216 is a brand new course that has never been taught on the George campus; it will be taught for the first time in the fall of Please note that CNE 216 is a brand new course that has never been taught on the George campus; it will be taught for the first time in the fall of 2015. The materials for this course are still being developed.

More information

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an

More information

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines Introduction to UNIX Logging in Basic system architecture Getting help Intro to shell (tcsh) Basic UNIX File Maintenance Intro to emacs I/O Redirection Shell scripts Logging in most systems have graphical

More information

Operating System Structure

Operating System Structure Operating System Structure CSCI 4061 Introduction to Operating Systems Applications Instructor: Abhishek Chandra Operating System Hardware 2 Questions Operating System Structure How does the OS manage

More information

Linux Fundamentals (L-120)

Linux Fundamentals (L-120) Linux Fundamentals (L-120) Modality: Virtual Classroom Duration: 5 Days SUBSCRIPTION: Master, Master Plus About this course: This is a challenging course that focuses on the fundamental tools and concepts

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,

More information

Getting to know you. Anatomy of a Process. Processes. Of Programs and Processes

Getting to know you. Anatomy of a Process. Processes. Of Programs and Processes Getting to know you Processes A process is an abstraction that supports running programs A sequential stream of execution in its own address space A process is NOT the same as a program! So, two parts

More information

2 Processes. 2 Processes. 2 Processes. 2.1 The Process Model. 2.1 The Process Model PROCESSES OPERATING SYSTEMS

2 Processes. 2 Processes. 2 Processes. 2.1 The Process Model. 2.1 The Process Model PROCESSES OPERATING SYSTEMS OPERATING SYSTEMS PROCESSES 2 All modern computers often do several things at the same time. A modern operating system sees each software as a process. When a user PC is booted, many processes are secretly

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Q) Q) What is Linux and why is it so popular? Answer - Linux is an operating system that uses UNIX like Operating system...

Q) Q) What is Linux and why is it so popular? Answer - Linux is an operating system that uses UNIX like Operating system... Q) Q) What is Linux and why is it so popular? Answer - Linux is an operating system that uses UNIX like Operating system... Q) Q) What is the difference between home directory and working directory? Answer

More information

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D)

PROCESS CONTROL BLOCK TWO-STATE MODEL (CONT D) MANAGEMENT OF APPLICATION EXECUTION PROCESS CONTROL BLOCK Resources (processor, I/O devices, etc.) are made available to multiple applications The processor in particular is switched among multiple applications

More information

Design Overview of the FreeBSD Kernel CIS 657

Design Overview of the FreeBSD Kernel CIS 657 Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler (2%

More information

Introduction to Linux

Introduction to Linux Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating

More information

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent?

Design Overview of the FreeBSD Kernel. Organization of the Kernel. What Code is Machine Independent? Design Overview of the FreeBSD Kernel CIS 657 Organization of the Kernel Machine-independent 86% of the kernel (80% in 4.4BSD) C C code Machine-dependent 14% of kernel Only 0.6% of kernel in assembler

More information

CRUK cluster practical sessions (SLURM) Part I processes & scripts

CRUK cluster practical sessions (SLURM) Part I processes & scripts CRUK cluster practical sessions (SLURM) Part I processes & scripts login Log in to the head node, clust1-headnode, using ssh and your usual user name & password. SSH Secure Shell 3.2.9 (Build 283) Copyright

More information

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo

PROCESS MANAGEMENT. Operating Systems 2015 Spring by Euiseong Seo PROCESS MANAGEMENT Operating Systems 2015 Spring by Euiseong Seo Today s Topics Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication

More information

5/20/2007. Touring Essential Programs

5/20/2007. Touring Essential Programs Touring Essential Programs Employing fundamental utilities. Managing input and output. Using special characters in the command-line. Managing user environment. Surveying elements of a functioning system.

More information

(MCQZ-CS604 Operating Systems)

(MCQZ-CS604 Operating Systems) command to resume the execution of a suspended job in the foreground fg (Page 68) bg jobs kill commands in Linux is used to copy file is cp (Page 30) mv mkdir The process id returned to the child process

More information

Operating Systems. II. Processes

Operating Systems. II. Processes Operating Systems II. Processes Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Concepts Definitions and basic concepts Process

More information

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Introduction to remote command line Linux. Research Computing Team University of Birmingham Introduction to remote command line Linux Research Computing Team University of Birmingham Linux/UNIX/BSD/OSX/what? v All different v UNIX is the oldest, mostly now commercial only in large environments

More information

Processes. CS3026 Operating Systems Lecture 05

Processes. CS3026 Operating Systems Lecture 05 Processes CS3026 Operating Systems Lecture 05 Dispatcher Admit Ready Queue Dispatch Processor Release Timeout or Yield Event Occurs Blocked Queue Event Wait Implementation: Using one Ready and one Blocked

More information

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version... Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing

More information

Creating a Shell or Command Interperter Program CSCI411 Lab

Creating a Shell or Command Interperter Program CSCI411 Lab Creating a Shell or Command Interperter Program CSCI411 Lab Adapted from Linux Kernel Projects by Gary Nutt and Operating Systems by Tannenbaum Exercise Goal: You will learn how to write a LINUX shell

More information

Operating System Concepts Ch. 3: Processes

Operating System Concepts Ch. 3: Processes Operating System Concepts Ch. 3: Processes Silberschatz, Galvin & Gagne Process Concept Recall: - Program: passive entity stored on secondary storage (executable files); instructions & initialization data.

More information

Perl and R Scripting for Biologists

Perl and R Scripting for Biologists Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications

More information

I/O and Shell Scripting

I/O and Shell Scripting I/O and Shell Scripting File Descriptors Redirecting Standard Error Shell Scripts Making a Shell Script Executable Specifying Which Shell Will Run a Script Comments in Shell Scripts File Descriptors Resources

More information

A Brief Introduction to the Linux Shell for Data Science

A Brief Introduction to the Linux Shell for Data Science A Brief Introduction to the Linux Shell for Data Science Aris Anagnostopoulos 1 Introduction Here we will see a brief introduction of the Linux command line or shell as it is called. Linux is a Unix-like

More information

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Processes. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University Processes Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu OS Internals User space shell ls trap shell ps Kernel space File System Management I/O

More information

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing Content 3 Operating Systems The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail. How to log into (and out

More information

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems. Copyleft 2005, Binnur Kurt 3 Operating Systems Copyleft 2005, Binnur Kurt Content The concept of an operating system. The internal architecture of an operating system. The architecture of the Linux operating system in more detail.

More information

CS Unix Tools. Fall 2010 Lecture 10. Hussam Abu-Libdeh based on slides by David Slater. September 29th, 2010

CS Unix Tools. Fall 2010 Lecture 10. Hussam Abu-Libdeh based on slides by David Slater. September 29th, 2010 Fall 2010 Lecture 10 Hussam Abu-Libdeh based on slides by David Slater September 29th, 2010 Vim = Awesome! Vim is a powerful lightweight text editor. The name Vim is an acronym for Vi IMproved vi is an

More information

Announcement. Exercise #2 will be out today. Due date is next Monday

Announcement. Exercise #2 will be out today. Due date is next Monday Announcement Exercise #2 will be out today Due date is next Monday Major OS Developments 2 Evolution of Operating Systems Generations include: Serial Processing Simple Batch Systems Multiprogrammed Batch

More information

COSC243 Part 2: Operating Systems

COSC243 Part 2: Operating Systems COSC243 Part 2: Operating Systems Lecture 16: Threads and data sharing Zhiyi Huang Dept. of Computer Science, University of Otago Zhiyi Huang (Otago) COSC243 Lecture 16 1 / 24 Overview Last lecture: Hierarchical

More information

S E C T I O N O V E R V I E W

S E C T I O N O V E R V I E W INPUT, OUTPUT REDIRECTION, PIPING AND PROCESS CONTROL S E C T I O N O V E R V I E W In this section, we will learn about: input redirection; output redirection; piping; process control; 5.1 INPUT AND OUTPUT

More information

User Commands ps ( 1 )

User Commands ps ( 1 ) NAME ps report process status SYNOPSIS ps [-aacdefjllpy] [-g grplist] [-n namelist] [-o format]... [-p proclist] [-s sidlist] [-t term] [-u uidlist] [-U uidlist] [-G gidlist] DESCRIPTION The ps command

More information

Unix Introduction to UNIX

Unix Introduction to UNIX Unix Introduction to UNIX Get Started Introduction The UNIX operating system Set of programs that act as a link between the computer and the user. Developed in 1969 by a group of AT&T employees Various

More information

What is a Process? Processes and Process Management Details for running a program

What is a Process? Processes and Process Management Details for running a program 1 What is a Process? Program to Process OS Structure, Processes & Process Management Don Porter Portions courtesy Emmett Witchel! A process is a program during execution. Ø Program = static file (image)

More information

5/8/2012. Controlling User Processes Chapter 10

5/8/2012. Controlling User Processes Chapter 10 Controlling User Processes Chapter 10 To describe the concept of a process, and execution of multiple processes on a computer system with a single CPU To explain how a shell executes commands To discuss

More information

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized)

Process management. What s in a process? What is a process? The OS s process namespace. A process s address space (idealized) Process management CSE 451: Operating Systems Spring 2012 Module 4 Processes Ed Lazowska lazowska@cs.washington.edu Allen Center 570 This module begins a series of topics on processes, threads, and synchronization

More information

The student will have the essential skills needed to be proficient at the Unix or Linux command line.

The student will have the essential skills needed to be proficient at the Unix or Linux command line. Table of Contents Introduction Audience At Course Completion Prerequisites Certified Professional Exams Student Materials Course Outline Introduction This challenging course focuses on the fundamental

More information

Chapter 1 - Introduction. September 8, 2016

Chapter 1 - Introduction. September 8, 2016 Chapter 1 - Introduction September 8, 2016 Introduction Overview of Linux/Unix Shells Commands: built-in, aliases, program invocations, alternation and iteration Finding more information: man, info Help

More information

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476

CSE 451: Operating Systems Winter Module 4 Processes. Mark Zbikowski Allen Center 476 CSE 451: Operating Systems Winter 2015 Module 4 Processes Mark Zbikowski mzbik@cs.washington.edu Allen Center 476 2013 Gribble, Lazowska, Levy, Zahorjan Process management This module begins a series of

More information

Community Enterprise Operating System (CentOS 7) Courses

Community Enterprise Operating System (CentOS 7) Courses Community Enterprise Operating System (CentOS 7) Courses CentOS 7 Administration I Core Skills (5 days) Advanced Linux Shell Scripting Shell Scripting (bash,ksh93) and awk Programming (3 days) Advanced

More information

Processes and Non-Preemptive Scheduling. Otto J. Anshus

Processes and Non-Preemptive Scheduling. Otto J. Anshus Processes and Non-Preemptive Scheduling Otto J. Anshus Threads Processes Processes Kernel An aside on concurrency Timing and sequence of events are key concurrency issues We will study classical OS concurrency

More information

Reading Assignment 4. n Chapter 4 Threads, due 2/7. 1/31/13 CSE325 - Processes 1

Reading Assignment 4. n Chapter 4 Threads, due 2/7. 1/31/13 CSE325 - Processes 1 Reading Assignment 4 Chapter 4 Threads, due 2/7 1/31/13 CSE325 - Processes 1 What s Next? 1. Process Concept 2. Process Manager Responsibilities 3. Operations on Processes 4. Process Scheduling 5. Cooperating

More information

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System

Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Mid Term from Feb-2005 to Nov 2012 CS604- Operating System Latest Solved from Mid term Papers Resource Person Hina 1-The problem with priority scheduling algorithm is. Deadlock Starvation (Page# 84) Aging

More information

PROCESS CONTROL: PROCESS CREATION: UNIT-VI PROCESS CONTROL III-II R

PROCESS CONTROL: PROCESS CREATION: UNIT-VI PROCESS CONTROL III-II R PROCESS CONTROL: This will describe the use and implementation of the system calls that control the process context. The fork system call creates a new process, the exit call terminates process execution,

More information

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J

Processes & Threads. Today. Next Time. ! Process concept! Process model! Implementing processes! Multiprocessing once again. ! More of the same J Processes & Threads Today! Process concept! Process model! Implementing processes! Multiprocessing once again Next Time! More of the same J The process model! Most computers can do more than one thing

More information

Lecture Topics. Announcements. Today: Threads (Stallings, chapter , 4.6) Next: Concurrency (Stallings, chapter , 5.

Lecture Topics. Announcements. Today: Threads (Stallings, chapter , 4.6) Next: Concurrency (Stallings, chapter , 5. Lecture Topics Today: Threads (Stallings, chapter 4.1-4.3, 4.6) Next: Concurrency (Stallings, chapter 5.1-5.4, 5.7) 1 Announcements Make tutorial Self-Study Exercise #4 Project #2 (due 9/20) Project #3

More information

CSE410 Operating Systems Spring 2018 Project 1: Introduction to Unix/Linux Signals

CSE410 Operating Systems Spring 2018 Project 1: Introduction to Unix/Linux Signals CSE410 Operating Systems Spring 2018 Project 1: Introduction to Unix/Linux Signals 1 Overview and Background In this exercise you will gain first hand experience with Unix/Linux signals. You will develop

More information

OS Structure, Processes & Process Management. Don Porter Portions courtesy Emmett Witchel

OS Structure, Processes & Process Management. Don Porter Portions courtesy Emmett Witchel OS Structure, Processes & Process Management Don Porter Portions courtesy Emmett Witchel 1 What is a Process?! A process is a program during execution. Ø Program = static file (image) Ø Process = executing

More information

Using bash. Administrative Shell Scripting COMP2101 Fall 2017

Using bash. Administrative Shell Scripting COMP2101 Fall 2017 Using bash Administrative Shell Scripting COMP2101 Fall 2017 Bash Background Bash was written to replace the Bourne shell The Bourne shell (sh) was not a good candidate for rewrite, so bash was a completely

More information

CSE 410: Computer Systems Spring Processes. John Zahorjan Allen Center 534

CSE 410: Computer Systems Spring Processes. John Zahorjan Allen Center 534 CSE 410: Computer Systems Spring 2018 Processes John Zahorjan zahorjan@cs.washington.edu Allen Center 534 1. What is a process? Processes 2. What's the process namespace? 3. How are processes represented

More information

OPERATING SYSTEMS LINUX

OPERATING SYSTEMS LINUX OPERATING SYSTEMS LINUX Božo Krstajić, PhD, University of Montenegro Podgorica bozok@cg.ac.yu Process management Linux operating systems work with processes. Basically a process consists of program code

More information

CS 4410, Fall 2017 Project 1: My First Shell Assigned: August 27, 2017 Due: Monday, September 11:59PM

CS 4410, Fall 2017 Project 1: My First Shell Assigned: August 27, 2017 Due: Monday, September 11:59PM CS 4410, Fall 2017 Project 1: My First Shell Assigned: August 27, 2017 Due: Monday, September 11th @ 11:59PM Introduction The purpose of this assignment is to become more familiar with the concepts of

More information

Working with Unix Processes. Copyright 2012 Jesse Storimer. All rights reserved. This ebook is licensed for individual use only.

Working with Unix Processes. Copyright 2012 Jesse Storimer. All rights reserved. This ebook is licensed for individual use only. Working with Unix Processes Copyright 2012 Jesse Storimer. All rights reserved. This ebook is licensed for individual use only. This is a one-man operation, please respect the time and effort that went

More information

Chapter. Basic Administration. Secrets in This Chapter. Monitoring the System Viewing Log Files Managing Services and Programs Monitoring Disk Usage

Chapter. Basic Administration. Secrets in This Chapter. Monitoring the System Viewing Log Files Managing Services and Programs Monitoring Disk Usage Basic Administration Chapter 18 Secrets in This Chapter Monitoring the System Viewing Log Files Managing Services and Programs Monitoring Disk Usage 95080c18.indd 425 2/17/09 1:24:15 AM 426 Part 3: Managing

More information

Linux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2.

Linux Tutorial #6. -rw-r csce_user csce_user 20 Jan 4 09:15 list1.txt -rw-r csce_user csce_user 26 Jan 4 09:16 list2. File system access rights Linux Tutorial #6 Linux provides file system security using a three- level system of access rights. These special codes control who can read/write/execute every file and directory

More information

LINUX FUNDAMENTALS (5 Day)

LINUX FUNDAMENTALS (5 Day) www.peaklearningllc.com LINUX FUNDAMENTALS (5 Day) Designed to provide the essential skills needed to be proficient at the Unix or Linux command line. This challenging course focuses on the fundamental

More information

CSci 4061 Introduction to Operating Systems. Processes in C/Unix

CSci 4061 Introduction to Operating Systems. Processes in C/Unix CSci 4061 Introduction to Operating Systems Processes in C/Unix Process as Abstraction Talked about C programs a bit Program is a static entity Process is an abstraction of a running program provided by

More information

Operating System Labs. Yuanbin Wu

Operating System Labs. Yuanbin Wu Operating System Labs Yuanbin Wu cs@ecnu Anouncement Project 1 due 21:00 Oct. 4th FTP In campus: direct connection Out of campus: VPN Windows: cmd \\222.204.249.4:5010 Linux: ftp 222.204.249.4 5010 Operating

More information

SOFTWARE ARCHITECTURE 3. SHELL

SOFTWARE ARCHITECTURE 3. SHELL 1 SOFTWARE ARCHITECTURE 3. SHELL Tatsuya Hagino hagino@sfc.keio.ac.jp slides URL https://vu5.sfc.keio.ac.jp/sa/login.php 2 Software Layer Application Shell Library MIddleware Shell Operating System Hardware

More information

Basics. I think that the later is better.

Basics.  I think that the later is better. Basics Before we take up shell scripting, let s review some of the basic features and syntax of the shell, specifically the major shells in the sh lineage. Command Editing If you like vi, put your shell

More information

CS 326: Operating Systems. Process Execution. Lecture 5

CS 326: Operating Systems. Process Execution. Lecture 5 CS 326: Operating Systems Process Execution Lecture 5 Today s Schedule Process Creation Threads Limited Direct Execution Basic Scheduling 2/5/18 CS 326: Operating Systems 2 Today s Schedule Process Creation

More information