Question Paper Code : 50071
B.E./B.Tech. DEGREE EXAMINATIONS, APRIL/MAY 2024.
Fourth Semester
Computer Science and Design
AL 3452 — OPERATING SYSTEMS
(Common to : Computer Science and Engineering (Artificial Intelligence and Machine Learning)/Computer and Communication Engineering/Artificial Intelligence and Data Science/Computer Science and Business Systems)
(Regulations 2021)
Answer ALL questions.
PART A — (10 × 2 = 20 marks)
- 1.
OS is designed in different ways. In what ways modular kernel approach is similar to the layered approach? In what way they differ?
- 2.
What are system calls? Give some examples.
- 3.
Priority inversion is a condition that occurs in real time systems where a low priority process is starved because higher priority processes have gained hold of the CPU" - Comment on this statement.
- 4.
What is deadlock? What is startvation? How do they differ from each other?
- 5.
What is the difference between internal and external fragmentation?
- 6.
What is page fault? How is page fault frequency related to degree of multiprogramming of a computer?
- 7.
What is the reason that all I/O operations are done in privileged mode?
- 8.
List and define the various file access methods.
- 9.
What is the significance of using virtual machines?
- 10.
Compare iOS and Android OS?
PART B — (5 × 13 = 65 marks)
- 11.(a)
Explain the operating system structure in detail. What is the main advantage of the layered approach to system design? What are the disadvantages of the layered approach?
- Or
- (b)
Explain the evolution of operating system in detail.
- 12.(a)
Explain the seven-state model of a process and also explain the queuing diagram for the same. Is it possible to have more than one blocked queue, if so can a process reside in more than one queue?
- Or
- (b)
Define: Critical Section, critical resource. Explain the need for enforcing mutual exclusion using echo function as an example in both uniprocessor and multiprocessor environment.
- 13.(a)
What do you mean by virtual memory? Consider a system where the virtual memory page size is 2K (2048 bytes), and main memory consists of 4 page frames. Now consider a process which requires 8 pages of storage. At some point during its execution, the page table is as shown below: [Table: Virtual page / Presence bit / Physical Page: 0: 0, -; 1: 0, -; 2: 1, 1; 3: 0, -; 4: 1, 3; 5: 0, -; 6: 1, 0; 7: 1, 2]
- (i)List the virtual address ranges for each virtual page.(3)
- (ii)List the virtual address ranges that will result in a page fault.(4)
- (iii)Write the main memory (physical) addresses for each of the following virtual addresses (all numbers decimal): (1) 8500, (2) 14000, (3) 5000, (4) 2100.(6)
- Or
- (b)
Explain the concept of Paged Memory Management and solve the following problem using virtual memory concept. Assume a process contains 6 virtual pages on disk and is assigned a fixed allocation of page frame in main memory. The following page trace occurs: 1 2 4 1 6 5 3 4 5 6 4 6 4 3 2 3 2 5. Show the successive pages residing in the three and four frames using (i) OPT (ii) FIFO (iii) LRU.
(1+4+4+4)
- 14.(a)
Explain various file allocation method with suitable illustrations. Also discuss in detail various file organization methods.
- Or
- (b)
Disk requests come into the disk driver for cylinders in the following order: 10, 22, 20, 2, 40, 6 and 38. Assume that the disk has 100 cylinders. A seek takes 6 milli-second per cylinder moved. Compute the average seek time for the request sequence given above using the following scheduling algorithm.
- (i)First come first served.(4)
- (ii)Shortest Seek Time First (SSTF).(3)
- (iii)LOOK (Assume disk arm moves towards higher number cylinders from lower number cylinder).(3)
- (iv)C-SCAN.(3)
- 15.(a)
Explain the features of virtual machine and also discuss the architecture in detail.
- Or
- (b)
Discuss in detail the system components of mobile OS. Also analyze the features of iOS and Android OS.
PART C — (1 × 15 = 15 marks)
- 16.(a)
Explain the methods how deadlock can be avoided? Assume that there are three resources, A, B, and C. There are 4 processes P0 to P3. At T0, the state of the system is given below. [Table: Allocation (A B C) / Maximum (A B C) / Need (A B C): P0: 1 0 1 / 2 1 1 / 2 1 1; P1: 2 1 2 / 5 4 4 / -; P2: 3 0 0 / 3 1 1 / -; P3: 1 0 1 / 1 1 1 / -]
- (i)Create a need matrix.(7)
- (ii)Use Banker's algorithm to check if the system in a safe state? Why or why not?(8)
- Or
- (b)
Consider the execution of two processes P1 and P2 with the following CPU and I/O burst times. [Table: P1: CPU-3, Net-4, CPU-2, Disk-3; P2: CPU-4, Disk-3, CPU-3, Net-3] Each row shows the required resource for the process and the time that the process needs that resource. For example "Net 3" in fourth row says that P2 needs network card for 3 time units.
- (i)If P2 arrives 2 time units after P1 and the scheduling policy is non-preemptive SJF then calculate the finish time for each process and the CPU idle time in that duration.(7)
- (ii)If P2 arrives 2 time units before P1 and the scheduling policy is preemptive SJF then calculate the finish time for each process and the CPU idle time in that duration.(8)