CSCE4600 Exam 1 Flashcards Preview

Programming > CSCE4600 Exam 1 > Flashcards

Flashcards in CSCE4600 Exam 1 Deck (60):
1

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

2

What are the 3 views of OS

Abstraction
Virtualization
Resource Management

3

I/O primitives are...

system calls, executed by the kernal

4

Name the 6 UNIX primitives

- create()
- open()
- close()
- read()
- write()
- ioctl()

5

If pathname does not start with / it is assumed...

to start in the current directory

6

if pathname starts with ./

current directory

7

if pathname starts with ../

refers to the parent directory

8

In Kernel mode, the executing code has..

complete and unrestricted access to the underlying hardware

9

Generally reserved for the lowest-level, most trusted functions

Kernel mode

10

In User mode, the executing code has...

no ability to directly access hardware or reference memory

11

Advantage for user mode,

crashes in user mode are always recoverable

12

Disadvantage for Kernel mode,

crashes are catastrophic

13

Why is unbuffered I/O suffer a performance loss?

you read and/or write one byte at a time

14

Buffered I/O is a net win when...

performing a large humber of small writes

15

A program whose execution has started and not yet terminated

A process

16

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

Determinant

17

for (Pi,Pj), Pi must...

complete before the start of Pj

18

Mutually non-interfering systems ARE/AREN'T determinant

ARE

19

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

20

Set of all processes in the system

Job queue

21

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

Ready queue

22

set of processes waiting for an I/O device

device queue

23

selects which processes should be brought into the ready queue

Long-term scheduler

24

selects which process should be executed next and allocates CPU

Short-term scheduler

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