What does the term ‘block’ mean

blocking

What does the term block mean wrt computer science? I have seen it being used in multiple occassions but never understood what it means. Like blocking I/O? Googling doesn't seem to help me much.

Best Answer

Blocking I/O means that the program essentially asks, "Get me this data, I'll wait until its ready". This is in contrast to non-blocking I/O. There are two flavors: "Get me this data, I'm going to go do something else. Interrupt me when the data is ready.", and "Get me this data, I'm going to go do something else. I'll ask you later if you have it yet."

It's important because if a program blocks while waiting for data, it can't do things like respond to mouse clicks or repaint the screen. This is what's happening when you see a program labeled as "Not Responding" in the task manager.

Related Question