We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6
OPERATING SYSTEM
BASIC
1. What is an opera ng system?
An opera ng system is an interface between user and computer hardware. It is the so ware that manages computer hardware and provides services for so ware applica ons. It handles tasks like alloca ng resources, managing processes, controlling memory, handling files, managing devices, and providing user interfaces. Examples include Windows, macOS, Linux, iOS, and Android. 2. What is exec() system call in opera ng system? To change the memory space of a newly created process (using a fork() system call), exec() system call is used. The file having the program is provided as a parameter. 3. What is wait() system call in opera ng system? When a parent process calls the wait() system call, its execu on is suspended un l the child process execu on gets terminated. Once the child process terminates, the PID and exit status of the child process is returned to the parent process. 4. What are the services provided by an opera ng system? Opera ng system services include process management, memory management, resource management, storage management, protec on and security. 5. What is kernel in opera ng system? The words opera ng system and kernel are used interchangeably. Kernel is an infinite program which runs at all mes on the computer. 6. What is the goal of an opera ng system? The primary goal of an opera ng system is convenience. The secondary goal of an opera ng system is efficiency. 7. What is an open source opera ng system? Those opera ng systems which are available in source code format i.e. their code can be accessed and modified are known as open source opera ng systems. 8. What are some open source opera ng systems? Open source opera ng systems include GNU Linux and BSD UNIX. 9. What are system calls in opera ng system? System calls are the requests made by the user program in order to get any kind of service from the opera ng system. System calls are thus a medium to use the services provided by an opera ng system. 10. How is opera ng system loaded into memory? As the power is turned on, the CPU fetches BIOS instruc ons from the ROM into the main memory which starts the bootstrap program. It then finds the kernel, loads it into memory and transfers control to the opera ng system. 11. What is distributed opera ng system? Users can share resources among physically separate hosts connected by a computer network in distributed systems. The two models of distributed systems are client–server model and peer–peer model. 12. What are the advantages of mul processor opera ng systems? Mul processor opera ng systems have increased throughput, increased reliability and are economical. 13. What is an opera ng system trap? Opera ng system trap or interrupt shi s the opera on from user mode to kernel mode. It is either caused by an error or by a request from a process for some service from opera ng system. 14. How does an opera ng system manage memory? Memory management includes keeping a record of parts of memory and the processes using them. It also includes swapping and alloca ng frames. 15. How does an opera ng system manage storage? Opera ng system manages storage by keeping files and directories in a file system. It is also responsible for managing free space on the disk. 16. How does an opera ng system ensure correct opera on of the computer system? Opera ng systems ensure correct opera on of computer system with the help of dual mode opera on (user and kernel mode), privileged instruc ons (executed only in kernel mode) and mer interrupts. 17. How does an opera ng system manage processes? Opera ng system helps in the crea on of processes, dele on of processes, inter process communica on, scheduling and synchroniza on of processes. 18. What is the u lity of real- me opera ng systems? A major u lity of real- me opera ng systems is in embedded systems like consumer devices, automobiles and robo cs. 19. How does an opera ng system provide convenience to the user? Opera ng system provides a user interface and performs program execu on, I/O opera ons, file system manipula on and error detec on which makes using a computer convenient for a user. 20. How does an opera ng system ensure efficiency? Opera ng system performs func ons like resource alloca on, accoun ng, protec on and security which ensure efficiency.
INTERMEDIATE
21. What is a process?
A process is a program under execu on i.e. the program in main memory execu ng on the CPU. A process is ac ve and dynamic. 22. What is a thread? A light weight process, which shares all the resources except stack and registers is called as thread. 23. What are frames and pages? In paging, the physical address space is divided into equal sized parts called frames and the logical or virtual address space is divided into equal sized parts called pages. The page size is equal to the frame size. 24. How can a deadlock be avoided? Deadlock can be avoided by using banker’s algorithm. Whenever a request for resources is made by a process, banker’s algorithm grants the request immediately only if the system is in a safe state a er gran ng the request. Otherwise, the process is made to wait. 25. What is the purpose of mul level paging? In paging, when the page size is large (so the number of memory accesses required increases), to reduce the effec ve memory access me, mul level paging is used. 26. What is a dispatcher responsible for? Dispatcher is responsible for loading the selected process (by the short-term scheduler) onto the CPU and performing context switch. 27. What is internal fragmenta on? In fixed par on memory management techniques (like con guous memory alloca on with fixed par ons and paging), the process doesn’t always fit exactly into the par on. Some space is wasted due to fixed size of par ons. This is called internal fragmenta on. 28. What is external fragmenta on? In con guous memory management techniques (fixed and variable par on scheme), the situa on when the total free space available is greater than or equal to the process size, but is not con guous so cannot be allocated to the process, is known as external fragmenta on. 29. What is race condi on? When the output depends on the order of execu on of several processes (or speed of execu on), it is termed as race condi on. It can only occur when the processes are coordina ng and not independent. 30. What is a cri cal sec on? The sec on of a process in which it accesses shared variables or shared resources is known as cri cal sec on. To ensure proper execu on, only one process, at a me, should be execu ng in its cri cal sec on. 31. What is the need of synchroniza on? Synchroniza on of coordina ng processes is necessary for proper execu on. Absence of synchroniza on may lead to problems like loss of data, unexpected output and deadlock. 32. What is a context switch? In mul programming OS, when a process scheduled onto CPU leaves the CPU for I/O or its me quantum expires, to be able to con nue the execu on from the exact point later, the context (values of registers like PC) are saved into PCB of the process and the context of another process is loaded onto CPU. This is called context switch. 33. What is address binding? Associa on of program instruc ons and data with the actual physical addresses is known as address binding. Address binding could be compile- me, load- me or execu on- me. 34. When is a process termed as orphan? The resources of a child process are deallocated when it completes its execu on but its entry in the process table is not deleted un l the parent process calls the wait() system call. If the parent terminates without calling wait(), the child process is termed as orphan. 35. What is the goal of virtual memory? Virtual memory makes it possible for the program size to be larger than the size of the main memory. Parts of the large program are swapped in and out of the main memory into the virtual memory space. 36. What conclusion can be drawn if the resource alloca on graph with only single instance type resources has a cycle? Resource alloca on graph can be used for deadlock detec on. When a resource alloca on graph with only single instance type resources has a cycle, it implies that deadlock has occurred. 37. What are semaphores? Semaphores are integer variables, whose values once ini alized, can be modified only by two atomic opera ons, wait() (or P() or down()) and signal() (or V() or up()). Coun ng semaphores can take any integer value while binary semaphores can take only two values, 0 and 1. Semaphores, when used properly, lead to synchroniza on of the processes. 38. What does a long-term scheduler do? A long-term scheduler, or job scheduler, selects a good mix of I/O bound processes and CPU bound processes from new state to load into main memory in the ready state.
39. What is the job of a short-term scheduler?
A short-term scheduler, or CPU scheduler, selects one process from the ready state, to execute on the CPU, according to the scheduling algorithm. 40. What is medium-term scheduler responsible for? When there is a lack of resources, some processes are suspended and swapped from main memory into secondary memory. This is done by the medium-term scheduler. 41. What is a solu on to the problem of external fragmenta on? Compac on is a solu on to the problem of external fragmenta on in which all the memory par ons which are occupied are moved towards one end of the memory so that con guous free space is created at the other end. It is not always possible and adds a me overhead. 42. How is security ensured using dual mode of opera on? To ensure security, dual mode (user and kernel mode) of opera on is used. The privileged instruc ons execute only in the kernel mode while the non-privileged instruc ons execute in the user mode. 43. What is convoy effect? When a longer process is scheduled before short processes, the overall device and CPU u liza on is lower than what it could have been if the shorter processes were scheduled first. This is termed as convoy effect. It can occur in the FCFS CPU scheduling algorithm. 44. What is Belady’s anomaly? Belady’s anomaly is possible in the FCFS and random page replacement algorithms. It is the situa on when on increasing the number of frames, the number of page faults also increase. 45. When is the request of a process immediately granted while using banker’s algorithm? Safe sequence is the sequence in which the remaining need of all the processes can be sa sfied. If at least one safe sequence exists, the system is said to be in a safe state and the request of the process is granted. 46. What is a solu on to the problem of starva on in process scheduling algorithms? Aging is used to overcome starva on problem in priority scheduling algorithms. As the wai ng me of a process increases, its priority is also increased. In this way, the wai ng me is not indefinite and starva on is not possible. 47. What is a mul core processor? In mul core processors, mul ple processing cores are placed on the same chip. They are faster and consume less power. 48. What is preemp ve mul programming? In preemp ve mul programming, a process execu ng on the CPU can be preempted if a higher priority process arrives in the ready queue or if the me quantum expires. 49. What is non-preemp ve mul programming? In non-preemp ve mul programming, when a process is scheduled to execute on the CPU, another process will be scheduled only when the process currently execu ng either terminates or blocks for I/O. 50. What is PTBR? PTBR or page table base register stores the base address of the page table of the process. It is stored in PCB (process control block).