Operating Systems and Processes

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which component is NOT typically part of a magnetic disk drive?

  • A solid-state buffer for temporary storage. (correct)
  • Electromagnetic platters.
  • Read-write heads.
  • Cylinders consisting of concentric tracks.

What is the primary function of the process scheduler within an operating system?

  • Handling hardware interrupts.
  • Providing a user interface.
  • Managing the file system.
  • Allocating CPU time to different processes. (correct)

Which memory management technique divides memory into fixed-size blocks, potentially leading to internal fragmentation?

  • Dynamic partitioning.
  • Paging. (correct)
  • Segmentation.
  • Contiguous memory allocation.

In the context of operating systems, what does the acronym 'SSI' stand for?

<p>Software Service Interrupt. (D)</p> Signup and view all the answers

Which of the following is the most accurate description of the 'kernel' in an operating system?

<p>The core software layer providing an abstract interface to the hardware. (A)</p> Signup and view all the answers

What is the primary role of the 'HAL' (Hardware Abstraction Layer) in an operating system like Windows?

<p>Abstracting hardware differences to make the OS more portable. (A)</p> Signup and view all the answers

Which sequence accurately describes the steps in handling a hardware interrupt?

<p>Interrupt, supervisor mode, determine subroutine address, execute subroutine, return to interrupted instruction. (A)</p> Signup and view all the answers

Which of the following is a characteristic of the monolithic kernel architecture?

<p>Higher performance due to direct access to hardware. (C)</p> Signup and view all the answers

What is the purpose of 'Wear Leveling' in Solid State Drives (SSDs)?

<p>To evenly distribute write and erase cycles across all memory cells. (C)</p> Signup and view all the answers

What is the main advantage of using multi-threading within a process?

<p>Improved resource sharing and concurrency within the same process. (D)</p> Signup and view all the answers

What is the function of the Translation Lookaside Buffer (TLB) in memory management?

<p>To cache recent virtual-to-physical address translations. (B)</p> Signup and view all the answers

Which of the following statements best describes the difference between 'user mode' and 'supervisor mode' in a CPU?

<p>Supervisor mode allows execution of privileged instructions, while user mode has restricted access. (B)</p> Signup and view all the answers

Which of the following best describes the NUMA (Non-Uniform Memory Access) architecture?

<p>A memory architecture where access time depends on the memory location relative to a processor. (A)</p> Signup and view all the answers

In the context of file systems, what is the purpose of a 'device driver'?

<p>To provide a software interface to a hardware device. (B)</p> Signup and view all the answers

What is the role of the 'initrd' or 'initramfs' in the Linux boot process?

<p>It's a temporary root file system loaded into memory to help boot the actual root file system. (D)</p> Signup and view all the answers

Flashcards

OS Kernel

Software layer above the hardware offering an abstract interface.

Process

A program in execution with its isolated memory space.

Process Scheduler

Part of the kernel allocating CPU time among processes.

Process States

Minimum process states: Ready, Active, Blocked.

Signup and view all the flashcards

Thread

Execution sequence within a process, sharing the same resources.

Signup and view all the flashcards

Hardware Organization

External devices communicating through buses with processors and shared memories.

Signup and view all the flashcards

Interrupt

Altering execution flow due to an event.

Signup and view all the flashcards

Supervisor Mode

Executing privileged instructions accessing hardware or external software.

Signup and view all the flashcards

Paging

Each process having its logical address space.

Signup and view all the flashcards

Virtual Memory

Processes executing without transferring pages to memory.

Signup and view all the flashcards

Adapter

Standardized interface to connect devices.

Signup and view all the flashcards

Device Driver

OS component with code for a specific device type.

Signup and view all the flashcards

Magnetic Disk

Hard drives comprised of magnetic platters to store data

Signup and view all the flashcards

Microkernel

Minimizes program size by externalizing components.

Signup and view all the flashcards

Layered Kernel

OS components with own memory spaces.

Signup and view all the flashcards

Study Notes

Operating System

  • An operating system consists of the kernel and system tools
  • It provides software that facilitates the use of the computer system and offers user-system and application-system interfaces
  • The kernel is the software layer above the hardware and provides an abstract interface, solving file reading issues independently of the hardware

Processes

  • A process is a program in execution with isolated memory space and can be synchronized and communicated through the kernel
  • Distinct processes can run the same program multiple times, or the same process can run another program
  • It can create other processes (parent, child) and make system calls
  • Multiprogramming allows processors to be used during blocking times of programs
  • The process scheduler is part of the kernel and distributes processor time among processes
  • Minimum process states include prepared, active, and blocked, with transitions occurring through activation, appropriation, and completion of blocking

Threads

  • Threads represents a sequence of execution in a process that shares resources, enabling parallelization of activities
  • It allows for multiple processors or better use of one processor during blocking times
  • Activities are interdependent and communicate to maintain integrity
  • Implements creation, destruction, and synchronization of threads, but does not include protection
  • Processes are system objects with threads, memory space, and resources
  • Thread scheduling is also necessary

Basic Hardware Concepts and Organization

  • External devices connect to processors via buses with local and shared memories
  • NUMA architecture involves distinct memories
  • Multi-core processors replicate control units
  • Multi-threaded processors replicate some components of the processor

Interrupts

  • Interrupt represents an alteration of the execution sequence in response to an event
  • Processors can experience hardware interrupts due to changes in input states, exceptions due to failed instruction execution (page faults, privilege violations), or deliberate software interrupts

Interrupt Handling Steps

  • Interrupt is activated
  • Processor switches to supervisor mode
  • Original action is returned to the instruction prior to the interrupt
  • Subroutine address is determined via interrupt vectors
  • Subroutine is executed

Execution Modes

  • User mode cannot execute privileged instructions
  • Supervisor mode can execute privileged instructions, which access hardware or external software resources (HALT) allowing for a robust kernel

Memory Paging

  • Each process has its own logical address space that may not be contiguous in physical memory
  • Translators are needed between logical and physical address spaces
  • Each process has a page table, always starting at index 0, relating physical pages to logical ones with accessed and modified bits

Virtual Memory

  • Virtual memory allows processes to execute without all their pages in memory
  • The steps include:
    • Create non-present pages
    • Handle an exception when attempting to access a non-present page
    • Kernel control through the memory manager
    • Identify a free frame and copy the page into it
    • Update the page table to mark the page as present
    • Transfer control back to the kernel

Device Access

  • Device consist of an adapter, controller, and electromechanical components implementing operations such as receiving orders and transferring data
  • Adapters provide standardized interfaces (mechanical, electrical, logical) for connecting devices such as SATA, SCSI, SAS, and Bluetooth
  • Controllers are the interface between a device and the system with control, status, and read/write registers
  • I/O can be guided using polling or interrupts

Guided I/O

  • Polling involves constantly checking the status (inefficient processor use)
  • Interrupts provide status updates only when there is a change (using a service routine in supervisor mode)
  • PCI interrupts the processor; MSI places interrupts as memory messages without direct PCI access

Architecture

  • Software includes I/O in user space via function libraries (external to kernel) and device-independent management with a file system interface

Storage Units

  • Storage unit includes device drivers which are kernel components
  • Storage units have service routines for interrupt handling

Magnetic Storage Units

  • Magnetic units are composed of platters with two sides containing tracks and sectors
  • A cylinder is a set of concentric tracks with the same number, accessed by read-write heads
  • Tracks are concentric rings divided into sectors, which are the minimum transfer unit
  • A buffer of RAM is used for temporary storage during read/write operations
  • Permanent storage involves writing electromagnetic information on platter surfaces using read/write heads
  • Addressing is done by CHS (Cylinder, Head, Sector) treating the disk as an array of sectors or by LBA (Linear Block Address) treating the disk as a vector of sectors

Transferring data

  • Transfer data in an isolated section has poor performance.
  • Time for transfer = time for motor to start + time for consecutive tracks + inertia + rotation time + time for sector
  • It is faster to transfer consecutive sectors but needs an efficient request queue

Solid State Drives (SSDs)

  • SSDs include the use of flash memory
  • Data has to be rewritten leading to write amplification, due to data being written into empty sectors, erasing blocks, or writing requiring reading, erasing, modification and writing
  • Leveling by minimizing wear by distributing erases across memory level

Addressing Write Amplification

  • Dynamic wear leveling involves writing modifications to an available cell and marking the old one obsolete
  • Trim command is where valid sectors are reported to the SSD to avoid unnecessary reads or rewrites
  • Static wear leveling involves moving sectors with a higher number of erases to maintain the average lifespan

User Interface

  • Internal terminals display via a console where the screen adapter manages a memory area (character matrix or pixel matrix) and the video memory shared with the system
  • External terminals connect to other systems, sending character codes

System Boot Sequence

  • System boot starts from pressing the power button until the machine is running, initialising internal components then executing the first instruction
  • Booting then loads the operating system from the ROM or the external.

Loading OS from ROM

  • The hardware loader, firmware BIOS/UEFI completes minimum initialization and transfers control to the kernel

Loading OS from external

  • The hardware loader and firmware starts execution
  • Software loader then searches the device through: a partitioned device or unpartitioned (sector 0) before verifying if it is able to boot
  • The kernel loads and transfers control

Basic Concepts of Operationg Systems

System Calls

  • System calls are requests to the kernel to obtain a service, accessed through kernel APIs
  • Routines inefficiently implement system calls, using a single entry point in a fixed direction
  • Software interrupts implement calls to the system by using a single entry point and INT n instruction.

Interruption Code

  • Mode supervisor is initiated
  • Hardware follows the entry point direction
  • Code executes in the OS
  • Previous calls will be removed

Calling Advantages

  • Independence of the entry points and mode supervisor commutation

Calling Disadvantages

  • Verification and interruption action is complex

Special Instructions

  • Special instructions efficiently implements system calls
  • Includes points to register Star
  • Syscall instructions run direction of entry point in the processor and efficient compared to software instructions

Users

  • Users are authorized by a system administrator to access a UID
  • Groups of users share access permissions

Archiving

  • Archiving collects information that identifies systems
  • Hierarchical organization is based on the directories.

Command Interpreter

  • The command interpreter is a system in text
  • Translates calls to users by the system

Graphic User Interfaces

  • Graphic user interfaces work as command interpreters for graphics
  • Provides API to programs

Design Models

  • Monolithic design includes: simple execution, memory occupation, debugging
  • Layered design includes: debugging and maintenance
  • Microkernel design includes: debugging, robustness and adaptability

Linux

  • Linux has a monolithic kernel but reduced compared to a microkernel
  • It has external components like loadable modules
  • Easier maintenance of OS
  • Processes to manage like insprobe and rmmod
  • Also includes libraries and system utilities

Windows

  • Windows has a monolithic kernel during user mode with a shared memory space for the supervisor, HAL + kernel, drivers + executive
  • It also includes an HAL (abstracts portable nucleus), kernel (threads) and management which administers the memory

Models in layers

  • The model is layered, with the following structure: hardware, planning, memory, communications and system calls

Microkernel Model

  • Microkernel reduces the nucleus to multiprograming, communications, synchranisation, etc..
  • The structure: Hardware, microkernel with processes communicating through the microkernel

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Exploring Core Components of Operating Systems
11 questions
Understanding Operating System Components Quiz
12 questions
Systemy Operacyjne - Główne cechy
125 questions

Systemy Operacyjne - Główne cechy

IntegratedGreenTourmaline avatar
IntegratedGreenTourmaline
Use Quizgecko on...
Browser
Browser