Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/2msgBlb.
Kavya Joshi explores when and why locks affect performance, delves into Go’s lock implementation as a case study, and discusses strategies one can use when locks are actually a problem. Filmed at qconnewyork.com.
Kavya Joshi works as a software engineer at Samsara - a start-up in San Francisco. She particularly enjoys architecting and building highly concurrent, highly scalable systems.
Presentation on Static Network Architecture for multi-programming and multi-processing. Architecture, Ring Architecture, Ring Chordal Architecture, Barrel Shifter Architecture, Fully Connected Architecture.
Presentation on Static Network Architecture for multi-programming and multi-processing. Architecture, Ring Architecture, Ring Chordal Architecture, Barrel Shifter Architecture, Fully Connected Architecture.
Case study of windows a product of microsoft including the history and related to operating system with MS-DOS its scheduling, networking, performance, etc. It also contains the windows architecture, it's system components like kernel, and scheduling through threads in windows.
This ppt covers different aspects about timing issues and various algorithms involved in having better sync between different systems in a distributed environment
Linux offers an extensive selection of programmable and configurable networking components from traditional bridges, encryption, to container optimized layer 2/3 devices, link aggregation, tunneling, several classification and filtering languages all the way up to full SDN components. This talk will provide an overview of many Linux networking components covering the Linux bridge, IPVLAN, MACVLAN, MACVTAP, Bonding/Team, OVS, classification & queueing, tunnel types, hidden routing tricks, IPSec, VTI, VRF and many others.
In VirtualBox it can sometimes challenging to choose the correct networking solution to fit the needs of your specific usecase. In this presentation, the different options are explained and some example cases are discussed. Access between guests, host and other members of the network is elaborated. After this presentation you will be better able to choose the right solution for different usecases and understand the different benefits and drawbacks of every option.
How Linux Processes Your Network Packet - Elazar LeibovichDevOpsDays Tel Aviv
With buzz on eBPF, XDP, bpfilter etc,, it's important to get the basics right. We will show the route of a networ packet from kernel driver to TCP/IP stack to userspace socket and explain how and where it's processed en route.
Modern environment uses a lot of the Linux networking stack capability.
Every docker container requires a dedicated bridge, usually a few iptables entries to expose port, and a dnsmasq daemon, and masquarading to allow internet access.
It is hence important to understand Linux network fundumentals. From the driver interrupt/NAPI, to the network stack, the various filters it passes through and the various hooks you have at your disposal to alter and view the network packets flow.
We will first review the theory, and then present useful tools to apply the theory and debug problems in common situations.
We will survey common containers situations and see how packets move from the hardware to the container's veth.
Load Balancing In Cloud Computing:A ReviewIOSR Journals
Abstract: As the IT industry is growing day by day, the need of computing and storage is increasing
rapidly. The amount of data exchanged over the network is constantly increasing. Thus the process of this
increasing mass of data requires more computer equipment to meet the various needs of the organizations.
To better capitalize their investment, the over-equipped organizations open their infrastructures to others by
exploiting the Internet and other important technologies such as virtualization by creating a new computing
model: the cloud computing. Cloud computing is one of the significant milestones in recent times in the
history of computers. The basic concept of cloud computing is to provide a platform for sharing of resources
which includes software and infrastructure with the help of virtualization. This paper presents a brief review
of cloud computing. The main emphasize of this paper is on the load balancing technique in cloud
computing.
Keywords: Cloud Computing, Load Balancing, Dynamic Load Balancing, Virtualization, Data Center.
Distributed operating system amoeba case studyRamuAryan
Amoeba server,one of the most useful research topic in distributed operating system,description about objects,capabilities, pool server, process management in amoeba
Case study of windows a product of microsoft including the history and related to operating system with MS-DOS its scheduling, networking, performance, etc. It also contains the windows architecture, it's system components like kernel, and scheduling through threads in windows.
This ppt covers different aspects about timing issues and various algorithms involved in having better sync between different systems in a distributed environment
Linux offers an extensive selection of programmable and configurable networking components from traditional bridges, encryption, to container optimized layer 2/3 devices, link aggregation, tunneling, several classification and filtering languages all the way up to full SDN components. This talk will provide an overview of many Linux networking components covering the Linux bridge, IPVLAN, MACVLAN, MACVTAP, Bonding/Team, OVS, classification & queueing, tunnel types, hidden routing tricks, IPSec, VTI, VRF and many others.
In VirtualBox it can sometimes challenging to choose the correct networking solution to fit the needs of your specific usecase. In this presentation, the different options are explained and some example cases are discussed. Access between guests, host and other members of the network is elaborated. After this presentation you will be better able to choose the right solution for different usecases and understand the different benefits and drawbacks of every option.
How Linux Processes Your Network Packet - Elazar LeibovichDevOpsDays Tel Aviv
With buzz on eBPF, XDP, bpfilter etc,, it's important to get the basics right. We will show the route of a networ packet from kernel driver to TCP/IP stack to userspace socket and explain how and where it's processed en route.
Modern environment uses a lot of the Linux networking stack capability.
Every docker container requires a dedicated bridge, usually a few iptables entries to expose port, and a dnsmasq daemon, and masquarading to allow internet access.
It is hence important to understand Linux network fundumentals. From the driver interrupt/NAPI, to the network stack, the various filters it passes through and the various hooks you have at your disposal to alter and view the network packets flow.
We will first review the theory, and then present useful tools to apply the theory and debug problems in common situations.
We will survey common containers situations and see how packets move from the hardware to the container's veth.
Load Balancing In Cloud Computing:A ReviewIOSR Journals
Abstract: As the IT industry is growing day by day, the need of computing and storage is increasing
rapidly. The amount of data exchanged over the network is constantly increasing. Thus the process of this
increasing mass of data requires more computer equipment to meet the various needs of the organizations.
To better capitalize their investment, the over-equipped organizations open their infrastructures to others by
exploiting the Internet and other important technologies such as virtualization by creating a new computing
model: the cloud computing. Cloud computing is one of the significant milestones in recent times in the
history of computers. The basic concept of cloud computing is to provide a platform for sharing of resources
which includes software and infrastructure with the help of virtualization. This paper presents a brief review
of cloud computing. The main emphasize of this paper is on the load balancing technique in cloud
computing.
Keywords: Cloud Computing, Load Balancing, Dynamic Load Balancing, Virtualization, Data Center.
Distributed operating system amoeba case studyRamuAryan
Amoeba server,one of the most useful research topic in distributed operating system,description about objects,capabilities, pool server, process management in amoeba
Cgroups, namespaces, and beyond: what are containers made from? (DockerCon Eu...Jérôme Petazzoni
Linux containers are different from Solaris Zones or BSD Jails: they use discrete kernel features like cgroups, namespaces, SELinux, and more. We will describe those mechanisms in depth, as well as demo how to put them together to produce a container. We will also highlight how different container runtimes compare to each other.
This talk was delivered at DockerCon Europe 2015 in Barcelona.
Cgroups, namespaces and beyond: what are containers made from?Docker, Inc.
Linux containers are different from Solaris Zones or BSD Jails: they use discrete kernel features like cgroups, namespaces, SELinux, and more. We will describe those mechanisms in depth, as well as demo how to put them together to produce a container. We will also highlight how different container runtimes compare to each other.
This paper aims to make students become familiar with the UNIX environment, developing programming skills in C, to increase their exposure to a shell functionality and put into practice concepts of management processes.
By James Kirk Cropcho
PyData New York City 2017
Want to start learning asynchronous programming techniques, but you’re feeling blocked? In this talk, I will explain asynchronous execution. Then, using assorted asynchronous libraries and frameworks, I’ll display and discuss different implementations of a realistic application.
At a time when Herbt Sutter announced to everyone that the free lunch is over (The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software), concurrency has become our everyday life.A big change is coming to Java, the Loom project and with it such new terms as "virtual thread", "continuations" and "structured concurrency". If you've been wondering what they will change in our daily work or
whether it's worth rewriting your Tomcat-based application to super-efficient reactive Netty,or whether to wait for Project Loom? This presentation is for you.
I will talk about the Loom project and the new possibilities related to virtual wattles and "structured concurrency". I will tell you how it works and what can be achieved and the impact on performance
Describes what is lightweight virtualization and containers, and the low-level mechanisms in the Linux kernel that it relies on: namespaces, cgroups. It also gives details on AUFS. Those component together are the key to understanding how modern systems like Docker (http://www.docker.io/) work.
"Lightweight Virtualization with Linux Containers and Docker". Jerome Petazzo...Yandex
Lightweight virtualization", also called "OS-level virtualization", is not new. On Linux it evolved from VServer to OpenVZ, and, more recently, to Linux Containers (LXC). It is not Linux-specific; on FreeBSD it's called "Jails", while on Solaris it’s "Zones". Some of those have been available for a decade and are widely used to provide VPS (Virtual Private Servers), cheaper alternatives to virtual machines or physical servers. But containers have other purposes and are increasingly popular as the core components of public and private Platform-as-a-Service (PAAS), among others.
Just like a virtual machine, a Linux Container can run (almost) anywhere. But containers have many advantages over VMs: they are lightweight and easier to manage. After operating a large-scale PAAS for a few years, dotCloud realized that with those advantages, containers could become the perfect format for software delivery, since that is how dotCloud delivers from their build system to their hosts. To make it happen everywhere, dotCloud open-sourced Docker, the next generation of the containers engine powering its PAAS. Docker has been extremely successful so far, being adopted by many projects in various fields: PAAS, of course, but also continuous integration, testing, and more.
Streaming a Million Likes/Second: Real-Time Interactions on Live VideoC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/39NIjLV.
Akhilesh Gupta does a technical deep-dive into how Linkedin uses the Play/Akka Framework and a scalable distributed system to enable live interactions like likes/comments at massive scale at extremely low costs across multiple data centers. Filmed at qconlondon.com.
Akhilesh Gupta is the technical lead for LinkedIn's Real-time delivery infrastructure and LinkedIn Messaging. He has been working on the revamp of LinkedIn’s offerings to instant, real-time experiences. Before this, he was the head of engineering for the Ride Experience program at Uber Technologies in San Francisco.
Next Generation Client APIs in Envoy MobileC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2x0Fav8.
Jose Nino guides the audience through the journey of Mobile APIs at Lyft. He focuses on how the team has reaped the benefits of API generation to experiment with the network transport layer. He also discusses recent developments the team has made with Envoy Mobile and the roadmap ahead. Filmed at qconlondon.com.
Jose Nino works as a Software Engineer at Lyft.
Software Teams and Teamwork Trends Report Q1 2020C4Media
How do we cope with an environment that has been radically disrupted, where people are suddenly thrust into remote work in a chaotic state? What are the emerging good practices and new ideas that are shaping the way in which software development teams work? What can we do to make the workplace a more secure and diverse one while increasing the productivity of our teams? This report aims to assist technical leaders in making mid- to long-term decisions that will have a positive impact on their organisations and teams and help individual contributors find the practices, approaches, tools, techniques, and frameworks that can help them get a better experience at work - irrespective of where they are working from.
Understand the Trade-offs Using Compilers for Java ApplicationsC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2QCmmJ0.
Mark Stoodley examines some of the strengths and weaknesses of the different Java compilation technologies, if one was to apply them in isolation. Stoodley discusses how production JVMs are assembling a combination of these tools that work together to provide excellent performance across the large spectrum of applications written in Java and JVM based languages. Filmed at qconsf.com.
Mark Stoodley joined IBM Canada to build Java JIT compilers for production use and led the team that delivered AOT compilation in the IBM SDK for Java 6. He spent the last five years leading the effort to open source nearly 4.3 million lines of source code from the IBM J9 Java Virtual Machine to create the two open source projects Eclipse OMR and Eclipse OpenJ9, and now co-leads both projects.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2y2yPiS.
Colin McCabe talks about the ongoing effort to replace the use of Zookeeper in Kafka: why they want to do it and how it will work. He discusses the limitations they have found and how Kafka benefits both in terms of stability and scalability by bringing consensus in house. He talks about their progress, what work is remaining, and how contributors can help. Filmed at qconsf.com.
Colin McCabe is a Kafka committer at Confluent, working on the scalability and extensibility of Kafka. Previously, he worked on the Hadoop Distributed Filesystem and the Ceph Filesystem.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2SXXXiD.
Katharina Probst talks about what it means to act like an owner and why teams need ownership to be high-performing. When team members, regardless of whether they have a formal leadership role or not, act like owners, magical things can happen. She shares ideas that we can apply to our own work, and talks about how to recognize when we don’t live up to our own expectations of acting like an owner. Filmed at qconsf.com.
Katharina Probst is a Senior Engineering Leader, Kubernetes & SaaS at Google. Before this, she was leading engineering teams at Netflix, being responsible for the Netflix API, which helps bring Netflix streaming to millions of people around the world. Prior to joining Netflix, she was in the cloud computing team at Google, where she saw cloud computing from the provider side.
Does Java Need Inline Types? What Project Valhalla Can Bring to JavaC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2T04Lw4.
Sergey Kuksenko talks about the performance benefits inline types bring to Java and how to exploit them. Inline/value types are the key part of experimental project Valhalla, which should bring new abilities to the Java language. Filmed at qconsf.com.
Sergey Kuksenko is a Java Performance Engineer at Oracle working on a variety of Java and JVM performance enhancements. He started working as Java Engineer in 1996 and as Java Performance Engineer in 2005. He has had a passion for exploring how Java works on modern hardware.
Do you need service meshes in your tech stack?
This on-line guide aims to answer pertinent questions for software architects and technical leaders, such as: what is a service mesh?, do I need a service mesh?, how do I evaluate the different service mesh offerings? In software architecture, a service mesh is a dedicated infrastructure layer for facilitating service-to-service communications between microservices, often using a sidecar proxy.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2UgQ3BU.
Christie Wilson describes what to expect from CI/CD in 2019, and how Tekton is helping bring that to as many tools as possible, such as Jenkins X and Prow. Wilson talks about Tekton itself and performs a live demo that shows how cloud native CI/CD can help debug, surface and fix mistakes faster. Filmed at qconsf.com.
Christie Wilson is a software engineer at Google, currently leading the Tekton project. Over the past decade, she has worked in the mobile, financial and video game industries. Prior to working at Google she led a team of software developers to build load testing tools for AAA video game titles, and founded the Vancouver chapter of PyLadies.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2S7lDiS.
Sasha Rosenbaum shows how a CI/CD pipeline for Machine Learning can greatly improve both productivity and reliability. Filmed at qconsf.com.
Sasha Rosenbaum is a Program Manager on the Azure DevOps engineering team, focused on improving the alignment of the product with open source software. She is a co-organizer of the DevOps Days Chicago and the DeliveryConf conferences, and recently published a book on Serverless computing in Azure with .NET.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/36epVKg.
Todd Montgomery discusses the techniques and lessons learned from implementing Aeron Cluster. His focus is on how Raft can be implemented on Aeron, minimizing the network round trip overhead, and comparing single process to a fully distributed cluster. Filmed at qconsf.com.
Todd Montgomery is a networking hacker who has researched, designed, and built numerous protocols, messaging-oriented middleware systems, and real-time data systems, done research for NASA, contributed to the IETF and IEEE, and co-founded two startups. He currently works as an independent consultant and is active in several open source projects.
Architectures That Scale Deep - Regaining Control in Deep SystemsC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2FWc5Sk.
Ben Sigelman talks about "Deep Systems", their common properties and re-introduces the fundamentals of control theory from the 1960s, including the original conceptualizations of Observability & Controllability. He uses examples from Google & other companies to illustrate how deep systems have damaged people's ability to observe software, and what needs to be done in order to regain control. Filmed at qconsf.com.
Ben Sigelman is a co-founder and the CEO at LightStep, a co-creator of Dapper (Google’s distributed tracing system), and co-creator of the OpenTracing and OpenTelemetry projects (both part of the CNCF). His work and interests gravitate towards observability, especially where microservices, high transaction volumes, and large engineering organizations are involved.
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/39SddUL.
Victor Dibia provides a friendly introduction to machine learning, covers concrete steps on how front-end developers can create their own ML models and deploy them as part of web applications. He discusses his experience building Handtrack.js - a library for prototyping real time hand tracking interactions in the browser. Filmed at qconsf.com.
Victor Dibia is a Research Engineer with Cloudera’s Fast Forward Labs. Prior to this, he was a Research Staff Member at the IBM TJ Watson Research Center, New York. His research interests are at the intersection of human computer interaction, computational social science, and applied AI.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2s9T3Vl.
Colin Eberhardt looks at some of the internals of WebAssembly, explores how it works “under the hood”, and looks at how to create a (simple) compiler that targets this runtime. Filmed at qconsf.com.
Colin Eberhardt is the Technology Director at Scott Logic, a UK-based software consultancy where they create complex application for their financial services clients. He is an avid technology enthusiast, spending his evenings contributing to open source projects, writing blog posts and learning as much as he can.
User & Device Identity for Microservices @ Netflix ScaleC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2S9tOgy.
Satyajit Thadeshwar provides useful insights on how Netflix implemented a secure, token-agnostic, identity solution that works with services operating at a massive scale. He shares some of the lessons learned from this process, both from architectural diagrams and code. Filmed at qconsf.com.
Satyajit Thadeshwar is an engineer on the Product Edge Access Services team at Netflix, where he works on some of the most critical services focusing on user and device authentication. He has more than a decade of experience building fault-tolerant and highly scalable, distributed systems.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2Ezs08q.
Justin Ryan talks about Netflix’ scalability issues and some of the ways they addressed it. He shares successes they’ve had from unintuitively partitioning computation into multiple services to get better runtime characteristics. He introduces us to useful probabilistic data structures, innovative bi-directional data passing, open-source projects available from Netflix that make this all possible. Filmed at qconsf.com.
Justin Ryan is Playback Edge Engineering at Netflix. He works on some of the most critical services at Netflix, specifically focusing on user and device authentication. Years of building developer tools has also given him a healthy set of opinions on developer productivity.
Make Your Electron App Feel at Home EverywhereC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2Z4ZJjn.
Kilian Valkhof discusses the process of making an Electron app feel at home on all three platforms: Windows, MacOS and Linux, making devs aware of the pitfalls and how to avoid them. Filmed at qconsf.com.
Kilian Valkhof is a Front-end Developer & User-experience Designer at Firstversionist. He writes about various topics, from design to machine learning, on his personal website, kilianvalkhof.com and is a frequent contributer to open source software. He is part of the Electron governance team that oversees the development of the Electron framework.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/344PnB1.
Steve Klabnik goes over the deep details of how async/await works in Rust, covering concepts like coroutines, generators, stack-less vs stack-ful, "pinning", and more. Filmed at qconsf.com.
Steve Klabnik is on the core team of Rust, leads the documentation team, and is an author of "The Rust Programming Language." He is a frequent speaker at conferences and is a prolific open source contributor, previously working on projects such as Ruby and Ruby on Rails.
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2OUz6dt.
Chris Riccomini talks about the current state-of-the-art in data pipelines and data warehousing, and shares some of the solutions to current problems dealing with data streaming and warehousing. Filmed at qconsf.com.
Chris Riccomini works as a Software Engineer at WePay.
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreC4Media
Video and slides synchronized, mp3 and slide download available at URL https://bit.ly/2rm4hFD.
Yevgeniy Brikman talks about how to write automated tests for infrastructure code, including the code written for use with tools such as Terraform, Docker, Packer, and Kubernetes. Topics covered include: unit tests, integration tests, end-to-end tests, dependency injection, test parallelism, retries and error handling, static analysis, property testing and CI / CD for infrastructure code. Filmed at qconsf.com.
Yevgeniy Brikman is the co-founder of Gruntwork, a company that provides DevOps as a Service. He is the author of two books published by O'Reilly Media: Hello, Startup and Terraform: Up & Running. Previously, he worked as a software engineer at LinkedIn, TripAdvisor, Cisco Systems, and Thomson Financial.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
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.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
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.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
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.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
2. InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
go-locks/
3. Presented at QCon New York
www.qconnewyork.com
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
8. “locks are slow”
…but they’re used everywhere.
from schedulers to databases and web servers.
lock contention causes ~10x latency
latency(ms)
time
9. “locks are slow”
…but they’re used everywhere.
from schedulers to databases and web servers.
lock contention causes ~10x latency
latency(ms)
time
?
10. let’s analyze its performance!
performance models for contention
let’s build a lock!
a tour through lock internals
let’s use it, smartly!
a few closing strategies
11. our case-study
Lock implementations are hardware, ISA, OS and language specific:
We assume an x86_64 SMP machine running a modern Linux.
We’ll look at the lock implementation in Go 1.12.
CPU 0 CPU 1
cache cache
interconnect
memory
simplified SMP system diagram
12. use as you would threads
> go handle_request(r)
but user-space threads:
managed entirely by the Go runtime, not the operating system.
The unit of concurrent execution: goroutines.
a brief go primer
13. use as you would threads
> go handle_request(r)
but user-space threads:
managed entirely by the Go runtime, not the operating system.
The unit of concurrent execution: goroutines.
a brief go primer
Data shared between goroutines must be synchronized.
One way is to use the blocking, non-recursive lock construct:
> var mu sync.Mutex
mu.Lock()
…
mu.Unlock()
16. T1
running on CPU 1
T2
running on CPU 2
func reader() {
// Read a task
t := tasks.get()
// Do something with it.
...
}
func writer() {
// Write to tasks
tasks.put(t)
}
// track whether tasks is
// available (0) or not (1)
// shared ring buffer
var tasks Tasks
want: “mutual exclusion”
only one thread has access to shared data at any given time
17. func reader() {
// Read a task
t := tasks.get()
// Do something with it.
...
}
func writer() {
// Write to tasks
tasks.put(t)
}
// track whether tasks is
// available (0) or not (1)
// shared ring buffer
var tasks Tasks
want: “mutual exclusion”
…idea! use a flag?
T1
running on CPU 1
T2
running on CPU 2
18. // track whether tasks can be
// accessed (0) or not (1)
var flag int
var tasks Tasks
19. // track whether tasks can be
// accessed (0) or not (1)
var flag int
var tasks Tasks
func reader() {
for {
/* If flag is 0,
can access tasks. */
if flag == 0 {
/* Set flag */
flag++
...
/* Unset flag */
flag--
return
}
/* Else, keep looping. */
}
}
T1
running on CPU 1
20. // track whether tasks can be
// accessed (0) or not (1)
var flag int
var tasks Tasks
func reader() {
for {
/* If flag is 0,
can access tasks. */
if flag == 0 {
/* Set flag */
flag++
...
/* Unset flag */
flag--
return
}
/* Else, keep looping. */
}
}
func writer() {
for {
/* If flag is 0,
can access tasks. */
if flag == 0 {
/* Set flag */
flag++
...
/* Unset flag */
flag--
return
}
/* Else, keep looping. */
}
}
T1
running on CPU 1
T2
running on CPU 2
21. // track whether tasks can be
// accessed (0) or not (1)
var flag int
var tasks Tasks
func reader() {
for {
/* If flag is 0,
can access tasks. */
if flag == 0 {
/* Set flag */
flag++
...
/* Unset flag */
flag--
return
}
/* Else, keep looping. */
}
}
func writer() {
for {
/* If flag is 0,
can access tasks. */
if flag == 0 {
/* Set flag */
flag++
...
/* Unset flag */
flag--
return
}
/* Else, keep looping. */
}
}
T1
running on CPU 1
T2
running on CPU 2
25. R
R
W
flag++
if flag == 0
timeline of
memory operations
T1
running on CPU 1
T2
running on CPU 2
T2 may observe T1’s RMW half-complete
26. atomicity
A memory operation is non-atomic if it can be
observed half-complete by another thread.
An operation may be non-atomic because it:
• uses multiple CPU instructions:
operations on a large data structure;
compiler decisions.
• use a single non-atomic CPU instruction:
RMW instructions; unaligned loads and stores.
> o := Order {
id: 10,
name: “yogi bear”,
order: “pie”,
count: 3,
}
27. atomicity
A memory operation is non-atomic if it can be
observed half-complete by another thread.
An operation may be non-atomic because it:
• uses multiple CPU instructions:
operations on a large data structure;
compiler decisions.
• uses a single non-atomic CPU instruction:
RMW instructions; unaligned loads and stores.
> flag++
28. atomicity
A memory operation is non-atomic if it can be
observed half-complete by another thread.
An operation may be non-atomic because it:
• uses multiple CPU instructions:
operations on a large data structure;
compiler decisions.
• uses a single non-atomic CPU instruction:
RMW instructions; unaligned loads and stores.
> flag++
An atomic operation is an “indivisible”
memory access.
In x86_64, loads, stores that are
naturally aligned up to 64b.*
guarantees the data item fits within a cache line;
cache coherency guarantees a consistent view for a
single cache line.
* these are not the only guaranteed atomic operations.
30. func reader() {
for {
/* If flag is 0,
can access tasks. */
if flag == 0 {
/* Set flag */
flag = 1
t := tasks.get()
...
/* Unset flag */
flag = 0
return
}
/* Else, keep looping. */
}
}
T1
running on CPU 1
31. the compiler may reorder operations.
// Sets flag to 1 & reads data.
func reader() {
flag = 1
t := tasks.get()
...
flag = 0
32. the processor may reorder operations.
StoreLoad reordering
load t before store flag = 1
// Sets flag to 1 & reads data.
func reader() {
flag = 1
t := tasks.get()
...
flag = 0
34. memory access reordering
The compiler, processor can reorder memory operations to optimize execution.
• The only cardinal rule is sequential consistency for single threaded programs.
• Other guarantees about compiler reordering are captured by a
language’s memory model:
C++, Go guarantee data-race free programs will be sequentially consistent.
• For processor reordering, by the hardware memory model:
x86_64 provides Total Store Ordering (TSO).
35. memory access reordering
The compiler, processor can reorder memory operations to optimize execution.
• The only cardinal rule is sequential consistency for single threaded programs.
• Other guarantees about compiler reordering are captured by a
language’s memory model:
C++, Go guarantee data-race free programs will be sequentially consistent.
• For processor reordering, by the hardware memory model:
x86_64 provides Total Store Ordering (TSO).
36. memory access reordering
The compiler, processor can reorder memory operations to optimize execution.
• The only cardinal rule is sequential consistency for single threaded programs.
• Other guarantees about compiler reordering are captured by a
language’s memory model:
C++, Go guarantee data-race free programs will be sequentially consistent.
• For processor reordering, by the hardware memory model:
x86_64 provides Total Store Ordering (TSO).
a relaxed consistency model.
most reorderings are invalid but StoreLoad is game;
allows processor to hide the latency of writes.
37. nope; not atomic and no memory order guarantees.
…idea! use a flag?
38. nope; not atomic and no memory order guarantees.
…idea! use a flag?
need a construct that provides atomicity and prevents memory reordering.
39. nope; not atomic and no memory order guarantees.
…idea! use a flag?
need a construct that provides atomicity and prevents memory reordering.
…the hardware provides!
40. For guaranteed atomicity and to prevent memory reordering.
special hardware instructions
x86 example:
XCHG (exchange)
these instructions are called memory barriers.
they prevent reordering by the compiler too.
x86 example: MFENCE, LFENCE, SFENCE.
41. special hardware instructions
The x86 LOCK instruction prefix provides both.
Used to prefix memory access instructions:
LOCK ADD
For guaranteed atomicity and to prevent memory reordering.
}
atomic operations in languages like Go:
atomic.Add
atomic.CompareAndSwap
42. special hardware instructions
The x86 LOCK instruction prefix provides both.
Used to prefix memory access instructions:
LOCK ADD
For guaranteed atomicity and to prevent memory reordering.
}
atomic operations in languages like Go:
atomic.Add
atomic.CompareAndSwapLOCK CMPXCHG
Atomic compare-and-swap (CAS) conditionally updates a variable:
checks if it has the expected value and if so, changes it to the desired value.
43. the CAS succeeded;
we set flag to 1.
flag was 1 so our CAS failed;
try again.
var flag int
var tasks Tasks
func reader() {
for {
// Try to atomically CAS flag from 0 -> 1
if atomic.CompareAndSwap(&flag, 0, 1) {
...
// Atomically set flag back to 0.
atomic.Store(&flag, 0)
return
}
// CAS failed, try again :)
}
}
baby’s first lock
44. var flag int
var tasks Tasks
func reader() {
for {
// Try to atomically CAS flag from 0 -> 1
if atomic.CompareAndSwap(&flag, 0, 1) {
...
// Atomically set flag back to 0.
atomic.Store(&flag, 0)
return
}
// CAS failed, try again :)
}
}
baby’s first lock: spinlocks
This is a simplified spinlock.
Spinlocks are used extensively in
the Linux kernel.}
45. The atomic CAS is the quintessence of any lock implementation.
46. cost of an atomic operation
Run on a 12-core x86_64 SMP machine.
Atomic store to a C _Atomic int, 10M times in
a tight loop.
Measure average time taken per operation
(from within the program).
With 1 thread: ~13ns (vs. regular operation: ~2ns)
With 12 cpu-pinned threads: ~110ns
threads are effectively serialized
var flag int
var tasks Tasks
func reader() {
for {
// Try to atomically CAS flag from 0 -> 1
if atomic.CompareAndSwap(&flag, 0, 1) {
...
// Atomically set flag back to 0.
atomic.Store(&flag, 0)
return
}
// CAS failed, try again :)
}
}
spinlocks
47. sweet.
We have a scheme for mutual exclusion that provides atomicity and
memory ordering guarantees.
48. sweet.
…but
spinning for long durations is wasteful; it takes away CPU time from
other threads.
We have a scheme for mutual exclusion that provides atomicity and
memory ordering guarantees.
49. sweet.
…but
spinning for long durations is wasteful; it takes away CPU time from
other threads.
We have a scheme for mutual exclusion that provides atomicity and
memory ordering guarantees.
enter the operating system!
50. Linux’s futex
Interface and mechanism for userspace code to ask the kernel to suspend/ resume threads.
futex syscall kernel-managed queue
51. flag can be 0: unlocked
1: locked
2: there’s a waiter
var flag int
var tasks Tasks
52. set flag to 2 (there’s a waiter)
flag can be 0: unlocked
1: locked
2: there’s a waiter
futex syscall to tell the kernel
to suspend us until flag changes.
when we’re resumed, we’ll CAS again.
var flag int
var tasks Tasks
func reader() {
for {
if atomic.CompareAndSwap(&flag, 0, 1) {
...
}
// CAS failed, set flag to sleeping.
v := atomic.Xchg(&flag, 2)
// and go to sleep.
futex(&flag, FUTEX_WAIT, ...)
}
}
T1’s CAS fails
(because T2 has set the flag)
T1
53. in the kernel:
keyA
(from the userspace address:
&flag)
keyA
T1
futex_q
1. arrange for thread to be resumed in the future:
add an entry for this thread in the kernel queue for the address we care about
54. in the kernel:
keyA
(from the userspace address:
&flag)
keyA
T1
futex_q
keyother
Tother
futex_q
keyother
hash(keyA)
1. arrange for thread to be resumed in the future:
add an entry for this thread in the kernel queue for the address we care about
55. in the kernel:
keyA
(from the userspace address:
&flag)
keyA
T1
futex_q
keyother
Tother
futex_q
keyother
hash(keyA)
1. arrange for thread to be resumed in the future:
add an entry for this thread in the kernel queue for the address we care about
2. deschedule the calling thread to suspend it.
56. T2 is done
(accessing the shared data)
T2
func writer() {
for {
if atomic.CompareAndSwap(&flag, 0, 1) {
...
// Set flag to unlocked.
v := atomic.Xchg(&flag, 0)
if v == 2 {
// If there was a waiter, issue a wake up.
futex(&flag, FUTEX_WAKE, ...)
}
return
}
v := atomic.Xchg(&flag, 2)
futex(&flag, FUTEX_WAIT, …)
}
}
57. T2 is done
(accessing the shared data)
T2
func writer() {
for {
if atomic.CompareAndSwap(&flag, 0, 1) {
...
// Set flag to unlocked.
v := atomic.Xchg(&flag, 0)
if v == 2 {
// If there was a waiter, issue a wake up.
futex(&flag, FUTEX_WAKE, ...)
}
return
}
v := atomic.Xchg(&flag, 2)
futex(&flag, FUTEX_WAIT, …)
}
}
if flag was 2, there’s at least one waiter
futex syscall to tell the kernel to wake
a waiter up.
58. func writer() {
for {
if atomic.CompareAndSwap(&flag, 0, 1) {
...
// Set flag to unlocked.
v := atomic.Xchg(&flag, 0)
if v == 2 {
// If there was a waiter, issue a wake up.
futex(&flag, FUTEX_WAKE, ...)
}
return
}
v := atomic.Xchg(&flag, 2)
futex(&flag, FUTEX_WAIT, …)
}
}
if flag was 2, there’s at least one waiter
futex syscall to tell the kernel to wake
a waiter up.
hashes the key
walks the hash bucket’s futex queue
finds the first thread waiting on the address
schedules it to run again!
}
T2 is done
(accessing the shared data)
T2
59. pretty convenient!
pthread mutexes use futexes.
That was a hella simplified futex.
…but we still have a nice, lightweight primitive to build synchronization constructs.
60. cost of a futex
Run on a 12-core x86_64 SMP machine.
Lock & unlock a pthread mutex 10M times in loop
(lock, increment an integer, unlock).
Measure average time taken per lock/unlock pair
(from within the program).
uncontended case (1 thread): ~13ns
contended case (12 cpu-pinned threads): ~0.9us
61. cost of a futex
Run on a 12-core x86_64 SMP machine.
Lock & unlock a pthread mutex 10M times in loop
(lock, increment an integer, unlock).
Measure average time taken per lock/unlock pair
(from within the program).
uncontended case (1 thread): ~13ns
contended case (12 cpu-pinned threads): ~0.9us
cost of the user-space atomic CAS = ~13ns
}
cost of the atomic CAS +
syscall + thread context switch = ~0.9us
}
62. spinning vs. sleeping
Spinning makes sense for short durations; it keeps the thread on the CPU.
The trade-off is it uses CPU cycles not making progress.
So at some point, it makes sense to pay the cost of the context switch to go to sleep.
There are smart “hybrid” futexes:
CAS-spin a small, fixed number of times —> if that didn’t lock, make the futex syscall.
Example: the Go runtime’s futex implementation.
63. spinning vs. sleeping
Spinning makes sense for short durations; it keeps the thread on the CPU.
The trade-off is it uses CPU cycles not making progress.
So at some point, it makes sense to pay the cost of the context switch to go to sleep.
There are smart “hybrid” futexes:
CAS-spin a small, fixed number of times —> if that didn’t lock, make the futex syscall.
Examples: the Go runtime’s futex implementation; a variant of the pthread_mutex.
65. …can we do better for user-space threads?
goroutines are user-space threads.
The go runtime multiplexes them onto threads.
lighter-weight and cheaper than threads:
goroutine switches = ~tens of ns;
thread switches = ~a µs. CPU core
g1 g6g2
thread
CPU core } OS scheduler
Go scheduler
}
66. …can we do better for user-space threads?
goroutines are user-space threads.
The go runtime multiplexes them onto threads.
lighter-weight and cheaper than threads:
goroutine switches = ~tens of ns;
thread switches = ~a µs. CPU core
g1 g6g2
thread
CPU core } OS scheduler
Go scheduler
}
we can block the goroutine without blocking the underlying thread!
to avoid the thread context switch cost.
67. This is what the Go runtime’s semaphore does!
The semaphore is conceptually very similar to futexes in Linux*, but it is used to
sleep/wake goroutines:
a goroutine that blocks on a mutex is descheduled, but not the underlying thread.
the goroutine wait queues are managed by the runtime, in user-space.
* There are, of course, differences in implementation though.
68. the goroutine wait queues are managed
by the Go runtime, in user-space.
var flag int
var tasks Tasks
func reader() {
for {
// Attempt to CAS flag.
if atomic.CompareAndSwap(&flag, ...) {
...
}
// CAS failed; add G1 as a waiter for flag.
root.queue()
// and to sleep.
futex(&flag, FUTEX_WAIT, ...)
}
}
G1’s CAS fails
(because G2 has set the flag)
G1
69. &flag
(the userspace address)
&flag
G1 G3
G4
&other
hash(&flag)
}
the top-level waitlist for a hash bucket
is implemented as a treap
}
there’s a second-level wait queue
for each unique address
the goroutine wait queues
(in user-space, managed by the go runtime)
70. the goroutine wait queues are managed
by the Go runtime, in user-space.
var flag int
var tasks Tasks
func reader() {
for {
// Attempt to CAS flag.
if atomic.CompareAndSwap(&flag, ...) {
...
}
// CAS failed; add G1 as a waiter for flag.
root.queue()
// and suspend G1.
gopark()
}
}
G1’s CAS fails
(because G2 has set the flag)
G1
the Go runtime deschedules the goroutine;
keeps the thread running!
71. G2’s done
(accessing the shared data)
G2
func writer() {
for {
if atomic.CompareAndSwap(&flag, 0, 1) {
...
// Set flag to unlocked.
atomic.Xadd(&flag, ...)
// If there’s a waiter, reschedule it.
waiter := root.dequeue(&flag)
goready(waiter)
return
}
root.queue()
gopark()
}
}
find the first waiter goroutine and reschedule it
]
72. this is clever.
Avoids the hefty thread context switch cost in the contended case,
up to a point.
73. this is clever.
Avoids the hefty thread context switch cost in the contended case,
up to a point.
but…
74. func reader() {
for {
if atomic.CompareAndSwap(&flag, ...) {
...
}
// CAS failed; add G1 as a waiter for flag.
semaroot.queue()
// and suspend G1.
gopark()
}
}
once G1 is resumed,
it will try to CAS again.
Resumed goroutines have to compete with any other goroutines trying to CAS.
They will likely lose:
there’s a delay between when the flag was set to 0 and this goroutine was rescheduled..
G1
75. Resumed goroutines have to compete with any other goroutines trying to CAS.
They will likely lose:
there’s a delay between when the flag was set to 0 and this goroutine was rescheduled..
// Set flag to unlocked.
atomic.Xadd(&flag, …)
// If there’s a waiter, reschedule it.
waiter := root.dequeue(&flag)
goready(waiter)
return
76. Resumed goroutines have to compete with any other goroutines trying to CAS.
They will likely lose:
there’s a delay between when the flag was set to 0 and this goroutine was rescheduled..
So, the semaphore implementation may end up:
• unnecessarily resuming a waiter goroutine
results in a goroutine context switch again.
• cause goroutine starvation
can result in long wait times, high tail latencies.
77. Resumed goroutines have to compete with any other goroutines trying to CAS.
They will likely lose:
there’s a delay between when the flag was set to 0 and this goroutine was rescheduled..
So, the semaphore implementation may end up:
• unnecessarily resuming a waiter goroutine
results in a goroutine context switch again.
• cause goroutine starvation
can result in long wait times, high tail latencies.
the sync.Mutex implementation adds a layer that fixes these.
78. go’s sync.Mutex
Is a hybrid lock that uses a semaphore to sleep / wake goroutines.
79. go’s sync.Mutex
Additionally, it tracks extra state to:
Is a hybrid lock that uses a semaphore to sleep / wake goroutines.
prevent unnecessarily waking up a goroutine
“There’s a goroutine actively trying to CAS”: An unlock in this case does not wake a waiter.
prevent severe goroutine starvation
“a waiter has been waiting”:
If a waiter is resumed but loses the CAS again, it’s queued at the head of the wait queue.
If a waiter fails to lock for 1ms, switch the mutex to “starvation mode”.
prevent unnecessarily waking up a goroutine
“There’s a goroutine actively trying to CAS”: An unlock in this case does not wake a waiter.
prevent severe goroutine starvation
“a waiter has been waiting”:
If a waiter is resumed but loses the CAS again, it’s queued at the head of the wait queue.
If a waiter fails to lock for 1ms, switch the mutex to “starvation mode”.
80. go’s sync.Mutex
Additionally, it tracks extra state to:
Is a hybrid lock that uses a semaphore to sleep / wake goroutines.
prevent unnecessarily waking up a goroutine
“There’s a goroutine actively trying to CAS”: An unlock in this case does not wake a waiter.
prevent severe goroutine starvation
“a waiter has been waiting”:
If a waiter is resumed but loses the CAS again, it’s queued at the head of the wait queue.
If a waiter fails to lock for 1ms, switch the mutex to “starvation mode”.
other goroutines cannot CAS, they must queue
The unlock hands the mutex off to the first waiter.
i.e. the waiter does not have to compete.
81. how does it perform?
Run on a 12-core x86_64 SMP machine.
Lock & unlock a Go sync.Mutex 10M times in loop
(lock, increment an integer, unlock).
Measure average time taken per lock/unlock pair
(from within the program).
uncontended case (1 goroutine): ~13ns
contended case (12 goroutines): ~0.8us
82. how does it perform?
Contended case performance of C vs. Go:
Go initially performs better than C
but they ~converge as concurrency gets high enough.
}
83. how does it perform?
Contended case performance of C vs. Go:
Go initially performs better than C
but they ~converge as concurrency gets high enough.
}
}
85. &flag
G1 G3
G4
&other
the Go runtime semaphore’s
hash table for waiting goroutines:
each hash bucket needs a lock.
…and it’s a futex!
86. &flag
G1 G3
G4
&other
the Go runtime semaphore’s
hash table for waiting goroutines:
each hash bucket needs a lock.
…it’s a futex!
87. &flag
G1 G3
G4
&other &flag
G1
the Linux kernel’s futex hash table
for waiting threads:
each hash bucket needs a lock.
…it’s a spin lock!
each hash bucket needs a lock.
…it’s a futex!
the Go runtime semaphore’s
hash table for waiting goroutines:
88. &flag
G1 G3
G4
&other &flag
G1
each hash bucket needs a lock.
…it’s a spinlock!
each hash bucket needs a lock.
…it’s a futex!
the Go runtime semaphore’s
hash table for waiting goroutines:
the Linux kernel’s futex hash table
for waiting threads:
91. uncontended case
Cost of the atomic CAS.
contended case
In the worst-case, cost of failed atomic operations + spinning + goroutine context switch +
thread context switch.
….But really, depends on degree of contention.
92. how many threads do we need to support a target throughput?
while keeping response time the same.
how does response time change with the number of threads?
assuming a constant workload.
“How does application performance change with concurrency?”
93. Amdahl’s Law
Speed-up depends on the fraction of the workload that can be parallelized (p).
speed-up with N threads = 1
(1 — p) + p
N
94. a simple experiment
Measure time taken to complete a fixed workload.
serial fraction holds a lock (sync.Mutex).
scale parallel fraction (p) from 0.25 to 0.75
measure time taken for number of goroutines (N) = 1 —> 12.
95. p = 0.75
p = 0.25
Amdahl’s Law
Speed-up depends on the fraction of the workload that can be parallelized (p).
96. Universal Scalability Law (USL)
• contention penalty
due to serialization for shared resources.
examples: lock contention, database
contention.
• crosstalk penalty
due to coordination for coherence.
examples: servers coordinating to synchronize
mutable state.
αN
Scalability depends on contention and cross-talk.
97. Universal Scalability Law (USL)
• contention penalty
due to serialization for shared resources.
examples: lock contention, database
contention.
• crosstalk penalty
due to coordination for coherence.
examples: servers coordinating to synchronize
mutable state.
αN
Scalability depends on contention and cross-talk.
βN2
98. Universal Scalability Law (USL)
N
(αN + βN2 + C)
N
C
N
(αN + C)
contention and crosstalk
linear scaling
contention
throughput
concurrency
throughput of N threads = N
(αN + βN2 + C)
99. p = 0.75p = 0.25
USL curves
plotted using the R usl package
p = parallel fraction of workload
101. but first, profile!
Go mutex
• Go mutex contention profiler
https://golang.org/doc/diagnostics.html
Linux
• perf-lock:
perf examples by Brendan Gregg
Brendan Gregg article on off-cpu analysis
• eBPF:
example bcc tool to measure user lock contention
• Dtrace, systemtap
• mutrace, Valgrind-drd
pprof mutex contention profile
102. strategy I: don’t use a lock
• remove the need for synchronization from hot-paths:
typically involves rearchitecting.
• reduce the number of lock operations:
doing more thread local work, buffering, batching, copy-on-write.
• use atomic operations.
• use lock-free data structures
see: http://www.1024cores.net/
103. strategy II: granular locks
• shard data:
but ensure no false sharing, by padding to cache line size.
examples:
go runtime semaphore’s hash table buckets;
Linux scheduler’s per-CPU runqueues;
Go scheduler’s per-CPU runqueues;
• use read-write locks
scheduler benchmark
(CreateGoroutineParallel)
modified scheduler: global lock; runqueue
go scheduler: per-CPU core, lock-free runqueues
104. strategy III: do less serial work
lock contention causes ~10x latency
latency
time time
smaller critical section change
• move computation out of critical section:
typically involves rearchitecting.
106. Special thanks to Eben Freeman, Justin Delegard, Austin Duffield for reading drafts of this.
@kavya719
speakerdeck.com/kavya719/lets-talk-locks
References
Jeff Preshing’s excellent blog series
Memory Barriers: A Hardware View for Software Hackers
LWN.net on futexes
The Go source code
The Universal Scalability Law Manifesto, Neil Gunther
107. Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
go-locks/