Thursday, 15 April 2021

April May 2019 Anna University Operating Systems Questions with Answers

Anna University - April May 2019 CS7452 Operating Systems Fourth Semester Regulation 2015 - End Semester Examination Questions with Answers

Exam

B.E/B.Tech. (Full Time) DEGREE END SEMESTER EXAMINATIONS

Academic Year

April May 2019

Subject Code

CS7452

Subject Name

Operating Systems

Branch

Computer Science and Engineering / Information Technology / EEE

Semester

Fourth Semester

Regulation

2015

 

B.E / B.Tech. (Full Time) DEGREE END SEMESTER EXAMINATIONS, APRIL / MAY 2019

CSE / IT / EEE

Fourth Semester

CS7452 – Operating Systems

(Regulation 2015)

Time : 3 Hours                      Answer A L L Questions                Max. Marks 100

PART-A (10 x 2 = 20 Marks)

 

1. What does an interrupt do?

Answer: 

Interrupts are signals sent to the CPU by external devices, normally I/O devices. They tell the CPU to stop its current activities and execute the appropriate part of the operating system.

2. How would you differentiate between a process and a thread?

Answer:

Process is an executing instance of an application. They run in separate memory space unlike threads. Threads are path of execution within a process. Threads within the same process runs in a shared memory space.

3. Is it possible to have a deadlock involving only one process? Justify your answer.

Answer:

It is not possible to have a deadlock involving only one single process. The deadlock involves a circular “hold-and-wait” condition between two or more processes, so “one” process cannot hold a resource, yet be waiting for another resource that it is holding.

4. Define critical region. 

Answer:

Sometimes a process have to access shared memory or files, or doing other critical things that can lead to races. That part of the program which accesses the shared memory or file is called the critical region or critical section.

5. Distinguish between main memory and secondary storage in terms of the operations of the operating systems.

6. What is page fault?

Answer:

A page fault is a type of exception raised by computer hardware when a running program accesses a memory page that is not currently mapped by the memory management unit (MMU) into the virtual address space of a process.


7. What is seek time in disk scheduling?

Answer:

The slowest part of accessing a disk block is physically moving the head to the correct track This is called the seek time. (Time to move disk arm to desired cylinder)

8. What are the operations performed on a file?

Answer:

Six basic file operations. The OS can provide system calls to create, write, read, reposition, delete, and truncate files.

9. What is a daemon? How does it work in Linux operating system?

Answer:

A daemon is a service process that runs in the background and supervises the system or provides functionality to other processes. A daemon is a type of program that runs unobtrusively in the background, rather than under the direct control of a user, waiting to be activated by the occurrence of a specific event or condition.

10. What is the role of kernel?

Answer:

The operating system kernel manages many of the fundamental details that an operating system needs to deal with, including memory, disk storage, and low-level networking. In general, the kernel is the part of the operating system that talks directly to hardware; it presents an abstracted interface to the rest of the operating system components.

 

Part — B (5 x 13 = 65 mark)

 

11. a) i) What are the various computing environments available in the modern computers? (4)

Answer:

The list of different types of computing environments is as follows:

Traditional, Mobile, Cluster, Distributed, Cloud Computing, Client Server, Time Sharing, Real-time embedded systems are different types of computing environments.

ii) Explain how operating systems are used in these different computing environments. (9)

OR

b) i) Briefly describe the purpose and need of interprocess communication in a multiprogramming environment. (7)

ii) Operating systems typically utilize the kernel mode and user mode functions as a rudimentary forms of protection.” Explain the two modes and justify this statement. (6)

Answer:

The  distinction  between  kernel  mode  and  user  mode  provides  a  rudimentary  form  of  protection  in  the  following  manner. Certain instructions could be executed only when the CPU is in kernel mode. Similarly, hardware devices could be accessed only when  the  program  is  executing  in  kernel  mode.  Control  over  when  interrupts  could  be  enabled  or  disabled  is  also possible only when the CPU is in kernel mode. Consequently, the CPU has very limited capability when executing in user mode, thereby enforcing protection of critical resources.

 

12. a) i) Draw a resource-allocation-graph for the scenario given below: (6)

Set of resources: {R1, R2, R3, R4, R5}

Set of processes: {P1, P2, P3, P4, P5}

R1 is allotted to P2 and requested by. P1; R2 is allotted to P1 and requested by P4;

R3 is allotted to P5 and requested by P2; R4 is allotted to P3 and requested by P2;

Provide the corresponding wait-for-graph and comment on the presence of deadlock.

ii) Consider the following snapshot of a system: (7)


Answer the following questions using the Banker's algorithm:

i. Provide the content of the matrix Need.

ii. Is the system in a safe state? Provide all the necessary calculations to support your answer.

iii. If the maximum request of process P1 changes to (3, 4, 3, 2), will the state of the system change? Provide all the necessary calculations to support your answer.

OR

b) A barbershop consists of a waiting room with a chair for the barber and n chairs for waiting customers. If there are no customers to be served, the barber goes to sleep in his chair. If a customer enters the barbershop, he wakes up the barber, if sleeping. If there are many customers and the barber is busy, then a customer has to either wait, if there is a free chair or, if all chairs are occupied,the customer leaves the shop. If the barber is busy but chairs are available,then the customer sits in one of the free chairs.

i) What problem does this scenario address? (2)

ii) Draw a flowchart for this scenario. (4)

iii) Write a program using semaphore to coordinate the barber and the customer. (7)

 

13. a) i) Consider a paging system with the page table stored in memory. If a memory reference takes 200 nanoseconds, how long does a paged memory reference take? If we add TLBs, and 75 percent of all page table references are found in the TLBs, what is the effective memory reference time? (Make and state any necessary assumptions required) (7)

ii) Describe the following allocation algorithms: (6)

a. First fit    b. Best fit    c. Worst fit

OR

b) i) Consider the following page-reference string: (9)

1, 2, 3, 4, 2, 1, 5, 6, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6

How many page faults would occur for the FIFO, OPT and LRU page replacement algorithms assuming five frames? Which algorithm performs better for the given page-reference string? Justify your answer.

ii. Explain segmentation in detail. (4)

 

14. a) Suppose a disk drive has 10000 cylinders, numbered 0 to 9999. The drive is currently serving a request at cylinder 1142. The previous request was at cylinder 1125. The queue of pending requests in FIFO order is 185, 4169, 3912, 2773, 4947, 5508, 8021, 4749, 9129. Calculate the total distance that the disk arm moves to satisfy all the pending requests, for each of the following disk scheduling algorithms. (13)

i) FCFS       ii) SSTF      iii) SCAN    iv) C- SCAN

OR

b) i) Explain various file allocation techniques in detail with their relative advantages and disadvantages (6)

Answer:

The list of different file allocation (disk allocation) techniques:

  • Contiguous allocation
  • Lined allocation
  • Indexed allocation

ii. Explain different directory implementation methods. (7)

Answer:

Different directory implementation methods are:

  • Linear list of file names with pointer to the data blocks.
  • Hash table - linear list with hash structure

 

15. a) i) Explain the process management mechanisms in Linux system. (6)

ii) What kind of scheduling takes place in Linux environment? Discuss in details. (7)

Answer:

The Linux scheduler is a preemptive priority-based algorithm with two priority ranges - Real time from 0 to 99 and a nice range from 100 to 140.

OR

b) i) Describe the architecture of the Windows 7 operating system. (6)

ii) What are the various services provided by the Windows operating system? Describe in details. (7)

 

Part—C (1x 5=15 mark)

16. i) Suppose a new process arrives in a system at an average of six processes per minute and each such process requires an average of 8 seconds of service time. Calculate the fraction of time the CPU will be busy in a system with a single processor. (4)

ii) Consider the following table showing a set of processes with arrival time (in milliseconds), CPU burst time (in milliseconds) and priority (consider 0 as the highest priority). Assume that none of the processes have I/O burst time. (4)


Calculate the average waiting time (in milliseconds) of all the processes using preemptive priority scheduling algorithm.

iii) Under what circumstances do page fault occur in a demand paging environment? Describe the actions taken by the operating system on the occurrence of a page fault. (7)

 

***********

 

Related links/questions:

Link1

Link2

Link3

Link4

Link5

 

Anna University operating systems question answers

Previous year solved exam questions in OS

Operating systems questions and answers for anna university affiliated college students.

 

 

No comments:

Post a Comment

Database Management Systems Anna University Exam Questions and Answers

Database management systems university question papers with answers, Anna university DBMS exam questions, Solved university exam questions f...