Preliminaries and OS Structures Flashcards

1
Q

What is the role of an OS?

A
  • Provide access to resources (processors, peripherals, memory)
  • Gets out of the way of applications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is contained in the code of an OS?

A
  • Access to resources
  • Protects application from itself
  • Protections applications from other applications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are characteristics of a DOS-like OS system?

A
  • No protection between kernel and user
  • Single user system
  • One program ran at a time
  • Extensible since everything runs in the same protection domain
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are characteristics of a monolithic OS system?

A
  • Has protection between user and kernel
  • Not easily extensible due to consolidation. Need to recompile to customize
  • Performs well since all system services are in same address space
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is contained in a PCB?

A

Process control block

  • Volatile state: register values of the processors for this process
  • Computational state for each thread
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the difference between threads and processes?

A
  • OS doesn’t see threads, just processes
  • Thread library is part of application at runtime
  • Switching threads is cheap (taken care of by application)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What can multithreads do with multicores/multiprocessors?

A
  • Not a lot. Multithreads cannot run on multiple processors since processes run on processors, not threads
  • If a process makes an I/O call, entire application will be blocked on the processor
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are characteristics of user level threads?

A
  • Switching among threads is voluntary
  • Pre-emption is not voluntary
  • All blocking calls go through the thread library
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are characteristics of kernel level threads?

A
  • It is expensive to context switch
  • Thread libraries are non portable
  • Threads in application are now visible to OS through libraries
  • OS provides the thread library
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What services are offered by the OS?

A
  • Process/thread management
  • Memory management
  • Inter-process communication
  • Network access
  • Access to mass storage and other peripherals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do components/structures affect the OS?

A
  • Affects performance

- Border crossings are expensive

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

Why are border crossings expensive?

A
  • Change in locality (address space)
  • Copying between kernel buffer and user buffers are expensive
  • Different applications require different sources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the goals of an OS?

A
  • Protection
  • Performance
  • Flexibility
  • Scalability
  • Agility
  • Responsiveness
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the process involved in a page fault?

A
  • Find a free page frame (Page replacement algorithm)
  • Update page table
  • Resume process

Can be customizable

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

What are the three classic examples of OSes?

A
  • DOS-like (great performance, no protection)
  • Monolithic (flexible, bad performance, good protection)
  • Microkernel (Flexible)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are program discontinuities?

A
  • Page fault
  • System call
  • External interrupt
  • Exceptions
17
Q

What are the two highest overhead components involved in border crossings?

A
  • Cache misses

- TLB misses

18
Q

What are the characteristics of a microkernel OS system?

A
  • Takes a hit in performance due to number of border crossings
  • Extensible
  • Protection due to each service having their own address space
19
Q

What is the difference between a logical protection domain and hardware address space?

A

Protection domain: OS abstraction

Hardware address space: mechanism for implementing OS abstraction