MCQ On Operating System Basics
Q1. What is an operating system?.
- interface between the hardware and application programs
- collection of programs that manages hardware resources
- system service provider to the application programs
- all of the mentioned
Answer: d, all of the mentioned
Solution: An Operating System acts as an intermediary between user/user applications/application programs and hardware. It is a program that manages hardware resources. It provides services to application programs.
Q2. In Operating Systems, which of the following is/are CPU scheduling algorithms?.
- Priority
- Round Robin
- Shortest Job First
- All of the mentioned
Answer: d, All of the mentioned
Q3. To access the services of the operating system, the interface is provided by the ___________.
- Library
- System calls
- Assembly instructions
- API
Answer: b, System calls
Solution: To access services of the Operating System an interface is provided by the System Calls. Generally, these are functions written in C and C++. Open, Close, Read, Write are some of most prominently used system calls.
Q4. CPU scheduling is the basis of ___________.
- multiprogramming operating systems
- larger memory sized systems
- multiprocessor systems
- none of the mentioned
Answer: a, multiprogramming operating systems
Q5. Which one of the following is not true?.
- kernel remains in the memory during the entire computer session
- kernel is made of various modules which can not be loaded in running operating system
- kernel is the first part of the operating system to load into memory during booting
- kernel is the program that constitutes the central core of the operating system
Answer: b, kernel is made of various modules which can not be loaded in running operating system
Solution: Kernel is the first program that is loaded in memory when OS is loading as well as it remains in memory till OS is running. Kernel is the core part of the OS which is responsible for managing resources, allowing multiple processes to use the resources and provide services to various processes. Kernel modules can be loaded and unloaded in run-time i.e. in running OS.
Q6. Which one of the following errors will be handle by the operating system?.
- lack of paper in printer
- connection failure in the network
- power failure
- all of the mentioned
Answer: d, all of the mentioned
Solution: All the mentioned errors are handled by OS. The OS is continuously monitoring all of its resources. Also, the OS is constantly detecting and correcting errors.
Q7. Where is the operating system placed in the memory?.
- either low or high memory (depending on the location of interrupt vector)
- in the low memory
- in the high memory
- none of the mentioned
Answer: a, either low or high memory (depending on the location of interrupt vector)
Q8. If a process fails, most operating system write the error information to a ______.
- new file
- another running process
- log file
- none of the mentioned
Answer: c, log file
Solution: If a process fails, most operating systems write the error information to a log file. Log file is examined by the debugger, to find out what is the actual cause of that particular problem. Log file is useful for system programmers for correcting errors.
Q9. Which one of the following is not a real time operating system?.
- RTLinux
- Palm OS
- QNX
- VxWorks
Answer: b, Palm OS
Solution: VxWorks, QNX & RTLinux are real-time operating systems. Palm OS is a mobile operating system. Palm OS is developed for Personal Digital Assistants (PDAs).
Q10. What does OS X has?.
- monolithic kernel with modules
- microkernel
- monolithic kernel
- hybrid kernel
Answer: d, hybrid kernel
Solution: OS X has a hybrid kernel. Hybrid kernel is a combination of two different kernels. OS X is developed by Apple and originally it is known as Mac OS X.
Q11. In operating system, each process has its own __________.
- open files
- pending alarms, signals, and signal handlers
- address space and global variables
- all of the mentioned
Answer: d, all of the mentioned
Solution: In Operating Systems, each process has its own address space which contains code, data, stack, and heap segments or sections. Each process also has a list of files that is opened by the process as well as all pending alarms, signals, and various signal handlers.
Q12. In a timeshare operating system, when the time slot assigned to a process is completed, the process switches from the current state to?.
- Suspended state
- Terminated state
- Ready state
- Blocked state
Answer: c, Ready state
Solution: In a time-sharing operating system, when the time slot given to a process is completed, the process goes from the running state to the Ready State. In a time-sharing operating system, unit time is defined for sharing CPU, it is called a time quantum or time slice. If a process takes less than 1 time quantum, then the process itself releases the CPU.
Q13. When a process is in a “Blocked” state waiting for some I/O service. When the service is completed, it goes to the __________.
- Terminated state
- Suspended state
- Running state
- Ready state
Answer: d, Ready state
Solution: Suppose that a process is in “Blocked” state waiting for some I/O service. When the service is completed, it goes to the ready state. Process never goes directly to the running state from the waiting state. Only processes which are in ready state go to the running state whenever CPU allocated by operating system.
Q14. The portion of the process scheduler in an operating system that dispatches processes is concerned with ____________.
- assigning ready processes to waiting queue
- assigning running processes to blocked queue
- assigning ready processes to CPU
- all of the mentioned
Answer: c, assigning ready processes to CPU
Q15. The FCFS algorithm is particularly troublesome for ____________.
- operating systems
- multiprocessor systems
- time sharing systems
- multiprogramming systems
Answer: c, time sharing systems
Solution: In a time sharing system, each user needs to get a share of the CPU at regular intervals.
Q16. For an effective operating system, when to check for deadlock?.
- every time a resource request is made at fixed time intervals
- at fixed time intervals
- every time a resource request is made
- none of the mentioned
Answer: a, every time a resource request is made at fixed time intervals
Solution: In an effective operating system, we must verify the deadlock each time a request for resources is made at fixed time intervals.
Q17. A deadlock avoidance algorithm dynamically examines the __________ to ensure that a circular wait condition can never exist..
- operating system
- resources
- system storage state
- resource allocation state
Answer: d, resource allocation state
Solution: Resource allocation states are used to maintain the availability of the already and current available resources.
Q18. What does OS X has?.
- monolithic kernel with modules
- microkernel
- monolithic kernel
- hybrid kernel
Answer: d, hybrid kernel
Solution: OS X has a hybrid kernel. Hybrid kernel is a combination of two different kernels. OS X is developed by Apple and originally it is known as Mac OS X.
Q19. Swapping _______ be done when a process has pending I/O, or has to execute I/O operations only into operating system buffers..
- must never
- maybe
- can
- must
Answer: a, must never
Q20. The main memory accommodates ____________.
- cpu
- user processes
- operating system
- all of the mentioned
Answer: c, operating system
Q21. The operating system is responsible for?.
- bad-block recovery
- booting from disk
- disk initialization
- all of the mentioned
Answer: d, all of the mentioned
Q22. The operating system maintains a ______ table that keeps track of how many frames have been allocated, how many are there, and how many are available..
- memory
- mapping
- page
- frame
Answer: d, frame
Q23. In real time operating system ____________.
- process scheduling can be done only once
- all processes have the same priority
- kernel is not required
- a task must be serviced by its deadline period
Answer: d, a task must be serviced by its deadline period
Q24. For real time operating systems, interrupt latency should be ____________.
- zero
- minimal
- maximum
- dependent on the scheduling
Answer: b, minimal
Solution: Interrupt latency is the time duration between the generation of interrupt and execution of its service.
Q25. Which one of the following is a real time operating system?.
- Windows CE
- RTLinux
- VxWorks
- All of the mentioned
Answer: d, All of the mentioned
Q26. The operating system keeps a small table containing information about all open files called ____________.
- file table
- directory table
- open-file table
- system table
Answer: c, open-file table
Q27. What will happen in the single level directory?.
- All files are contained in the same directory
- All files are contained in different directories all at the same level
- Depends on the operating system
- None of the mentioned
Answer: a, All files are contained in the same directory
Q28. On systems where there are multiple operating system, the decision to load a particular one is done by _____________.
- process control block
- file control block
- boot loader
- bootstrap
Answer: c, boot loader
Q29. Whenever a process needs I/O to or from a disk it issues a ______________.
- system call to the operating system
- a special procedure
- system call to the CPU
- all of the mentioned
Answer: a, system call to the operating system
Q30. The two steps the operating system takes to use a disk to hold its files are _______ and ________.
- caching & logical formatting
- logical formatting & swap space creation
- swap space creation & caching
- partitioning & logical formatting
Answer: d, partitioning & logical formatting
Q31. The _______ program initializes all aspects of the system, from CPU registers to device controllers and the contents of main memory, and then starts the operating system..
- bootstrap
- main
- bootloader
- rom
Answer: a, bootstrap
Q32. Network operating system runs on ___________.
- every system in the network
- server
- both server and every system in the network
- none of the mentioned
Answer: b, server
Q33. What are the types of distributed operating systems?.
- Zone based Operating system
- Level based Operating system
- Network Operating system
- All of the mentioned
Answer: c, Network Operating system
Q34. In Unix, which system call creates the new process?.
- create
- fork
- new
- none of the mentioned
Answer: b, fork
Solution: In UNIX, a new process is created by fork() system call. fork() system call returns a process ID which is generally the process id of the child process created