Lesson 1: Introduction Flashcards
What is an operating system?
A program that provides an environment within which other programs can do useful work.
It comes between the users and the hardware and provides a convenient, safe, and efficient way to access the hardware.
What is Spooling?
Simultaneous Peripheral Operation On-Line
This means that you are overlapping an I/O of one job with the computation of another job. (Used to manage slower IO devices like printers)
What is a job pool?
A data structure that allows the OS to select which job to run next in order to increase CPU utilization
Latency
זמן השהייה
The time it takes to perform a job or process data.
Units: seconds
Throughput
תפוקה
The rate of work/production/processing.
Units: byte/second (or jobs/second)
Utilization
ניצולת
The fraction of time the CPU is performing useful tasks
(=the time the CPU isn’t idle)
This is a number between 0-1.
For example:
The utilization of a lesson at school is:
(lesson time)/(lesson time + time it takes to get to university)
CPU usage
The fraction of time the CPU is executing instructions (useful and not useful tasks)
Overhead
תקורה
Excess or indirect computation time, memory, bandwidth, or other resources that are required to attain a particular goal.
Units: seconds
What is the goal of multiplexing in the CPU?
To maximize the resource utilization
Multi-programming
When the first program reached an instruction waiting for a peripheral, the second program in memory is given a chance to run
Time sharing
Switch program even if not waiting for peripheral
In multi-programming, when does the CPU move between jobs?
- When one job finished running
2. When a job “gives up” on its CPU usage when its waiting for a response from an IO device.
In time sharing, when does the CPU move between jobs?
- When one job finished running
2. When the OS decides to stop a job and run another one instead
Can the OS and another program run simultaneously?
No!
The OS is just like any program, and when it’s running, it’s the only program running.
What has a higher throughput: multi-programming or time sharing?
Throughput = תפקודה
Time sharing.
In time sharing the OS can plan its “maintenance work”, but in multiprogramming you need to always move between jobs and that involves needing to do a lot of work in order to switch jobs.
What has a larger overhead: multi-programming or time sharing?
Overhead = תקורה
Time sharing
What’s the difference between a scheduler and a spooler?
The spooler manages slower IO devices, and the scheduler manages the flow of other jobs in and out of the CPU
What are the assumptions in multi-programming and time-sharing?
- CPU is always there, and therefore, not using it is a waste
- CPU is much faster than I/O
- Memory (RAM) is large enough to host many programs
- Direct memory access (DMA)
- More than one task to do at a time
What is DMA?
Direct memory access (DMA) is a feature of computer systems that allows certain hardware subsystems (for example IO devices) to access main system memory (random-access memory) independent of the central processing unit (CPU).
What are the states that a process can be in?
- Running
- Waiting (for example, for the keyboard or other IO device)
- Ready
Is multi-processing and time sharing parallel programing?
No! There are never two programs running at the same time. Programs just take turns.
In computers that have more than one core we can have real parallel programming.
What is a disadvantage of having a virtualization layer?
Very high overhead because every actions needs to be converted through the software to the hardware.
VM snapshot
A feature of virtualization that allows to freeze a copy of virtual machine with the specific state of the virtual machine
VM mirgration
A feature of virtualization that allows to move a VM to another host
Scaling
A feature of virtualization that allows to add/remove more VM to cope with demand (very important for the cloud)
Isolation
A feature of virtualization that when running on the same hardware, the operation of one VM are (almost) completely isolated from the others –> Added security
Virtualization allows for sharing the same ______ amongst many _____.
Virtualization allows for sharing the same resources (hardware) amongst many users.
What is the cloud?
Provides computing resources over the internet so you don’t need the actual hardware.
It delivers a hosting environment that is immediate, flexible, scalable, secure, and available – while saving corporations money, time and resources
What are the assumptions regarding the cloud?
- HW and maintenance are cheaper for big companies (Amazon, Microsoft, Google ).
- Big companies have more experience and infrastructure (home-made protocols).
What are NOT assumptions in mobile computing?
- CPU is always there, and therefore, not using it is a waste (because we need to also consider battery life, not using the CPU is not a waste (since it saves battery)).
- Memory (RAM) is large enough to host many programs
- More than one task to do at a time
What are assumptions in mobile computing?
- CPU is much faster than I/O
2. Direct memory access (DMA)
Kilo
10^3
Mega
10^6
Giga
10^9
Tera
10^12
What are some requirements for a successful mobile OS?
- Easy and consistent for app developers despite the inconsistent hardware (different screen size, different camera, different CPUs)
- Efficient – Battery efficient.
Every single CPU cycle consumes battery power.
The more time the CPU can spend sleeping the longer the battery life will be –> Less Multitasking - Secure - Lots of personal data on phones. Mobile is easy to lose or steal.
- Run with limited RAM
“Being a Responsible Background App”