BCCS199_Session_11 Flashcards

1
Q

A process is…?

A

a program in execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Processes are defined by a process control block, which include…?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When creating a process, the parent process ____ and the child process ______.

A
  • 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Processes can be in one of five states:

A
  • R: Runnable
  • S: Voluntary Sleep
  • D: Involuntary Sleep
  • T: Stopped (Suspended) Processes
  • Z: Zombie
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Every process has a…?

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

All running processes get a chance to go during a…?

A

scheduling “epoch”; higher priority processes get more time.

At the end of the epoch, processes are re-evaluated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Signals can be sent to a process for various reasons:

A
  • 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Jobs can be run in…?

A

foreground (can’t do anything else) or background (can do other things).

From command line, finishing with “&” runs the command in the background

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Foreground jobs can be interrupted with …?

A

CTRL-Z. then resumed with fg or run the background with bg.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A list of running jobs can be generated with the…?

A

jobs command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Programs can be scheduled to run with the…?

A

at command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A list of scheduled commands can be viewed with the…?

A

atq command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The cron command can be used to…?

A

schedule tasks to run at a specific time and day of the week or month.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

cron tasks are defined in the…?

A

cron table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The cron table is edited with the …?

A

crontab command.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly