Software Systems and Operating Systems (Week 7) Flashcards

1
Q

What are two major types of software?

A
  1. Operating Systems (OS), e.g., Windows, MacOS, Linux, Android
  2. Application Programs, e.g., Web browsers, text processors, spreadsheet software, image viewer, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why do we need an operating system?

A

Early computers could only run one program at a time.

Today, they can handle multiple users and multiple tasks at a time.
* OS manages resources and coordinates applications;
* OS provides services for applications, e.g., storage of data in files;
=> applications do not have to worry about every system detail
* Programs use the same resources and naturally get in each others way.

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

What are the 4 main responsibilities of the operating system?

A

The operating system…

  1. Controls and allocates the resources of a computer, above all else how much CPU time each application gets;
  2. Manages and allocates RAM to applications;
  3. Manages information on storage devices e.g., files on hard drives, optical drives, thumb drives;
  4. Manages and coordinates the activities of peripheral devices connected to a computer.
    e.g., if you plug in a printer, a microphone or a speaker, the OS makes them available to be used by applications.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 4 main responsibilities of the operating system? (Simpler version)

A
  1. Control the CPU / Processing Unit
  2. Manage RAM
  3. Manage Storage
  4. Manages and coordinates the activities of peripheral devices connected to a computer
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe OS Responsibility 1 - Control the CPU

A
  • At any given moment, only one process can use (= is being executed by) a CPU core
  • Active applications and background processes (e.g. virus scanner) share the CPU and are executed consecutively
  • It is the OS ́s responsibility to decide, which process gets to run (on which core), when and how long (scheduling)
  • OS can prioritize (increase CPU time) or also suspend (pause) a process, e.g. if it is waiting for data from a network to arrive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Process?

A
  • A program currently being executed is called a process
  • Typically, dozens of processes run at the same time
  • The Task Manager (Windows) or Activity Monitor (macOS) allows us to view information about processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe OS Responsibility 2 - Manage RAM

A

OS loads a program into RAM before the process is started
* To be executed, program code must be available in RAM

OS decides how much RAM will be allocated to each process
* A process needs to ask OS for permission to use more memory

RAM is a limited resource, especially if you run a lot of processes that work with lots of data, e.g. large images, videos, etc.

OS can move memory content of a process out to disk temporarily if RAM is needed for the next process to run
* This is called memory swapping and slows down execution significantly (because any disk is much slower than RAM)

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

What is Virtual Memory?

A

OS shows each process only those RAM segments that are assigned to this process (Virtual Memory)

The purpose is to keep processes from interfering with each other
* Makes sure a process doesn’t overwrite or read (spy on) RAM being used by another process
* This is called Memory Protection

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

Describe OS Responsibility 3 - Manage Storage

A

To manage information stored on disks, OS ́s use a “file [management] system” which is responsible for:

  • How files are physically stored on disks,
    e.g. which platter/sector/track of a hard disk is used
  • How files are organized logically,
    e.g. names, folders and sub-folders
  • How permissions to access files are organized,
    e.g. read, write and execute permissions
  • Providing services for applications to create and modify files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the Physical Organization of Storage

A

Any data on drives is stored in blocks of equal size, e.g. 4096 bytes

A file that is larger than a block is spread out over several blocks (a block may be only partially used, but never for more than one file)

The OS keeps records of all blocks used by a file

If files are deleted, only the folder entry is removed, but data in blocks remains on disk until blocks are reused to store other files

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

What is Peripheral Device Coordination?

A

device management

handling input and output, and controlling peripheral devices such as disk drives and printers.

handles the translation of requests between a device and the computer. Defines where a process must put outgoing data before it can be sent, and where incoming messages will be stored when they are received.

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

What are 6 major Operating Systems?

A

Unix: 1969, Bell Labs – research center

DOS (Disk Operating System): 1981, Microsoft
* Developed for IBM ́s first Personal Computer
* Used via command line interface (CLI)

Mac OS: 1984, Apple
* One of the first OS with graphical user interface (GUI)
* Mac OS X (2001) and iOS (2007) is to a certain extent based on Unix

Windows: 1985, Microsoft
* Was first only an extension to DOS; “grown up” OS since 1995

Linux: 1991, Open Source
* UNIX-like, but developed independently (started by Linus Torvalds)

Android: 2007, controlled by Google
* Based on Linux

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

What is Folder Hierarchy and how does it work?

A

Logical organisation of files is based on a tree structure
=> a hierarchy of folders/directories

It is largely independent from the physical organization
* (blocks) of data on the hard disk, optical disc, etc.

Location of a file in this tree is called path

Windows paths begin with a drive letter,
e.g. D:\My Documents\TEACHING\105\Grades.xls

Linux and MacOS paths start with the root directory / and drives are “mounted” to a directory
e.g. /mnt/d/My Documents/bestfilms.txt

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

What is Remote Storage?

A

Network file systems: used to access files that are stored on remote computers (file servers) via network,
e.g. your Camosun M: drive is hosted on a file server

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

What is Redundant Storage?

A

Redundant Array of Independent Disks (RAID)
* Multiple disks are used in combination to provide redundant storage and/or higher speed
* Redundancy: multiple copies of each data item are stored on different disks
e.g. each block of a file, in this case A1, A2, A3
and A4 is stored on both disks 0 and 1
* If one disk crashes, data remains unharmed

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

What is a Device Driver?

A

An OS uses a program called device driver to communicate with a particular piece of hardware (device), e.g. a printer driver, graphics card driver, etc.
* Device drivers know all about the characteristics of the devices

Example: Printer
* You can choose from thousands of printers with very diverse properties, e.g. paper size, color/black&white, ink type, etc.
* OS needs a custom device driver for each type of printer to know how to properly use it and communicate with it
* Applications (e.g. Word) talk to the OS if they want to print
=> the OS provides a common interface to use any printer

17
Q

How is complexity reduced with Layers of Software?

A

Software is created in layers to manage it ́s inherent complexity
* Every layer has certain responsibilities
* Interfaces between layers define how they interact with each other - interfaces hide the internal complexity of layers

Layers request services (aka “call” services) that other layers provide via the defined interfaces

The same idea is also used in many other (non-digital) systems, e.g. ordering a meal in a restaurant:
* Customer “calls” a server with their order
* Server in turn “calls” kitchen, bar, etc. to help fulfilling the order

18
Q

Other Operating Systems

(Once again, no idea how to turn this into a question so just reveal the answer already)

A

Most CPU-powered “smart” devices use an OS
* Digital camera, DVD recorder, Blu-ray player, smart TV, smart speaker, smart watch, head-mounted displays, etc.

Most are powered by Linux, some have custom built OS ́s

If a device should provide “standard” features like file access, network access, etc., Linux is a good choice

E.g.: Amazon FireOS for Echo Speaker Series is based on Android (which is in turn based on Linux)

19
Q

What is the Boot Process (Start up Process)?

A

Computer boots (starts) after power is turned on:

  1. CPU starts execution of a startup program (Firmware) stored in read-only memory (ROM)
  2. The startup program is either of type (not important - don’t memorize this)
    * BIOS - Basic Input Output System (older)
    * UEFI – Unified Extensible Firmware Interface (newer)
  3. Boot loader of the OS is loaded from specific location of a boot device specified by firmware (e.g. hard disk boot sector)
  4. Rest of OS is loaded from storage into RAM and started afterwards
20
Q

How are multiple OS’s run on one computer?

A

Option 1: Install several OS ́s on the same machine and choose at boot time which OS to run, or

Option 2: Run multiple OS ́s simultaneously on a virtual machine for each OS using a “hypervisor” software

a. Type 1: Run multiple OS directly (usually used on server machines)

b. Type 2: Run a “virtual OS” on top of a host OS, (see next slide)