Unit 1: Operating Systems: Structure and Services — Short Questions

10th Class Computer Science · Unit 1: Operating Systems: Structure and Services

Introduction to Operating System (OS)

1.What is an Operating System (OS)?

Ans. An Operating System (OS) is a type of system software that manages hardware, runs application software, and provides a user interface, like MS Windows, macOS, Linux, Android, and iOS.

2.How does the OS work as the central system controller?

Ans. An operating system works like a traffic controller for the computer. It decides which task should be done first, how the computer's memory is used, and which devices (like a printer or speakers) should be active at a given time. It makes sure the computer works smoothly even when multiple tasks are running at the same time.

3.How does the OS enable interaction between users, applications and hardware?

Ans. The operating system acts as a translator between the user, applications and the hardware system. When you click an icon or type something, the OS changes those actions into instructions that the hardware can understand.

4.Give an example of how the OS translates user actions into hardware instructions?

Ans. When you press the letter A on a keyboard, the operating system converts it into a special binary code:

  • The letter 'A' in binary is (01000001)₂.
  • This code is sent to the computer screen, which displays A.
  • This happens so quickly that it feels instant to the user.
5.Do humans and computers understand the same languages?

Ans. No, humans and computers do not understand the same language. Humans speak languages like Urdu or English, whereas computers understand only binary language, which works using ON OFF states represented by 1 and 0 respectively.

6.How to convert letter 'A' into binary code?

Ans. 'A' is a character which has ASCII (American Standard Code for Information Interchange) 65. Convert 65 into binary by successive division by 2, recording remainders, then reading remainders from bottom to top.

A = (65)₁₀ = (01000001)₂

7.How does the OS manage multiple users on the same computer?

Ans. The OS ensures

  • Creation and management of separate user accounts.
  • Keeps each user's files and information private.
  • Shares the computer's resources equally so no one slows down the system.
  • Protects shared resources from unauthorized access.
8.How does the OS create and manage user accounts? Also, give its example.

Ans. The OS allows separate accounts for different users, each with its own desktop, Files, settings, and passwords.
Example: In a computer lab, students log in with a username and password provided by the school. This keeps each student's work separate and private. In modern OS like Windows, a new account can be created through Settings or Control Panel by selecting User Accounts, choosing Add New User, and entering details like username, password, and account type (Standard, Administrative, Guest).

Architecture of an Operating System

9.What is the architecture of an operating system?

Ans. The architecture of an operating system is the way how its parts are organized and how they work together. Each part has a special role, and together they make the computer work smoothly just like a school has different departments that perform specific duties but work together for the smooth working of the school.

10.What is the kernel?

Ans. The kernel is the core part of the operating system, that directly controls the computer's system software and hardware such as the CPU, memory, and devices. It decides how and when different programs can use these resources.

11.Give an example of how the kernel works.

Ans. When you open a file, the kernel manages the process of reading it from the hard drive and sending it to the screen.
Example: Like Engine of a car work is kernel and accessories like steering wheel, dashboard is shell.

12.What is the shell?

Ans. The shell is the outer part of the OS that interacts with the user. It receives commands from the user and passes them to the kernel.

13.Name two types of shells.

Ans. Graphical shells (like Windows desktop) and Command-line shells (like the Command Prompt or Terminal).

14.What do lower layers of the OS do?

Ans. The lower layer works directly with hardware devices like the CPU, RAM, secondary storage (i.e hard disk). They manage and control hardware resources.

15.What is the function of the middle layer in OS?

Ans. The middle layer of the OS manages system resources (such as CPU, memory, and devices) and ensures that programs can access and use them efficiently when needed.

16.What does the upper layer do?

Ans. Upper-layer run applications and provide the interface that the user views on the screen.

17.What are system libraries?

Ans. System libraries are collections of ready-made instructions that programs can use to perform common tasks, such as opening files or showing text on the screen.

18.What are device drivers?

Ans. Device drivers are special programs that allow the operating system to communicate with hardware devices such as printers and graphics cards.

Process Management in Operating Systems (OS)

19.What is the role of the operating system in process management?

Ans. The operating system is responsible for managing all the programs that run on a computer. In this context, these running programs are called processes. Process management ensures that each process gets the resources it needs, even when multiple processes are active. Process management is one of the most important jobs of an operating system because it ensures all processes run smoothly without disturbing each other.

20.What are the stages of a process life cycle?

Ans. A process goes through several stages during its life cycle: Creation, Execution, and Termination.

21.What happens during the creation stage of a process?

Ans. This happens when you start any program (like MS Word). The OS loads the program into memory and gives it the resources (like CPU time and memory) it needs.

22.What happens during the execution stage of a process?

Ans. During execution phase the process is actively running and performing tasks effectively.

23.What happens during the termination stage of a process?

Ans. The process finishes its task and is closed by the user or the system. The OS release the resources so they can be used by other processes.

24.What is multitasking in an operating system?

Ans. The operating system allows more than one program to be open and usable by a single user at the same time. You can easily switch between them whenever you need.

25.What is concurrency in an operating system?

Ans. Concurrency in an operating system means that more than one process is active at the same time. The CPU switches between processes very quickly.

26.What is process scheduling?

Ans. Since the CPU cannot run all processes at the same time, the operating system must decide which process should run first and how long each process should run. This process is called scheduling.

27.Which is the First Come, First Served (FCFS) scheduling method?

Ans. In the FCFS method, the CPU processes tasks in the exact order they arrive. The first process to arrive is completed first, and the next process starts only after the previous one finishes.

28.Give an example of FCFS scheduling with three processes.

Ans. P1 arrives first and runs from 0s to 5s, P2 runs from 5s to 8s, and P3 runs from 8s to 10s. Even though P3 has the shortest duration, it must wait until P1 and P2 have finished.

29.What are the advantages of FCFS?

Ans. The advantages of FCFS are:

  • Easy to understand and implement.
  • Processes are served in the exact order they arrive.
  • No process is skipped.
30.What are the disadvantages of FCFS?

Ans. The disadvantages of FCFS are:

  • Short processes may have to wait a long time if queued behind longer processes (known as the "convoy effect").
  • This can affect the overall efficiency of the system.

Memory

31.What is memory in a computer system?

Ans. Memory is a fundamental component of a computer system, used to store data and instructions required for processing. It ensures that the CPU can access information quickly during program execution.

32.What is primary or Volatile memory?

Ans. Primary memory, also called Random Access Memory (RAM) or Volatile Memory, is the main working area of a computer. It is a fast storage area where the computer keeps the data and instructions temporarily. Its data is erased when the computer is turned off.

33.How does RAM work? Explain with an example.

Ans. When you open a Word document, the computer quickly places the program and the document into RAM so the CPU can work on them right away.

34.What is virtual memory?

Ans. When the RAM is full, the operating system uses part of the computer's storage device (like Hard Drives, Solid-State Drives (SSD), or Non-Volatile Memory Express (NVMe)) as virtual memory.

35.What is the purpose of virtual memory?

Ans. The primary purpose of virtual memory is to extend a computer's usable memory from secondary storage like hard disk drive.

36.How does virtual memory affect system performance?

Ans. Storage drives operate at lower data transfer speeds and have higher access times as compared to RAM; that's why the use of virtual memory can result in reduced system performance.

Processes vs Threads

37.What happens when several programs are open simultaneously?

Ans. The operating system may transfer data from less active programs to virtual memory. This frees up space in RAM for the programs you are currently using, but may make those fewer active programs slower to respond.

38.What is a process?

Ans. A process is an independent program that is currently being executed by the computer. It has its own memory space, CPU time, and other resources to run.

39.What is a thread?

Ans. A thread is the smallest unit of execution within a process. Multiple threads can exist inside a single process, performing different tasks while sharing the same memory and resources.

40.How do processes and threads differ in resources?

Ans. Processes have their own memory space, CPU time, and other resources such as files or network connections. Threads share the same memory and resources within the process.

41.How do processes and threads differ in isolation?

Ans. Processes are isolated from one another to ensure stability and security, so a problem in one process does not affect another. Threads operate independently but are not isolated, sharing resources within the same process.

42.What is the purpose or benefit of a process?

Ans. The purpose of a process is to ensure stability in the system. A problem in one process generally does not affect the execution of other processes.

System Calls

43.What is the purpose or benefit of a thread?

Ans. Threads allow multiple tasks within the same process to run simultaneously. This ensures that tasks can progress without waiting for each other to finish, improving efficiency.

44.Give an example of a process.

Ans. A web browser as a whole is one process. The entire application runs independently with its own memory and resources allocated by the operating system.

45.Give an example of threads within a process.

Ans. Example of threads within a process:

  • Loading a webpage
  • Playing audio or video
  • Downloading files
46.What is multithreading?

Ans. Multithreading is an operating system technique that allows a single process to perform multiple tasks at the same time by dividing its work into smaller units.

47.What are the benefits of multithreading?

Ans. Multithreading enhances performance by allowing tasks to run in parallel, improving system efficiency. It also improves responsiveness, supports concurrent operations, and uses system resources more efficiently since threads share the same memory and resources of the parent process.

48.What is a system call?

Ans. A system call is a request made by a program to the operating system to perform a specific task that the program cannot do directly. They act as a bridge between user programs and the kernel, allowing applications to access hardware and core OS functions safely.

49.Why are system calls important?

Ans. Without system calls, programs that directly control hardware can be unsafe and complex. They allow safe interaction between programs and the operating system.

50.Give an example of a system call in action.

Ans. When you save a file in a text editor, the program uses a system call to tell the operating system to write the data to the storage drive, like a Hard drive.

51.How the 'open' system call work?

Ans. The open system call opens a file for reading or writing.
Example: Opening a music file to play

52.How the 'read' system call work?

Ans. The read system call retrieves data from a file or input device.
Example: Reading text from a document.

53.How the 'write' system call work?

Ans. The write system call sends data to a file or output device.
Example: Saving an image to the computer.

54.How the 'fork' system call work?

Ans. The fork system call creates a new process by duplicating an existing one.
Example: Opening a new browser tab, where the OS may use fork to create another process.

55.How many system calls do Linux and macOS have?

Ans. Linux and macOS have a few hundred system calls.

56.How many system calls does Windows have?

Ans. Windows uses nearly 2,000 system calls that handle everything from opening files to running apps and showing graphics in the background while you work.

File System Structure and Management

57.What is the main role of system calls in operating systems?

Ans. System calls allow programs to access hardware and core OS functions safely, acting as a bridge between user programs and the kernel.

58.What is the role of an operating system in data storage?

Ans. An operating system not only runs programs but also stores and organizes the user's data. This is achieved through the file system, which provides a structured way for users and applications to store, locate, and manage information on storage devices.

59.What is a file?

Ans. A file is a collection of related data stored on a computer. It may contain text, images, audio, video, or program instructions.

60.What is a folder?

Ans. A folder (also called a directory) is a container used to organize files and other folders in a logical structure, making it easier to locate and manage information.

61.What is metadata?

Ans. Metadata refers to details about a file or folder, such as its name, type, size, date of creation, and date of last modification. This information helps both the operating system and the user identify and manage files and folders without opening them.

62.What is a file system?

Ans. A file system is the way an operating system stores and organizes files on a storage device, such as a hard drive, SSD, or USB. It decides where each file will be kept and saves its location so it can be accessed later.

63.Name some widely used file systems.

Ans. FAT32 (File Allocation Table 32): Used in USB flash drives.
NTFS (New Technology File System): Used by Windows OS.
APFS (Apple File System) /HFS + (Hierarchical File System Plus): Used by macOS.
EXT4 (Fourth Extended File System): Commonly used by Linux OS.

64.How does the choice of file system affect a computer?

Ans. The choice of file system affects performance, storage capacity, and security features.

65.Give an example of how a file system works.

Ans. If you save a photo on your computer, the file system makes sure it is stored in the right place and knows exactly where to find it when you open it again, just like a librarian placing a book in the right section and knowing where to locate it later.

66.Why is a file system important for users and applications?

Ans. A well-designed file system ensures that data remains organized, secure, and easily retrievable, even when there are thousands of files containing complex data.

67.What types of data can a file contain?

Ans. A file may contain text, images, audio, video, or program instructions.

Types of Operating Systems

68.Why are operating systems designed differently for each device?

Ans. Operating systems are designed according to the needs of the device and the work it performs. Each type serves a different purpose and is optimized for specific tasks.

69.What is a Real-Time Operating System (RTOS)?

Ans. A Real-Time Operating System is designed to process data and respond within a strict time limit, known as a deadline. It is used where even a tiny delay can cause system failure or serious consequences.

70.What are the key features of RTOS?

Ans. The key features of Real Time Operating System (RTOS) are:

  • Processes tasks immediately as they arrive.
  • Without long waiting times.
71.Where is RTOS commonly used?

Ans. RTOS is used where critical systems such as air traffic control, heart-monitoring devices, or industrial robots' tasks must be completed within strict time limits.

72.What is an Embedded Operating System (EOS)?

Ans. An Embedded OS is a small and efficient operating system built into a highly efficient operating system built into a specific device to control only the functions it needs. It is not meant for general-purpose computing but is optimized for one task or a small set of tasks.

73.What are the key feature of EOS?

Ans. The key features of EOS are: uses very little memory, power, and is often stored permanently inside the device.

74.Where is EOS commonly used?

Ans. EOS are commonly used in home appliances (microwaves, washing machines), printers, smart TVs, and ATMs.

75.What is a Network Operating System (NOS)?

Ans. A Network OS manages and supports multiple computers connected through a network. It enables the sharing of resources like files, printers, and internet connections among users.

76.What is the key feature of NOS?

Ans. The key feature of NOS is that it focuses on communication and coordination between computers in a network.

77.Write the example of NOS usage.

Ans. In a school computer lab, students use different computers, but all can save files to the same server and print from the same printer.

78.What is a Mobile Operating System?

Ans. Mobile OS is designed for smartphones, tablets, and other handheld devices. It is optimized for touch-screen use, battery saving, and mobile apps.

79.What are the key features of Mobile OS?

Ans. It supports wireless connectivity, cameras, sensors, and app stores, allowing mobile devices to run apps and communicate effectively.

80.Where is Mobile OS commonly used?

Ans. Mobile phone OS is commonly used in:

  • Smartphones
  • Tablets
  • Smartwatches