


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
this is the assingment to data base and data and data and its base because the base of data the base of data base itlsel
Typology: Assignments
1 / 4
This page cannot be seen from the preview
Don't miss anything!



INTRODUCTION TO OPERATING SYSTEM
ASSIGNMENT # 3 Submitted by : Muhammad Fahad Siddiqui (2019-SE-206) Muhammad Ali Hamza (2019-SE-219) Muhammad Moiz Bakaseer (2019-SE-221) Shahzaib Ansari (2019-SE-249) Submitted to : Miss Falak Saleem
Suppose we have 64bit logical address with 8KB of page size and size of each entry in the page is 4 Bytes. Calculate the following: (i) Inner page size. (ii) Outer page size. (iii) Page offset
Given the following stream of page references by an application, calculate the number of page faults the application would incur with the FIFO, LRU and Optimal page replacement algorithms. Assume that there are 3 frames, and all are initially empty. Reference Stream: E D H B D E D A E B E D E B G.
(a) Consider the following data of a system has five processes (P0, P1, P2, P3 and P4) and four types of resources (A, B, C and D). There are multiple resources of each type. Is the following state safe or not? If it is, show how the processes can complete. If not, show how they can deadlock. (b) Draw the resource-allocation graph when the sets Process, Resource, and Edges are: P = {T1, T2, T3, T4} R = {A, B, C, D} E = {T1 B, A T1, A T2, B T2, T3 B, C T3, T2 C, T4 C, D T3 and D T4} Assume there exists two instances of resource A and D one instance of resource B and C. As well, assume resources A, B, C and D are non-preemptive and cannot be shared. (i) Draw wait-for-graph with the help of resource allocation graph. (ii) Could a deadlock exist in the system? Briefly explain.
Please mark whether the following statements are true or false. (i) One way of implementing semaphores on uni-processor machines is by using Peterson’s algorithm. (ii) A critical section is a segment of code that can be executed by more than one process/thread at a time. (iii) Hardware interrupts can be disabled both from user- and kernel-space. (iv) Counting semaphores are the most primitive synchronization mechanisms.
Briefly explain the following: (i) Why rotational latency is usually not considered in disk scheduling? How would you modify SSTF, SCAN, and C-SCAN to include latency optimization? (ii) Why must the bit map for file allocation be kept on mass storage, rather than in main memory? (iii) Consider a system that supports the strategies of contiguous, linked, and indexed allocation. What criteria should be used in deciding which strategy is best utilized for a particular file? (iv) How file allocation table (FAT) works? Explain with the help of diagram. (v) What is the difference between deadlock prevention and deadlock avoidance? What category does Bankers algorithm fall in and why?