GoConqr has a new look! Let us know what you think.

Flashcards

SCC 211 Operating Systems

Alex Stout English 108 cards

SCC 211 Operating Systems

Cards in this deck (108)

  1. 1—
  2. 2What does an Operating System do?Manages hardware and system resources
    Shares out and accounts for resources
    Offers secure environment for applications
    Provides common device or I/O system
  3. 3What does operating system abstraction help with?An environment that applications can operate on.
  4. 4What does hardware abstraction help with?Hide hardware differences from the operating system so OS can run on different machines.
  5. 5What to operating systems empahise on?- Long term reliability
    - Small footprint (no unneeded code, Shez)
    - Certification process for safety-critical systems
  6. 6What do Server Operating Systems emphasize on?- Fair share of resources
    - Reliability
  7. 7What do Desktop Operating Systems emphasize on?- Interactivity
    - GUI and graphics/media
  8. 8What are the Types of Operating Systems?Monolithic
    Microkernel
    Modular
    Exo-kernel
  9. 9Basics of Monolithic Operating System?All OS Code runs with Full privileges
    Difficult to impose security or protection
    Efficient call structure
    Difficult to maintain
    (Layered approach)
  10. 10Positives and Negatives of a layered OS approach?+ Impose tighter security as move from -
    hardware (Performance penalty per layer moved)
    - Hard to manage complex inter-layer calls
    (call down not up layers)
  11. 11Basics of Micro-Kernel Operating System?- Minimal amount of code has 'system' privileges
    - Components communicate by message passing
    - Extensible and have minimal system dependencies (Clean APIs)
  12. 12What does Linux and Windows NT base their operating systems off?Linux = Layered Microkernel
    Windows = Layered Monolithic
  13. 13Basics of a Modular Operating System?- Kernel loads modules as needed
    - Kernel modules run with elevated privileges
    - Naturally restricted to module API
  14. 14Basics of a Exo-kernel operating system?Kernel configures security at lowest level
    Libraries provide - addition security, os structure, and personallity
    - Applications more aware of hardware.
  15. 15What are 3 modes of an operating system?Real
    Protected
    Virtual
  16. 16Brief overview of "Real Mode"Initial state for x86 processors
    Ensures backward compatibility with early PC code
  17. 17Brief overview of "Protected Mode"Full access to x86 features: memory protection...
    No Access to bios functions
  18. 18Brief overview of "Virtual Mode"Emulates real mode while in virtual mode
    Traps anything not compatible with protected mode config.
  19. 19Where is the Operating System stored?ROM
    (Read Only Memoy)
  20. 20What is the first program to run on startup?BIOS
    (Basic Input/Output System)
  21. 21Who creates a BIOS and what does it offer?- Developed by Hardware supplier
    - Offers limited access to basic functions
    (Basic disk access, keyboard, and mouse, parallel and serial ports)
  22. 22What does the BIOS contain?Basic Drivers for hardware on motherboard.
    - Provides lowest level of hardware abstraction
    - For common devices and OS specific.
  23. 23Steps of BIOS startup- Performs Power on Self Test (POST)
    - Finds populated memoy areas
    - Checks basic devices
    - initial device discovery (ISA and PCI)
    - Detemines list of boot drives
  24. 24What is the MBR on a disk?Master Boot Record
  25. 25What happens on a BIOS based boot?- Reads first sector of boot disk (MBR)
    - Copies boot code to clear memory area
    - Initial OS code machine dependent (Initialises stack, calls kernel main function)
  26. 26What are Multi-stage/chain boot loaders?Commonly agreed way of passing basic host configuration data to OS
    (Conforms to multiboot spec)
  27. 27Name 2 Multi-Stage/Chain Boot loadersGNU GRUB
    BootMgr/WinLoad
  28. 28Stages of Multi-Stage/Chain boot loaders?1 - Degined to fit within free space in disk boot block
    2 - Detemines main host config, loads and starts OS
    (Abstracts boot process)
  29. 294 Sections of address space?Stack
    Heap
    Data
    Code
  30. 30What are two types of I/O?Memory Mapped
    Isolated I/O
  31. 31What is Memory Mapped I/O?Devices visible as noemal memory locations
    (Easily accessed using C Pointers)
  32. 32What is Isolated I/O?Seperate bus for I/O devices
    - easier interfacing, distinct from high-speed memory bus
    - accessed via special instructions
  33. 33What is Synchronous I/O?Act of Polling or Busy Waiting
    Spins waiting for change
    (wasteful)
  34. 34What is Asynchronous I/O?Interrupt Driven
    No waiting for I/O input
    (Interrupts are prioritied)
  35. 35What does ISR Stand for?Interrupt Service Routine
  36. 36Steps in a basic ISRPush all registers (save state)
    call c_handler
    popall (handle interrupt)
    iret (restart main program)
  37. 37What happens when using 1 interrupt line?No idea what generated an interrupt
    Must poll each device to ask what made the interrupt. along with data ready/state change
  38. 38What does using Multiple interrupt lines solve?Narrows search when subsequently polling
    Groups similar devices
    More support on processor
  39. 39What does the Pushall instruction do?Push all general registers to the stack
  40. 40What generates interrupts?The device attatched to the wire/line
    (Message based)
    Software (bu executing special interrupts)
    Exceptions (generated in response to internal processor problem)
  41. 41Types of x86 ExceptionsFault (significant event)
    Trap (Minor event requring, no remedial)
    Abort (Unrecoverable)
    (some store error codes)
  42. 42What can Programmable Interrupt Controllers do?Processor can't have seperate wire to every device
    Give priority to most important devices
    (orders interrupts)
  43. 43What are Precise and Imprecise Exceptions?Precise - Current instructions complete execution, ISR Called
    Imprecise - ISR called
    Deeply pipelined function not fully complete.
    Hard to recover from unknown state.
  44. 44What does a PIT do?Creates periodic event at set/configurable interval
    Used to invoke periodic kernel tasks
  45. 45What could happen if a Programmable Interrupt Timers frequency is too low or too high?Low: kernel can seem unresponsive
    High: OS Spends too much time servicing timer
  46. 46What does a typical I/O device contain?Circular buffer for input and output
    Status register, Control Register
    (Device ready, data available flags)
  47. 47What is an alternative to programmed I/O?Direct Memory Access
  48. 48What are device drivers?Defined interface to an I/O system
    Loadable modules allow run-time changes
    Must be re-entrant
    (can be called again before previous request serviced)
  49. 49What are device driver tasks?- I/O Scheduling
    - Buffering, Spooling and caching
    - Error Handling
    - I/O Protection
  50. 50Example of Single and Multi instance devices?Single: Printers
    (Devices that can only be used by one procss)
    Multi:
    Handle requests from multiple sources
  51. 51What happens at PCI initialisation and Addressing?Scan PCI bus hierarchy
    (Establish device type,
    Whether multi-function device,
    Resource requirements, Allocate and set I/O address and interrupt used)
  52. 52What is base and Limit?A way to enforce memory protection
    - Base bottom, limit top
  53. 53What does the Relocation Register allow?To find the physical address from a logical address
  54. 54Segments of MemoryStack
    Code
    Data
    Heap
    Shared libraries
    Shared Data
  55. 55Three types of Dynamic Storage AllocationFirst fit
    Best fit
    Worst fit
  56. 56What type of fragmentation occurs when using Variable/Dynamic allocation?External Fragmentation
    (space left outside/between allocated memoy)
  57. 57What type of fragementation occurs when using Fixed size schemes?Internal Fragmentation
    (Processes typically get more memory than requested)
  58. 58What is paging?Memory management technique, divided into fixed sized pages. When a program needs a page, it is avaliable in MM, as the OS copies a number of pages from SM to MM.
  59. 59What does paging allow?Physical address space of a process to be noncontiguous
  60. 60What does paging assure?Operating system will never run out of memory.
    (By storing pages of memory to a hard-disk)
  61. 61What does a page table map?Page numbers to frames
  62. 62Page tables in registers vs MemoryRegisters: Fast but limited capacity
    Memory: Capacity limited by memory, slow access time
    (Hybrid, maintain a cache of page to frame translation)
  63. 63How can we solve problems with page table sizes?Hierarchical / Multi-level paging
    (Top level becomes a Directory pointint to other page tables)
    [page1][page2][offset]
  64. 64What do inverted page tables allow?One table used for all processes
    page table has one entry for each frame
  65. 65What happens if a process tries to access a memory location not mapped in its page tables?PAGE FAULT exception
    (kernel page fault handler called)
  66. 66What is demand paging?Pages are un-allocated until data is requested on startup. Once a page fault occurs memory is loaded as needed.
  67. 67What happens if a page table entry isn't present in RAM?Present flag determines if frame is valid.
  68. 68Steps of Frame Replacement- Take page fault
    - if free/empty space available in memoy (select) else (identify victim frame)
    - Write/swap out frame
    - read requested page into frame
    - restart process
  69. 69What does the Dirt Flag determine?if not dirty, no need to write to disk.
    Disk copy will have same content.
  70. 70Two ways to speed-up replacing framesKeep at least one free page
    keep write queue of likely victim pages
  71. 71Algorithms to replace frames?First-In First-Out (FIFO)
    Least Recently Used (LRU)
  72. 72Why is FIFO bad?First pages likely to hold key parts of process
    (libraries, globals...)
  73. 73How can we determine a pages access frequency?Accessed flag
  74. 74What is thrashing in the context of paging?Process is allocated too few frames
    - high number of page faults
    - CPU util spends time swapping pages
  75. 75How can we limit thrashing?Using Local replacement algorithm
    (Process cannot take frames from another)
    Thrashing can't extend to other processes
  76. 76Why would we need Non Page Based Allocation?- Can't allocated whole page for every request.
    - Sometimes need memory area larger than one page (maybe contiguous)
    (allocated pages as group then allocate group)
  77. 77Idea of buddy allocation?A memoy block can be split into two
    (Two buddies)
    They can be recombined reforming original larger block
  78. 783 Types of SystemsBatch
    Real-time
    Interactive
  79. 79Characteristics of Batch SystemsNon preemptive (no interrupts)
    Scheduling Policies:
    First come first served
    Shortest job first
  80. 80Types of Characterising processesCPU Bound
    (Process spends most time with data)
    I/O Bound
    (Process spend most time waiting for data)
  81. 81Types of real time processesSoft Real-Time
    Hard Real-Time
  82. 82How is Real-Time scheduling driven?Periodic events - predictable
    Aperiodic events - unpredictable
  83. 83Characteristics of Real-Time SchedulingRate Monotonic
    - Static scheduling policy
    - Schedule for worst case
    Earliest Deadline First
    - Dynamic
  84. 84Characteristics of Interactive SystemsMulti-tasking
    (Cooperative, pre-emptive)
  85. 85What is pre-emptive scheduling?Scheduler forces context switch at defined interval
    Quantum defines how long processes run
  86. 86What is round robin scheduling?P0 -> P1 -> P2 -> P3
    <-------------------------
    P0 -> P1 -> P2 -> P3
  87. 87What does a dispatcher do?Given a scheduled task, performs a context switch to this task
  88. 88What types of access are there in file systems?Read, write, execute, append, delete, list
  89. 89How can we share files in a file system?Multiple directories can point to the same files
  90. 90What does the virtual file system hide?Multiple file-systems
    File-system differences
    Networked file systems
  91. 91Ways to allocate space for filesContiguously
    Linked-lists
    Indexed
  92. 92Benefits of contiguous allocation?- Each file fills set of adjacent blocks in file system
    - Fast access
  93. 93Disadvantages of contiguous allocation?- Need to know file size before finding gap for file
    - Suffers from external fragmentation
  94. 94Advantages and disadvantages of linked-list allocation?+ Avoids external fragmentation problem
    - Suffers with long access times (only sequential)
  95. 95Advantages of Indexed allocationDedicated index blocks
    (Quick access to any position)
    Can support holes
  96. 96What is Combined Allocation?First entries in index blocks are data blocks
    last entry is a 2nd level pointer to an index
  97. 97What is a hard link?A way for the system to think that a file actually exists in that location using a junction point. (Modifying junction also modifies the original)
    (can't point to directories (avoids loops))
  98. 98What is a symbolic link?A file containing the path to a linked file.
    Ability to place a folder which is actually a link to another location on the system.
    (Similar to a shortcut)
    (Can refer to delete files)
  99. 99How do kernel tables speed up access?Maintains a cache of recently used inodes
    (active inode question)
  100. 100What does buffering allow?Decoupled byte and block reads
    Caching of blocks to reduce disk activity
    read-ahead to speedup access
  101. 101Why do we need to perform Flush/Synchronize in a file system?- Protect against lost data in event of failure
    - speed up reuse of LRU buffers
    (Uses dirty flag track updates)
  102. 102What is POSIX File locking?a way to coordinate unrelated applications
    - Shared lock
    - Exclusive lock
  103. 103How can large files be suited with block fragmentation?Larger files can be allocated fragments of blocks, 4x 1k fragments = a single 4K disk block
    (blocks must be a multiple of disk sector size)
  104. 104What are problems with Variable size regions?Suffers external fragmentation
  105. 105Three ways to allocate dynamicallyFirst fit,
    Best fit,
    Worst fit.
  106. 1065 Scheduling CriteriaCPU Utilisation
    Throughput
    Turnaround time
    Waiting time
    Response time
  107. 107How is the average wait time for processes worked out?Dispatch - Arrival time
  108. 108How is the average turnaround time for processes worked out?Completion - Arrival time

Information

Description
Flashcards on SCC 211 Operating Systems, created by Alex Stout on 13/05/2017.
Created by
Alex Stout
Views
6
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?