Lecture 4 (unfinished) Flashcards

1
Q

What is Resource Ownership in terms of Processes?

A

Process includes a virtual address space to hold the process image
• The OS performs a protection function to prevent unwanted interference between processes with respect to resources

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

What is Scheduling/Execution in terms of Processes?

A

Follows an execution path that may be interleaved with other processes
 A process has an execution state (Running, Ready, etc.) and a dispatching priority, and is the entity that is scheduled and dispatched by the OS

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

What is a Thread (Lightweight process)?

A

The unit of dispatching is referred to as a thread

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

What is a process (task)?

A

Defined in a multithreaded environment as “the
unit of resource allocation and a unit of protection”

Associated with processes:
A virtual address space that holds the process image
Protected access to:
 Processors
 Other processes (for interprocess communication)
 Files
 I/O resources (devices and channels)

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

What is multithreading?

A

Multithreading - The ability of an OS to support multiple, concurrent paths of execution within a single process.

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

Check multithread and single thread model/pics slide 5

A

Check multithread and single thread model/pics slide 5

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

What does each thread have ?

A

Access to the memory and resources of its processes, shared with all other threads in that process

 An execution state (Running, Ready, etc.)
 A saved thread context when not running
 An execution stack
 Some per-thread static storage for local variables

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

2 benefits of threads?

A

Takes less time to create a new thread than a process

Less time to terminate a thread than a process

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

What is Thread Use in a Single-User System?

A

Foreground and background work in parallel
•Asynchronous processing
•Speed of execution
•Modular program structure

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

What is suspending a process?

A

 Suspending a process involves suspending all threads of the process

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

What is a termination of a process?

A

Termination of a process terminates all threads within the process

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

What is thread syncronization?

A

It is necessary to synchronize the activities of the various threads
•All threads of a process share the same address space and other resources
•Any alteration of a resource by one thread affects the other threads in the same process

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

What are the 2 types of threads?

A

User Level thread

Kernel Level thread

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

What is a user Level Thread (ULT)?

A
  • All thread management is done by the application

* The kernel is not aware of the existence of threads

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

2 advantages of ULT?

A

Thread switching does not require kernel mode privileges

ULTs can run on any OS

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

1 Disadvantage of ULT?

A

Many system calls are blocking

When a ULT executes a system call, the thread and all of the threads within the process are blocked

17
Q

What is a kernel level thread?

A

Thread management is done by the kernel

No thread management code in the application level, simply an application programming interface (API) to the kernel thread facility

18
Q

Advantage of kernel level thread?

A

The kernel can simultaneously schedule multiple threads from the same process on multiple processors

19
Q

Disadvantage of kernel Level thread?

A

The transfer of control from one thread to another within the same process requires a mode switch to the kernel