A Lightweight Semaphore for Linux

Similar documents
Using IPC: semaphores Interprocess communication using semaphores. Lecturer: Erick Fredj

CSPP System V IPC 1. System V IPC. Unix Systems Programming CSPP 51081

Lecture 18. Log into Linux. Copy two subdirectories in /home/hwang/cs375/lecture18/ $ cp r /home/hwang/cs375/lecture18/*.

COP 4604 UNIX System Programming IPC. Dr. Sam Hsu Computer Science & Engineering Florida Atlantic University

CS 385 Operating Systems Fall 2011 Homework Assignment 5 Process Synchronization and Communications

UNIX IPC. Unix Semaphore Unix Message queue

Interprocess Communication. Originally multiple approaches Today more standard some differences between distributions still exist

CS 385 Operating Systems Fall 2013 Homework Assignment 2 Inter-Process Communications and Synchronization

Concurrent Servers. Overview. In our current assignment we have the following changes:

CS 385 Operating Systems Spring 2013 Homework Assignment 2 Third Draft Inter-Process Communications and Synchronization

Systems Programming/ C and UNIX

Unix Inter-process Communication

EMERALDS: a small-memory real-time microkernel

INTER-PROCESS COMMUNICATION. UNIX Programming 2015 Fall by Euiseong Seo

OPERATING SYSTEMS 3rd Homework

CL020 - Advanced Linux and UNIX Programming

Thin Locks: Featherweight Synchronization for Java

PRACTICAL NO : 1. AIM: To study various file management system calls in UNIX.

Operating Systems. VI. Threads. Eurecom. Processes and Threads Multithreading Models

Agenda Process Concept Process Scheduling Operations on Processes Interprocess Communication 3.2

UNIT 7 INTERPROCESS COMMUNICATION

Concurrency, Thread. Dongkun Shin, SKKU

CS333 Intro to Operating Systems. Jonathan Walpole

Deterministic Futexes Revisited

#include <sys/types.h> #include <sys/wait.h> pid_t wait(int *stat_loc); pid_t waitpid(pid_t pid, int *stat_loc, int options);

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

CSCI 4061: Inter-Process Communication

2 Threads vs. Processes

Operating Systems, Assignment 2 Threads and Synchronization

518 Lecture Notes Week 3

EECS 482 Introduction to Operating Systems

Message Queues, Semaphores, Shared Memory

Threads. What is a thread? Motivation. Single and Multithreaded Processes. Benefits

PROCESS MANAGEMENT Operating Systems Design Euiseong Seo

CROWDMARK. Examination Midterm. Spring 2017 CS 350. Closed Book. Page 1 of 30. University of Waterloo CS350 Midterm Examination.

Computer Science & Engineering Department I. I. T. Kharagpur. Operating System: CS rd Year CSE: 5th Semester (Autumn ) Lecture XI

Threads. Still Chapter 2 (Based on Silberchatz s text and Nachos Roadmap.) 3/9/2003 B.Ramamurthy 1

Embedded System Curriculum

Threads. studykorner.org

Locks. Dongkun Shin, SKKU

Threads. lightweight processes

CS 333 Introduction to Operating Systems. Class 3 Threads & Concurrency. Jonathan Walpole Computer Science Portland State University

Interprocess Communication. Bosky Agarwal CS 518

Outline. CS4254 Computer Network Architecture and Programming. Introduction 2/4. Introduction 1/4. Dr. Ayman A. Abdel-Hamid.

pthreads CS449 Fall 2017

Overview. This Lecture. Interrupts and exceptions Source: ULK ch 4, ELDD ch1, ch2 & ch4. COSC440 Lecture 3: Interrupts 1

Resource Access Control (2) Real-Time and Embedded Systems (M) Lecture 14

Overview. Thread Packages. Threads The Thread Model (1) The Thread Model (2) The Thread Model (3) Thread Usage (1)

EPL372 Lab Exercise 2: Threads and pthreads. Εργαστήριο 2. Πέτρος Παναγή

ADVANCED OPERATING SYSTEMS

Last class: Today: Thread Background. Thread Systems

Last Class: Synchronization

Lecture 13 Condition Variables

Contents. 1.1 What Operating Systems Do Computer-System Organization Computer-System Architecture 12. Operating-System Structures

Resource management. Real-Time Systems. Resource management. Resource management

VEOS high level design. Revision 2.1 NEC

CSE 153 Design of Operating Systems Fall 2018

Multithreaded Programming

COMP 2355 Introduction to Systems Programming

Introduction to PThreads and Basic Synchronization

Synchronization and Semaphores. Copyright : University of Illinois CS 241 Staff 1

Comp 310 Computer Systems and Organization

Subject: Operating System (BTCOC403) Class: S.Y.B.Tech. (Computer Engineering)

CSE 451 Midterm 1. Name:

Threads, SMP, and Microkernels

EE458 - Embedded Systems Lecture 8 Semaphores

OPERATING SYSTEMS ASSIGNMENT 2 SIGNALS, USER LEVEL THREADS AND SYNCHRONIZATION

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #10: More on Scheduling and Introduction of Real-Time OS

CMPSCI 377: Operating Systems Exam 1: Processes, Threads, CPU Scheduling and Synchronization. October 9, 2002

전공핵심실습 1: 운영체제론 Chapter 6. Inter-process Communication (IPC)

Process Synchronization Mechanisms

Midterm Exam. October 20th, Thursday NSC

Operating System Architecture. CS3026 Operating Systems Lecture 03

Chapter 4: Processes. Process Concept

CS2506 Quick Revision

1995 Paper 10 Question 7

Chapter 4: Processes

Signals, Synchronization. CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han

COP 4610: Introduction to Operating Systems (Spring 2015) Chapter 4: Threads. Zhi Wang Florida State University

Improved IPC Design In Embedded System Via Context Switching

CS140 Operating Systems and Systems Programming Midterm Exam

Process Description and Control

Achieving Synchronization or How to Build a Semaphore

Introduction to pthreads

Sistemi in tempo reale Anno accademico

Inter Process Communication (IPC) Giorgio Richelli

CS 5523 Operating Systems: Midterm II - reivew Instructor: Dr. Tongping Liu Department Computer Science The University of Texas at San Antonio

628 Lecture Notes Week 4

Multithreading and Interactive Programs

Chapter 5: Processes & Process Concept. Objectives. Process Concept Process Scheduling Operations on Processes. Communication in Client-Server Systems

Exercise (could be a quiz) Solution. Concurrent Programming. Roadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - IV Threads

Synchronization and Semaphores. Copyright : University of Illinois CS 241 Staff 1

Chapter 3 Process Description and Control

CS 3305 Intro to Threads. Lecture 6

Pre-lab #2 tutorial. ECE 254 Operating Systems and Systems Programming. May 24, 2012

OPERATING SYSTEMS, ASSIGNMENT 2 KERNEL THREADS IN XV6, SYNCHRONIZATION

Chapter 4: Multi-Threaded Programming

Real-Time Systems. Lecture #4. Professor Jan Jonsson. Department of Computer Science and Engineering Chalmers University of Technology

Process Characteristics. Threads Chapter 4. Process Characteristics. Multithreading vs. Single threading

Threads Chapter 4. Reading: 4.1,4.4, 4.5

Transcription:

Jojumon Kavalan Joy Menon Samveen Gulati Department of Computer Science and Engineering, IIT Mumbai. 31 October 2004

What are Semaphores? What are Semaphores? Sets of Semaphores Semaphore Performance Definition: Semaphores are a mechanism to allow contending processes/ threads to query, alter, monitor and control access to shared system resources. Figure: Semaphore S for shared resource R

More on Semaphores... What are Semaphores? Sets of Semaphores Semaphore Performance

More on Semaphores... What are Semaphores? Sets of Semaphores Semaphore Performance Types of Semaphores: Binary Semaphores. Counting Semaphores. Semaphore Sets.

More on Semaphores... What are Semaphores? Sets of Semaphores Semaphore Performance Types of Semaphores: Binary Semaphores. Counting Semaphores. Semaphore Sets. Typical usage scenarios for Semaphores: 1. Access to buffers in producer-consumer synchronization (binary semaphores) 2. Access to shared memory segments. This can help serve as a mechanism for interprocess communication. 3. Access to class members (static variables) by objects.

More on Semaphores... What are Semaphores? Sets of Semaphores Semaphore Performance Types of Semaphores: Binary Semaphores. Counting Semaphores. Semaphore Sets. Typical usage scenarios for Semaphores: 1. Access to buffers in producer-consumer synchronization (binary semaphores) 2. Access to shared memory segments. This can help serve as a mechanism for interprocess communication. 3. Access to class members (static variables) by objects. Linux 2.4.x kernels use an implementation of the System V Semaphore specification.

Set of Semaphores What are Semaphores? Sets of Semaphores Semaphore Performance Semaphore set is a control structure with a unique ID and an array of semaphores. The identifier for the semaphore or array is called the semid. control structure semaphore array

Semaphore Performance What are Semaphores? Sets of Semaphores Semaphore Performance Figure: Graphical Analysis - Performance of current Linux Semaphores

Performance Issues What are Semaphores? Sets of Semaphores Semaphore Performance The Linux semaphore implementation is heavyweight in terms of memory-usage and performance.

Performance Issues What are Semaphores? Sets of Semaphores Semaphore Performance The Linux semaphore implementation is heavyweight in terms of memory-usage and performance. Reasons: Sets of semaphores - size of sets may be a maximum of 25. Because of this usage of large sets, the implemetation is heavyweight.

Performance Issues What are Semaphores? Sets of Semaphores Semaphore Performance The Linux semaphore implementation is heavyweight in terms of memory-usage and performance. Reasons: Sets of semaphores - size of sets may be a maximum of 25. Because of this usage of large sets, the implemetation is heavyweight. Heavy context switching - typically 25-30% time while locking. See [3].

Performance Issues What are Semaphores? Sets of Semaphores Semaphore Performance The Linux semaphore implementation is heavyweight in terms of memory-usage and performance. Reasons: Sets of semaphores - size of sets may be a maximum of 25. Because of this usage of large sets, the implemetation is heavyweight. Heavy context switching - typically 25-30% time while locking. See [3]. Linux needs a Lightweight Semaphore!

Design Approaches Design Approaches Single Semaphores The Interface Data Structures The following 3 design approaches were examined:

Design Approaches Design Approaches Single Semaphores The Interface Data Structures The following 3 design approaches were examined: 1. Modify current algorithms to remove bottlenecks.

Design Approaches Single Semaphores The Interface Data Structures Design Approaches The following 3 design approaches were examined: 1. Modify current algorithms to remove bottlenecks. 2. Apply existing lightweight solutions. Small-Memory Embedded Systems semaphores. See [3].

Design Approaches Single Semaphores The Interface Data Structures Design Approaches The following 3 design approaches were examined: 1. Modify current algorithms to remove bottlenecks. 2. Apply existing lightweight solutions. Small-Memory Embedded Systems semaphores. See [3]. General Parallel File System semaphores. See [1] and [2].

Design Approaches Single Semaphores The Interface Data Structures Design Approaches The following 3 design approaches were examined: 1. Modify current algorithms to remove bottlenecks. 2. Apply existing lightweight solutions. Small-Memory Embedded Systems semaphores. See [3]. General Parallel File System semaphores. See [1] and [2]. 3. Use Single Semaphores instead of sets.

Single Semaphores Design Design Approaches Single Semaphores The Interface Data Structures

Single Semaphores Design Design Approaches Single Semaphores The Interface Data Structures Use a single semaphore instead of a set of semaphores.

Single Semaphores Design Design Approaches Single Semaphores The Interface Data Structures Use a single semaphore instead of a set of semaphores. Designed to overcome the limitations of set of semaphores.

Single Semaphores Design Design Approaches Single Semaphores The Interface Data Structures Use a single semaphore instead of a set of semaphores. Designed to overcome the limitations of set of semaphores. Effective utilisation of system resources.

Single Semaphores Design Design Approaches Single Semaphores The Interface Data Structures Use a single semaphore instead of a set of semaphores. Designed to overcome the limitations of set of semaphores. Effective utilisation of system resources. Enable the system to provide more semaphores for the application programs.

The Interface Design Approaches Single Semaphores The Interface Data Structures The Interface Specification for the Implementation is as follows: int s semget (key t key, int sem flag, int sem val); This function will create a semaphore and return the identifier. A new semaphore is created if key has the value IPC PRIVATE or if no existing semaphore is associated to key and IPC CREAT is asserted in semflg (i.e. semflg & IPC CREAT isn t zero). The values of the semaphore will be set as sem val. int s semop(struct s sembuf *sop); The function s semop will perform an operation on a semaphore. int s semtimedop(struct s sembuf *sop, struct timespec *timeout); timed version of s semop, which returns failure if it is unable to operation in time. int s semctl(int semid, int cmd,...); performs the control operation cmd on the semaphore semid. Next... data structures to be modified/implemented.

Data Structures Design Approaches Single Semaphores The Interface Data Structures The Data structures that are part of the implementation are: s sem array The Kernel will be keeping the information of semaphores in this data structure: s sem queue This structure will be used to keep information about processes waiting on a semaphore s sembuf This Structure will be used to represent semaphore operations to be done. The function, s semop takes this structure as its argument. s sem undo This Structure keeps information about the undo operations that are to be done on a semaphore. union s semun This Union is used as a parameter for the s semctl function. next... functions to be implemented.

Functions to Implement Design Approaches Single Semaphores The Interface Data Structures The internal functions of the implementation are END int is newary (key t key, int semflg); int sys s semget (key t key, int semflg, int sem val); int sys s semop (struct s sembuf *sop); int sys s semtimedop (struct s sembuf *sop, struct timespec *timeout); void s append to queue (struct s sem array * sma, struct s sem queue * q); void s prepend to queue (struct s sem array * sma, struct s sem queue * q); void s remove from queue (struct s sem array * sma, struct s sem queue * q); struct s sem undo* s freeundos(struct s sem array *sma, struct s sem undo* un); void s update queue (struct s sem array * sma); int s sem revalidate(int semid, struct s sem array* sma, short flg); int s count semncnt (struct s sem array * sma); int s count semzcnt (struct s sem array * sma); void s freeary (int id); int s semctl nolock(int semid, int cmd, int version, union semun arg); int s semctl main(int semid, int cmd, int version, union semun arg); int s semctl down(int semid, int cmd, int version, union semun arg); int sys s semctl (int semid, int cmd, union semun arg); int s alloc undo(struct s sem array *sma, struct s sem undo** unp, int semid, int alter); void s sem exit (void);

Verification Tests Functional Verification Profiling Performance

Verification Tests Functional Verification Profiling Performance Extent Of Verification:

Verification Tests Functional Verification Profiling Performance Extent Of Verification: A. CONFORMANCE TESTS: To test both that the header files are correct and that the behavior defined in the specification is implemented.

Verification Tests Functional Verification Profiling Performance Extent Of Verification: A. CONFORMANCE TESTS: To test both that the header files are correct and that the behavior defined in the specification is implemented. B. FUNCTIONAL TESTS: To test the presence and behavior of all necessary functional areas of the specification.

Verification Tests Functional Verification Profiling Performance Extent Of Verification: A. CONFORMANCE TESTS: To test both that the header files are correct and that the behavior defined in the specification is implemented. B. FUNCTIONAL TESTS: To test the presence and behavior of all necessary functional areas of the specification. C. STRESS TESTS: To monitor how the system behaves when it is taxed by excessively using the functional areas.

The Test Suite Functional Verification Profiling Performance

The Test Suite Functional Verification Profiling Performance Required Test Suite: For each functional interface of the semaphore specification, there will be a corresponding script/program to test it extensively for conformance, completeness and stress-response. Flexibility to run on one set of tests, or testing only one functional ares, will be needed.

The Test Suite Functional Verification Profiling Performance Required Test Suite: For each functional interface of the semaphore specification, there will be a corresponding script/program to test it extensively for conformance, completeness and stress-response. Flexibility to run on one set of tests, or testing only one functional ares, will be needed. Available - OPEN POSIX TEST suite: The Open Posix Test Suite is a widely accepted conformance benchmark for such IPC specifications. Package: posixtestsuite version 1.4.2.

Micro-Benchmarks for Performance Functional Verification Profiling Performance

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks:

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. II. SWITCH TIME: Two processes using one semaphore.

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. II. SWITCH TIME: Two processes using one semaphore.

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. II. SWITCH TIME: Two processes using one semaphore.

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. 3. The total time T, for K cycles is reported. II. SWITCH TIME: Two processes using one semaphore.

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. 3. The total time T, for K cycles is reported. FLIP TIME Tf = T /2K II. SWITCH TIME: Two processes using one semaphore.

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. 3. The total time T, for K cycles is reported. FLIP TIME Tf = T /2K II. SWITCH TIME: Two processes using one semaphore. 1. A process creates two semaphores,

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. 3. The total time T, for K cycles is reported. FLIP TIME Tf = T /2K II. SWITCH TIME: Two processes using one semaphore. 1. A process creates two semaphores, 2. Process locks 1st, unlocks 2nd and waits on 1st.

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. 3. The total time T, for K cycles is reported. FLIP TIME Tf = T /2K II. SWITCH TIME: Two processes using one semaphore. 1. A process creates two semaphores, 2. Process locks 1st, unlocks 2nd and waits on 1st. 3. A second process starts, waits on 1st and clears 2nd.

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. 3. The total time T, for K cycles is reported. FLIP TIME Tf = T /2K II. SWITCH TIME: Two processes using one semaphore. 1. A process creates two semaphores, 2. Process locks 1st, unlocks 2nd and waits on 1st. 3. A second process starts, waits on 1st and clears 2nd. 4. The total time T, for K cycles is reported.

Micro-Benchmarks for Performance Functional Verification Profiling Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. 3. The total time T, for K cycles is reported. FLIP TIME Tf = T /2K II. SWITCH TIME: Two processes using one semaphore. 1. A process creates two semaphores, 2. Process locks 1st, unlocks 2nd and waits on 1st. 3. A second process starts, waits on 1st and clears 2nd. 4. The total time T, for K cycles is reported. 5. Each cycle = 4 semaphore flips + 2 context switches.

Functional Verification Profiling Performance Micro-Benchmarks for Performance Performance measured using 2 basic micro-benchmarks: I. FLIP TIME: Single process lock-unlock cycle. 1. A single semaphore is created. 2. A lock/unlock cycle is executed for K times. 3. The total time T, for K cycles is reported. FLIP TIME Tf = T /2K II. SWITCH TIME: Two processes using one semaphore. 1. A process creates two semaphores, 2. Process locks 1st, unlocks 2nd and waits on 1st. 3. A second process starts, waits on 1st and clears 2nd. 4. The total time T, for K cycles is reported. 5. Each cycle = 4 semaphore flips + 2 context switches. SWITCH TIME Ts = (T 4.K.Tf )/(2.K)

Performance Tests Functional Verification Profiling Performance

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions:

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions: 1. Stand-alone. (say time Ta)

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions: 1. Stand-alone. (say time Ta) 2. CPU load at lower priority. (say time Tb)

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions: 1. Stand-alone. (say time Ta) 2. CPU load at lower priority. (say time Tb) 3. CPU load at equal priority. (say time Tc)

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions: 1. Stand-alone. (say time Ta) 2. CPU load at lower priority. (say time Tb) 3. CPU load at equal priority. (say time Tc) Shows behaviour of OS scheduler. Ensure Ta < Tb < Tc

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions: 1. Stand-alone. (say time Ta) 2. CPU load at lower priority. (say time Tb) 3. CPU load at equal priority. (say time Tc) Shows behaviour of OS scheduler. Ensure Ta < Tb < Tc Run above tests for old and new implementations.

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions: 1. Stand-alone. (say time Ta) 2. CPU load at lower priority. (say time Tb) 3. CPU load at equal priority. (say time Tc) Shows behaviour of OS scheduler. Ensure Ta < Tb < Tc Run above tests for old and new implementations. Ta-old: Tf, Ts Tb-old: Tf, Ts Tc-old: Tf, Ts

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions: 1. Stand-alone. (say time Ta) 2. CPU load at lower priority. (say time Tb) 3. CPU load at equal priority. (say time Tc) Shows behaviour of OS scheduler. Ensure Ta < Tb < Tc Run above tests for old and new implementations. Ta-old: Tf, Ts Tb-old: Tf, Ts Tc-old: Tf, Ts Ta-new: Tf, Ts Tb-new: Tf, Ts Tc-new: Tf, Ts

Performance Tests Functional Verification Profiling Performance Both tests should be run in 3 load conditions: 1. Stand-alone. (say time Ta) 2. CPU load at lower priority. (say time Tb) 3. CPU load at equal priority. (say time Tc) Shows behaviour of OS scheduler. Ensure Ta < Tb < Tc Run above tests for old and new implementations. Ta-old: Tf, Ts Tb-old: Tf, Ts Tc-old: Tf, Ts Ta-new: Tf, Ts Tb-new: Tf, Ts Tc-new: Tf, Ts Compare and analyze performance results.

Plan for Implementation Plan for Implementation Conclusions Here is the plan for implementation the project. No. Project Stage Resources 1 Coding and debugging 5 days 3 persons 2 Integration of functionality 5 days 2 persons 3 Writing Test Suite 5 days 1 persons 4 Integration with Kernel 5 days 3 persons 5 Functional Testing 2 days 3 persons 6 Performance Analysis 2 days 3 persons 7 Packaging and manuals 1 days 3 persons The complete coding to packaging will take 60 programmer days.

Conclusions Plan for Implementation Conclusions

Conclusions Plan for Implementation Conclusions The existing implementation of semaphores in Linux is heavyweight in memory usage and performance due to usage of sets of semaphores

Conclusions Plan for Implementation Conclusions The existing implementation of semaphores in Linux is heavyweight in memory usage and performance due to usage of sets of semaphores A lightweight implementation of semaphores will involve a mechanism that will allow single semaphores to be associated with resources. We have here presented a detailed design and interface definition for such a lightweight semaphore. We have also outlined a plan for implementation.

Conclusions Plan for Implementation Conclusions The existing implementation of semaphores in Linux is heavyweight in memory usage and performance due to usage of sets of semaphores A lightweight implementation of semaphores will involve a mechanism that will allow single semaphores to be associated with resources. We have here presented a detailed design and interface definition for such a lightweight semaphore. We have also outlined a plan for implementation. The improvement in performance expected is difficult to quantify. However it is expected to be significant enough to justify proceeding with the implementation.

References Plan for Implementation Conclusions T. Jones, A. Koniges, and R. K. Yates. Performance of the IBM general parallel file system. pages 673 683. Frank Schmuck and Roger Haskin. GPFS: Shared-disk file system for large computing clusters. In Proc. of the First Conference on File and Storage Technologies (FAST), pages 231 244, January 2002. K. Zuberi and K. Shin. An efficient semaphore implementation scheme for small-memory embedded systems. pages 25 37.