Notes on Lock Free Programming (Part 1)

With the advent of multi-core architectures, it is becoming increasingly important to build scalable data structures that support the basic operations (insert, search) without taking coarse grained locks. Coarse grained locks are usually taken on the entire data structure and prevent any other concurrent thread(s) from operating even on other disjoint/orthogonal parts of the data... Continue Reading →


Priority Queue Implementation in C

#include<stdio.h> typedef struct queue { int data; int priority; struct queue *next; } queue; queue *front; queue *rear; void init() { front = NULL; rear = NULL; } void enqueue(int x,int priority) { queue *new; new = (queue*)malloc(sizeof(queue)); new->data = x; new->priority = priority; new->next = NULL; if(front == NULL) { front = new; rear... Continue Reading →

Blog at

Up ↑

%d bloggers like this: