3
$\begingroup$

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

$\endgroup$
1
$\begingroup$

A initialized file means that you have comprobe that exist, or open it in some mode (write, read, r&w, etc) and create it if is not already.

$\endgroup$
2
  • $\begingroup$ You mean if a person wants to perform an operation on the file then that file must be loaded into the operating system with respective rights? $\endgroup$ – user1697 May 13 '13 at 15:09
  • 1
    $\begingroup$ The file must be loaded by the operating system into main memory. Usually when editing a file it is created a modified copy under a different name. The file permissions are evaluated before editing or creating $\endgroup$ – Alejandro Sazo May 13 '13 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy