COE128 Exam - 3 Flashcards

1
Q

It is a basic unit of CPU utiilization

A

Thread

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

A thread is composed of:

A
  • A Thread ID
  • A Program Counter
  • A Register Set
  • A Stack
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Benefits of Multithreading

A
  • Responsiveness
  • Resource Sharing
  • Economy
  • Scalability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Multithreading an interactive application may allow a program to continue running even if part of it is blocked or is performing a lengthy operation, thereby increasing responsiveness to the user

A

Responsiveness

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

Thread share the memory and the resources of the process to which they belong by default. The benefit of sharing code and data is that it allows an application to have several different threads of activity within the same address space

A

Resource Sharing

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

Allocating memory and resource for process creation is costly. Because threads share the resources of the process to which they belong, it is more economical to create and context-switch threads.

A

Economy

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

The benefits of multithreading can be greatly increased in a multiprocessor architecture, where threads may be running in parallel on different processors

A

Scalability

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

Types of Threads

A
  • User Thread
  • Kernel Thread
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Supported above the kernel and are managed without kernel support

A

User Threads

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

Supported and managed directly by the operating system

A

Kernel Threads

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

Three (3) common ways of establishing relationship between user thread and kernel threads.

A
  • Many-to-One Model
  • One-to-One Model
  • Many-to-Many Model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Thread management is done by the _________ in user space, so it is efficient

A

Thread Library

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

Disadvantages of Many-to-One Model

A
  • The entire process will block if a thread makes a blocking system call.
  • Because only one thread can access the kernel at a time, multiple threads are unable to run in parallel on the multiprocessor.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Disadvantages of One-to-One Model

A
  • Creating a user thread requires creating the corresponding kernel thread.
  • Number of threads per process is sometimes restricted due to overload.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When a thread performs a blocking system call, ___________________.

A

the kernel can schedule another thread for execution.

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

Allows a single CPU core to handle multiple threads simultaneously.

A

Simultaneous Multithreading (SMT)

17
Q

It is used to retrieve the number of CPU cores and number of logical processors on a Windows System.

A

Windows Management Instrumentation Command-line (WMIC) tool

18
Q

This system call is used to create a separate duplicate process.

A

fork()

19
Q

When an _________ system call is invoked, the program specified in the parameter to _______ will replace the entire process - including all threads.

A

exec()