Lesson 2 Flashcards

1
Q

trap instruction

A

Sets kernel mode,integrated with the system call in C code

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

Calling kernel level from user level

A

system call interface

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

Handles inter-process communication, scheduling and memory management

A

Process Control System

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

Handles hardware from kernel level

A

Hardware Control

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

System call with TWO return values

A

parent gets PID of child, child gets 0

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

The stacks of a Unix process

A

One for user mode

One for system calls in kernel mode

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

Memory layout: Text

A

read-only machine code

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

4 facts after a fork

A
  • Child gets a copy of parent’s code and data
  • except fork returns child’s PID to parent, and zero to child
  • Parent and child share the same open files
  • Child gets copy of parent’s signal table, but with no pending signals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

wait [n]

A
  • pauses until execution of a background process with PID = n has ended
  • If n not given, waits for all processes known to it
  • returns the exit status of the last job which terminated
  • returns 127 in the event that n specifies a non-existent job
  • returns zero if no jobs to wait for
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

exec

A

Change program in the current process, keeping the old PID

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

critical resource

A

to be deterministic: only one process or thread at a time

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

static - on variables declared outside function (and functions themselves)

A

not visible outside the declaring file

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

static - on variables declared inside functions

A

keeping value from one function execution to the next.

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