Lecture 1 Flashcards

1
Q

ps -A

A

On a Linux system, displays every active process

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

Parent of all processes on the system

A

init
systemd
launchd

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

How is PCB implemented in linux?

A

As the data structure task_struct

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

How is PCB implemented in Darwin?

A

As a data structure task.

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

What is the most complicated data structure in the operating system?

A

The process block

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

Job queue

A

Set of all processes in the system

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

Ready queue

A

set of all processes in main memory, ready and waiting to execute.

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

Device queues

A

set of processes waiting for a particular I/O device

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

Scheduling

A

used to determine which process is next to get access to CPU.

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

How are queues implemented?

A

As a doubly linked list of PCBs

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

What are the reasons for cooperating processes? (IPC)

A
  1. Computation speedup (parallelization)
  2. Information sharing
  3. Modularity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the two models of IPC?

A
  1. Shared memory

2. Message passing

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

Example of shared memory in Unix

A

POSIX shared memory Unix

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

How does a process terminate another process?

A

Via a System call
TerminateProcess() in windows
abort() in Unix/Linux

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

How does a parent know which child to terminate?

A

The child id is passed to the parent when the child is created.

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

Does the OS allow a child to continue if its parent terminates?

A

NO

17
Q

The process is a Zombie when?

A

No parent waiting, hasn’t invoked wait() yet.

18
Q

A process is an orphan when?

A

Parent terminates without invoking wait().

19
Q

ps -ef

A

In Linux will display kernal threads

20
Q

Parent of all other kernel threads?

A

kthreadd (pid = 2)

21
Q

Examples of message passing

A
 Windows advanced local procedure (ALPC) facility
 Pipes (named or unnamed)
 Client-server communication
     - Sockets
     - Remote Procedure Calls (RPCs)
22
Q

What are the reasons a parent might terminate a child process?

A

 Child has exceeded allocated resources
 Task assigned to child is no longer required
 The parent is exiting and the operating systems does not allow a child to continue if its
parent terminates

23
Q

On UNIX systems what happens to orphaned processes?

A

They are inherited by process with pid 1 which then proceeds to kill them.