Classified in Computers

Written at on English with a size of 6.49 KB.

Operating systemVirtual Machine, hides the complexity and limitations of hardware from application programmersJob: Unit of processingBatch system: collects a batch of Jobs before processing them and printing out resultsTimesharing: each user can afford to own terminals to interact with machines Thread: A sequential execution stream. Smallest CPU scheduling unit. Can be programed as if it owns the entire CPU. Illusion of multiple CPUs on a single machine.Address space: Contains all states necessary to run a program.Process: An address space + at least one thread of execution. Fundamental unit of computation. Running instance of a program. Context switch: Procedure that a CPU follows to switch from one task to another while ensuring that the tasks do not conflict.Uniprogramming: Running one process at a time.Multiprogramming: Running multiple processes on a machine.Multithreading: Having multiple threads per address space.Multiprocessing: running programs on a machine with multiple processors.Multitasking:A single user can run multiple processes.Benefits of concurrency: Allow multiple applications to run at the same time, better resource utilization, Better average response time, Better performance.  Program vs. Process: Process address space for at least one thread of execution, Program a collection of statements in C or any programming lang. Process running instance of the program.Dispatching loop: Run thread, Save States, Choose a new thread to run, Load states from different thread. Thread state diagram Master boot record: Loaded from the boot device, stored at the first logical sector of the boot device that fits into a single 512-byte disk sector, describes the physical layout of the disk. System call: Allow processes running at the user mode to Access kernel functions that run under the kernel mode. User mode: when the operating system is running a user application such as handling a text editor. Kernel mode: implemented as a single bit, some privileged instructions can only be run in kernel mode to protect OS from errant users. Operating system must run in kernel mode. When the system boots and after the operating system is loaded, it executes applications in user mode. Starvation: Constant arrivals of short jobs can keep long ones from running. No way to know the completion time of jobs.Atomic operation: Always runs to completion, all or nothing(memory loads and stores)Race condition: When threads share data, and their results depend on the timing of their executions.Mutual exclusion: Ensures one thread can do something without the interference of other thread.Critical section: A piece of code that only one thread can execute at a time.Busy waiting: When process checks repeatedly for a condition, waiting, for the condition but it is busy checking for it which consumes CPU time. / consumption of CPU cycles while a thread is waiting for a lockEx Function wait_for_internet{while (check_for_internet==0)//WAIT}Semaphore:  type of generalized lock. Nonnegative integer value, two operation P() atomic operation that waits for semaphore to become positive then decrement by 1 PROBERENV() atomic operation that increments semaphore by 1 and wakes up a waiting thread at P() if any. VERHOGENSafety: mutual exclusion, at most time thread is in critical section at any time, all necessary locks are acquired at the entrance of a critical section, all shared resources are protected.Liveness: progress, is more than one thread is interested in executing the critical section, some processes will eventually do soFairness: bounded waiting, every thread that wants to execute the critical section will eventually do so, no starvation. 

Entradas relacionadas: