Introduction to Operating Systems Flashcards

1
Q

Virtualization

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

Concurrency

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

Persistence

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

What happens when a program runs?

A

it executes instructions.

  1. the processor fetches an instruction from memory
  2. decodes the instruction (which instruction is this?)
  3. executes the instruction
  4. the processor fetches the next instruction, and repeats steps 2 - 4 until there are no further instructions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

the simple model most programs use:

A
  1. instructions execute one at a time, in an orderly and sequential fashion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the Basic Von-Neumann Structure?

A

the Von-Neumann structure uses a single processor, uses one memory for both instructions and data, and executes programs following the fetch-decode-execute cycle

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

What are the components of the Von-Neumann Model?

A

Central-Processing Unit: electric circuit responsible for performing most of the data processing operations. CPU performs variety of functions dictated by the instructions that are incorporated into the computer.

Buses: the means by which information is shared between the registers in a multiple-register configuration system. A bus structure consists of common lines, one for each bit of a register, through which binary information is transferred one at a time. Control signals determine which register is selected by the bus during each particular register transfer

Memory Unit: a collection of storage cells together with associated circuits needed to transfer information in and out of storage. The memory stores binary information in groups of bits called words.

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

Operating System

A

is a body of software responsible for making it easy to run programs, allows programs to share a memory, enabling programs to interact with devices

The operating system is a body of software in charge of making sure the system operates correctly and efficiently in an easy-to-use manner.

The primary way the OS does this is by a technique called Virtualization.

The OS also acts a resource manager, managing the resources such as CPU, memory unit, and disk.

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

1st Component of Operating Systems: What is Virtualization?

A

the OS takes a physical resource, such as the processor, memory unit, or a disk, and transforms it into a more general, powerful, and easy-to-use virtual form of itself - hence, referring to the OS as a virtual machine

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

How does the user interact with the OS to instruct the OS? (like, instruct the OS to run a program, allocate memory, or access a file)

A

The OS provides interfaces (APIs) the user can call. The OS exports roughly 200 system calls that are available to applications. The OS provides a standard library to applications.

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

The CRUX of the problem: How do operating systems virtualize resources?

A

First, we start with why. Why does the OS virtualize its resources? Because it makes the system easier to use

Second, we focus on the HOW. What mechanisms and policies are implemented by the OS to attain virtualization? How does the OS do so efficiently? What hardware support is needed?

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

Virtualizing the CPU

A

there’s an illusion that the system has a large number of CPUS. The illusion is turning a single CPU into a seemingly infinite number of CPUs

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

Virtualizing Memory

A

Memory is just an array of bytes.

To READ memory: one must specify an address to be able to access the data stored there

To WRITE/UPDATE memory: one must specify the data to be written at the specific address

Memory is accessed all the time when a program is running. A program keeps all of its data structures and instructions in memory. Therefore, when the processor needs to fetch instructions, it goes to memory. Then, when it goes to execute the instructions which involve a data structure from the program, it access that data structure in memory.

Virtualizing memory provides each process its own private virtual address space in memory, which the OS somehow maps onto the physical memory of the machine

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

Why is it important for me to learn about the Operating System?

A

Because it helps me understand computer programming from the ground up. It allows me to put a bound on this gap in knowledge. It allows me to put a bound around this knowledge. On one end there’s the finished software application that the end user is using, on the other end there’s a system with limited resources that need to be managed properly as I build this software, so that the software can run as expected.

This gives me concrete, simple building blocks to work with.

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

2nd Component of Operating Systems: Concurrency

A

concurrency refers to the host of problems that arise, and must be addressed, when working on many things at once(concurrently) in the same program.

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

The CRUX of the problem: How do we build correct concurrent programs?

A

When there are many concurrently executing threads within the same memory space, how can we build a correctly working program?

What primitives are needed from the OS?

What mechanisms should be provided by the hardware?

How can we use them to solve problems of concurrency?

** JWB ** : my question is, should we be running concurrently executing threads? Should we be building concurrent programs in the first place?

17
Q

Third component of Operating Systems:

A

Persistence is the ability to maintain stored data in after the program executes completely or a system crashes

18
Q

File system

A

is the software in an OS that usually handles the disk. The File system is responsible for storing any files the user creates in a reliable and efficient manner on the disks of the system

19
Q

The CRUX of the problem: How to store data persistently?

A

The file system is the software program in the OS in charge of managing persistent data. What techniques are needed to do so correctly? What mechanisms and policies are required to do so with high performance? How is reliability achieved in the face of failures in the hardware and software?

20
Q

Recap of OS:

A

The OS is a software system that takes physical resources like CPU, memory, and disk, and virtualizes them for correct, efficient, and easy use. The OS handles tough situations related to concurrency. And it stores files persistently, thus making them safe over the long-term.

Finding the right set of trade-offs is key to building systems

21
Q

OS Design Goals

A
  1. Abstraction: one goal is make the system convenient and easy to use
  2. High-performance, minimum cost: another goal is to minimize the overheads of the OS. We strive to provide virtualization and other OS features without excessive overheads.

These overheads arise in a number of forms: extra time (more instructions) and extra space (in memory or on disk). We seek solutions that minimize one or the other, or both.

  1. Protection: another goal when designing an OS is to provide protection between one application and other applications, and to provide protection between an application and the OS. We must ensure an application is not able to harm the OS itself. Protection is at the heart of one of the main principles of the OS, the ISOLATION Principle.
  2. Reliability: another goal when designing an OS is that the OS must run non-stop, because if the OS fails, then all applications on the system fail as well. Therefore, Operating Systems strive to provide a high degree of reliability. With the added complexity to modern operating systems, this is more challenging.
  3. Energy Efficiency: this is important for the environment and the future of our world
  4. Security: especially in these highly networked times
  5. Mobility: OSes are run on smaller and smaller devices
22
Q

Isolation Principle of OS:

A

isolate processes from one another

23
Q

What was the unifying principle of UNIX Operating System:

A

building small powerful programs that could be connected together to form larger workflows

Unix made it easy for programmers to write/CREATE and share their own programs