0% found this document useful (0 votes)
3 views2 pages

Process Management and Synchronization Guide

The document outlines key concepts related to processes and threading in operating systems, including process states, scheduling, interprocess communication, and synchronization. It discusses various threading models, libraries, and issues, emphasizing the importance of managing shared resources and avoiding race conditions. Additionally, it covers critical-section problems and solutions such as Peterson’s algorithm and mutex locks.

Uploaded by

revanthlanka123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Process Management and Synchronization Guide

The document outlines key concepts related to processes and threading in operating systems, including process states, scheduling, interprocess communication, and synchronization. It discusses various threading models, libraries, and issues, emphasizing the importance of managing shared resources and avoiding race conditions. Additionally, it covers critical-section problems and solutions such as Peterson’s algorithm and mutex locks.

Uploaded by

revanthlanka123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIT 2 – CT2 Notes

1. Process Concept
A process is a program in execution. It has a program counter, stack, data section, and resources.
Represented by PCB (Process Control Block) which stores process ID, state, registers, scheduling
info.
States: New, Ready, Running, Waiting, Terminated.
2. Process Scheduling
Scheduling decides execution order of processes.
- Long-term: Controls multiprogramming level.
- Medium-term: Suspends/resumes processes.
- Short-term: Chooses process for CPU.
Algorithms: FCFS, SJF, Priority, Round Robin.
3. Operations on Processes
Process creation using fork() or CreateProcess(), termination when process finishes or is killed.
Parent-child relationships; parent can wait for child.
4. Interprocess Communication (IPC)
Exchange of data between processes.
- Message Passing: send() and receive()
- Shared Memory: Processes share memory for communication.
5. Communication in Client–Server Systems
Client requests services, server responds. Uses sockets, RPC, pipes.
6. Threads
Thread is a lightweight process; shares memory but has its own stack.
Improves concurrency and responsiveness.
7. Multicore Programming
Programs use multiple CPU cores for parallelism. Needs synchronization.
8. Multithreading Models
- Many-to-One: Many user threads → one kernel thread.
- One-to-One: Each user thread → one kernel thread.
- Many-to-Many: Many user threads → many kernel threads.
9. Thread Libraries
APIs for thread creation & management. Examples: Pthreads, Java Threads, Windows Threads.
10. Implicit Threading
Threads managed by compiler/runtime. Examples: Thread Pools, OpenMP, Fork-Join.
11. Threading Issues
Thread cancellation, signal handling, fork/join issues.
12. Process Synchronization
Controls access to shared data; avoids race conditions.
13. Critical-Section Problem
Critical section is where shared resources accessed.
Solution must ensure mutual exclusion, progress, bounded waiting.
14. Peterson’s Solution
Software algorithm for 2 processes using flag[] and turn variables. Avoids busy waiting.
15. Synchronization Hardware
Hardware instructions Test-and-Set, Swap provide atomic operations.
16. Mutex Locks
A mutex is a lock for mutual exclusion. acquire() and release() functions.

You might also like