Final Exam
CS365, Operating Systems
1. [3 points] A user-level process cannot modify its own page table entries.
A.TRUE B. FALSE Why?
2. [3 points]The scheduler is the part of an Operating System that determines the priority ofeach process.
A.TRUE B.FALSE. Why?
3. [3 points] Shortest Remaining Time First is the best preemptive scheduling algorithm thatcan be implemented in an Operating System.
A. TRUE B. FALSE. Why?
4. [3 points]The working set model is used to compute the average number of frames a job willneed in order to run smoothly without causing thrashing.
A. TRUE B. FALSE Why?
5.[3 points] The system calls chown(), chmod(), and umask() are examples of operating systemfunctionality for:
a.file manipulation
b.device manipulation
c.process control
d.protection and security
6. [3 points] The ioctl() system call is typically used to:
a. convert I/O addresses from octal (base 8) to decimal (base 10)
b. convert I/O addresses from decimal (base 10) to octal (base 8)
c. manipulate I/O devices
d. convert processes into threads
7. [3 points] The threading model supported by the typical Linux kernel is:
a. one-to-one
b. one-to-many
c. many-to-one
d. many-to-many
8. [3 points] Among CPU scheduling policies, First Come First Serve (FCFS) is attractivebecause:
a. it is simple to implement
b. it is fair to all processes
c. it minimizes the total waiting time in the system
d. it minimizes the average response time in the system
9. [20 points] For each of the following pairs of terms, define each term, making sure to clarifythe key difference(s) between the two terms.
(1) “application software” and “system software”
(2) “single-core” and “multi-core”
(3) “short-term scheduler” and “long-term scheduler”
(4) “waiting time” and “service time
10.[ [5 points] Memory management: (5 points) Consider a memory system with a cache accesstime of 10ns and a memory access time of 110ns – assume the memory access time includes the time to check the cache. If the effective access time is 10% greater than the cache access time, what is the hit ratio H?
(fractional answers are OK)
11. [5 points] Consider a machine with a physical memory of 8 GB, a page size of 8 KB, and a page table entry size of 4 bytes. How many levels of page tables would be required tomap a 46-bit virtual address space if every page table fits into a single page? Be explicit in your explanation.
12. [5 points] Without a cache or TLB, how many memory operations are required to read orwrite a single 32-bit word?
13. [11 points] Consider a client using the 4.2 BSD FFS to store files. For this problem, assumethat the file’s inode has already been read into memory from the disk, there is an (initially empty) filebuffer cache, and the following constants:
Ty– CPU cycle time in nanoseconds
F – File size in bytes
TL – Average time to read a block from the local disk, including filebuffer cache lookup and access time
B – Filesystem block size in bytes S – Disk sector size in bytes
TC – Average time to lookup and read a block from the filebuffer cache
The filebuffer is capable of storing the various types of blocks associated with files.
(1) (3 points) On average, how long will it take to read a 5 block file?
(2)(4 points) On average, how long will it take to read a 49 block file?
(3) (4 points) Now consider the performance when the cache is warm. Assuming that repeated reads of files yield an average cache hit rate of 80% and no compulsory misses, how long will it now take to read a 49 block file?
14. [30 points] The output on the next page is from a moderately busy Linux system. Use theoutput and your knowledge of Linux systems to answer the following questions:
(1) How many users are using the system in this example?
(2) On average, how many processes are currently in the ready queue?
(3) Has the system load been increasing, decreasing, or staying about the samein the last 15 minutes?
(4) What type of Linux shell is the user (carey) running?
(5) What is the default scheduling priority for user processes on this system?
(6) What is the PID of the most recently created process for user jsmith?
(7) Among all the indicated processes on the system, which has consumed themost CPU time so far?
(8) Which user owns the process identified in (g)?
(9) How many different terminal windows does the user in (h) have running?
(10) Among all the indicated processes on the system, which process has the largest “memory footprint