ch3 - basic Flashcards

Processes (34 cards)

1
Q

What is the advantage of processes?

A

Allows multitasking and efficient use of system resources.

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

What is the disadvantage of processes?

A

Context switching causes additional performance overhead.

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

What is a process state?

A

Indicates the execution state of a process: New, Running, Waiting, Ready, or Terminated.

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

What is a Process Control Block (PCB)?

A

A data structure that contains information about a process, such as state, program counter, CPU registers, memory management info, etc.

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

What is a context switch?

A

The process where the CPU switches from one process to another by saving and restoring its state.

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

What is the disadvantage of a context switch?

A

Context switch time is pure overhead and does not perform useful work.

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

What is Interprocess Communication (IPC)?

A

A mechanism that allows processes to share information and coordinate activities.

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

What are the two main types of IPC?

A

Shared memory and message passing.

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

What is a problem with shared memory IPC?

A

Requires synchronization between processes to prevent race conditions.

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

What is message passing?

A

An IPC mechanism where processes exchange information by sending and receiving messages.

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

What are the advantages of message passing?

A

Easier synchronization and supports communication across different computers.

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

What are the disadvantages of message passing?

A

Slower data transfer compared to shared memory.

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

What is the Producer-Consumer problem?

A

A classic IPC problem where one process produces data while another consumes it.

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

How can the Producer-Consumer problem be solved using shared memory?

A

By using a counter variable, shared buffers, and synchronization mechanisms.

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

What is a race condition?

A

A situation where multiple processes access a shared resource concurrently, leading to inconsistent results.

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

How can a race condition be prevented?

A

Using synchronization mechanisms like locks and atomic operations.

17
Q

What are the disadvantages of multiprocessing?

A

Complex process management, synchronization requirements, and context switch overhead.

18
Q

What is a socket?

A

An endpoint for communication between processes over a network or within the same system.

19
Q

How are sockets used in client-server communication?

A

The server listens for requests, and the client sends data and receives responses.

20
Q

What is Remote Procedure Call (RPC)?

A

An IPC mechanism that allows calling functions on a remote process as if they were local.

21
Q

What are the advantages of RPC?

A

Simplifies process communication and abstracts network communication.

22
Q

What are the disadvantages of RPC?

A

Sensitive to network failures and requires data format compatibility between systems.

23
Q

What is a Named Pipe?

A

An IPC mechanism that allows bidirectional communication between unrelated processes.

24
Q

What is a Foreground Process in mobile systems?

A

An active process controlled via the user interface.

25
What is a Background Process in mobile systems?
A process running in the background with limited task execution.
26
What is an Orphan Process?
A process whose parent has terminated, but it continues to run.
27
What is a Zombie Process?
A process that has completed execution but still has an entry in the process table because its parent hasn't called wait().
28
What is the difference between a process and shared memory?
A process is an execution entity, while shared memory is a resource that allows processes to share data.
29
What is Process Control?
It's a type of system call that manages the creation, execution, and termination of processes, ensuring smooth operation and resource allocation.
30
What is File Management?
It's a type of system call that handles operations related to creating, reading, writing, modifying, and deleting files in a storage system.
31
What is Device Management?
It's a type of system call that controls access to hardware devices, allowing processes to read, write, and configure device settings.
32
What is Information Maintenance?
It's a type of system call that provides system-related data such as time, date, and attributes for processes, files, and devices.
33
What is Communications?
It's a type of system call that enables processes to exchange data through message passing or shared memory in a networked or local environment.
34
What is Protection?
It's a type of system call that ensures secure access to system resources by managing user permissions and restricting unauthorized access.