Midterm Fall 2002 - Midterm Fall 2002 Name: Part 1. True...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Midterm Fall 2002 Name: Part 1. True False Questions Answer True/False (T/F) (1 point each) ____ A call to getenv() will show in the truss output. ____ A program that uses user-level threads will consume less system time than the same program using kernel threads. ____ execvp() will return a value of 0 if successful. . ____ The function strcpy(a, b) allocates strlen(a) + 1 bytes of memory using malloc. ____ By default pthread_create() creates user-level threads. ____ The user time in the time command is always smaller than the system time. ____ The close() system call always releases the resources of an open file object. ____ When a process calls fork(), the number of file descriptors in the parent process remain the same. ____ Programs that run non-preemptive scheduling finish sooner than programs that run with preemptive scheduling. ____ The OS checks the arguments of a system call in user space to save execution time. ____ The size in bytes of a variable of type (char *) is 4 bytes. ____ When a process exits, all the file descriptors of that process are closed. ____ The sum of the user and system time in a process could be larger than the real time. ____ After forking a process, a write call in the parent could modify the offset of an open file in the child. ____ The counter of a semaphore cannot have a value larger than the initial count.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/30/2012 for the course CS 252 taught by Professor Gustavorodriguez during the Fall '11 term at Purdue University-West Lafayette.

Page1 / 7

Midterm Fall 2002 - Midterm Fall 2002 Name: Part 1. True...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online