Please enable JavaScript.
Coggle requires JavaScript to display documents.
Process Description and Control - Coggle Diagram
Process Description and Control
A process is a running instance of a program, with its own memory space, state, and allocated resources.
It is the basic execution unit of an operating system
Main elements
Memory space
Includes process code, data, stack, and heap.
Each process has its own address space.
Status of the process
Ready:
Prepared to run.
Running:
in use by the CPU.
Waiting:
stopped until an event occurs.
Completed:
has completed its execution.
Process Identifier (PID):
unique number assigned by the operating system.
Process context:
information stored to suspend or resume the process (registers, program counter, CPU state).
Process scheduling:
decides which process uses the CPU, seeking efficiency and fairness.
Resources allocated:
memory, CPU, I/O, files, permissions.
Inter-process communication (IPC):
information exchange and synchronization for coordination.
Process Control
Process control allows the operating system to manage the creation, execution, synchronization, and termination of processes.
Main functions
Creation and completion
Termination: When the process ends or stops, the OS releases the resources
Creation: When an application starts, a new process is created.
Process Planning
Select which process runs and in what order
Use algorithms (by priority, time-sharing, FIFO, etc.)
Context change
Save the current process state and load the next one
Enables multitasking and efficient CPU usage
Synchronization
Ensures cooperation between concurrent processes
Mechanisms: semaphores, mutexes, monitors, condition variables
Inter-process Communication (IPC)
Allows data exchange via pipes, message queues, shared memory, or signals
Priority and Resource Control
The operating system allocates resources and prevents blocking or starvation.
Manage execution priorities to optimize performance
Operating system execution
Describe how the OS starts, manages, and terminates its operations during system operation.
Main stages
System startup (boot):
The firmware or boot manager loads the kernel into memory
Hardware and Driver Initialization:
Detection and configuration of CPU, memory, I/O, and peripherals
Process Loading and Execution:
System processes and user applications are started. Resources are allocated as needed.
Interrupt Management:
The OS responds to events (I/O, errors, signals) by suspending or resuming processes
Resource and service management:
Controls CPU, memory, network, files, security, and users.
System Termination:
Resources are released, processes are closed, and the system is shut down in an orderly manner
Multithreading Processes
Characteristics
Threads: concurrent units of execution within the same process.
Execution context: each thread has its own stack and CPU registers.
Synchronization: coordination using semaphores, mutexes, or condition variables to avoid conflicts.
Communication: direct data exchange, since they share memory.
Advantages:
Greater efficiency and performance.
Lower cost of context creation and switching.
Better utilization of multi-core systems.
Disadvantages:
Risk of race conditions and deadlocks.
An error in one thread can affect the entire process.
Applications
Used in web servers, video games, real-time systems, and concurrent applications.