Introduction to OS Flashcards

1
Q

What is an operating system?

A

An operating system is the software layer that manages a computer’s resources for its users and their applications.

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

What are the jobs of an OS?

A
  • Virtualization
    ○ Taking a possibly limited physical resource(processor,memory,storage) and transforms it into a more general, portable, and easy-to use virtual interface for user applications to use.
  • Concurrency
    ○ Acting as a resource manager which supports multiple user applications(and multiple tasks inside one application) to run concurrently and coorindates among running entities, ensuring correct, fair, and efficient sharing of resources.
  • Persistence
    ○ Data can be easily lost on volatile devices such as DRAM. An OS allows users to talk to external devices - including persitent storage drives - through input/output
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the design goals of an operating system?

A
  • Performance:
    ○ Minimize the overheads brought by the OS
  • Scalability
    ○ With multiprocessors, speed up concurrent accesses
    • Security
      ○ Protect against bad behaviour
    • Reliability
      ○ Properly recover on fail-stops
    • Connectivity
      ○ Networking support, connect with the internet
      Energy-efficiency, mobility
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is I/O?

A

I/O stands for input and output and is reffered to devices connected to a computer. This could be a mouse and keyboard.

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

What does API stand for?

A

Application programming interface (API)

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

Why do we have an API in the OS?

A

The API in an operating system has system calls like create, wait, and destroy. These calls let apps ask the OS to do special tasks. The API also gives information about app processes and helps different OS services communicate.

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

What are the roles of an operating system?

A

Referee: They manage resources used by different apps on one machine, like protecting memory and scheduling tasks.

Illusionist: They create a simpler view of hardware for apps, like using virtual memory and file systems.

Glue: They offer common tools for apps to share, such as hardware access (HAL), system calls, and copy-paste.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of dual-mode operation on a CPU?

A

There are two modes of operation on a CPU: Kernel mode and user mode. The purpose of the two modes is to limit the privileges of a user program, so that it cannot cause harm to the machine, operating system, or other user processes running on the system.

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

Give two examples of virtualization

A

CPU| - Memory

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

Explain the software design principle of separating mechanism from policy.

A

Separating mechanism and policy means having a basic system that can be used in many situations. Then, we can change how it works without redoing the whole thing. Policies are like decisions on what to do, and mechanisms are how those decisions are carried out.

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

Classify each of the following as mechanism/policy/neither: Scheduling, Context switching, Limited direct execution, Page replacement, Fragmentation, Address translation, Best/worst fit, Locality.

A

Scheduling
Policy

Context switching
    Mechanism

Limited direct execution
    Mechanism

Page replacement
    Policy

Fragmentation
    Neither

Address translation
    Mechanism

Best/worst fit
    Policy

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

Give examples on policies

A

Scheduling- Allocation of resources - Page fault handling - Segmentation handling

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

Give examples on mechanism?

A

Context switching- Swapping- Authorization

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