Midterm Lecture 3 Flashcards

1
Q

cooperating processes: why this framework would be useful

A

Cooperating processes can be designed to perform specific tasks or components of a larger system. This modular approach makes it easier to organize and manage complex systems, as each process can focus on its unique functionality. This is especially valuable in large-scale software development.

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

“Open before use”

A

“Open before use” is a common principle in the context of input and output (I/O) operations in computer programming, particularly when working with files. This principle means that, before attempting to read from or write to a file or any I/O resource, you should explicitly open the resource using appropriate functions or methods provided by the operating system or programming language. Here’s why the “open before use” principle is useful:

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

I/O

A

Opening a file or I/O resource allocates necessary system resources, establishes a connection, and performs any necessary setup. This is essential for tracking the status of the resource and avoiding resource leaks.

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

producer/consumer model for communication

A

One process “producer” writes to a shared buffer, while the other, “consumer” reads the data from the shared buffer.

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

Blocking vs Nonblocking

A

Blocking: The process is halted until the reader reads it.
Nonblocking: The process continues whether the reader retrieves the data or not.

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