Processes Flashcards

(19 cards)

1
Q

How does Linux represent a process?

A

As a task_struct structure containing PID, state, parent, children, open files, and address space.

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

What are the typical mobile process management limits in iOS?

A

Single foreground process controlled by UI and multiple background processes in memory with limits on task duration and activity.

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

What is a context switch?

A

The process of saving the state of the current process and loading the state of another process during CPU switching.

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

What is the difference between a short-term and long-term scheduler?

A

What is the difference between a short-term and long-term scheduler?

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

What is shared memory IPC?

A

A method where processes share a common memory region for communication, requiring synchronization

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

What is the purpose of a medium-term scheduler?

A

To reduce degree of multiprogramming by swapping processes in and out of memory and disk.

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

What are the main IPC models?

A

Shared memory and message passing.

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

What is a thread in a process?

A

A thread is a control flow within a process, allowing multiple locations to execute concurrently, with storage for thread details and program counters.

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

What is the Linux fork() system call?

A

What is the Linux fork() system call?

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

What are the key process states?

A

New, Running, Waiting, Ready, Terminated.

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

What is a process in an operating system?

A

A process is a program in execution, consisting of code, current activity, stack, data, and heap, that is active and managed by the OS.

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

What are the main process scheduling queues?

A

Job queue (all processes), ready queue (in memory, ready to run), device queues (waiting for I/O devices).

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

What are typical resource sharing options between parent and child processes?

A

Share all resources, share subset of resources, or no resources; and execute concurrently or wait for termination.

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

What are the main parts of a process?

A

Program code (text), current activity (program counter, registers), stack, data section, and heap.

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

What does the exec() system call do?

A

Replaces the process’s memory space with a new program after a fork().

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

What is message passing in IPC?

A

A mechanism where processes communicate and synchronize by sending and receiving messages.

17
Q

What is a socket in interprocess communication?

A

An endpoint for communication, identified by IP address and port, used for network communication.

18
Q

What information does the Process Control Block (PCB) contain?

A

Process state, program counter, CPU registers, scheduling info, memory info, accounting info, I/O status.

19
Q

What is a context switch overhead?

A

Time spent saving and loading process states during a CPU switch, which is overhead and not productive work.