Operating Systems and Systems Programming Review PDF

Document Details

RicherSatellite5098

Uploaded by RicherSatellite5098

Temple University

Tags

operating systems systems programming computer science programming

Summary

This document contains a review of topics in operating systems and systems programming. It covers various concepts such as processes, threads, interrupts, memory management, and scheduling. The document also discusses concurrency and synchronization.

Full Transcript

Topics for Review in Operating Systems and Systems Programming Processes What are processes ? Why processes are different than programs ? Processes implemented as virtualizations of the CPU The role of the PCB in virtualizing the CPU and a process PCB content Proc...

Topics for Review in Operating Systems and Systems Programming Processes What are processes ? Why processes are different than programs ? Processes implemented as virtualizations of the CPU The role of the PCB in virtualizing the CPU and a process PCB content Process creation Threads What are threads ? Thread creation The relationship between threads and processes The ways that threads differ from processes Types of threads Data structures used to define/manage threads Resource sharing among threads and processes User Level Threads vs Kernel Level Threads Use of Process and Threads in Applications Program Evaluation and Tracing Interrupts CPU Modes Busy-waiting I/O The mechanism for interrupt servicing Interrupt service routine Interrupt vector region and contents System calls vs TRAPs (supervisor calls) Direct Memory Access (DMA) CPU Scheduling Multiprogramming / multitasking Types of scheduling algorithms Main features of each scheduling algorithm and how they differ Evaluation of algorithms given process start and execution times Definition of performance metrics for algorithms Round-robin scheduling, multiple RR queues and how they are used Multi-level feedback queues and scheduling Process/thread execution states: Definition of each state and its purpose State transitions – what causes a transition from one state to another Context switch How does the mechanism work? What causes a context switch? How do interrupts play a role? Concurrency Atomicity: fine-grained atomic, course-grained atomic actions Change in ‘state’ of a multithreaded (or multi-process) program as instructions execute Influence of preemption Mutual exclusion vs synchronization Critical sections Locks What they provide Test_and_set instruction and compare_and_swap instruction; how they work Spin-lock and implementation Synchronization Consumer-producer problem Condition variables Mechanism & how it works Role of locks Signal() & wait() functions: block/wake-up MESA Implementation Semaphores Semaphore variable (data structure) Semaphore functions (P & V): block/wakeup & counting Details of the implementation Use as a synchronization tool Barriers Monitors Condition Variables in the Monitor (MESA) Hoare Implementation Memory Management What is Physical memory and how is it addressed? What is logical memory and how is it addressed? A CPU produces a logical address Static relocation Purpose? When is it used/can be used? Where is it performed and by whom? What is the result of static relocation? Dynamic relocation Why is it needed? When is it performed? Base/Limit Relocation How and why does it work Limitations Memory Management Unit (MMU) Dynamic Linking What is it and when do we use it How is it implemented Memory Fragmentation Meaning and types Non-Contiguous Memory Allocation Why do we need it? Alternate ways to address memory Approaches: Paging Segmentation Hybrid: segmentation/paging Paging Pages vs Frames Address components for use in paging Page / frame / offset Page Table & address translation How it changes view of logical memory space; physical memory space TLB (Translational Lookaside Buffer) Content TLB integrated with memory caching MMU with paging With & without TLB Memory Access Time with paging Memory protection: valid/invalid; where is it specified? Page Table Entry (PTE) contents Hierarchical Paging Address definitions with multiple components Two level paging Additional translation tables Paging the page table Effect on memory access time Inverted Page Table Segmentation What are segments? How are they different from pages? Dividing virtual space into segments What do virtual and physical addresses look like in segmentation? Advantages vs disadvantages Translation of segment to physical memory space What is contiguous in virtual space and in physical space? Paged Segmentation What do logical and physical addresses look like (their components)? What is in the segment table (i.e. a segment table entry)? What are the functions of the different translation tables? Paging the segment table: what is the interpretation of a page of segment table What is the final mapping to physical memory? ‘Cost’ of paged segmentation How is TLB used? Demand Paging What is it? Why do we want it? What do we need to implement demand paging? Page Fault Mechanism Overhead for servicing a page fault Instruction restart Effective memory access time Of process Of Page Tables Page Replacement Why do we need it? What features need to be added to the page table to support page replacement? Where are pages of a process stored? If pages are modified how are they replaced? Algorithms for Page Replacement FIFO Optimal LRU How does this differ from Optimal? implementations LRU approximations Why do we need them? Clock algorithms Second chance Page Buffering / Pools PTE information to support page replacement Resident Set Management Replacement Scope: Global, Local Allocation methods: fixed, variable Locality Working Set Concept Working Set strategy & algorithm Thrashing Memory Mapped Files An application of demand paging How is this related to demand paging? Fewer system calls for user I/O Reduce kernel overhead mmap() functions Shell Command line processing Redirection What is it and how is it implemented Pipes Dup & Dup2 File Descriptor implementation Process Table File Table File Systems File Directories Hierarchical directories Low level vs high level APIs? Difference between user view of files (and file data) and system view of files How do the features of disk storage and data transfer affect the system view of file access? FAT file system Organization of storage Logical directories Physical directory Low-Level Input Output Control Processor communication with devices Device controller Interrupts Polling Device Driver Function of top half Function of bottom half How I/O requests are handled by the OS Properties of disks What components or features affects the transfer of data Relationship between user data storage in programs vs storage and transfer with disks

Use Quizgecko on...
Browser
Browser