LAB2 PROCESS CONTROL 


 


UNIX/LINUX TRAINING MANUAL ( TOO GOOD TO IGNORE !!!!!)





PROCESS MANAGEMENT

    When working in a shell environment, multiple jobs can be started. Each program executed is a job. if you run Netscape then Netscape is a job. Every job whether user invoked or by the system has an associated job number and an id. The jobs the user invokes have a user id or UID. Jobs that are run by the system have root UID. Follow the instruction below to understand how to manage your jobs. There will come a time when you will want to terminate a job and it will be necessary to understand how to do it without any problems.

  1. The top command
PID
USER
PRI
NI
SIZE
RSS
SHARE
STAT
LIB
%CPU
%MEM
TIME
COMMAND
907
root
18
0
1052
1052
94290
R
0
.2
.90
0:00
top
1
root
0
0
420
420
3422
S
0
99
3.2
11:00
init
2
root
0
0
0
0
233
SW
0
.9
2.2
2:20
kflushd

  1. ps command

  1. Background(bg) and Foreground(fg) jobs
A background job is invoked by appending the & symbol after a command; a foreground job is taking a background job and putting it in the forground whereby the shell is occupied. When you invoke a job or action in a shell e.g top, the shell cannot accept any other commands from you: the shell is occupied. When a background job is initiated the job runs in the background thus allowing you to continue work on the shell. When you do not see the command prompt ($) re-appear after a command then you should be aware that the shell is occupied and no other jobs will be accepted until this job terminates.
  1. Mounting a floppy or cd (optional)
  2. Standard Input and Standard output


ADVANCED FILE AND DIRECTORY MANAGEMENT
  1. copy a dir and its contents
  1. rm a dir and its contents



Using the man page : Problem Statement (20 pts) (USE gnumeric SPREAD SHEET)

  1. Practice using [Unix help:Required Commands] and their options by using the "man" command.
  2. Determine options which you would expect to be of most use to you (no more than 4 required for each command) for each of the commands marked with *. 
  3. Refer to the 
  4. Use the oocalc spread sheet program on the linux workstation. To invoke oocalc- type oocalc after the prompt. 
  5. Submit the spread sheet the following week when you have lab
  6. The usage of the man page is crucial !
  7. do a man of ifc instead of f77
  8. type q to get out of man page
  9. type in shell
    1. gnumeric
Submit:
    A table prepared using "xess" in the following form:
     
    Command Options Description
    ls   list the contents of a directory
      a list all files ( includes  .files )
      d
     .
      F
     .
      l
     .



SYMBOLS LEARNT THUS FAR
These symbols have more than one meaning, but in the context of todays lab they represent the following