Notes - MIECT
Sistemas De Operação
Notes - MIECT
Sistemas De Operação
  • Sistemas de Operação
  • Processes in Unix/Linux
    • Process
    • Multiprocessing vs. Multiprogramming
    • Processes in Unix
    • Execution of a C/C++ program
  • Introduction to operating systems
    • Global view
    • Evolution of computational systems
    • Key topics
  • Semaphores and Shared memory
    • Concepts
    • Semaphores
    • Shared memory
    • Unix IPC primitives
  • Threads, mutexes and condition variables in Unix/Linux
    • Threads
      • In linux
    • Monitors
    • Unix IPC primitives
  • Processes
    • Process
      • Diagrams
    • Process control table
    • Context switching
    • Threads
  • Processor Scheduling
    • Processor Scheduler
    • Short-term processor scheduler
    • Scheduling algorithms
    • Scheduling criteria
    • Priorities
    • Scheduling policies
      • In Linux
  • Interprocess communication
    • Concepts
    • Philosopher dinner
    • Access primitives
      • Software solutions
      • Hardware solutions
    • Semaphores
    • Monitors
    • Message-passing
    • Unix IPC primitives
  • Deadlock
    • Introduction
    • Philosopher dinner - Solution 1
      • Deadlock prevention
    • Philosopher dinner - Solution 2
      • Deadlock prevention
    • Philosopher dinner - Solution 3
      • Deadlock prevention
    • Philosopher dinner - Solution 4
    • Deadlock avoidance
    • Deadlock detection
  • Memory management
    • Introduction
    • Address space
    • Contiguous memory allocation
    • Memory partitioning
    • Virtual memory system
    • Paging
    • Segmentation
    • Combining segmentation and paging
    • Page replacement
      • Policies
    • Working set
    • Thrashing
    • Demand paging vs. preparing
Powered by GitBook
On this page
  • Access to a resource or to a shared area
  • Producer-consumer example
  • Producer
  • Consumer
  • Requirements
  • Types of solutions
  1. Interprocess communication

Access primitives

PreviousPhilosopher dinnerNextSoftware solutions

Last updated 2 years ago

Access to a resource or to a shared area

Producer-consumer example

Producer

Consumer

Requirements

Requirements that should be observed in accessing a critical section:

  • Effective mutual exclusion – access to the critical sections associated with the same resource, or shared area, can only be allowed to one process at a time, among all processes that compete for access.

  • Independence on the number of intervening processes or on their relative speed of execution.

  • A process outside its critical section cannot prevent another process from entering its own critical section.

  • No starvation – a process requiring access to its critical section should not have to wait indefinitely.

  • Length of stay inside a critical section should be necessarily finite.

Types of solutions

In general, a memory location is used to control access to the critical section.

  • it works as a binary flag.

Two types of solutions: software solutions and hardware solutions.

  • software solutions – solutions that are based on the typical instructions used to access memory location.

    • read and write are done by different instructions.

    • interruption can occur between read and write.

  • hardware solutions – solutions that are based on special instructions to access the memory location.

    • these instructions allow to read and then write a memory location in an atomic (uninterruptible) way.