How does a program execute with respect to the operating system? I am reading Operating Systems by William Stallings 6th edition and I came across this text,

Program execution:

A number of steps need to be performed to execute a
program. Instructions and data must be loaded into main memory, I/O devices
and files must be initialized, and other resources.


Now I am unable to understand how I/O devices and files are initialized on program execution? I assume it meant to start the I/O resources but what about the files? Please guide. Thanks
A initialized file means that you have comprobe that exist, or open it in some mode (write, read, r&amp;w, etc) and create it if is not already.