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
  • Independent and collaborative processes
  • Critical section
  • Deadlock and starvation
  1. Interprocess communication

Concepts

PreviousIn LinuxNextPhilosopher dinner

Last updated 2 years ago

Independent and collaborative processes

In a multiprogrammed environment, two or more processes can be:

  • independent – if they, from their creation to their termination, never explicitly interact.

    • actually. there is an implicit interaction, as they compete for system resources.

    • ex: jobs in a batch system; processes from different users.

  • cooperative – if they share information or explicitly communicate.

    • the sharing requires a common address space.

    • communication can be done through a common address space or a communication channel connecting them.

Independent processes competing for a resource.

It is the responsibility of the OS to ensure the assignment of resources to processes is done in a controlled way, such that no information lost occurs.

In general, this imposes that only one process can use the resource at a time – mutual exclusive access.

Cooperative processes sharing information or communicating.

It is the responsibility of the processes to ensure that access to the shared area is done in a controlled way, such that no information lost occurs.

In general, this imposes that only one process can access the shared area at a time – mutual exclusive access.

The communication channel is typically a system resource, so processes compete for it.

Critical section

Having access to a resource or to a shared area actually means executing the code that does the access.

This section of code, if not properly protected, can result in race conditions.

  • which can result in lost of information.

  • It is called critical section.

Critical sections should execute in mutual exclusion.

Deadlock and starvation

Mutual exclusion in the access to a resource or shared area can result in:

  • deadlock – when two or more processes are waiting forever to access to their respective critical section, waiting for events that can be demonstrated will never happen.

    • operations are blocked.

  • starvation – when one or more processes compete for access to a critical section and, due to a conjunction of circumstances in which new processes that exceed them continually arise, access is successively deferred.

    • operations are continuously postponed.