Looking for SISTEMAS OPERATIVOS test answers and solutions? Browse our comprehensive collection of verified answers for SISTEMAS OPERATIVOS at moodle.uam.es.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Dado este código:
...#define FILE "file.txt"int main(void) { int file; if ((file = open(FILE, O_CREATE | O_TRUNC | O_RDWR) == -1) { // Imprimimos error ... }; close(file); ...}¿Se ha borrado del disco el fichero FILE?
En una tubería que no tiene procesos lectores asociados, ¿qué ocurre cuando un proceso intenta escribir un mensaje en la tubería?
¿Qué devuelve la función open() para abrir un fichero?
Dado este código:
...#define FILE "file.txt"int main(void) { int file; if ((file = open(FILE, O_CREATE | O_TRUNC | O_RDWR) == -1) { // Imprimimos error ... }; close(file); ...}¿Se ha borrado del disco el fichero FILE?
¿Qué hace exactamente la función waitpid()?
Cuando la llamada a la función fork() devuelve - 1 significa que:
¿Cuántos procesos padre puede tener otro proceso?
Si se ejecuta el siguiente código:
...
for (i=0; i < 3; i++) {
fork();
}
exit(EXIT_SUCCESS);
...
¿Cuántos procesos zombies tenemos?
¿Qué hace exactamente la función wait(NULL)?
Si se ejecuta el siguiente código:
...
for (i=0; i < 3; i++) {
fork();
}
exit(EXIT_SUCCESS);
...
¿Cuántos hijos se quedan huerfanos?