BCCS199_Session_11 Flashcards
A process is…?
a program in execution.
Processes are defined by a process control block, which include…?
- Process ID
- Process priority
- Process state
- Location of program in memory
- Address of next instruction to be executed
- List of resources held by the process
- Etc, etc, etc
When creating a process, the parent process ____ and the child process ______.
- The parent process duplicates itself (forking)
- The child process runs a new program (execing)
Typically, the parent process waits for the child to die, as when executing a command in bash, though there are exceptions.
Processes can be in one of five states:
- R: Runnable
- S: Voluntary Sleep
- D: Involuntary Sleep
- T: Stopped (Suspended) Processes
- Z: Zombie
Every process has a…?
numerical priority associated with it.
The lower the number, the higher the priority.
This priority can be adjusted up or down with the nice command.
All running processes get a chance to go during a…?
scheduling “epoch”; higher priority processes get more time.
At the end of the epoch, processes are re-evaluated.
Signals can be sent to a process for various reasons:
- Hardware error, e.g. divide by zero
- Software conditions, e.g. child dies or window resized
- Terminal interrupts (CTRL-C and CTRL-Z)
- Processes can send signals to other processes for various reasons, if owned by same user
See slide 7 for signal list.
Jobs can be run in…?
foreground (can’t do anything else) or background (can do other things).
From command line, finishing with “&” runs the command in the background
Foreground jobs can be interrupted with …?
CTRL-Z. then resumed with fg or run the background with bg.
A list of running jobs can be generated with the…?
jobs command.
Programs can be scheduled to run with the…?
at command.
A list of scheduled commands can be viewed with the…?
atq command.
The cron command can be used to…?
schedule tasks to run at a specific time and day of the week or month.
cron tasks are defined in the…?
cron table.
The cron table is edited with the …?
crontab command.