Lecture 2 Flashcards
Multiprogramming abstraction
multi-programming abstraction over many programs means that the execution of
these programs is scheduled such that each runs, bit by bit, but rapid switching
between them gives the impression that all are running smoothly in parallel.
Why cant all data reside in the main memory permantely?
First, main
memory is usually too small to store all needed programs and data permanently.
Second, main memory is a volatile storage device that loses its contents when power
is turned off.
Where are most programs stored?
most programs (system and application) are stored on a disk until they are loaded into memory.
Resource sharing
This resource sharing is made possible by virtual memory and is a memory management function of the OS.
extended machine interface
This resource abstraction means that these N programs use virtual memory to share the space
of limited main memory.
multiplexing
sharing of main memory by multiple programs
programs are partially loaded
OS=kind of virtual machine
each process seems to execute on its own
processor with its own memory, and devices.
Java Virtual Machine (JVM)
The Java Virtual Machine (JVM) allows Java code to be portable between various hardware and OS platforms.
Concurrency
running of multiple programs on a single CPU
Parallelism
the computational speed-up via running multiple programs in parallel on multiple
CPUs.
What is the key problem with concurrency?
The key problem with concurrency is that multiple programs (processes) must be
simultaneously executed on a single CPU, and that these multiple processes must
safely interact (e.g. not over-write each other)
Multi-threading
a program is split into multiple processes (threads)
that run concurrently on one CPU.
multiple virtual processors
a virtual processor is its own virtual machine representing all of the functionality of the underlying
physical processor, meaning that a program can run on a virtual processor just as it would on the physical processor
Virtual processors in parallelism
one virtual processor would be run for each physical processor. This N virtual processor for N physical processor setup is used so as the
processes running on each processor are protected from and cannot interfere with each other during the parallel running of the N programs.