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
Q

spends more time doing I/O than computations, many short CPU bursts

A

I/O bound process

26
Q

spends more time doing computations, few very long CPU bursts

A

CPU-bound process

27
Q

Any code segment that accesses a shared data area is referred to as…

A

Critical Section

28
Q

solution to the Critical Section problem is to..

A

allow at most one process to be active, Mutual Exclusion

29
Q

A process that is currently not executing in its critical section must not prevent other processes to enter the critical section

A

Progress

30
Q

A process must not repeatedly enter its critical section, thereby preventing other processes to enter the critical section

A

Starvation

31
Q

two processes that are about to enter their critical section must not block each other indefinitely

A

Deadlock

32
Q

two processes about to enter their critical section must not repeatedly yield to each other indefinitely

A

Livelock

33
Q

Name a requirement for Critical Section problem

A

A thread which dies in its critical non-critical section will not affect the others’ ability to continue.

34
Q

Changes a process from ready state to running state

A

Short-Term scheduler

35
Q

Another name for Short-term scheduler

A

CPU scheduler

36
Q

Removes the process from the memory

A

Medium-term scheduler

37
Q

In charge of handling the swapped out processes

A

Medium-term scheduler

38
Q

Name the three types of queues

A

Job queue
Ready queue
Device queues

39
Q

An analogy for synchronous communication

A

A phone call

40
Q

An analogy for asynchronous communication

A

A letter

41
Q

No blocking, so resources could be freed

A

Asynchronous Communication

42
Q

Requestor blocks, held resources are “tied up”.

A

Synchronous communication

43
Q

Response times are unpredictable

A

Asynchronous communication

44
Q

Outcome is known immediately

A

Synchronous communication

45
Q

If the system is

determinate for all interpretations…

A

then all processes are mutually non-interferring

46
Q

Every read and write will cause a context switch

A

Unbuffered I/O

47
Q

Collects as many bytes as you can before writing to file

A

Explicit buffered I/O

48
Q

Explicit buffered I/O uses…

A

UNIX I/O primitives

49
Q

Implicit buffered I/O uses…

A

Stream facility library

50
Q

allocates memory in the process table and creates a copy of the current process.

A

fork()

51
Q

used to terminate a process

A

exit()

52
Q

temporarily suspends parent process until one of the child processes has terminated

A

wait()

53
Q

used to execute the corresponding process

A

exec()

54
Q

A newly created child process returns

A

0

55
Q

the status in the wait() function is…

A

a pointer to an integer to which the child’s status information is assigned

56
Q

how could read() fail

A

could fail if you try and access something you don’t have permissions to access

57
Q

how could write() fail

A

could fail if you don’t have adequate memory allocated to write to

58
Q

how could fork() fail

A

could fail if system has reached limit of total processes

59
Q

how could close() fail

A

can fail if file descriptor is invalid

60
Q

how could waitpid() fail

A

could fail if the called child process does not exist