Process Management: Processes Flashcards

1
Q

A Process is the basic unit of execution in an operating system

A

Each process has a number, its process identifier (pid)

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

Different processes may run

A

different instances of the same program

Ex: my gcc and your gcc process both run c compiler

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

At a minimum,

A

process execution requires following resources:

Memory to contain the program code and data
A set of CPU registers to support execution

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

Modern OS run

A

multiple processes concurrently

Examples: (can all run simultaneously):
o gcc hello_world.c – compiler running on hello_world file
o gcc read_A.c – compiler running on read_A file
o emacs – text editor
o firefox – web browser

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

Steps of program to process:

A

when first we write the program in e.g C

then the compiler turns that program into an instruction list

OS delivers the instruction list to the processor

then The CPU interprets the instruction list

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

Process has its own address space:

A

.The program code, also called text section

. Current activity including program counter,
processor registers

. Stack containing temporary data
. Function parameters
. return addresses
. local variables

. Data section containing global variables

. Heap containing memory dynamically
allocated during run time

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

As a process executes, it changes state

A

. new: The process is being created
. running: Instructions are being executed
. waiting: The process is waiting for some event to occur
. ready: The process is waiting to be assigned to a processor
. terminated: the process has finished execution

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

Each process is represented in the operating system

A

by a process control block (PCB)

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

The goal of scheduling is to Maximize

A

CPU use, quickly switch processes onto CPU for time sharing

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