Processes Pt.2 - Lec.7 Flashcards

1
Q

Context Switching

A

Context switching is the CPU switching from one process to another, involves storing and restoring the CPU’s state(context).

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

Context Switching Triggers MIK

A

Multitasking(switching between processes/threads), Interrupts( e.g. handling external events), Kernel/User Mode transitions( e.g. accessing system resources).

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

Hardware vs Software context switching

A

Some CPUS like Intelx86 support hardware switching, but modern OSes often use software-based switching for portability and performance.

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

Process Creation[PID, Tree Structures, Resource Sharing, Execution] PTRE

A

PID- processes are dynamically created and identified by a process id(pid), Tree Structures- processes form a tree structure with parent processes creating child processes, Resource Sharing- Can be shared fully, partially or not at all between parent and child, Execution- Parent and child can run concurrently or the parent can wait until the child has finished.

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

Process Address Space

A

Child processes may- 1. Duplicate the parent process(same program/data), or 2. Load a new program(using exec() after fork()).

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

POSIX Process Creation Commands( fork(), exec(), exit() and wait() )

A

fork() creates a new process(child), exec() replaces the process memory with a new program, exit() terminates a process, wait() allows parent process to wait for child termination.

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

Process termination( zombie and orphan processes)

A

Processes terminate with exit(), releasing resources. Zombie process is a terminated process whose parent hasn’t called wait(). Orphan process is a process whose parent terminates without waiting, reparented to init in Linux.

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