PPL Unit-4 notes

https://drive.google.com/file/d/1OvGDY6OIXLx8asrkLGyL-2VvQJzpfUUY/view?usp=sharing https://drive.google.com/file/d/1k8Ykm9lOLUXEZTjOmxcSEa7n6xgKxYhs/view?usp=sharing










The document, "ppl Unit 4 (1).pdf," covers fundamental concepts in concurrency and exception handling in programming languages. Concurrency involves the execution of multiple processes during a period of time and can occur at various levels, from machine instruction to program level. Concurrency can be categorized as physical (multiple independent processors) or logical (time-sharing a single processor to appear concurrent).

A key focus is on subprogram level concurrency, where a program unit called a task or process executes concurrently with others. The document details synchronization mechanisms like semaphores, which can manage both cooperation synchronization (task A waiting for task B) and competition synchronization (multiple tasks using a shared resource). It also introduces monitors and message passing (like Ada's rendezvous) as alternative synchronization methods. Finally, the document discusses exception handling in Ada, C++, and Java, which allows programs to trap and respond to unusual events.

Here are 5 key bullet points of the specific topics covered with a brief definition for each:
  • Concurrency: The execution of multiple processes during a period of time, occurring at levels such as machine instruction, statement, unit, or program.
  • Task/Process: A program unit that can be in concurrent execution with other program units (subprogram level concurrency).
  • Semaphores: A data structure consisting of a counter and a queue for storing task descriptors, used to implement synchronization (both cooperation and competition) by controlling the order in which tasks execute.
  • Rendezvous (Message Passing): The actual transmission of a message between two tasks, which occurs when both the sender and receiver are ready for the communication.
  • Exception Handling: The special processing required after detecting an unusual event (exception), typically involving a dedicated code unit called an exception handler.

Comments