CSCE3600 - Exam 1 Flashcards
unix command: concatenates files and print to standard output
cat
unix command: file viewer
less
unix command: locate a command
which
unix command: prints the groups a user is in
groups
unix command: prints lines matching to a pattern
grep
unix command: search for a file in a directory
find
unix command: clears the terminal screen
clear
unix command: prints information about a user
finger
unix command: shows who is logged in
who
unix command: identifies the current user
whoami
List 7 processes associated with Process Control Block (PCB)
process state, program counter, cpu registers, cpu scheduling information, memory-management info, accounting info, I/O status info
program in execution, which forms the basis of all computation
process
the context (information/data) maintained for an executing program - intuitively the abstraction of a physical processor
process
Process: containing temporary data (function parameters, return addresses, local variables)
stack
process: containing global variables
data section
process: containing memory dynamically allocated during run time
heap
how does unix view everything?
as files
what are the three standard unix/linux files?
stdin, stdout, stderr
what is stored in the user level context (4)
code, data, stack, heap
preserve the literal value of each character enclosed within the quotes
single quotes (‘ ‘)
remove the special meaning from a single character
backslash ( \ )
preserves the literal value of all characters within the quotes
double quotes (“ “)
draw the process state diagram
new, running, waiting, ready, terminated
selects which processes should be brought into the ready queue. controls the degree of multiprogramming. invoked infrequently
long-term scheduler
selects which process should be executed next and allocates cpu. invoked frequently
short-term scheduler
when cpu switches to another process the system must
save the state of the old process and load the saved states for the new process
if child exits before parent or if no parent waiting, then terminated process is a
zombie
if parent exits before child or if parent terminated, processes are
orphans
using SJF draw chart and calculate waiting time and turn around time: AT:BT P1 = 0:7 P2 = 2:4 P3 = 4:1 P4 = 5:4
chart: P1 - P3 - P2 - P4
WT = 4
TAT = 8
only one processor accesses the system data structures, alleviating the need for data sharing
asymmetric multiprocessing
each processor is self-scheduling, all processes in common ready queue, or each has its own private queue of ready processes
symmetric multiprocessing
process must voluntarily relinquish by terminating or by making a system call
non-preemptive
yank the cpu away from the currently executing process when a higher priority process is ready
preemptive
list preemptive algorithms
shortest-remaining-time-first
round-robin
multi-level feedback queue
fraction (%) of time that cpu is busy
cpu utilization
number of job completions (processes) per unit of time
throughput
the interval from the time of submission of a process to the time of completion
turnaround time
sum of the periods spent waiting in the ready queue
waiting time
time of submission to the time the first response is produced
response time
list 3 resource sharing options for parents and children
1) parent and children share all resources
2) children share subset of parent’s resources
3) parent and child share no resources
list 2 address space options for parents and children
1) child duplicate of parent
2) child has no program loaded into it
list 2 execution options for parent and child
1) parent and child execute concurrently
2) parent waits until children terminate