Flashcards in CSCE4600 Exam 1 Deck (60):
The OS is responsible for
- Unify view of memory
- Transfer Data between CPU and other devices
- Keep track of file locations
- Provide HW / Platform Independence
- Mediate Resource Usage
What are the 3 views of OS
I/O primitives are...
system calls, executed by the kernal
Name the 6 UNIX primitives
If pathname does not start with / it is assumed...
to start in the current directory
if pathname starts with ./
if pathname starts with ../
refers to the parent directory
In Kernel mode, the executing code has..
complete and unrestricted access to the underlying hardware
Generally reserved for the lowest-level, most trusted functions
In User mode, the executing code has...
no ability to directly access hardware or reference memory
Advantage for user mode,
crashes in user mode are always recoverable
Disadvantage for Kernel mode,
crashes are catastrophic
Why is unbuffered I/O suffer a performance loss?
you read and/or write one byte at a time
Buffered I/O is a net win when...
performing a large humber of small writes
A program whose execution has started and not yet terminated
If all executions allowed under precedence relation result in the same values, then system is
for (Pi,Pj), Pi must...
complete before the start of Pj
Mutually non-interfering systems ARE/AREN'T determinant
Name the 7 parts of a process
1) Process State
2) Program counter
3) CPU registers
4) CPU scheduling
5) Memory management
6) Accounting information
7) I/O status
Set of all processes in the system
set of all processes residing in main memory, ready and waiting
set of processes waiting for an I/O device
selects which processes should be brought into the ready queue
selects which process should be executed next and allocates CPU
spends more time doing I/O than computations, many short CPU bursts
I/O bound process
spends more time doing computations, few very long CPU bursts
Any code segment that accesses a shared data area is referred to as...
solution to the Critical Section problem is to..
allow at most one process to be active, Mutual Exclusion
A process that is currently not executing in its critical section must not prevent other processes to enter the critical section
A process must not *repeatedly* enter its critical section, thereby preventing other processes to enter the critical section
two processes that are about to enter their critical section must not block each other indefinitely
two processes about to enter their critical section must not repeatedly yield to each other indefinitely
Name a requirement for Critical Section problem
A thread which dies in its critical non-critical section will not affect the others' ability to continue.
Changes a process from ready state to running state
Another name for Short-term scheduler
Removes the process from the memory
In charge of handling the swapped out processes
Name the three types of queues
An analogy for synchronous communication
A phone call
An analogy for asynchronous communication
No blocking, so resources could be freed
Requestor blocks, held resources are “tied up”.
Response times are unpredictable
Outcome is known immediately
If the system is
determinate for all interpretations...
then all processes are mutually non-interferring
Every read and write will cause a context switch
Collects as many bytes as you can before writing to file
Explicit buffered I/O
Explicit buffered I/O uses...
UNIX I/O primitives
Implicit buffered I/O uses...
Stream facility library
allocates memory in the process table and creates a copy of the current process.
used to terminate a process
temporarily suspends parent process until one of the child processes has terminated
used to execute the corresponding process
A newly created child process returns
the status in the wait() function is...
a pointer to an integer to which the child's status information is assigned
how could read() fail
could fail if you try and access something you don’t have permissions to access
how could write() fail
could fail if you don’t have adequate memory allocated to write to
how could fork() fail
could fail if system has reached limit of total processes
how could close() fail
can fail if file descriptor is invalid