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

Flashcards

Sistemas Operativos

Enderson Gonzalo Diaz Munoz Spanish 76 cards

Storage-Device Hierarchy

Cards in this deck (76)

  1. 1What is an Operating System?A program that acts as an intermediary between a user of a computer and the computer hardware
  2. 2Computer system can be divided into four components:Hardware
    Operating System
    Application programs
    Users
  3. 3The one program running at all times on the computer” is the kernel. Everything else is eitherA system program (ships with the operating system) , or
    an application program.
  4. 4What is caching?copying information into faster storage system; main memory can be viewed as a cache for secondary storage
  5. 5Storage-Device HierarchyStorage-Device Hierarchy
  6. 6Asymmetric Multiprocessingeach processor is assigned a specie task.
  7. 7Symmetric Multiprocessingeach processor performs all tasks
  8. 8features of Clustered SystemsUsually sharing storage via a storage-area network (SAN)
    Provides a high-availability service which survives failures
    Asymmetric clustering has one machine in hot-standby mode
    Symmetric clustering has multiple nodes running applications, monitoring each other
    Some clusters are for high-performance computing (HPC)
    Some have distributed lock manager (DLM) to avoid conflicting operations
  9. 9Multiprogramming (Batch system)Needed for efficiency
    Single user cannot keep CPU and I/O devices busy at all times
    Multiprogramming organizes jobs (code and data) so CPU always has one to execute
    One job selected and run via job scheduling
  10. 10Timesharing (multitasking)is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing
    Response time should be < 1 second
    If processes don’t fit in memory, swapping moves them in and out to run
    If several jobs ready to run at the same time → CPU scheduling
  11. 11Mode bitProvided by hardware
    Provides ability to distinguish when system is running user code or kernel code
    Some instructions designated as privileged, only executable in kernel mode
  12. 12What is a process?A process is a program in execution. It is a unit of work within the system. Program is a passive entity, process is an active entity.
  13. 13Responabilities of the operative SystemCreating and deleting both user and system processes
    Suspending and resuming processes
    Providing mechanisms for process synchronization
    Providing mechanisms for process communication
    Providing mechanisms for deadlock handling
  14. 14Memory Management activitiesKeeping track of which parts of memory are currently being used and by whom
    Deciding which processes (or parts thereof) and data to move into and out of memory
    Allocating and deallocating memory space as needed
  15. 15Storage ManagementCreating and deleting files and directories
    Primitives to manipulate files and directories
    Mapping files onto secondary storage
    Backup files onto stable (non-volatile) storage media
  16. 16I/O Subsystem responsabilitiesMemory management of I/O including buffering (storing data temporarily while it is being transferred), caching (storing parts of data in faster storage for performance), spooling (the overlapping of output of one job with input of other jobs)
    General device-driver interface
    Drivers for specific hardware devices
  17. 17Network is a communications path, TCP/IP most common:Local Area Network (LAN)
    Wide Area Network (WAN)
    Metropolitan Area Network (MAN)
    Personal Area Network (PAN)
  18. 18What is P2PPeer to Peer
    P2P does not distinguish clients and servers
    Instead all nodes are considered peers
    May each act as client, server or both
    Node must join P2P network
  19. 19One set of operating-system services provides functions that are helpful to the user:One set of operating-system services provides functions that are helpful to the user:
  20. 20What is CLICommand Line Interface
    Windows: command
    Apple: Aqua
    Linux: CDE,KDE,GNOME
  21. 21Three comon APIsWin32 API for Windows
    POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X)
    Java API for the Java virtual machine (JVM)
  22. 22Methods used to pass parameters to the OSSimplest: pass the parameters in registers
    Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register
    Parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating system
  23. 23What is fork() used for?Shell executes fork() system call to create process
  24. 24What is exec() used for?Shell executes exec() to load program into process
  25. 25System programs provide a convenient environment for program development and execution. They can be divided into:File manipulation
    Status information sometimes stored in a File modification
    Programming language support
    Program loading and execution
    Communications
    Background services
    Application programs
  26. 26User goals and System goalsUser goals – operating system should be convenient to use, easy to learn, reliable, safe, and fast
    System goals – operating system should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient
  27. 27What is a System Call?They are mechanism whereby a program ask to the SO for low level tasks, also known as privileged tasks.
    An API is a set of functions that facilitate to the programmers doing applications, covering the low level tasks and giving them a made up interface.
  28. 28Policiy and MechanismMechanism determine how to do something
    Policies determine what will be done.
  29. 29What is a linker?Source files are compiled into object files that are designed to be loaded into any physical memory location, a format known as an relocatable object fil . Next, the linker combines these relocatable object files into a single binary executable file.
  30. 30What is a Loader?A loader is used to load the binary executable file into memory, Operative Systems often load the libraries at the same time they are loading the program in order not to link and load libraries that may end up not being used.
  31. 31Simple Operative System StructureMonolithic Structure
    The simplest structure for organizing an operating system is no structure at all. That is, place all of the functionality of the kernel into a single, static binary file that runs in a single address space.
  32. 32Layered Approach System StructureThe operating system is divided into a number of layers (levels), each built on top of lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the user interface.
  33. 33MicrokernelIt consists in separate some of the kernel´s functions, putting them in the user mode in order to make the kernel compact and smaller.
    Its principal issue is the communication among services, since the OS has to switch from one process to the next to exchange the messages.
  34. 34ModulesThe best current methodology for operating-system design involves using loadable kernel modules (LKMs). Here, the kernel has a set of core components and can link in additional services via modules, either at boot time or during run time.
  35. 35What is a Core Dump and a Crash DumpCore Dump: A capture of the memory of the process
    Crash Dump: A capture of the memory of the kenel
  36. 36What is a CrashAn error in kernel's runtime, the information about the error is saved in a log file
  37. 37Parts of a processThe program code, also called text section
    Current activity including program counter, processor registers
    Stack containing temporary data
    Function parameters, return addresses, local variables
    Data section containing global variables
    Heap containing memory dynamically allocated during run time
  38. 38Diagram of Process StateDiagram of Process State
  39. 39What is PCBInformation associated with each process
    (also called task control block)
    Process state – running, waiting, etc
    Program counter – location of instruction to next execute
    CPU registers – contents of all process-centric registers
    CPU scheduling information- priorities, scheduling queue pointers
    Memory-management information – memory allocated to the process
    Accounting information – CPU used, clock time elapsed since start, time limits
    I/O status information – I/O devices allocated to process, list of open files
  40. 40Scheduling queues (3)Job queue – set of all processes in the system
    Ready queue – set of all processes residing in main memory, ready and waiting to execute
    Device queues – set of processes waiting for an I/O device
  41. 41Short-term schedulerCPU scheduler
    Short-term scheduler is invoked frequently (milliseconds)  (must be fast)
  42. 42Long-term scheduler(job scheduler) – selects which processes should be brought into the ready queue
    Long-term scheduler is invoked infrequently (seconds, minutes)  (may be slow)
  43. 43(1)I/O-bound process (2)CPU-bound process(1)more I/O than CPU
    (2)More CPU than I/O
  44. 44SwappingRemove process from memory, store on disk, bring back in from disk to continue execution
  45. 45Context SwitchWhen CPU switches to another process, the system must save the state of the old process and load the saved state for the new process via a context switch
  46. 46Parent and childrenThey form a tree of processes identified dentified and managed via a process identifier (pid)
  47. 47Process terminationReturns status data from child to parent (via wait())
    Process’ resources are deallocated by operating system
  48. 48cascading termination.All children, grandchildren, etc. are terminated.
  49. 491) Zombie Process 2)Orphan Process1) No parent waiting
    2) Parent terminated without invoking wait()
  50. 50(1)Independent Processes (2)Cooperating ProcessesIndependent process cannot affect or be affected by the execution of another process
    Cooperating process can affect or be affected by the execution of another process
    (1) need Interprocess Communication (IPC)
    Two models of IPC:
    Shared memory
    Message passing
  51. 51send() receive()send (P, message) – send a message to process P
    receive(Q, message) – receive a message from process Q
    all of this through a link, directed and received from PORTS (mailbox)
  52. 52Synchronization (1)Blocking (2)Non-Blocking(1)synchronous
    Blocking send
    Blocking receive
    (2)asynchronous
    Non-Blocking send
    Non-Blocking receive
  53. 53Three ways of implementing buffering1. Zero capacity – no messages are queued on a link. Sender must wait for receiver (rendezvous)
    2. Bounded capacity – finite length of n messages. Sender must wait if link full
    3. Unbounded capacity – infinite length Sender never waits
  54. 54Communication between server and clientCommunication between server and client
  55. 55SocketA socket is defined as an endpoint for communication
    Concatenation of IP address and port – a number included at start of message packet to differentiate network services on a host
  56. 56RPCRemote procedure call (RPC) abstracts procedure calls between processes on networked systems
  57. 57Pipes and Named PipesActs as a conduit allowing two processes to communicate
    Named Pipes are more powerful than ordinary pipes
    Communication is bidirectional
    No parent-child relationship is necessary between the communicating processes
  58. 58MultithreadingResponsiveness – may allow continued execution if part of process is blocked, especially important for user interfaces
    Resource Sharing – threads share resources of process, easier than shared memory or message passing
    Economy – cheaper than process creation, thread switching lower overhead than context switching
    Scalability – process can take advantage of multicore architectures
  59. 59(1)Parallelism (2)Concurrency(1)implies a system can perform more than one task simultaneously
    (2) supports more than one task making progress
    Single processor / core, scheduler providing concurrency
  60. 60Data and Task ParallelismData and Task Parallelism
  61. 61Multithreading ModelsMany-to-One
    One-to-One
    Many-to-Many
    (User Thread → Kernel Thread)
  62. 62Categories of system callsCategories of system calls
  63. 63Implicit ThreadingFive methods explored
    Thread Pools
    Fork-Join
    OpenMP
    Grand Central Dispatch
    Intel Threading Building Blocks
  64. 64Thread PoolsCreate a number of threads in a pool where they await work
  65. 65Fork-Join ParallelismMultiple threads (tasks) are forked, and then joined.
  66. 66OpenMpIdentifies parallel regions – blocks of code that can run in parallel
  67. 67Grand Central DispatchAllows identification of parallel sections of code, then it puts into blocks.
    Blocks placed in dispatch queue
    Assigned to available thread in thread pool when removed from queue
  68. 68Intel Threading Building Blocks (TBB)Template library for designing parallel C++ programs
  69. 69Signal and signal handlingsSignals are used in UNIX systems to notify a process that a particular event has occurred.
    A signal handler is used to process signals
    Signal is generated by particular event
    Signal is delivered to a process
    Signal is handled by one of two signal handlers:
    default
    user-defined
  70. 70Thread CancellationThread to be canceled is target thread
    Two general approaches:
    Asynchronous cancellation terminates the target thread immediately
    Deferred cancellation allows the target thread to periodically check if it should be cancelled
  71. 71Scheduler ActivationsTypically use an intermediate data structure between user and kernel threads – lightweight process (LWP)
    Appears to be a virtual processor on which process can schedule user thread to run
    Each LWP attached to kernel thread
  72. 72Context of threadThe register set, stacks, and private storage area are known as the context of the thread
  73. 73Threads Data StructuresThreads Data Structures
  74. 74Critical Section ProblemEach process has critical section segment of code
    Process may be changing common variables, updating table, writing file, etc
    When one process in critical section, no other may be in its critical section
  75. 75Synchronization HardwareMany systems provide hardware support for implementing the critical section code.
    All solutions based on idea of locking
    Protecting critical regions via locks
  76. 76Mutex LockProtect a critical section by first acquire() a lock then release() the lock
    Boolean variable indicating if lock is available or not

Information

Description
Flashcards on Sistemas Operativos, created by Enderson Gonzalo Diaz Munoz on 29/09/2018.
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?