Quiz 2 Flashcards

1
Q

True or False

Processes are dynamic whereas programs are static.

A

True

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

True or False:

Some processes will be created at system initialization.

A

True

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

A system call on_______________in Unix/Linux creates a process.

A

fork

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

True or False:

A process can be killed due to a fatal error such as divide by 0.

A

True

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

When a process is waiting for input/output, it comes into _________ state.

A

blocked

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

When a time slice of CPU is used up, a process comes into ___________ state.

A

ready

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

When a process is created, it comes into _______________ state.

A

ready

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

True or False:

Process swapping is needed when a CPU is shared by multiple processes.

A

True

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

True or False:

A process is an abstraction of a running program.

A

True

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

In an operating system, the _________________ selects a process to use the CPU.

A

scheduler

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

Given the following function definition in Python:

def greet(person):
print(“Hello”, person)
print (“How are you?”)

What output(s) do we get if the function is invoked by greet(Jimmy)?

A

An error

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

True or False:

In computer science, a queue is a last in first out data structure.

A

False

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

What symbol is used to denote comments in Python code?

A

#

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