Pregunta 1
Pregunta
The three standard file descriptor's are opened on the program's behalf by the [blank_start]______[blank_end]
Pregunta 2
Pregunta
The O_CREAT flag to open(2) can be used in conjunction with [blank_start]______[blank_end] flag to create a file exclusively (atomically).
Pregunta 3
Pregunta
The [blank_start]_____[blank_end] flag to open(2) prevents dereferencing symbolic links and its absence is the cause of some vulnerabilities in privileged programs.
Pregunta 4
Pregunta
When file descriptors are open in a program and a fork(2) and exec(2) happen before closing them - the descriptors can end up being passed to a new program. The [blank_start]_____[blank_end] flag to open(2) closes them for you.
Pregunta 5
Pregunta
The [blank_start]____[blank_end] is a directory in the proc filesystem which contains information about each file descriptor opened by a program.
Pregunta 6
Pregunta
The two size types in the function prototype translate to what standard C types (in order of appearance)?
Respuesta
-
signed integer type, unsigned integer type
-
unsigned integer type, signed integer type
-
integer type, signed integer type
-
signed integer type, integer type
Pregunta 7
Pregunta
Which of the following flags to open(2) are not a part of the Single UNIX Specification?
Respuesta
-
O_DIRECT
-
O_LARGEFILE
-
O_NOATIME
-
O_ASYNC
-
O_DSYNC
-
O_SYNC
Pregunta 8
Pregunta
The creat(2) system call is equivalent to this open(2) system call
Respuesta
-
fd = open(pathname, O_WRONLY | O_CREAT | O_TRUNC, mode);
-
fd = open(pathname, O_WRONLY | O_TRUNC, mode);
-
fd = open(pathname, O_WRONLY | O_CREAT |O_APPEND, mode);
-
fd = open(pathname, O_WRONLY | O_APPENDT | O_TRUNC, mode);
Pregunta 9
Pregunta
During which system calls does the kernel set the file offset or file pointer?
Respuesta
-
read()
-
write()
-
lseek()
-
open()
-
close()
-
creat()
Pregunta 10
Pregunta
During which system calls does the kernel update a pointer called the file offset or file pointer.
Respuesta
-
read()
-
write()
-
close()
-
creat()
-
lseek()
-
open()
Pregunta 11
Pregunta
With file holes the file system doesn’t allocate any disk blocks for a hole until, at some later point, data is written into it
Pregunta 12
Pregunta
The return value from a successful lseek() is a?
Respuesta
-
file offset
-
number of seeked bytes
-
number of read bytes
Pregunta 13
Pregunta
Writing to a file hole performs what action?
Respuesta
-
Allocating disk blocks but not writing null bytes in them
-
Writing null bytes but not allocating disk blocks
-
Allocating disk blocks and writing null byes within the blocks
-
Neither, system assumes null byte are there