Process, Threads and Synchronization - Algorithms and Problem SolvingAlgorithms and Problem Solving
This is a simple classical thread synchronization problem. Before moving to the solution I would like revise basic process, thread, and synchronization/concurrency concepts. Some of the figures in this article are taken from this Silberschatz OS book. Process Process is an execution stream in the context of a particular process state. By Execution Stream we mean a sequence of instructions executed sequentially i.e. only one thing happens at a time. By Process State we mean everything that can affect, or be affected by, the process: code, data, call stack, open files, network connections, etc. A process has a self-contained execution environment. A process generally has a complete, private set of basic run-time resources e.g. process has its own memory space. Process memory is divided into four sections as shown in Figure below: Text Section : contains compiled program code loaded when program is launched. Data Section : contains global and static variables,Read full article from Process, Threads and Synchronization - Algorithms and Problem SolvingAlgorithms and Problem Solving
No comments:
Post a Comment