This document discusses shared memory in Linux, including creating shared memory segments using shmget, attaching and detaching shared memory using shmat and shmdt, controlling shared memory segments using shmctl, and using mmap to map files to shared memory. It provides details on the system calls used for shared memory and examples of creating and using shared memory between processes.
Distributed Mutual Exclusion and Distributed Deadlock DetectionSHIKHA GAUTAM
Distributed Mutual Exclusion: Classification of distributed mutual exclusion, requirement of mutual exclusion theorem, Token based and non token based algorithms. Distributed Deadlock Detection: system model, resource Vs communication deadlocks, deadlock prevention, avoidance, detection & resolution, centralized dead lock detection
Peer-to-peer Systems – Introduction – Napster and its legacy – Peer-to-peer – Middleware – Routing overlays. Overlay case studies: Pastry, Tapestry- Distributed File Systems –Introduction – File service architecture – Andrew File system. File System: Features-File model -File accessing models – File sharing semantics Naming: Identifiers, Addresses, Name Resolution – Name Space Implementation – Name Caches – LDAP.
About Naming Concepts in Distributed systems.
More about its services, its types & the approaches of implementation for Name Space & Name Resolution and Locating Entities Approaches with example diagrams.
Optimistic concurrency control in Distributed Systemsmridul mishra
What is Optimistic concurrency control, how and why it is applied to distributed systems, the Kung Robinson algorithm overview and the advantages-disadvantages have been covered
Agreement Protocols, Distributed Resource Management: Issues in distributed File Systems, Mechanism for building distributed file systems, Design issues in Distributed Shared Memory, Algorithm for Implementation of Distributed Shared Memory.
Gives an overview about Process, PCB, Process States, Process Operations, Scheduling, Schedulers, Interprocess communication, shared memory and message passing systems
Distributed Mutual Exclusion and Distributed Deadlock DetectionSHIKHA GAUTAM
Distributed Mutual Exclusion: Classification of distributed mutual exclusion, requirement of mutual exclusion theorem, Token based and non token based algorithms. Distributed Deadlock Detection: system model, resource Vs communication deadlocks, deadlock prevention, avoidance, detection & resolution, centralized dead lock detection
Peer-to-peer Systems – Introduction – Napster and its legacy – Peer-to-peer – Middleware – Routing overlays. Overlay case studies: Pastry, Tapestry- Distributed File Systems –Introduction – File service architecture – Andrew File system. File System: Features-File model -File accessing models – File sharing semantics Naming: Identifiers, Addresses, Name Resolution – Name Space Implementation – Name Caches – LDAP.
About Naming Concepts in Distributed systems.
More about its services, its types & the approaches of implementation for Name Space & Name Resolution and Locating Entities Approaches with example diagrams.
Optimistic concurrency control in Distributed Systemsmridul mishra
What is Optimistic concurrency control, how and why it is applied to distributed systems, the Kung Robinson algorithm overview and the advantages-disadvantages have been covered
Agreement Protocols, Distributed Resource Management: Issues in distributed File Systems, Mechanism for building distributed file systems, Design issues in Distributed Shared Memory, Algorithm for Implementation of Distributed Shared Memory.
Gives an overview about Process, PCB, Process States, Process Operations, Scheduling, Schedulers, Interprocess communication, shared memory and message passing systems
Shared memory and semaphore? And how to use them? An explanation about those ...durga_421
This presentation will give what is shared memory, how to create using system calls, when multiple threads are accessing the same shared memory, how to synchronize them with a semaphore.
Distributed system lectures
Engineering + education purpose
This series of lectures was prepared for the fourth class of computer engineering / Baghdad/ Iraq.
This series is not completed yet, it is just a few lectures in the object.
Forgive me for anything wrong by mistake, I wish you can profit from these lectures
My regard
Marwa Moutaz/ M.Sc. studies of Communication Engineering / University of Technology/ Bagdad / Iraq.
Useful documents for engineering students of CSE, and specially for students of aryabhatta knowledge university, Bihar (A.K.U. Bihar). It covers following topics: Background, logical vs. physical address space, swapping, contiguous memory
allocation, paging, segmentation
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
2. 2
Shared Memory
Introduction
Creating a Shared Memory Segment
Shared Memory Control
Shared Memory Operations
Using a File as Shared Memory
3. 3
Introduction
Shared memory allows multiple processes to
share virtual memory space.
This is the fastest but not necessarily the easiest
(synchronization-wise) way for processes to
communicate with one another.
In general, one process creates or allocates the
shared memory segment.
The size and access permissions for the
segment are set when it is created.
The process then attaches the shared segment,
causing it to be mapped into its current data
space.
SHARED MEMORY
4. 4
Introduction
If needed, the creating process then initializes
the shared memory.
Once created, and if permissions permit, other
processes can gain access to the shared
memory segment and map it into their data
space.
Each process accesses the shared memory
relative to its attachment address.
While the data that these processes are
referencing is in common, each process uses
different attachment address values.
SHARED MEMORY
5. 5
Introduction
For each process involved, the mapped memory
appears to be no different from any other of its
memory addresses.
SHARED MEMORY
6. 6
Creating a Shared Memory Segment
The shmget system call is used to create the
shared memory segment and generate the
associated system data structure or to gain
access to an existing segment.
The shared memory segment and the system
data structure are identified by a unique shared
memory identifier that the shmget system call
returns.
(Table 8.1)
SHARED MEMORY
7. 7
Creating a Shared Memory Segment
Return
Summary int shmget(key_t key, int size,int shmflg);
Include File(s) <sys/ipc.h>
<sys/shm.h>
Manual Section 2
Success Failure Sets errno
Shared memory identifier. -1 Yes
Table 8.1. Summary of the shmget System Call.
SHARED MEMORY
8. 8
Creating a Shared Memory Segment
The shmget system call creates a new shared
memory segment if
The value for its first argument, key, is the
symbolic constant IPC_PRIVATE, or
the value key is not associated with an existing
shared memory identifier and the IPC_CREAT
flag is set as part of the shmflg argument or
the value key is not associated with an existing
shared memory identifier and the IPC_CREAT
along with the IPC_EXCL flag have been set as
part of the shmflg argument.
SHARED MEMORY
9. 9
Creating a Shared Memory Segment
As with previous IPC system calls for message
queues and semaphores, the ftok library function
can be used to generate a key value.
The argument size determines the size in bytes
of the shared memory segment.
If we are using shmget to access an existing
shared memory segment, size can be set to 0,
as the segment size is set by the creating
process.
SHARED MEMORY
10. 10
Creating a Shared Memory Segment
The last argument for shmget, shmflg, is used to
indicate segment creation conditions (e.g.,
IPC_CREAT, IPC_EXCL) and access
permissions (stored in the low order 9 bits of
shmflg).
At this time the system does not use the execute
permission settings.
To specify creation conditions along with access
permissions, the individual items are bitwise
ORed.
SHARED MEMORY
11. 11
Creating a Shared Memory Segment
The shmget system call does not entitle the
creating process to actually use the allocated
memory.
It merely reserves the requested memory.
To be used by the process, the allocated
memory must be attached to the process using a
separate system call.
SHARED MEMORY
12. 12
Creating a Shared Memory Segment
If shmget is successful in allocating a shared
memory segment, it returns an integer shared
memory identifier.
If shmget fails, it returns a value of -1 and sets
the value in errno to indicate the specific error
condition.
Example 9.1 shows creating of the shared
memory segments. You can run it multiple times
and see the results by ipcs –m system command
SHARED MEMORY
13. 13
Shared Memory Control
The shmctl system call permits the user to
perform a number of generalized control
operations on an existing shared memory
segment and on the system shared memory
data structure.
SHARED MEMORY
14. 14
Shared Memory Control
Return
Summary int shmctl(int shmid, int cmd, struct shmid_ds
*buf);
Include File(s) <sys/ipc.h>
<sys/shm.h>
Manual Section 2
Success Failure Sets errno
0 -1 Yes
Table 8.4. Summary of the shmctl System Call.
SHARED MEMORY
15. 15
Shared Memory Control
There are three arguments for the shmctl system
call:
The first, shmid, is a valid shared memory
segment identifier generated by a prior shmget
system call.
The second argument, cmd, specifies the
operation shmctl is to perform.
The third argument, buf, is a reference to a
structure of the type shmid_ds.
SHARED MEMORY
16. 16
Shared Memory Control
If shmctl is successful, it returns a value of 0;
otherwise, it returns a value of -1 and sets the
value in errno to indicate the specific error
condition.
SHARED MEMORY
17. 17
Shared Memory Operations
There are two shared memory operation system
calls.
The first, shmat, is used to attach (map) the
referenced shared memory segment into the
calling process's data segment.
(Table 8.6.)
SHARED MEMORY
18. 18
Shared Memory Operations
Return
Summary void *shmat(int shmid, const void *shmaddr, int
shmflg);
Include File(s) <sys/ipc.h>
<sys/shm.h>
Manual Section 2
Success Failure Sets errno
Reference to the data segment -1 Yes
Table 8.6. Summary of the shmat System Call.
SHARED MEMORY
19. 19
Shared Memory Operations
The first argument to shmat, shmid, is a valid
shared memory identifier.
The second argument, shmaddr, allows the
calling process some flexibility in assigning the
location of the shared memory segment.
If a nonzero value is given, shmat uses this as the
attachment address for the shared memory
segment.
If shmaddr is 0, the system picks the attachment
address.
In most situations, it is advisable to use a value of
0 and have the system pick the address.
SHARED MEMORY
20. 20
Shared Memory Operations
The third argument, shmflg, is used to specify
the access permissions for the shared memory
segment and to request special attachment
conditions, such as an aligned address or a
read-only segment.
The values of shmaddr and shmflg are used by
the system to determine the attachment
address.
SHARED MEMORY
21. 21
Shared Memory Operations
When shmat is successful, it returns the address
of the actual attachment.
If shmat fails, it returns a value of -1 and sets
errno to indicate the source of the error.
Remember that after a fork, the child inherits the
attached shared memory segment(s).
After an exec or an exit attached, shared
memory segment(s) are detached but are not
destroyed.
SHARED MEMORY
22. 22
Shared Memory Operations
The second shared memory operation, shmdt, is
used to detach the calling process's data
segment from the shared memory segment.
(Table 8.8.)
SHARED MEMORY
23. 23
Shared Memory Operations
Return
Summary int shmdt ( const void *shmaddr);
Include File(s) <sys/types.h
>
<sys/shm.h>
Manual Section 2
Success Failure Sets errno
0 -1 Yes
Table 8.8. Summary of the shmdt System Call
SHARED MEMORY
24. 24
Shared Memory Operations
The shmdt system call has one argument,
shmaddr, which is a reference to an attached
memory segment.
If shmdt is successful in detaching the memory
segment, it returns a value of 0.
If the shmdt call fails, it returns a value of -1 and
sets errno.
See Example 9.2 that shows the example of
sharing a memory segment by parent and child
SHARED MEMORY
25. 25
Using a File as Shared Memory
mmap system call can be used to map a file to a
process's virtual memory address space.
In many ways mmap is more flexible than its
shared memory system call counterpart.
Once a mapping has been established, standard
system calls rather than specialized system calls
can be used to manipulate the shared memory
object.
Unlike memory, the contents of a file are
nonvolatile and will remain available even after a
system has been shut down (and rebooted).
(Table 8.11).
SHARED MEMORY
26. 26
Using a File as Shared Memory
Return
Summary #ifdef _POSIX_MAPPED_FILES <-- 1
void *mmap(void *start, size_t length, int prot,
int flags, int fd, off_t offset);
#endif
(1)If _POSIX_MAPPED_FILES has been defined.
Include File(s) <unistd.h>
<sys/nman.h
>
Manual Section 2
Success Failure Sets errno
A pointer to the mapped area MAP_FAILED ((void *) -1) Yes
Table 8.11. Summary of the mmap System Call.
SHARED MEMORY
27. 27
Using a File as Shared Memory
The mmap system call requires six arguments.
The first, start, is the address for attachment. As
with the shmat system call, this argument is most
often set to 0, which directs the system to choose
a valid attachment address.
The number of bytes to be attached is indicated
by the second argument, length.
The third argument, prot, is used to set the type of
access (protection) for the segment.
SHARED MEMORY
28. 28
Using a File as Shared Memory
The fifth argument, fd, is a valid open file
descriptor. Once the mapping is established, the
file can be closed.
The sixth argument, offset, is used to set the
starting position for the mapping.
If the mmap system call is successful, it returns
a reference to the mapped memory object.
If the call fails, it returns the defined constant
MAP_FAILED (which is actually the value -1 cast
to a void *).
See Example 9.3 that uses mmap
SHARED MEMORY
29. 29
Using a File as Shared Memory
While the system will automatically unmap a
region when a process terminates, the system
call munmap can be used to explicitly unmap
pages of memory.
(Table 8.16)
SHARED MEMORY
30. 30
Using a File as Shared Memory
Return
Summary #ifdef _POSIX_MAPPED_FILES
int munmap(void *start, size_t length);
#endif
Include File(s) <unistd.h>
<signal.h>
Manual Section 2
Success Failure Sets errno
0 -1 Yes
Table 8.16. Summary of the munmap System Call.
SHARED MEMORY
31. 31
Using a File as Shared Memory
The munmap system call is passed the starting
address of the memory mapping (argument
start) and the size of the mapping (argument
length).
If the call is successful, it returns a value of 0.
Future references to unmapped addresses
generate a SIGVEGV signal.
If the munmap system call fails, it returns the
value -1 and sets the value in errno to EINVAL.
SHARED MEMORY