Recitation_02-Unix_Processes

Recitation_02-Unix_Processes - 9/13/11 CSE 421/521 -...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
9/13/11 1 1 CSE 421/521 - Operating Systems Fall 2011 Recitations Presented by Yuan(Alex) Zhang University at Buffalo September . ..., 2011 Recitation - II Unix Processes Prof. Tevfik Kosar 2 In Today’s Class • Unix Process Environment Creation & Termination of Processes Exec() & Fork() ps -- get process info Shell & its implementation Environment Variables Process Control Pipes 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9/13/11 2 3 $ ps PID TTY TIME CMD 18684 pts/4 00:00:00 bash 18705 pts/4 00:00:00 ps 4 $ ps a PID TTY STAT TIME COMMAND 6702 tty7 Ss+ 15:10 /usr/X11R6/bin/X :0 -audit 0 7024 tty1 Ss+ 0:00 /sbin/mingetty --noclear tty1 7025 tty2 Ss+ 0:00 /sbin/mingetty tty2 7026 tty3 Ss+ 0:00 /sbin/mingetty tty3 7027 tty4 Ss+ 0:00 /sbin/mingetty tty4 7028 tty5 Ss+ 0:00 /sbin/mingetty tty5 7029 tty6 Ss+ 0:00 /sbin/mingetty tty6 17166 pts/6 Ss 0:00 -bash 17191 pts/6 S+ 0:00 pico program3.cc 17484 pts/5 Ss+ 0:00 -bash 17555 pts/7 Ss+ 0:00 -bash 17646 pts/8 Ss 0:00 -bash 17809 pts/10 Ss 0:00 -bash 17962 pts/8 S+ 0:00 pico prog2.java 17977 pts/1 Ss 0:00 -bash 18014 pts/9 Ss+ 0:00 -bash 18259 pts/10 T 0:00 a.out 18443 pts/2 Ss 0:00 -bash 18511 pts/1 S+ 0:00 pico program3.cc 18684 pts/4 Ss 0:00 -bash 18741 pts/2 S+ 0:00 pico program3.cc
Background image of page 2
9/13/11 3 5 $ ps la F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 0 6702 6701 15 0 25416 7204 - Ss+ tty7 15:10 /usr/X11R6/bin/X :0 - audit 0 -auth /var/lib/g 4 0 7024 1 17 0 3008 4 - Ss+ tty1 0:00 /sbin/mingetty --noclear tty1 4 0 7025 1 16 0 3008 4 - Ss+ tty2 0:00 /sbin/mingetty tty2 4 0 7026 1 16 0 3012 4 - Ss+ tty3 0:00 /sbin/mingetty tty3 4 0 7027 1 17 0 3008 4 - Ss+ tty4 0:00 /sbin/mingetty tty4 4 0 7028 1 17 0 3008 4 - Ss+ tty5 0:00 /sbin/mingetty tty5 4 0 7029 1 17 0 3008 4 - Ss+ tty6 0:00 /sbin/mingetty tty6 0 2317 17166 17165 15 0 9916 2300 wait Ss pts/6 0:00 -bash 0 2317 17191 17166 16 0 8688 1264 - S+ pts/6 0:00 pico program3.cc 0 2238 17484 17483 16 0 9916 2300 - Ss+ pts/5 0:00 -bash 0 2611 17555 17554 15 0 9912 2292 - Ss+ pts/7 0:00 -bash 0 2631 17646 17644 16 0 9912 2300 wait Ss pts/8 0:00 -bash 0 2211 17809 17808 15 0 9916 2324 wait Ss pts/10 0:00 -bash 0 2631 17962 17646 16 0 8688 1340 - S+ pts/8 0:00 pico prog2.java 0 2320 17977 17976 16 0 9912 2304 wait Ss pts/1 0:00 -bash 6 $ ps -ax PID TTY STAT TIME COMMAND 1 ? S 0:02 init [5] 2 ? S 0:00 [migration/0] 3 ? SN 0:00 [ksoftirqd/0] 4 ? S 0:00 [migration/1] 5 ? SN 0:01 [ksoftirqd/1] 6 ? S 0:00 [migration/2] 7 ? SN 0:16 [ksoftirqd/2] 8 ? S 0:00 [migration/3] 9 ? SN 0:16 [ksoftirqd/3] 10 ? S< 0:00 [events/0] 11 ? S< 0:00 [events/1] 12 ? S< 0:00 [events/2] 13 ? S< 0:00 [events/3] 14 ? S< 0:00 [khelper] 15 ? S< 0:00 [kthread] 653 ? S< 0:00 [kacpid] 994 ? S< 0:00 [kblockd/0] 995 ? S< 0:00 [kblockd/1] 996 ? S< 0:01 [kblockd/2] 997 ? S< 0:00 [kblockd/3] 1062 ? S 0:24 [kswapd0] 1063 ? S< 0:00 [aio/0]
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
9/13/11 4 7 Process Creation ... int main(.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 10/01/2011.

Page1 / 20

Recitation_02-Unix_Processes - 9/13/11 CSE 421/521 -...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online