1/205
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Von Neumann architecture
Computer structure where instructions and data are stored in the same main memory.
Operating system
Software that manages hardware, provides services for programs, and acts as intermediary between user and hardware.
Kernel
The one program always running in memory that controls the system.
Control program
Program that manages execution of user programs and controls I/O devices.
CPU
Hardware component that executes instructions.
Processor
Physical chip containing one or more CPUs.
Core
Basic computational unit within a CPU.
Multiprocessor system
System with two or more processors or cores sharing resources.
Multicore processor
Single CPU chip with multiple processing cores.
Parallelization
Dividing a program into components that run in parallel.
Trap
Software-generated interrupt caused by error or system-call request.
Interrupt
Hardware mechanism that signals the CPU for attention.
Interrupt vector
Kernel structure containing addresses of interrupt handlers.
System call
Software-triggered interrupt used by a process to request OS service.
Multiprogramming
Technique of keeping multiple jobs in memory to maximize CPU utilization.
Multitasking
Switching CPU between jobs so users can interact with processes.
Degree of multiprogramming
Number of processes in memory.
Process
A program in execution.
CPU scheduler
Kernel routine selecting next ready thread/process for execution.
CPU-bound process
Spends more time computing than performing I/O.
I/O-bound process
Spends more time performing I/O than computing.
CPU burst
Period when process executes on CPU.
I/O burst
Period when process waits for I/O.
Virtual memory
Technique allowing execution of process not fully in physical memory.
Logical memory
Memory as viewed by user.
User mode
Restricted CPU mode preventing privileged instructions.
Kernel mode
CPU mode allowing execution of privileged instructions.
Program counter
Register containing address of next instruction.
Cache
Fast temporary storage improving memory performance.
Cache coherency
Ensuring consistent copies of data across multiple caches.
Cache-consistency problem
Challenge of maintaining identical cached data.
Caching
Using temporary storage to improve access speed.
Process states
New, Ready, Running, Waiting, Terminated.
New state
Process being created and not yet admitted for execution.
Ready state
Process waiting in Memory for CPU.
Running state
Process executing instructions on CPU.
Waiting state
Process waiting for event or I/O completion.
Terminated state
Process finished execution.
Text section
Executable code portion of process memory.
Data section
Global variables of process.
Heap
Dynamically allocated memory.
Stack
Temporary storage for function calls and local variables.
Activation record
Stack frame containing parameters, return address, locals.
Process Control Block (PCB)
OS data structure representing a process and stores all the info about the process.
What does the PCB process state hold
Current state of process.
What does the PCB program counter hold
Address of next instruction.
What do the PCB CPU registers hold
Saved register contents.
What does the PCB scheduling information hold
Priority and queue pointers.
What does the PCB memory-management information hold
Base/limit registers or page table info.
What does the PCB accounting information hold
CPU time used, job number.
What does the PCB I/O status information hold
Open files and allocated devices.
Context switch
Saving current process state and restoring another.
Context-switch time
Overhead time where no useful work is done.
Independent process
Does not share data with others.
Cooperating process
Can affect or be affected by other processes.
Interprocess communication (IPC)
Mechanism allowing processes to exchange data.
Shared memory
IPC model where processes share memory region.
Message passing
IPC model where processes exchange messages.
Producer-consumer problem
Classic example of synchronization using shared buffer.
Empty buffer condition
in == out.
Full buffer condition
(in + 1) % BUFFER_SIZE == out.
Pipe
Communication conduit between processes.
fork()
Creates new process copy of calling process.
fork() return values
0 in child, child PID in parent, -1 on failure.
open()
Opens file and returns file descriptor.
O_RDONLY
Open file for reading only.
O_WRONLY
Open file for writing only.
O_RDWR
Open file for both reading and writing.
O_CREAT
Create file if not exists.
O_TRUNC
Truncate file to length 0.
O_APPEND
Append writes to end of file.
read()
Reads bytes from file descriptor.
write()
Writes bytes to file descriptor.
close()
Closes file descriptor.
wait()
Parent waits for child process to finish.
Thread
Basic unit of CPU utilization consisting of thread ID, program counter, register set, and stack.
Multithreaded process
A process containing multiple threads sharing code, data, and resources.
Responsiveness benefit
Multithreading allows application to remain responsive while part is blocked.
Resource sharing benefit
Threads share memory and OS resources by default within same process.
Economy benefit
Thread creation and context switching are cheaper than processes.
Scalability benefit
Threads can run in parallel on multicore systems.
Multicore system
System with multiple cores appearing as separate CPUs.
Concurrency
System supports more than one task making progress.
Parallelism
System performs more than one task simultaneously.
Concurrency without parallelism
Possible on single-core systems via context switching.
Data parallelism
Distributing subsets of same data across cores performing identical operations.
Task parallelism
Distributing different tasks across cores.
Pthreads
POSIX thread standard defining API for thread creation and synchronization.
pthread_t
Data type for thread identifier.
pthread_create()
Creates new thread; takes pointer to thread ID, attributes, function pointer, and argument.
pthread_join()
Waits for specified thread to terminate.
pthread_self()
Returns ID of currently executing thread.
CPU scheduling
Process of selecting which ready process runs next.
Multiprogramming objective
Keep CPU busy at all times.
CPU–I/O burst cycle
Process alternates between CPU bursts and I/O bursts.
Ready queue
Queue of processes waiting for CPU.
Preemptive scheduling
OS may interrupt running process.
Nonpreemptive scheduling
Running process keeps CPU until it blocks or terminates.
What are the Scheduling criteria?
CPU utilization, throughput, turnaround time, waiting time, response time.
CPU utilization
Percentage of time CPU is busy.