Mod 1: Introduction Flashcards
What is concurrency?
When two or more things seemingly happen at the same time
What is “currency programming”?
When you
(1) make to or more task seem to execute at the same time, and they
(2) share the computer’s CPU
What is a task?
Unit of a program that can be executed concurrently with other units of a program
What is parallell programming?
When two or more tasks run at the same time, NOT sharing the computer’s CPU
With the support of which three is concurreny achieved?
(1) The underlying hardware
(2) The Operating system
(3) The application
What is a “scheduler”?
Program runned by the OS or Runtime
What is the purpose of a scheduler?
Decide which process should be allowed to run within the next period of time
What are the two types of scheduling?
(1) Preemptive
(2) Cooperative
What is preemptive sheduling?
> priority-based
gives every task exclusive access to a computing resource
given time period
What is cooperative scheduling?
mechanism that give every task exclusive access until the task is done, or let the computing resource go
What is an interrupt?
Signal to the processor produced by hardware or software indicating an event needing immediate attention
What does multitasking refer to?
OS ability to quickly switch between computing task
Give an example of multitasking
Multithreading
multitasking within an application, executing several tasks concurrently
What is a process?
An instance of an application being executed
What does a process consists of?
(1) Program instructions
(2) Stack memory/Call Stack
(3) A heap memory
(4) Program counter (register)
(5) Other resources eg. security info