Operating System Fundamentals

Table of Contents

Operating System Fundamentals

Process Management

What is a process in the context of operating systems?   drill operating_systems

Back

A process is an instance of a program in execution. It includes the program code, its current activity (as represented by the value of the program counter), and the contents of the processor's registers.

Explain the difference between a process and a thread.   drill operating_systems

Back

A process is an independent program in execution with its own memory space, while a thread is a lightweight unit of execution within a process. Threads within the same process share the same memory space and resources, allowing for more efficient communication and context switching compared to processes.

Memory Management

What is virtual memory and why is it important?   drill operating_systems

Back

Virtual memory is a memory management technique that provides an idealized abstraction of the storage resources that are actually available on a given machine. It allows programs to use more memory than physically available by using disk space as an extension of RAM. This is important because it enables efficient use of physical memory, isolation between processes, and the ability to run larger programs than would fit in physical memory alone.

Explain the concept of paging in memory management.   drill operating_systems

Back

Paging is a memory management scheme that eliminates the need for contiguous allocation of physical memory. It divides physical memory into fixed-sized blocks called frames and logical memory into blocks of the same size called pages. The operating system keeps track of all free frames. To run a program, its pages are loaded into available frames in physical memory. This allows for more efficient use of memory and simplifies memory allocation.

File Systems

What is a file system and what are its main functions?   drill operating_systems

Back

A file system is a method and data structure that the operating system uses to control how data is stored and retrieved. Its main functions include:

  1. Tracking allocated and free space
  2. Maintaining directories and file names
  3. Mapping files to storage locations
  4. Ensuring data integrity and controlling access to files

Explain the difference between FAT and NTFS file systems.   drill operating_systems

Back

FAT (File Allocation Table) and NTFS (New Technology File System) are both file systems used in Windows:

  1. FAT is simpler, older, and more compatible across different operating systems, but has limitations on file size and doesn't support advanced features.
  2. NTFS is more modern, supports larger file and partition sizes, has built-in security features, journaling for improved reliability, and supports advanced features like compression and encryption.

Device Management

What is the role of device drivers in an operating system?   drill operating_systems

Back

Device drivers are software components that act as an interface between the operating system and hardware devices. They:

  1. Translate high-level operating system instructions into low-level hardware-specific commands
  2. Manage device-specific operations and data transfers
  3. Handle interrupts and error reporting from devices
  4. Provide a standardized interface for the OS to interact with various hardware devices

Explain the concept of interrupt handling in device management.   drill operating_systems

Back

Interrupt handling is a mechanism used by operating systems to manage requests from hardware devices. When a device needs attention, it sends an interrupt signal to the CPU. The operating system then:

  1. Suspends the current process
  2. Saves the current state
  3. Determines the source of the interrupt
  4. Executes the appropriate interrupt service routine (ISR)
  5. Restores the saved state and resumes the interrupted process

This allows for efficient multitasking and responsive handling of hardware events.

Security and Access Control

What is the principle of least privilege in operating system security?   drill operating_systems

Back

The principle of least privilege is a fundamental concept in computer security that states that a user, program, or process should be given only the minimum levels of access – or permissions – needed to perform its function. This reduces the potential damage from errors or malicious actions and limits the attack surface of the system.

Explain the difference between discretionary access control (DAC) and mandatory access control (MAC).   drill operating_systems

Back

Discretionary Access Control (DAC) and Mandatory Access Control (MAC) are two different approaches to access control in operating systems:

  1. DAC: Allows users to control access to their own files and resources. The owner of a resource can grant or restrict access to other users. It's more flexible but potentially less secure.
  2. MAC: Enforces access control based on system-wide policies that cannot be changed by individual users. Access decisions are made by the system, not the users. It's generally more secure but less flexible than DAC.

Author: Jason Walsh

j@wal.sh

Last Updated: 2024-10-30 16:43:54