Exam 1 Flashcards
PID
Process ID
GID
Group ID
UID
User ID
TSL
Test and Set Lock
process
a program in execution
daemon
a background process
child process
a process created by another process
multiprogramming
when multiple processes are running
multiprocessing
when multiple CPUs are running processes
race condition
two or more processes want to modify a shared resource at the same time and the result depends who runs when
quantum
the amount of time before a clock interrupt preempts a process
critical section
when the program is accessing the shared data
atomic action
a single check, change, and possible sleep action
spin lock
a lock that uses busy waiting
system call
trapping into the kernel and invoking the operating system
throughput
the number of jobs per hour the system completes
turnaround time
the averaged time from the moment a job is submitted to the time that it is completed in a batch setup
preemptive scheduling
selects a process to run for a set amount of time and after that time if the process is still running it is suspended and another process is allowed to run
context switch
switching from one program to another
thread
a lightweight process
what are the two main functions of an operating system
- an extended machine
- a resource manager
What hardware characteristics distinguish between the 4 generation of computers?
vacuum tubes, transistors, ICs, PCs
What is the memory hierarchy? Why do computer systems use a memory hierarchy?
registers, cache, main memory, disk drives, tape drives
the higher in the hierarchy the faster the access but the more it costs
Why are system calls necessary? What does the fork system call accomplish?
- system calls protect from allowing the user to cause avoidable damage to the system
- creates a child process
Which of the following instructions should be allowed only in kernel mode? a) disable all interrupts b) read the time-of-day clock c) set the time-of-day clock d) change the memory map
a, c, d
What is a virtual machine?
allows multithreading on a machine that doesn’t support it
List some items that might be found in a process table.
Registers, Program counter, Stack Pointer, Priority, GID, UID, PID, PPID, group, time used
What are the three process states and four transitions that were discussed in the book? You should be able to reproduce the figure that represents the three process states and four transitions.
- ready, running, blocked
- blocked for input, scheduler picks a process, scheduler picks this process, input becomes available
what advantages are there in using threads rather than multiple processes
more can be accomplished at once, faster program speeds, virtualization
list two examples of applications that are commonly implemented using threads
- web server
- word processor
what are the advantages and disadvantages are there in implementing threads in user space as opposed to kernel space
advantage: more usage of the quantum
disadvantage: less fair to the other processes
which is easier: blocking system call or non-blocking system call
blocking system call
list four functions defined by the Pthread standard
create, exit, join, yield
what four conditions are needed to avoid race conditions
- no tow processes may be simultaneously inside their critical regions
- No assumptions may be made about speeds or the number of CPUs
- No process running outside its critical region may block other processes
- No process should have to wait forever to enter its critical region
what were the problems with the four unsuccessful attempts to implement mutual exclusion functions?
?
what two functions are implemented by an operating system that supports semaphores?
up and down
what is a binary semaphore
a semaphore that can have only one of two values
why don’t we use the monitor system call in every application that needs to implement mutual exclusion
monitor doesn’t work in machines with more than one CPU
what mechanism is used to avoid race conditions with multiple CPUs
Message Passing
what are six goals that could be used in designing a good scheduling algorithm
- fairness
- policy enforcement
- balance
- throughput
- response time
- meeting deadlines
List three scheduling algorithms that could be used for a batch-oriented system
- throughput
- turnaround time
- CPU utilization
List three scheduling algorithms that could be used for an interactive-oriented system
response time
proportionality
balance
dining philosophers problem
an example of deadlock issue