Chapter 12 Flashcards

1
Q

What kill -l do

A

It displays the signals supported by system and their numbers

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

Why we create threads

A

Process is expensive. Multiple threads can run simultaneously. A thread can be independent unit in CPU.

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

Does each thread has its own thread Id, stack, CPU context, priority and errno

A

Yes

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

What are 2 levels of threads

A
  1. User level thread

2. Kernel level thread

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

What are similarities between threads and processes

A
  • States are same (new, terminated, blocked, run, ready, blocked)
  • A thread can create another thread
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are differences between threads and processes

A
  • Multiple threads can operate within same address space
  • No automatic protection mechanism is in place for threads. OS does not provide such support that one time there should be only one writing mechanism in thread. We do it by code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is example of multi threaded server

A

Web browser

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

What are advantages of threads

A
  • Multi threading
  • Resource sharing
  • Economy
  • Performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly