Saturday, October 10, 2015

Anna University Chennai Operating System Lab Viva Questions

Anna University Chennai
Operating System Lab
Practical Exam
VIVA QUESTIONS with answers

1. What is an operating system?
An operating system is a program that acts as an intermediary between the user and the computer hardware. The purpose of an OS is to provide a convenient environment in which user can execute
programs in a convenient and efficient manner.

2. What are the different operating systems?
1. Batched operating systems
2. Multi-programmed operating systems
3. timesharing operating systems
4. Distributed operating systems
5. Real-time operating systems

3. What is a boot-strap program?
Bootstrapping is a technique by which a simple computer program activates a more complicated system of programs.

4.What is BIOS?
A BIOS is software that is put on computers which allows the user to configure the input and output of a computer.

5. What is SCSI?
Small computer systems interface.

6. What is a sector?
Smallest addressable portion of a disk.

7. What is cache-coherency?
In a multiprocessor system there exist several caches each may containing a copy of same variable A. Then a change in one cache should immediately be reflected in all other caches this process of maintaining the same value of a data in all the caches is called cache-coherency.

8. What are residence monitors?
Early operating systems were called residence monitors.

9. What is dual-mode operation?
In order to protect the operating systems and the system programs from the malfunctioning programs the two mode operations were evolved:
1. System mode.
2. User mode.
Here the user programs cannot directly interact with the system resources, instead they request the operating system which checks the request and does the required task for the user programs-DOS was written for / intel 8088 and has no dual-mode. Pentium provides dual-mode operation.

10. What are system calls?
System calls provide the interface between a process and the operating system.

11. What is a layered approach and what is its advantage?
Layered approach is a step towards modularizing of the system, in which the operating system is broken up into a number of layers (or levels), each built on top of lower layer. The bottom layer is the hard ware and the top most is the user interface.

12. What are a virtual machines and site their advantages?
It is the concept by which an operating system can create an illusion that a process has its own processor with its own (virtual) memory.

13. What is a process?
A program in execution is called a process.

14. What are the states of a process?
1. New
2. Running
3. Waiting
4. Ready
5. Terminated

15. What are various scheduling queues?
1. Job queue
2. Ready queue
3. Device queue

16. What is a job queue?
When a process enters the system it is placed in the job queue.

17. What is a ready queue?
The processes that are residing in the main memory and are ready and waiting to execute are kept on a list called the ready queue.

18. What is a device queue?
A list of processes waiting for a particular I/O device is called device queue.

19. What is a long term scheduler?
Long term schedulers are the job schedulers that select processes from the job queue and load them into memory for execution.

20. What are short term scheduler?
The short term schedulers are the CPU schedulers that select a process form the ready queue and allocate the CPU to one of them.

21. What is context switching?
Transferring the control from one process to other process requires saving the state of the old process and loading the saved state for new process.

22. What is a thread?
A thread is a program line under execution. Sometimes called a light-weight process, is a basic unit of CPU utilization.

23. What are types of threads?
1. User thread
2. Kernel thread
User threads are easy to create and are created in user space. Kernel threads are supported directly by the operating system.

24. What are multithreading models?
Many-to-one model
One-to-one model
Many-to –many

25. What is process synchronization?
A situation, where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which the access takes place, is called race condition. To guard against the race condition we need to ensure that only one process at a time can be manipulating the same data. The technique we use for this is called process synchronization.

26. What is critical section problem?
Critical section is the code segment of a process in which the process may be changing common variables, updating tables, writing a file and so on. Only one process is allowed to go into critical section at any given time (mutually exclusive). The three basic requirements of critical section are:
1. Mutual exclusion
2. Progress
3. bounded waiting

27. What is a semaphore?
A semaphore is an integer variable that, apart from initialization, is accessed only through two standard atomic operations: Wait and Signal.

28. What is dining philosophers’ problem?
Consider 5 philosophers who spend their lives thinking and eating. The philosophers share a common circular table surrounded by 5 chairs, each belonging to one philosopher. In the center of the table is a bowl of rice, and the table is laid with five single chop sticks. When a philosopher thinks, she doesn’t interact with her colleagues. From time to time, a philosopher gets hungry and tries to pick up two chop sticks that are closest to her .A philosopher may pick up only one chop stick at a time. Obviously she can’t pick the stick in some others hand. When a hungry philosopher has both her chopsticks at the same time, she eats without releasing her chopsticks. When she is finished eating, she puts down both of her chopsticks and start thinking again.

29. What is resource allocation graph?
This is the graphical description of deadlocks. This graph consistsof a set of edges E and a set of vertices V. The set of vertices V is partitioned into two different types of nodes P={p1,p2,…,pn},
the set consisting of all the resources in the system, R={r1,r2,…rn}.A directed edge Pi?Rj is called a request edge; a directed edge Rj? Pi is called an assignment edge. Pictorially we represent a process
Pi as a circle, and each resource type Rj as square.

30. What are deadlock prevention techniques?
1. Mutual exclusion : Some resources such as read only files shouldn’t be mutually exclusive. They should be sharable. But some resources such as printers must be mutually exclusive.
2. Hold and wait : To avoid this condition we have to ensure that if a process is requesting for a resource it should not hold any resources.
3. No preemption : If a process is holding some resources and requests another resource that cannot be immediately allocated to it (that is the process must wait), then all the resources currently being held are preempted(released autonomously).
4. Circular wait : the way to ensure that this condition never holds is to impose a total ordering of all the resource types, and to require that each process requests resources in an increasing order of enumeration.

31. What is a safe state and a safe sequence?
A system is in safe state only if there exists a safe sequence. A sequence of processes is a safe sequence for the current allocation state if, for each Pi, the resources that the Pi can still request can be satisfied by the currently available resources plus the resources held by all the Pj, with j.

32. What is virtual memory?
A virtual memory is hardware technique where the system appears to have more memory that it actually does.

33. What is CPU Scheduler?
Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them.

35. What is Throughput, Turnaround time, waiting time and Response time?
Throughput – number of processes that complete their execution per time unit.
Turnaround time – amount of time to execute a particular process
Waiting time – amount of time a process has been waiting in the ready queue.
Response time – amount of time it takes from when a request was submitted until the first response is produced, not output.

36. What is starvation and aging?
Starvation: Starvation is a resource management problem where a process does not get the resources it needs for a long time because the resources are being allocated to other processes.
Aging: Aging is a technique to avoid starvation.

Share This
Previous Post
Next Post

B.E Civil Engineer Graduated from Government College of Engineering Tirunelveli in the year 2016. She has developed this website for the welfare of students community not only for students under Anna University Chennai, but for all universities located in India. That's why her website is named as . If you don't find any study materials that you are looking for, you may intimate her through contact page of this website to know her so that it will be useful for providing them as early as possible. You can also share your own study materials and it can be published in this website after verification and reviewing. Thank you!


Pen down your valuable important comments below

Search Everything Here