1 / 18

Solutions for the First Quiz

Solutions for the First Quiz. COSC 6360 Fall 2015. First question. Which feature of the UNIX file system allows it to implement random file access?. Answer. Which feature of the UNIX file system allows it to implement random file access? lseek(). Second question.

dblack
Download Presentation

Solutions for the First Quiz

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Solutions for the First Quiz COSC 6360 Fall 2015

  2. First question • Which feature of the UNIX file system allows it to implement random file access?

  3. Answer • Which feature of the UNIX file system allows it to implement random file access? • lseek()

  4. Second question • UNIX uses separate fork( ) and exec( ) system calls to create and initialize processes. • What is the main disadvantage of this approach? • Which is the best way to address this problem?

  5. Answer • UNIX uses separate fork( ) and exec( ) system calls to create and initialize processes. • What is the main disadvantage of this approach? • Its high cost because fork() has to make a complete copy of the parent process' address space

  6. Answer • UNIX uses separate fork( ) and exec( ) system calls to create and initialize processes. • What is the main disadvantage of this approach? • Its high cost … • Which is the best way to address this problem? • Use copy-on-write and let parent and child share the same address space until the exec()

  7. Third question • Unlike the older UNIX file system, the Fast File System specifies a minimum block size. • What was that minimum block size? • What is the main advantage of that specific value?

  8. Answer • Unlike the older UNIX file system, the Fast File System specifies a minimum block size. • What was that minimum block size? • 4KB • What is the main advantage of that specific value?

  9. Answer • Unlike the older UNIX file system, the Fast File System specifies a minimum block size. • What was that minimum block size? • 4KB • What is the main advantage of that specific value? • It is the smallest block size that allows to access all files with at most two levels of indirection.

  10. Fourth question • What is the main advantage of mapped files? • Whichmemory object is associated with each mapped file? • What should be the inheritance attribute of a mapped file?

  11. Answer • What is the main advantage of mapped files? • It eliminates context switches by bringing file blocks directly into the address space of the process accessing them

  12. Answer • Whichmemory object is associated with each mapped file? • The accessed file

  13. Answer • What should be the inheritance attribute of a mapped file? • Share

  14. Sixth question • In the two-handed version of the BSD Clock policy, • What is the main advantage of keeping these two hands close together? • What is the main disadvantage of keeping these two hands too close together?

  15. Answer • In the two-handed version of the BSD Clock policy, • What is the main advantage of keeping these two hands close together? • Fewer context switches as pages that are not currently accessed are expelled faster • What is the main disadvantage of keeping these two hands too close together?

  16. Answer • In the two-handed version of the BSD Clock policy, • What is the main advantage of keeping these two hands close together? • Fewer context switches as pages that are not currently accessed are expelled faster • What is the main disadvantage of keeping these two hands too close together? • Some pages might be expelled too quickly

  17. Sixth question • What is the main advantage of the VMS page replacement policy over that of UNIX?

  18. Answer • What is the main advantage of the VMS page replacement policy over that of UNIX? • It supports real-time processes

More Related