1. What is the main purpose of an operating system?
(a) Manage computer resources: This includes, among other things, the CPU, Memory, Disk Drives, etc
(b) Establish a user Interface: it provides a bridge between user and computer.
(c) Execute and provide services for software: It interacts with software in order to allow it any of the necessary resources for it to run.
2. What are the deadlocks?
Ans- Deadlocks are a set of blocked processes each holding a resource held by another process i.e. deadlock is a situation that occurs in the Operating System when any process enters a waiting state because another process is holding the demanded resource.
3. What is the difference between process and program?
|Basis of Comparison||Program||Process|
|Basic||Program is a set of instruction||When a program is executed, it is known as a process.|
|Required Resources||It is stored on disk in some file and does not require any other resources||Process hold resources such as CPU, memory address, disk, I/O, and so on.|
4. What is thrashing?
Ans- Thrashing is a situation that occurs when a process is spending more time in paging or swapping activities rather than its execution. In a thrashing state, the CPU is so busy in wapping that it cannot respond to the user program as much as it requires.
5. On which operating system do you work and why? Is it good or would you prefer any other operating system?
- I am currently working on Windows. I prefer Windows for the following reasons;
- It is commercial software hence there is someone you can always rely on.
- It is one of the oldest and has a very large customer base.
- Feature-rich, highly user friendly.
- After the release of Windows XP, OS is quite stable.
- I currently use Windows 10 and in several years, I have not seen my system hanging.
- There is a wide range of compatible applications and many are free.
- Hassle-free. Almost maintenance-free.
- Automatic updates keep the system stable and safe.
- Good technical support from Microsoft.
- Since the user community is large, one can get free support also on many forums.
- Be it for personal use or in the corporate (server), I recommend Microsoft Windows.
- Microsoft products like Exchange, Office, SQL Server sound expensive but it is worth in the long run
- if you look at cost of ownership (I mean chiefly maintenance).
- If you consider Windows for corporate, HR is not an issue. You get a huge pool of talent at an affordable cost to the company.
- If you look at development platforms, Microsoft Visual Studio, Team Foundation Server offer a
- flexible and complete suite.
- There are many many more advantages.
6. What is a thread?
Ans- A thread is a basic unit of CPU utilization. In general, a thread is composed of a thread ID, program counter, register set, and the stack.
7. What are overlays?
Ans- Overlays are used to enable a process to be longer than the amount of memory allocated to it. The basic idea is that only instructions and data that are needed at any given time are kept in memory.
8. What is caching?
Ans- Caching is the processing of utilizing a region of fast memory for limited data and processes. Cache memory is usually efficient because of its high access speed.
9. What are the different types of CPU registers in typical operating system design?
(b) Index Registers
(c) Stack Pointer
(d) General Purpose Registers
10. What are interrupts?
Ans – Interrupts are a part of a hardware mechanism that sends a notification to the CPU when it wants to gain access to a particular resource. An interrupt signal and tells the processor to take action based on the interrupt request.
11. What is virtual memory?
Ans – Virtual memory is a hardware technique where the system appears to have more memory than it actually does. This is done by time-sharing, the physical memory, and storage parts of the memory one disk when they are not actively being used.
12. What is Throughput, Turnaround time, waiting time, and Response time?
Throughput – the number of processes that complete their execution per time unit.
Turnaround time – the amount of time to execute a particular process.
Waiting time – the amount of time a process has been waiting in the ready queue.
Response time – the amount of time it takes from when a request was submitted until the first response is produced, not output (for the time-sharing environment).
13. What is the state of the processor, when a process is waiting for some event to occur?
Ans- Waiting state
14. What is a Real-Time System?
Ans- A real-time process is a process that must respond to the events within a certain time period. A real-time operating system is an operating system that can run real-time processes successfully.
15. Explain the concept of the batched operating systems.
Ans- In a batched operating system the user gives their jobs to the operator who sorts the programs according to their requirements and executes them. This is time-consuming but makes the CPU busy all the time.
16. What is the purpose of different operating systems?
Ans- The machine purpose workstation individual usability and resource utilization mainframe optimize utilization of hardware PC support complex games, business application hand PCs Easy interface, and minimum power consumption.
17. What are the types of threads?
(a) User thread
18. What is the job queue?
Ans- When a process enters the system it is placed in the job queue.
19. What is a ready queue?
Ans- 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
20. What is the different job scheduling in operating systems?
Ans- Scheduling is the activity of deciding when a process will receive the resources they request.
FCFS: It stands for First Come First Serve. In FCFS the job that has been waiting for the longest is served next.
Round Robin Scheduling: RR scheduling is a method where each process gets a small quantity of time to run and then it is preempted and the next process gets to run. This is called time-sharing and gives the effect of all the processes running at the same time.
Shortest Job First: SJF scheduling algorithm is a non-preemptive scheduling algorithm that chooses the job that will execute the shortest amount of time.
Priority Scheduling: Priority Scheduling is a scheduling method where at all times the highest priority process is assigned the resource.
21. Name all the states of a Process.
22. How is thread different from the process?
Thread is different from a process in the following ways:
- The process is independent, whereas a thread is not.
- A thread can assist other threads, whereas the process is not.
- If one thread stops, the next thread starts executing, but this is not a case in case of a process.
23. What is starvation?
When a program is in process, and it does not get all the resources to execute, because other processes are using the same resources, this problem of not getting all needed resources is known as starvation.
24. What is a command interpreter?
It is a text field I/O interface between the user and the operating system. In the command interpreter, the user gives input through the keyboard using command lines. Command Prompt in windows and terminal in Linux & macOS are the examples of the command interpreter.
25. What is the process control block (PCB)?
PCB stands for Process Control Block, and it is an Operating System data structure, which can collect and store the information about the processes. It is also known by process Descriptor.
As soon as a process gets created, the Operating System creates a corresponding PCB to store the process status and information. With each transition, OS updates the PCB data structure.
26. An operating system loads programs into the CPU memory either via load-time or run-time dynamic linking. What is the difference between the two?
With load-time dynamic linking, the load module is read into memory. If it references any external module, the latter is also loaded into memory. The references are updated to a relative address from the application module’s base address. With run-time linking, on the other hand, the module is loaded and linked only when it is actually referenced during execution. It is especially useful for large pieces of code and helps in better allocation of memory space.
27. What is SMP?
SMP stands for Symmetric Multi-Processing. It has the usual advantages of any multi-processor system, such as increased throughput and cost savings through resource sharing.
What makes it the most popular type of multi-processor system is that in this mode of operation, any thread or process can be assigned to any processor, thereby enabling maximum reliability and efficiency.
Each processor runs an identical copy of the operating system and can communicate with the other processors as and when needed.
28. What are Time-Sharing Systems?
When the CPU switches between multiple jobs in a multi-tasking fashion, it is a time-sharing system. The switching speed is high enough for the user to interact with any program at a given point in time.
29. What are the different types of Real-Time Scheduling?
Hard real-time systems – required to complete a critical task within a guaranteed amount of time.
Soft real-time computing – requires the critical processes to receive priority over less fortunate ones.
30. What are the methods for Handling Deadlocks?
Ensure that the system will never enter a deadlock state Allow the system to enter a deadlock state and then recover. Ignore the problem and pretend that deadlocks never occur in the system; used by most operating systems; including UNIX.