Computing Systems W8 part 2 Flashcards

1
Q

Program vs process

A

program (passive) & process (active)

process:
instance of a program
requires resources (CPU, memory, IO, data)
program counter for execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

process resources (5)

A

CPU, memory, I/O , files, data

reusable resources are reclaimed when process terminates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

single-threaded process manager

A

one program counter : executes one instruction at a time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

multi-threaded process manager

A

multiple program counters for parallel execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Parallel execution

A

simultaneous execution of multiple processes or threads, typically on multiple CPU cores or processors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

concurrent execution

A

operating system switches between processes, giving the illusion of simultaneous execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Process management activities (4)

A

Creating/Deleting user & system processes
Stopping/Starting processes
process synchronization & communication
Deadlock handling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

process synchronization (3)

A

control multiple processes (threads) to preserves system integrity and avoids undesirable outcomes

Ensures only one process can access a shared resource at a time

Facilitates interaction between processes

Controls the order of execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

deadlock

A

two or more processes are unable to proceed because each is waiting for the other to release a resource, resulting in a cyclic waiting scenario.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Memory Management (3)

A

Keep track of currently used memory

Decides which process and data move in/out of memory

allocates/deallocate memory space as need

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Program execution and Memory

A

Memory must contain ALL program instructions in order to execute the program

data required by the program must be in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Memory management advantages

A

improve CPU utilization and computer response speed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

file

A

Standardized model that represents a collection of related information.

Users work with files and OS translates file operations into operations on storage devices

ex. files represent programs and data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Storage management (4)

A

OS provides users with file system to view information. Users interact with files (logical storage units)

create/delete files & directories
support for manipulating files/directories
Mapping files to mass storage
Backing up files on nonvolatile storage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Storage device properties (4)

A

speed (fast access to data)
capacity (big or small)
data-transfer rate (efficiency)
access method (how data is accessed, in order or random)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Mass Storage Management (3)

A

Computer speed and efficiency depends on mass storage system and management algorithms

Free-space management
Storage allocation
Disk scheduling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Mass Storage

A

Used for data that is meant to be kept for long periods. Used frequently so it must be efficient

ex.
secondary: HDD, SSD
tertiary: optical storage, magnetic tape (not as efficient)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

I/O subsystem components (3)

A

Memory management of I/O
- buffer (storage)
- caching
- spooling (I/O data is first spooled into a local buffer before sending data to output device)
- device driver interface
- Drivers for specific hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

protection

A

any mechanism for controlling access of processes or users to resources defined by the OS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

security

A

defense of the system against internal and external attacks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

UserID

A

When user logs in to the system, the authentication determines user ID for the user. That user ID is associated with all of the user’s processes and threads.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

GroupID

A

ID to distinguish among sets of users

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

escalate privileges

A

allows user to change to effective ID with more rights

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Cloud computing

A

delivers computing, storage, and applications as a service across a network (extension of virtualization)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Virtualization
Multiple simulated (virtual) versions of something on a single physical system ex. Virtual Machine is like a computer within a computer. Multiple virtual machines on one physical machine, each with its own OS and applications
26
Software as a service (SaaS)
one or more applications available via the internet
27
Platform as a service
software stack ready for application use via internet (i.e. database server)
28
Infrastructure as a Service (IaaS)
servers or storage available over internet (i.e. storage available for backup use)
29
load balancers
spread traffic across multiple applications
30
Real-time embedded systems
systems integrated into other devices that focus on real-time processing. Designed to perform specific tasks with a focus on meeting strict time constraints constraints - processes must be executed within specific time limits i.e. sound system of computer
31
command interpreter
Also known as CLI (when there are multiple it is called shell) provides direct command entry (can be implemented by kernel or system program) (UNIX) fetches command from user and CLI identify file to be loaded into memory and execute command ex bash, C shell, Korn shell
32
User OS Interface GUI
Graphical User Interface rather than entering commands directly via a command-line interface, users employ a mouse-based window-and-menu system characterized by a desktop metaphor ex. mouse, keyboard, monitor
33
System call
Allows user programs to request services from OS provide an interface to the system calls available by OS. Access by programs via API (Win32, POSIX, Java API) These calls are generally available as functions written in C and C++, although certain low-level tasks
34
System-call interface
Intercepts function calls in API and invokes system call System call table indexed according to system call number invokes a system call in OS kernel and return status of system call + return values
35
System call types (6)
Process control file management device management information maintenance communications protection
36
Process control system call (5)
◦ create process, terminate process ◦ load, execute ◦ get process attributes, set process attributes ◦ wait event, signal event ◦ allocate and free memory ex. CreateProcess() fork() ExitProcess() exit() WaitForSingleObject()
37
file management system call (4)
◦ create file, delete file ◦ open, close ◦ read, write, reposition ◦ get file attributes, set file attributes ex. CreateFile() ReadFile() WriteFile() CloseHandle()
38
device management system call (4)
request device, release device ◦ read, write, reposition ◦ get device attributes, set device attributes ◦ logically attach or detach devices ex. SetConsoleMode() ioctl() ReadConsole() read() WriteConsole()
39
information maintenance system call (4)
◦ get time or date, set time or date ◦ get system data, set system data ◦ get process, file, or device attributes ◦ set process, file, or device attributes ex. GetCurrentProcessID() getpid() SetTimer() alarm() Sleep()
40
communications system call (4)
◦ create, delete communication connection ◦ send, receive messages ◦ transfer status information ◦ attach or detach remote devices ex. CreatePipe() pipe() CreateFileMapping() shm open() MapViewOfFile()
41
protection system call (2)
◦ get file permissions ◦ set file permissions ex. SetFileSecurity() chmod() InitlializeSecurityDescriptor() umask() SetSecurityDescriptorGroup()
42
System programs
provide an environment for program development and execution. Provides essential services without direct user interaction ex. user interface to system calls file management: create, delete, copy, remain
43
System call process
- User program initiates system call - Mode switches to kernel mode - Control is transferred to specific system call function - Validation takes place to ensure user program has permissions to perform request - System call executes - After completing, handler returns results to user program - Control returns to user mode and it continue execution
44
System programs characteristic
Some launched during system boot up Some run continuously from boot to shutdown Run in user mode ( do not have privileged permission) referred to as services/subsystems/daemons
45
Application programs
user-oriented programs that do not pertain to core functioning of OS Users initiate and run application programs Considered external software that performs specific task
46
How to design an OS
1. define goals and specifications 2. Choose hardware
47
user goals
operating system should be convenient to use, easy to learn, reliable, safe, and fast - make it safe and no data loss
48
System goals
operating system should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient
49
debugging
finding and fixing errors OS will generate log files
50
cooperating process
Any process that can affect or be affected by other processes
51
Message Passing
Data is sent from one process to another: - Process A sends a message and is stored in the kernel - Process B receives a message, retrieving the message from the kernel (This models is useful for processes running on different computers)
52
shared memory
Memory shared between 2 processes - Process A: Writes value to shared memory - Process B: reads value from shared memory (Kernel provides shared memory when requested)
53
Process Control Block (PCB)
Generated for each process created, contains data and metadata about process
54
Switching process situations (3)
Interrupt: OS wants different process to use CPU I/O Request: process is added to I/O queue Waiting for event: program is waiting for even to occur
55
Context Switch
act of switching processes saves PCB to load saved state of process to resume after switching is done
56
daemons
processes waiting for work once it receives work, it will create a process
57
fork() return values (2)
1. pid of parent or -1 if there was an error 2. child process pid which is 0
58
cooperating process usages (4)
info sharing efficiency modularity convenience
59
Inter-process communication (IPC) Models
Message Passing Shared memory
60
average memory latency formula
c + (1-h) * m c: cache access time m: time to access main memory
61
average memory latency formula for multi-level cache
L1 + (1-h1)*(L2 + (1-h2)*M)
62
Nonpreemptive scheduling
Process decides when to evict from CPU
63
preemptive scheduling
OS decides when to evict process from CPU
64
nonpreemptive schedulers (3)
nonpreemptive shortest job first first come first serve
65
preemptive schedulers (3)
preemptive shortest remaining time first round robin
66
FCFS pros (2) & cons (3)
pros - no starvation - simple to implement cons - wait time is not optimized - long processes can hog resources - Convoy effect: short processes wait behind long ones
67
SJF pros (2) & cons (2)
pros - reduce average wait time : best nonpreemptive scheduler - favors I/O bound processes cons - large burst time processes can starve - long processes can hog resources
68
NP pros (1) & cons (2)
pros - higher priority processes see lower wait times cons - processes with low priorities can starve - long processes can hog resources
69
Schedulers that cause starvation
NP: SJF and NP P: SRTF and P (avoid starvation by providing a max wait time that applies to all processes)
70
SRTF pros (2) & cons (1)
pros - fastest algorithm - favors I/O bound processes cons - processes with large burst time can starve
71
P pros (1) & cons (1)
pros - higher priority processes have low wait times cons - processes with low priorities can starve
72
RR pros (2) & cons (2)
pros - starvation is not possible - avg response time decreases cons - average waiting time increases - more context switches
73
meta-scheduler
Multiple queues of processes require a scheduler for which queue to be picked next
74
time slice
allocated CPU time