Midterm Spring 2003

Midterm Spring 2003 - Midterm Spring 2003 Name Part 1 True...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Midterm Spring 2003 Name: Part 1. True False Questions Answer True/False (T/F) (1 point each) __F__ The call to putenv() in your shell can be called by a child process. __T__ spinlocks have less overhead than mutex-locks as long as the critical section is small. __F__ The check for permissions in the open() system call could be done in user space. __T__ If foo() calls xoo() and foo() has a local variable v1 and xoo() has a local variable v2, then &v1 > &v2 __T__ A call to fork() will show in the truss output. __F__ execvp() will return a value of 0 if successful. __T__ The counter of a semaphore could be negative at some point in the execution of a program.. __T__ Calling fork() modifies the reference counter of the open file objects. __F__ A parent and a child process may communicate using a pipe created by the child process. __F__ The size in bytes of a variable of type (char *) is 4 bytes and the size of a variable of type (char **) is 8 bytes. __T__ User-level threads use non-preemptive scheduling. __F__ ELF means Executable Level Format. _T/F___ SMP stands for Simultaneous Multi Processing (It should be "Symetric" instead of Simultaneous. Modify your class notes). __F__ A call to strcat(a,b) will allocate space with a number of bytes equal to the lenght of string "a" plus the lenght of string "b" plus 1. __T__ A process that has "n" POSIX threads, where one of them calls fork() will have only one thread in the child process. __F__ The number of processes in ready state in mentor cannot exceed 8. __T__ a[i] is equivalent to *(&a[0] + i) __T__ The input/output redirection to files can be done by the child. __F__ It is possible to disable interrupts in user space. __T__ BSS stores uninitialized global variables Part 2. Short questions. 1. (3 pts) Mention the advantages and disadvantages of clusters compared to multiprocessor machines. Advantage of cluster: 1. Inexpensive. Cost O(n) vs O(n^2) for mulitprocessor machines.
Image of page 1

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

View Full Document Right Arrow Icon
2. More reliability through redundancy. If one fails another can be used. 3. Easy to fix and replace a broken node. Disadvantage: 1. Slower communication vs. using shared memory in multiprocessor machines. 2. Multithreaded programs will not take advantage of a cluster. 3. Need to rewrite program to use cluster. 2. (3 pts.) Mention in what circumstances the user time of a process may exceed the real time.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern