Operating System

OS Unit 1 Part 1 MCQs

Distribute Education like Computer Geek
Unit 1

Operating system and functions, Classification of Operating systems- Batch, Interactive, Time-sharing, Real Time System, Multiprocessor Systems, Multiuser Systems, Multi-process Systems, Multithreaded Systems, Operating System Structure: Layered structure, System Components, Operating System services, Re-entrant Kernels, Monolithic and Microkernel Systems.

Q1 – What is operating system?
  1. collection of programs that manages hardware resources
  2. system service provider to the application programs
  3. link to interface the hardware and application programs
  4. all of the mentioned

Ans – (4)

ExplanationAn operating system (OS) is a multi-functional entity.

They are:

A collection of programs that manage hardware resources –

The OS handles hardware like CPU, memory, and I/O devices in order to ensure they are effectively used.

System service provider to application programs –

Essential services like file management, process scheduling, and communication are provided to applications.

The interface that links hardware with application programs –

The OS acts like a bridge between the hardware and the software, allowing applications the means for interaction with their hardware, without requiring them to know low-level details.

Q2 – To access the services of operating system, the interface is provided by the
  1. system calls
  2. API
  3. library
  4. assembly instructions

Ans – (1)

ExplanationIn order to access the services of the operating system, programs invoke system calls.

System calls are interfaces by which application programs communicate with the operating system, requesting services such as file management, process control, or communication.

API (Application Programming Interface) – While APIs provide higher-level interfaces for the programming community, it is common for these APIs to use, at their core, system calls to communicate with the OS.

Library – Libraries are a collection of pre-written code that accomplish common tasks. These libraries almost always have system calls or API calls to make requests to the OS.

Assembly instructions – are low-level machine instructions and are only rarely called, directly, to access operating system services on new platforms.

Q3 – Which one of the following errors will be handle by the operating system?
  1. power failure
  2. lack of paper in printer
  3. connection failure in the network
  4. all of the mentioned

Ans – (4)

Explanation – In the event of power failure, the operating system performs various tasks, including the preservation of information prior to execution and safely shutting down the operating system by means of a UPS.

The operating system communicates with the printer and also, through various methods, warns the user about possible errors.

The operating system manages and looks to solve any occurrence where disconnection of the network takes place. Some may be through automatic rick driving, for instance, the notification of the user, and other ways.

Q4 – Which one of the following is not true regarding operating system?
  1. kernel is the program that constitutes the central core of the operating system
  2. kernel is the first part of operating system to load into memory during booting
  3. kernel is made of various modules which cannot be loaded in running operating system
  4. kernel remains in the memory during the entire computer session

Ans – (3)

Explanation – The 3rd statement is not true because many current operating systems, such as Linux, have modular kernel designs.

On such systems, kernel modules can be loaded or unloaded dynamically while the operating system is running, without requiring a reboot.

Q5 – By operating system, the resource management can be done via
  1. time division multiplexing
  2. space division multiplexing
  3. both (a) and (b)
  4. none of the mentioned

Ans – (3)

Explanation –

The operating system manages resources with two major techniques

  1. Time Division Multiplexing: This technique divides time into very small intervals and allocates the time slices to different processes or users. For example, CPU scheduling in a time-sharing system.
  2. Space Division Multiplexing: This technique allocates physical or logical resources (such as memory or disk space) to processes or users. For example, partitioning memory for different processes in main memory management.
Q6 – The operating system manages ________.
  1. Memory
  2. Processor
  3. Disk and I/O devices
  4. All of the above

Ans – (4)

Explanation –

In general, the operating system is responsible for managing:

  • Allocation and deallocation of memory to processes.
  • Scheduling of processes for execution using CPU scheduling algorithms.
  • System disk access control and file system management. Input or output devices and their driver’s management.
Q7 – Main memory of the computer system is also called
  1. non volatile
  2. volatile
  3. reserved
  4. large

Ans – (2)

Explanation – Main memory, also known as RAM (Random Access Memory), is volatile. It loses its stored data when the power is turned off.

 

Q8 – The Hardware mechanism that enables a device to notify the CPU is called __________.
  1. Polling
  2. Interrupt
  3. System Call
  4. None of the above

Ans – (2)

Explanation –

Interrupt is a hardware mechanism to notify the CPU that a device is in need of a service.

The device such as keyboard, printer, or NIC could send an interrupt signal to the processor when it requires the attention of the CPU.

The CPU ceases the ongoing task, saves the state, and invokes the Interrupt Service Routine (ISR) to serve the request from the device.

Other options –

Polling is where the CPU actively checks each device to see whether it needs some service, less efficient than interrupts.

System Call is a software mechanism in which the application requires for the service to be provided by the operating system and is not a hardware notification.

 

Q9 – If a process fails, most operating system write the error information to a
  1. log file
  2. another running process
  3. new file
  4. none of the mentioned

Ans – (1)

Explanation – Most operating systems create a log file for quoting errors in case a process fails. This log file usually contains details about the error, such as

  • The nature of failure.
  • Time and date of errors.
  • Associated process details like the process ID and its status.
Q10 – Multiprogramming of the computer system increases
  1. memory
  2. storage
  3. CPU utilization
  4. cost

Ans – (3)

Explanation – It allows the coexistence of multiple programs in memory so that the CPU is always busy in executing tasks; when one of the programs is waiting for I/O operations, the CPU switches to another program, maximizing the use of the CPU.

Q11 – A program at the time of executing is called ________.
  1. Dynamic program
  2. Static program
  3. Binded Program
  4. A Process

Ans – (4)

ExplanationA program consists of a set of instructions stored on some disk. Upon loading to the memory to commence execution, it turns into a process.

A process is a program in execution, which consists of:

  • The program code (instructions).
  • The current state of the execution (values of the program counter, registers, etc.).
  • The resources associated before execution (open files, memory, etc.).

Other options –

Dynamic program – A dynamic memory allocation program, but not a term for a running program;

Static program – Does not change during execution; hence, it does not relate to the execution state;

Bound program – No standardized term for referring to a program during execution.

Q12 – Multi-processor system gives a
  1. small system
  2. tightly coupled system
  3. loosely coupled system
  4. both a and b

Ans – (2)

ExplanationA multi-processor system is the system in which two or more processors work in collaboration to get the tasks completed. In the multi-processor system
Tightly coupled system – The processors share the same memory and are closely linked so that they may communicate and perform their tasks quite efficiently. Most multi-processor systems are of this kind.
Loosely coupled system – Processors have their own private memory and talk to each other through communication links. This is more common in distributed systems, not usual multi-processor systems.

Q13 – Logical extension of multiprogramming operating system is
  1. time sharing
  2. multi-tasking
  3. single programming
  4. both a and b

Ans – (4)

Explanation – Multiprogramming is running a number of programs on a computer by utilizing CPU time efficiently. The system switches from one program to another when these programs have to wait for an input or an output operation to be completed.
Time Sharing: This is a development of multiprogramming and allows several users to share the system simultaneously. The CPU time is divided into small fractions. It seems each user has a processor.
It is another mode through which the CPU executes many tasks or processes, apparently running them in parallel by rapidly switching between them.

Q14 – What is a shell ?
  1. It is a hardware component
  2. It is a command interpreter
  3. It is a part in compiler
  4. It is a tool in CPU scheduling

Ans – (2)

Explanation –

A shell is a command interpreter that acts as an interface between the user and the operating system.

A shell is a command interpreter that allows users to interact with the operating system by typing commands. The shell interprets those commands and passes them on to the OS kernel for execution.

Examples of shells are Bash, Zsh, Csh, and Ksh.

Q15 – Multiprocessor system have advantage of
  1. Increased Throughput
  2. Expensive hardware
  3. operating system
  4. both a and b

Ans – (1)

Explanation – This mainly allows the increase of throughput with the help of multiprocessors. Here, multiple processors operate and perform processes at the same time, ensuring improved system efficiency.

More processors handle more tasks or operations simultaneously to enhance performance and develop efficiency.

Q16 – UNIX was initially developed at
  1. Bell Labs
  2. Nasa Labs
  3. Microsoft Labs
  4. Kaspersky Labs

Ans – (1)

Explanation –

UNIX was originally created in 1969 by Ken Thompson, Dennis Ritchie, and their team at Bell Labs (Bell Telephone Laboratories). At the time, Bell Labs was part of AT&T. Over the years, UNIX grew to be the bedrock of an operating system that would influence many modern versions, such as Linux and macOS.

Q17 – Scheduling of threads are done by
  1. input
  2. output
  3. operating system
  4. memory

Ans – (3)

Explanation – The operating system manages and schedules threads. It makes decisions on the following:

Which thread receives CPU time.

When to switch between threads.

Methodologies for proper usage of a CPU and resource utilization.

The scheduler of an operating system sorts threads according to numerous scheduling algorithms: round-robin, priority scheduling, etc.

Q18 – Another type of multiple-CPU system is the
  1. mini Computer
  2. Super Computer
  3. Clustered System
  4. both a and b

Ans – (3)

Explanation –

Another form of a multiple-CPU system is a clustered system. In a clustered system:

  1. Several computers, or nodes, operate in conjunction and are networked together to share work.
  2. They provide high availability, scalability, and higher computing power.

Mini Computer and Super Computer are types of computer systems, but not specifically multiple-CPU systems.

Q19 – Interrupt table of pointers having addresses for each interrupt is located at
  1. high memory
  2. low memory
  3. mid memory
  4. both a and b

Ans – (2)

Explanation – Interrupt vector table is generally located in the low memory area of a computer. This table consists of pointers, or addresses, to the interrupt service routines (ISRs) for each interrupt.

The location of the IVT in memory is determined by the system design, but in many systems, it starts at address 0x0000 or another low memory address.

Putting the IVT in low memory helps the CPU access it quickly during interrupt handling because it can refer to the table directly without much extra work.

Q20 – Example of open source operating system is
  1. UNIX
  2. Linux
  3. windows
  4. both a and b

Ans – (2)

Explanation – Linux is an open source operating system. Its source code is freely available for modification and distribution under licenses like the GNU General Public License (GPL). Examples include Ubuntu, Fedora and Debian.
UNIX is not open source. Some variants of UNIX are open source (like BSD) while traditional UNIX systems are proprietary.
Windows is a proprietary operating system developed by Microsoft and does not open source.

BOOKS

Operating System by Silberschatz

Operating System by Rajiv Chopra

Â