Understanding Processes and Process Management in Operating Systems
1. Introduction
A process is a running program. It should be understood as a program associated with an activity. A program is a list of instructions written in a file on disk (e.g., any executable program with the extension *.exe). When this program is executed, it is loaded into RAM, and the instructions are executed. Then we have a program plus activity, i.e., a process loaded into memory. We often use the terms ‘process’ and ‘task’ interchangeably. Example: Ctrl + Alt + Delete -> Task Manager
Read MoreMultithreading Benefits, Synchronization, and Deadlock Prevention
Multithreading Advantages
The USO (User Space Option/User System Option – define the acronym if known) provides several multithreaded benefits. Programs using multiple threads are faster than those implemented with multiple processes because thread creation, context switching, and disposal generate less overhead.
- Threads share the same address space, enabling quick and efficient communication.
- Threads within the same process can easily share resources like file descriptors, timers, and signals.
In client-
Read MoreAlgorithms: Prim’s, Kruskal’s, Dijkstra’s, Quick Sort, Merge Sort, Knapsack
Prim’s Algorithm
C Implementation
#include <stdio.h>
#include <limits.h>
#include <stdbool.h>
#define V 5 // Number of vertices
int findMinVertex(int key[], bool mstSet[]) {
int min = INT_MAX, minIndex;
for (int v = 0; v < V; v++)
if (!mstSet[v] && key[v] < min) {
min = key[v];
minIndex = v;
}
return minIndex;
}
void primMST(int graph[V][V]) {
int parent[V], key[V];
bool mstSet[V] = {false};
for (int Read More
Human Communication Data Conversion: A Deep Dive
Human Communication Data Conversion
Seven Steps of Data Conversion
- User enters data via hardware interface.
- Software/hardware converts data to digital format.
- Application services initiate data transfer.
- OSI layers encapsulate data (downstack).
- Encapsulated data is conveyed to destination.
- Destination OSI layers decapsulate data (upstack).
- Data is ready for processing.
Application Layer Software
Application layer software has two forms:
- Applications: Interact directly with users, providing an interface between
Stacks and Queues: Data Structures and Implementations
The activation record for the invoked function contains only a pointer to the previous stack frame and a return address. The previous stack frame pointer points to the stack frame of the invoking function, while the return address contains the location of the statement to be executed after the function terminates. Since only one function executes at any given time, the function whose stack frame is on top of the system stack is chosen. If this function invokes another function, the local variables,
Read MoreObject-Oriented Programming: Principles, Advantages & Development
Object-Oriented Programming (OOP)
A module is a group of components designed for a common purpose. These components may include types, variables, constants, procedures, functions, etc. A module encapsulates its components, allowing interface with other modules while exposing only necessary components (exported), hiding others. This is crucial for managing the complexity of modern software.
Software Complexity: Assembly language programs of past decades were hundreds of lines; today, high-level languages
Read More