OS1 introduction Flashcards

1
Q

What is an operating system

A
  • first program that hardware runs
  • program that runs other programs
  • acts as middle man between user and hardware
  • coordinates use of hardware amongst different programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

goals of the OS (3)

A

execute user programs, make computer systems and convenient to use, use hardware efficiently

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

Explain the analogy of the OS being a government

A

protects user from each other - one cannot overwrite another

allocates resources efficiently and fairly

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

Key function of the OS

A

provide computational environment within which other programs can do useful work

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

Name and explain the two different OS views from a systems perspective

A

First view - resource allocator that manages system resources and decides between conflicting requests for efficient and fair resource use
Second - control program that controls execution of programs - prevent errors and improper use of computer

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

Explain how the OS is an abstraction f the workings of a computer system. Give an example

A

OS is an interface between users and hardware.

OS can share resources between user programs and system applications thus is able to concurrently process the running of multiple programs.

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

What is the OS user level?

A

part of the OS that the user directly interacts with - consists of programs that the user creates or imports, libraries, system application programs

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

OS kernel level

A

Core of the OS, kept in main memory at all times.
Ensures that essential OS operations are kept running
Runs device drivers - enable OS to interact with hardware

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

name 2 essential OS operations

A

File management and storage in secondary memory (hard-disk)storage

process control (scheduling and executing programs) to run in main memory and to allocate each process appropriate computational resources

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

OS hardware level

A

Physical devices that the OS uses e.g. CPU, HDD, keyboards etc

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

Why have abstractions

A

Reduce complexity expected from user

reduce program design complexity

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

Name 3 examples of abstraction

A

User
Disk
Process
File

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

What is multi-programming abstraction

A

rapid switching between the running of programs and keeping all programs partially loaded into memory

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

Issues with file abstraction

A

files need unique names and addresses in phys mem
Efficiently organized in phys mem for quick retrieval
Eventually more files than phys mem space

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

Why is it not possible to store programs and data in main memory permanently? What is a fix for this?

A

Too small
Volatile (loses contents when power off)

secondary storage (typically magnetic HDD)

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

Virtual memory allows the execution…

A

of programs that are not completely in memory

17
Q

What does virtual memory allow programs to do?

A

use more memory than available in phys memory, share files and data easily (implements shared memory)

by abstracting main memory to large, uniform memory array that uses second storage to temporary hold programs that must eventually be put into main mem for execution

18
Q

Benefits of using VMemory

A
  • programs no longer constrained by amount of phys mem
  • each user program takes less physical memory: more programs can run at same time therefore increasing CPU use and program throughput (with no increase in run time)
19
Q

What is Multiplexing (OS - RAM)

A

resource abstraction means that these N programs use virtual memory to share the space of limited main memory. This sharing of main memory by multiple programs is known as multiplexing

20
Q

Explain how multiplexing occurs on the CPU

A

CPU - can only execute one program at a time but N programs run concurrently on OS. N programs execute in chunks with rapid switching between them

21
Q

Explain how the OS is a type of virtual machine

A

Each process seems to execute on own processor - OS mandates that resources of physical machine must be shared.

22
Q

Function of a VMachine

A

provides interface to application layer

23
Q

Purpose of the Java VMachine

A

allows java code to be portable between different OS and hardware
enables a computer to run Java programs that are compiled into Javabyte-code
Abstraction so that java devs dont need to worry about underlying hardware platform and OS

24
Q

Concurrency vs parallelism

A

Concurrency - same cpu multiple programs at same time

Parallel - multiple programs, multiple CPU at same time

25
Q

Key problem with concurrency at OS level

A

multiple processes must safely interact (e.g. not over-write each other)