Chapter 12 Flashcards
1
Q
What kill -l do
A
It displays the signals supported by system and their numbers
2
Q
Why we create threads
A
Process is expensive. Multiple threads can run simultaneously. A thread can be independent unit in CPU.
3
Q
Does each thread has its own thread Id, stack, CPU context, priority and errno
A
Yes
4
Q
What are 2 levels of threads
A
- User level thread
2. Kernel level thread
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
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.
7
Q
What is example of multi threaded server
A
Web browser
8
Q
What are advantages of threads
A
- Multi threading
- Resource sharing
- Economy
- Performance