CSCE4600 Exam 1 Flashcards

1
Q

The OS is responsible for

A
  • Unify view of memory
  • Transfer Data between CPU and other devices
  • Keep track of file locations
  • Provide HW / Platform Independence
  • Mediate Resource Usage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 3 views of OS

A

Abstraction
Virtualization
Resource Management

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

I/O primitives are…

A

system calls, executed by the kernal

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

Name the 6 UNIX primitives

A
  • create()
  • open()
  • close()
  • read()
  • write()
  • ioctl()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

If pathname does not start with / it is assumed…

A

to start in the current directory

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

if pathname starts with ./

A

current directory

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

if pathname starts with ../

A

refers to the parent directory

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

In Kernel mode, the executing code has..

A

complete and unrestricted access to the underlying hardware

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

Generally reserved for the lowest-level, most trusted functions

A

Kernel mode

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

In User mode, the executing code has…

A

no ability to directly access hardware or reference memory

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

Advantage for user mode,

A

crashes in user mode are always recoverable

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

Disadvantage for Kernel mode,

A

crashes are catastrophic

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

Why is unbuffered I/O suffer a performance loss?

A

you read and/or write one byte at a time

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

Buffered I/O is a net win when…

A

performing a large humber of small writes

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

A program whose execution has started and not yet terminated

A

A process

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

If all executions allowed under precedence relation result in the same values, then system is

A

Determinant

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

for (Pi,Pj), Pi must…

A

complete before the start of Pj

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

Mutually non-interfering systems ARE/AREN’T determinant

A

ARE

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

Name the 7 parts of a process

A

1) Process State
2) Program counter
3) CPU registers
4) CPU scheduling
5) Memory management
6) Accounting information
7) I/O status

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

Set of all processes in the system

A

Job queue

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

set of all processes residing in main memory, ready and waiting

A

Ready queue

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

set of processes waiting for an I/O device

A

device queue

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

selects which processes should be brought into the ready queue

A

Long-term scheduler

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

selects which process should be executed next and allocates CPU

A

Short-term scheduler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
spends more time doing I/O than computations, many short CPU bursts
I/O bound process
26
spends more time doing computations, few very long CPU bursts
CPU-bound process
27
Any code segment that accesses a shared data area is referred to as...
Critical Section
28
solution to the Critical Section problem is to..
allow at most one process to be active, Mutual Exclusion
29
A process that is currently not executing in its critical section must not prevent other processes to enter the critical section
Progress
30
A process must not *repeatedly* enter its critical section, thereby preventing other processes to enter the critical section
Starvation
31
two processes that are about to enter their critical section must not block each other indefinitely
Deadlock
32
two processes about to enter their critical section must not repeatedly yield to each other indefinitely
Livelock
33
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.
34
Changes a process from ready state to running state
Short-Term scheduler
35
Another name for Short-term scheduler
CPU scheduler
36
Removes the process from the memory
Medium-term scheduler
37
In charge of handling the swapped out processes
Medium-term scheduler
38
Name the three types of queues
Job queue Ready queue Device queues
39
An analogy for synchronous communication
A phone call
40
An analogy for asynchronous communication
A letter
41
No blocking, so resources could be freed
Asynchronous Communication
42
Requestor blocks, held resources are “tied up”. 
Synchronous communication
43
Response times are unpredictable
Asynchronous communication
44
Outcome is known immediately 
Synchronous communication
45
If the system is | determinate for all interpretations...
then all processes are mutually non-interferring
46
Every read and write will cause a context switch
Unbuffered I/O
47
Collects as many bytes as you can before writing to file
Explicit buffered I/O
48
Explicit buffered I/O uses...
UNIX I/O primitives
49
Implicit buffered I/O uses...
Stream facility library
50
allocates memory in the process table and creates a copy of the current process.
fork()
51
used to terminate a process
exit()
52
temporarily suspends parent process until one of the child processes has terminated
wait()
53
used to execute the corresponding process
exec()
54
A newly created child process returns
0
55
the status in the wait() function is...
a pointer to an integer to which the child's status information is assigned
56
how could read() fail
could fail if you try and access something you don’t have permissions to access
57
how could write() fail
could fail if you don’t have adequate memory allocated to write to
58
how could fork() fail
could fail if system has reached limit of total processes
59
how could close() fail
can fail if file descriptor is invalid
60
how could waitpid() fail
could fail if the called child process does not exist