+ All Categories
Home > Documents > Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017....

Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017....

Date post: 20-Jul-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
22
Solutions for the First Quiz COSC 6360 Fall 2017
Transcript
Page 1: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Solutions for the First Quiz

COSC 6360Fall 2017

Page 2: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

First question

How many lines will be printed by the following program?

#include <stdio.h>main() {

printf("Start\n");fork();fork();printf("Done!\n");}

Page 3: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

How many lines will be printed by the following program?

#include <stdio.h>main() {

printf("Start\n");fork();fork();printf("Done!\n");}

Five lines

Page 4: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Alternate first question

How many lines will be printed by the following program?

#include <stdio.h>main() {

fork();printf("Start\n");fork();printf("Done!\n");}

Page 5: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

How many lines will be printed by the following program?

#include <stdio.h>main() {

fork();printf("Start\n");fork();printf("Done!\n");}

Six lines

Page 6: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Second question

Where does UNIX store the file names?

Page 7: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

Where does UNIX store file names?

In the directory entry/entries pointing to the i-node of each individual file.

Page 8: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Third question

What are UNIX soft links?

Page 9: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

What are UNIX soft links?

UNIX soft links are special entities within the file system that point to other files, much like Windows shortcuts.

They are also called symbolic links.They can cross paritition boundaries

Page 10: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Fourth question

Where does UNIX store access control lists?

Page 11: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

Where does UNIX store access control lists?

In the i-node of each file

Page 12: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Fifth Question

Why does the Fast File System subdivide each disk partition into cylinder groups?

Page 13: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

Why does the Fast File System subdivide each disk partition into cylinder groups?

It minimizes disk arm motions because each cylinder group has its own fragment of the i-node table. As a result most file blocks reside closer to their file i-node.

Page 14: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Sixth question

Why does FFS use blocking writes to implement all metadata updates?

Page 15: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

Why does FFS use blocking writes to implement all metadata updates?

To guarantee the consistency of the file systemAnd the durability of metadata updates

Page 16: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Seventh question

While the page replacement policies of VMS and Mach are fairly similar, each of them has a strong point that the other doesn't have.

What is the main advantage of the VMS policy compared to the Mach policy?

What is the main advantage of the Mach policy compared to the VMS policy?

Page 17: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

While the page replacement policies of VMS and Mach are fairly similar, each of them has a strong point that the other doesn't have.

What is the main advantage of the VMS policy compared to the Mach policy?VMS supports real-time processes

What is the main advantage of the Mach policy compared to the VMS policy?

Page 18: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

While the page replacement policies of VMS and Mach are fairly similar, each of them has a strong point that the other doesn't have.

What is the main advantage of the VMS policy compared to the Mach policy?VMS supports real-time processes

What is the main advantage of the Mach policy compared to the VMS policy?Mach policy is easier to tune

Page 19: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Eighth question

What is the main advantage of mapped files?

Which memory object is associated with each mapped file?

What should be the inheritance attribute of a mapped file?

Page 20: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

What is the main advantage of mapped files?

They eliminate context switches by bringing file blocks directly into the address space of the process accessing them

Page 21: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

Which memory object is associated with each mapped file?

The file being accessed

Page 22: Solutions for the First Quizparis/6360/EXAMS/Quiz1+f17.pdf · the First Quiz COSC 6360 Fall 2017. First question How many lines will be printed by the following program?

Answer

What should be the inheritance attribute of a mapped file?

Shared


Recommended