This slides explains why ConfigureAwait(false) needs to be called when we use async await. This slides is based on the following blog by Microsoft.
https://devblogs.microsoft.com/dotnet/configureawait-faq/
Spring Batch is a lightweight, comprehensive framework for batch processing in Java. It provides reusable functions for processing large volumes of records, including reading, processing, and writing data. This document provides an overview of Spring Batch 2.0, including the domain model of jobs, steps, and processing items, and how to configure and run batch jobs using Spring Batch.
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
Find out why more and more developers are switching to Git - distributed version control. This intro to Git covers the basics, from cloning to pushing for beginners.
Introduction to Version Control and Configuration ManagementPhilip Johnson
Version control systems like SVN aim to address three classic configuration management problems: the double maintenance problem of multiple copies needing separate updates, the shared data problem of developers accessing the same files, and the simultaneous update problem of file clobbering during concurrent edits. SVN improves on CVS by using a database backend instead of file versions, supporting repository-wide instead of file-based versions, and using directory-based tags and branches. Distributed version control systems like Git store a full code repository locally and support decentralized workflows without a central server.
Bitbucket is a web-based hosting service that provides unlimited private repositories for up to 5 developers using Mercurial or Git revision control systems. It allows teams to work collaboratively through features like pull requests, code reviews, and inline comments directly in source code. Bitbucket also provides visibility into repository and commit history through tools to compare changes across branches, files, and forks.
This document provides an overview of Git and SourceTree. It discusses the differences between distributed version control systems (DVCS) like Git versus centralized version control systems (CVCS). It also outlines a branching model for Git including feature branches for new development, release branches for testing releases, and hotfix branches for production bugs.
Talk for USENIX LISA17: "Containers pose interesting challenges for performance monitoring and analysis, requiring new analysis methodologies and tooling. Resource-oriented analysis, as is common with systems performance tools and GUIs, must now account for both hardware limits and soft limits, as implemented using cgroups. A reverse diagnosis methodology can be applied to identify whether a container is resource constrained, and by which hard or soft resource. The interaction between the host and containers can also be examined, and noisy neighbors identified or exonerated. Performance tooling can need special usage or workarounds to function properly from within a container or on the host, to deal with different privilege levels and name spaces. At Netflix, we're using containers for some microservices, and care very much about analyzing and tuning our containers to be as fast and efficient as possible. This talk will show you how to identify bottlenecks in the host or container configuration, in the applications by profiling in a container environment, and how to dig deeper into kernel and container internals."
React Native allows developers to build mobile apps using React with native platform capabilities. It uses native components instead of web views, making apps feel and perform like native ones. The document discusses what React Native is, how to set up a development environment, build a basic app, add libraries, handle common errors, and React Native fundamentals like components, styles, layout, events, and touch handling.
Spring Batch is a lightweight, comprehensive framework for batch processing in Java. It provides reusable functions for processing large volumes of records, including reading, processing, and writing data. This document provides an overview of Spring Batch 2.0, including the domain model of jobs, steps, and processing items, and how to configure and run batch jobs using Spring Batch.
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
Find out why more and more developers are switching to Git - distributed version control. This intro to Git covers the basics, from cloning to pushing for beginners.
Introduction to Version Control and Configuration ManagementPhilip Johnson
Version control systems like SVN aim to address three classic configuration management problems: the double maintenance problem of multiple copies needing separate updates, the shared data problem of developers accessing the same files, and the simultaneous update problem of file clobbering during concurrent edits. SVN improves on CVS by using a database backend instead of file versions, supporting repository-wide instead of file-based versions, and using directory-based tags and branches. Distributed version control systems like Git store a full code repository locally and support decentralized workflows without a central server.
Bitbucket is a web-based hosting service that provides unlimited private repositories for up to 5 developers using Mercurial or Git revision control systems. It allows teams to work collaboratively through features like pull requests, code reviews, and inline comments directly in source code. Bitbucket also provides visibility into repository and commit history through tools to compare changes across branches, files, and forks.
This document provides an overview of Git and SourceTree. It discusses the differences between distributed version control systems (DVCS) like Git versus centralized version control systems (CVCS). It also outlines a branching model for Git including feature branches for new development, release branches for testing releases, and hotfix branches for production bugs.
Talk for USENIX LISA17: "Containers pose interesting challenges for performance monitoring and analysis, requiring new analysis methodologies and tooling. Resource-oriented analysis, as is common with systems performance tools and GUIs, must now account for both hardware limits and soft limits, as implemented using cgroups. A reverse diagnosis methodology can be applied to identify whether a container is resource constrained, and by which hard or soft resource. The interaction between the host and containers can also be examined, and noisy neighbors identified or exonerated. Performance tooling can need special usage or workarounds to function properly from within a container or on the host, to deal with different privilege levels and name spaces. At Netflix, we're using containers for some microservices, and care very much about analyzing and tuning our containers to be as fast and efficient as possible. This talk will show you how to identify bottlenecks in the host or container configuration, in the applications by profiling in a container environment, and how to dig deeper into kernel and container internals."
React Native allows developers to build mobile apps using React with native platform capabilities. It uses native components instead of web views, making apps feel and perform like native ones. The document discusses what React Native is, how to set up a development environment, build a basic app, add libraries, handle common errors, and React Native fundamentals like components, styles, layout, events, and touch handling.
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...Amazon Web Services Korea
서비스 런칭을 위해 라이온하트와 카카오게임즈가 어떻게 최적 성능의 인스턴스를 선택하고, Windows 운영 체제를 최적화하며, 왜 Amazon Aurora를 기본 데이터베이스로 채택하였는지를 설명합니다. 또한, 출시부터 운영까지의 과정에서 MMORPG가 어떻게 AWS 상에서 설계되고, 게임 서버 성능을 극대할 수 있었는지에 대해 전달해드립니다.
Git is a distributed version control system created by Linus Torvalds to manage changes to the Linux kernel. It allows developers to work independently and merge changes later. Git uses local repositories that can act as both clients and servers, avoiding the need to be connected to a central server. The basic Git workflow involves modifying files in the working directory, staging changes, and committing snapshots of the staged changes to the local repository. Common Git commands are used to add, commit, push, pull, branch, merge, and more. Key features of Git include being open source, distributed, providing security and speed, supporting non-linear development with branching and merging, and assuring data integrity.
Bitbucket is a hosting site for Git and Mercurial repositories that allows for effective collaboration without requiring a centralized server. While Git does not require a central server, it is good to have Bitbucket to host code repositories. Git uses a distributed version control system that allows developers to directly exchange changes and work independently of network access. Benefits of using Git with Bitbucket include free hosting for academic users, the ability to work offline or on planes, and fast branching and merging of code.
The document discusses Git workflows, comparing centralized and feature branch workflows. It then describes Vincent Driessen's branching model which uses two main branches (master and develop) and three supporting branch types (feature, release, hotfix). The master branch is stable and used for production, while develop is integrated features. Feature branches branch off develop for new work, and release branches prepare releases by merging to develop and master. Hotfix branches fix production issues. The model aims to support collaboration while keeping branches stable. Special cases in applying the model are also addressed.
Nginx uses an event-driven architecture with a master process that manages worker processes. It handles requests non-blockingly and efficiently using techniques like memory pooling, buffer chaining, and an event-driven model. Key parts of the architecture include phases and handlers for HTTP requests, virtual servers, locations, and filters. Nginx also supports mail proxying and module development.
This document discusses Janus, a WebRTC server, and its deployment using Docker containers. It begins by providing background on microservices and Docker. It then describes issues that can arise with Docker's default networking modes for Janus due to network-related WebRTC failures. Specifically, Docker's NAT functionality does not always behave predictably for ICE negotiations. The document recommends using dedicated IP addresses for containers to avoid these issues. It provides examples of complex Docker-based architectures for deploying Janus at IETF meetings and for recording production using Docker Swarm.
The document discusses React patterns and hooks. It covers topics like inheritance, composition, mixins, render props, higher order components (HOCs), and React hooks. Some key points:
- Inheritance and composition are approaches to code reuse in object-oriented programming. React uses composition over inheritance.
- Mixins were introduced in 2015 for code reuse but are now deprecated due to issues. Render props and HOCs are preferred patterns.
- Render props and HOCs allow code and state to be shared across components. Render props have fewer levels of nesting while HOCs are better for applying multiple concerns.
- Hooks were introduced to overcome class component limitations and support functional components with local state and lif
This document discusses NetFlow, sFlow, and OpenNMS for network monitoring. It provides configuration steps for installing Elasticsearch, the OpenNMS drift plugin, OpenNMS, PostgreSQL, and Grafana. Elasticsearch will store NetFlow/sFlow data, and OpenNMS with the drift plugin will parse, enrich, and write the data to Elasticsearch. Grafana can then query and visualize the data.
Version control is a method for centrally storing files and keeping a record of changes made by developers. It allows tracking who made what changes and when. This allows developers to back up their work, track different versions of files, merge changes from multiple developers, and recover old versions if needed. Centralized version control systems like Subversion store all files in a central repository that developers check files out from and check changes back into. Subversion allows viewing changes between versions, rolling back changes, and recovering old project versions with a single version number across all files.
The document discusses Content Fragments and Experience Fragments in AEM. Content Fragments allow for the creation of reusable editorial content independent of design, while Experience Fragments group together content and layout to create reusable experiences. The document compares the two and outlines their definitions, features, technical details, variations, building blocks, export options, and common use cases.
Jenkins is a tool that supports continuous integration by automatically building, testing, and deploying code changes. It integrates code changes frequently, at least daily, to avoid "big bang" integrations. Jenkins runs builds and tests across multiple platforms using slave nodes. It supports various source control systems and build tools and notifies developers of failed builds or tests through email or other plugins.
This document provides an introduction to using git for version control. It outlines three scenarios: 1) a single developer using a local repository, 2) a team of developers using a central remote repository, and 3) contributing to a software project hosted on GitHub. The document demonstrates how to initialize repositories, add and commit changes, branch, merge, resolve conflicts, push and pull from remote repositories, and set up a shared remote repository. It provides summaries of key git commands and demonstrations of workflows through examples.
This document provides an overview of Git and how to use it. It discusses version control systems and how distributed version control systems like Git work. It explains how Git was created by Linus Torvalds for Linux kernel development and why it gained popularity due to its speed and efficiency. The document then covers Git basics like setup, commits, branches and workflows. It also introduces tools for using Git in Eclipse and GitLab for code hosting and collaboration.
Git pull requests allow for better collaboration and code reviews. Pull requests initiate discussions about proposed code changes by showing exactly what would be merged. Team members can provide feedback and additional commits can be added to address feedback before merging. It is recommended to work on topic branches for new features or bugs rather than directly on the main branch. Pull requests can be automatically built using services like TeamCity to validate tests pass before merging.
Spring Batch is a framework for processing large volumes of records in batch jobs. It provides reusable functions for logging, transactions, job processing statistics, and restarting or skipping jobs. Batch jobs read input data, process it, and write the output. Spring Batch jobs consist of a job with steps, an item reader to read input, an item processor to transform data, and an item writer to write output. Job repositories store metadata about job executions. Common item readers and writers include flat files, databases, and messaging systems.
Concurrency Programming in Java - 05 - Processes and Threads, Thread Objects,...Sachintha Gunasena
This session discusses about the basic building blocks of Concurrent Programming in Java, which include:
processes, threads, how to define a thread, how to start a thread, how to sleep a thread, thread interrupt, interrupt status flag, joins, simple thread example, synchronization part 1, thread interference, memory consistency errors
This document discusses C# threads and thread synchronization. It begins by explaining how threads are represented by the Thread class in C# and how to start a thread by passing a delegate to its constructor. It then discusses thread states and properties like priority. It describes how threads need synchronization mechanisms when sharing resources and demonstrates this with a parent-child thread example using a shared queue. Finally, it covers various .NET synchronization primitives like locks, monitors, and reader-writer locks and how to synchronize access to collections and methods.
오딘: 발할라 라이징 MMORPG의 성능 최적화 사례 공유 [카카오게임즈 - 레벨 300] - 발표자: 김문권, 팀장, 라이온하트 스튜디오...Amazon Web Services Korea
서비스 런칭을 위해 라이온하트와 카카오게임즈가 어떻게 최적 성능의 인스턴스를 선택하고, Windows 운영 체제를 최적화하며, 왜 Amazon Aurora를 기본 데이터베이스로 채택하였는지를 설명합니다. 또한, 출시부터 운영까지의 과정에서 MMORPG가 어떻게 AWS 상에서 설계되고, 게임 서버 성능을 극대할 수 있었는지에 대해 전달해드립니다.
Git is a distributed version control system created by Linus Torvalds to manage changes to the Linux kernel. It allows developers to work independently and merge changes later. Git uses local repositories that can act as both clients and servers, avoiding the need to be connected to a central server. The basic Git workflow involves modifying files in the working directory, staging changes, and committing snapshots of the staged changes to the local repository. Common Git commands are used to add, commit, push, pull, branch, merge, and more. Key features of Git include being open source, distributed, providing security and speed, supporting non-linear development with branching and merging, and assuring data integrity.
Bitbucket is a hosting site for Git and Mercurial repositories that allows for effective collaboration without requiring a centralized server. While Git does not require a central server, it is good to have Bitbucket to host code repositories. Git uses a distributed version control system that allows developers to directly exchange changes and work independently of network access. Benefits of using Git with Bitbucket include free hosting for academic users, the ability to work offline or on planes, and fast branching and merging of code.
The document discusses Git workflows, comparing centralized and feature branch workflows. It then describes Vincent Driessen's branching model which uses two main branches (master and develop) and three supporting branch types (feature, release, hotfix). The master branch is stable and used for production, while develop is integrated features. Feature branches branch off develop for new work, and release branches prepare releases by merging to develop and master. Hotfix branches fix production issues. The model aims to support collaboration while keeping branches stable. Special cases in applying the model are also addressed.
Nginx uses an event-driven architecture with a master process that manages worker processes. It handles requests non-blockingly and efficiently using techniques like memory pooling, buffer chaining, and an event-driven model. Key parts of the architecture include phases and handlers for HTTP requests, virtual servers, locations, and filters. Nginx also supports mail proxying and module development.
This document discusses Janus, a WebRTC server, and its deployment using Docker containers. It begins by providing background on microservices and Docker. It then describes issues that can arise with Docker's default networking modes for Janus due to network-related WebRTC failures. Specifically, Docker's NAT functionality does not always behave predictably for ICE negotiations. The document recommends using dedicated IP addresses for containers to avoid these issues. It provides examples of complex Docker-based architectures for deploying Janus at IETF meetings and for recording production using Docker Swarm.
The document discusses React patterns and hooks. It covers topics like inheritance, composition, mixins, render props, higher order components (HOCs), and React hooks. Some key points:
- Inheritance and composition are approaches to code reuse in object-oriented programming. React uses composition over inheritance.
- Mixins were introduced in 2015 for code reuse but are now deprecated due to issues. Render props and HOCs are preferred patterns.
- Render props and HOCs allow code and state to be shared across components. Render props have fewer levels of nesting while HOCs are better for applying multiple concerns.
- Hooks were introduced to overcome class component limitations and support functional components with local state and lif
This document discusses NetFlow, sFlow, and OpenNMS for network monitoring. It provides configuration steps for installing Elasticsearch, the OpenNMS drift plugin, OpenNMS, PostgreSQL, and Grafana. Elasticsearch will store NetFlow/sFlow data, and OpenNMS with the drift plugin will parse, enrich, and write the data to Elasticsearch. Grafana can then query and visualize the data.
Version control is a method for centrally storing files and keeping a record of changes made by developers. It allows tracking who made what changes and when. This allows developers to back up their work, track different versions of files, merge changes from multiple developers, and recover old versions if needed. Centralized version control systems like Subversion store all files in a central repository that developers check files out from and check changes back into. Subversion allows viewing changes between versions, rolling back changes, and recovering old project versions with a single version number across all files.
The document discusses Content Fragments and Experience Fragments in AEM. Content Fragments allow for the creation of reusable editorial content independent of design, while Experience Fragments group together content and layout to create reusable experiences. The document compares the two and outlines their definitions, features, technical details, variations, building blocks, export options, and common use cases.
Jenkins is a tool that supports continuous integration by automatically building, testing, and deploying code changes. It integrates code changes frequently, at least daily, to avoid "big bang" integrations. Jenkins runs builds and tests across multiple platforms using slave nodes. It supports various source control systems and build tools and notifies developers of failed builds or tests through email or other plugins.
This document provides an introduction to using git for version control. It outlines three scenarios: 1) a single developer using a local repository, 2) a team of developers using a central remote repository, and 3) contributing to a software project hosted on GitHub. The document demonstrates how to initialize repositories, add and commit changes, branch, merge, resolve conflicts, push and pull from remote repositories, and set up a shared remote repository. It provides summaries of key git commands and demonstrations of workflows through examples.
This document provides an overview of Git and how to use it. It discusses version control systems and how distributed version control systems like Git work. It explains how Git was created by Linus Torvalds for Linux kernel development and why it gained popularity due to its speed and efficiency. The document then covers Git basics like setup, commits, branches and workflows. It also introduces tools for using Git in Eclipse and GitLab for code hosting and collaboration.
Git pull requests allow for better collaboration and code reviews. Pull requests initiate discussions about proposed code changes by showing exactly what would be merged. Team members can provide feedback and additional commits can be added to address feedback before merging. It is recommended to work on topic branches for new features or bugs rather than directly on the main branch. Pull requests can be automatically built using services like TeamCity to validate tests pass before merging.
Spring Batch is a framework for processing large volumes of records in batch jobs. It provides reusable functions for logging, transactions, job processing statistics, and restarting or skipping jobs. Batch jobs read input data, process it, and write the output. Spring Batch jobs consist of a job with steps, an item reader to read input, an item processor to transform data, and an item writer to write output. Job repositories store metadata about job executions. Common item readers and writers include flat files, databases, and messaging systems.
Concurrency Programming in Java - 05 - Processes and Threads, Thread Objects,...Sachintha Gunasena
This session discusses about the basic building blocks of Concurrent Programming in Java, which include:
processes, threads, how to define a thread, how to start a thread, how to sleep a thread, thread interrupt, interrupt status flag, joins, simple thread example, synchronization part 1, thread interference, memory consistency errors
This document discusses C# threads and thread synchronization. It begins by explaining how threads are represented by the Thread class in C# and how to start a thread by passing a delegate to its constructor. It then discusses thread states and properties like priority. It describes how threads need synchronization mechanisms when sharing resources and demonstrates this with a parent-child thread example using a shared queue. Finally, it covers various .NET synchronization primitives like locks, monitors, and reader-writer locks and how to synchronize access to collections and methods.
This session discusses about the basic building blocks of Concurrent Programming in Java, which include:
high-level concurrency objects, lock objects, executors, executor interfaces, thread pools, fork/join, concurrent collections, atomic variables, concurrent random numbers.
This document provides an introduction to multithreading concepts. It discusses using multiple threads to allow a bouncing ball animation program to start new balls even while others are still bouncing. It covers the basics of creating and running threads, including defining a runnable class and starting new threads. It also discusses key threading issues like thread states, scheduling, synchronization, and suspending/stopping threads.
This document provides an overview of parallel programming concepts like parallelism, threads, and concurrency. It discusses the importance of parallel programming given increasing numbers of processor cores. Key concepts covered include parallelism versus multi-processing, tasks and threads, the Java thread classes and methods, threading in Swing applications, and the new Java ForkJoin framework for parallel divide-and-conquer tasks. Examples are provided of using threads, Runnables, and SwingWorkers in Java programs.
This document discusses multithreading in Java. It explains that multithreading allows executing multiple threads simultaneously by sharing a common memory area. This saves memory compared to multiprocessing. Advantages of multithreading include not blocking the user and performing multiple operations simultaneously to save time. The document also covers thread states, creating and ending threads, synchronization, scheduling, and other core multithreading concepts in Java.
This document discusses threads in Java programming. It defines threads as the smallest unit of program execution that can be scheduled independently. The key points covered are:
- Threads are represented by the Thread class in Java and allow for multithreaded programming.
- A thread can be created by extending the Thread class or implementing the Runnable interface.
- The life cycle of a thread includes states like new, runnable, running, blocked, and dead.
- Synchronization techniques like wait(), notify(), and synchronized blocks are used for inter-thread communication and coordination.
This document provides information about multithreading and I/O in Java. It discusses the Java thread model and how to create threads using the Thread class and Runnable interface. It covers thread states, priorities, synchronization, and inter-thread communication. It also discusses I/O basics in Java including reading from the console using Console, BufferedReader and Scanner, and writing to the console and files.
Threads in java, Multitasking and Multithreadingssusere538f7
Threads allow Java programs to take advantage of multiprocessor systems by performing multiple tasks simultaneously. There are two main ways to create threads in Java - by extending the Thread class or implementing the Runnable interface. Threads can be started using the start() method and terminate when their run() method completes. The Java scheduler uses priority to determine which runnable threads get CPU time, with higher priority threads preempting lower priority ones. Threads provide concurrency but not true parallelism since Java threads still run on one CPU.
In 5-2020, I and Minh have a sharing session about Sync, Async, and Multi-threading in C#.
We believe this is one of the most important things when working with .Net technology.
This sharing is aiming to Junior Dev, or even Sr Dev or anyone interested in Sync, Async, and Multi-threading.
I hope it will bring you some values.
New abstractions for concurrency make writing programs easier by moving away from threads and locks, but debugging such programs becomes harder. The call-stack, an essential tool in understanding why and how control flow reached a certain point in the program, loses meaning when inspected in traditional debuggers. Futures, actors or iteratees make code easier to write and reason about, and in this talk I'll show a simple solution to make them easier to debug. The tool I present integrates well with the Eclipse plugin for Scala, and shows how a "reactive debugger" might look like.
This document provides an overview of Java threading concepts including the base threading topics of thread creation methods, life cycle, priorities, and synchronization. It also covers more advanced topics such as volatile variables, race conditions, deadlocks, starvation/livelock, inter-thread communication using wait/notify, thread pools, and remote method invocation. The document includes examples and explanations of key threading mechanisms in Java like semaphores and message passing.
The document discusses asynchronous programming with async and await in C#. It explains that async and await were introduced to address issues with threading like overhead and blocking. Async methods use threads efficiently from the thread pool rather than creating new threads. Await yields threads rather than blocking them. The document demonstrates async programming and best practices like using Task instead of async void. It recommends using async for I/O bound work since it can improve performance over synchronous code.
This document discusses multithreading and concurrency in Java. It defines a thread as a single sequential flow of control within a program. Multithreading allows a single processor to run multiple threads concurrently by rapidly switching between them. Creating threads in Java involves either extending the Thread class or implementing the Runnable interface. The document outlines thread states like new, ready, running, blocked, and finished. It also discusses thread scheduling, priorities, synchronization to prevent race conditions, and thread pools for managing tasks.
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
Concurrent Programming in Java discusses various approaches to concurrency in Java including threads, executors, fork/join, parallel streams, CompletableFuture, and RXJava. It explains challenges with threads like interference, deadlocks, and performance overhead. It then covers enhancements in Java 5+ including executors and concurrent collections. Later sections discuss functional-style concurrency with CompletableFuture and RXJava, which allow composing asynchronous operations without blocking.
This document provides an overview of threads in Java, including:
- Threads allow for multitasking by executing multiple processes simultaneously. They are lightweight processes that exist within a process and share system resources.
- Threads can be created by extending the Thread class or implementing the Runnable interface. The run() method defines the code executed by the thread.
- Threads transition between states like new, runnable, running, blocked, and dead during their lifecycle. Methods like start(), sleep(), join(), etc. impact the thread states.
- Synchronization is used to control access to shared resources when multiple threads access methods and data outside their run() methods. This prevents issues like inconsistent data.
In computer science, synchronization refers to one of two distinct but related concepts: synchronization of processes, and synchronization of data. Process synchronization refers to the idea that multiple processes are to join up or handshake at a certain point, in order to reach an agreement or commit to a certain sequence of action. Data synchronization refers to the idea of keeping multiple copies of a dataset in coherence with one another, or to maintain data integrity. Process synchronization primitives are commonly used to implement data synchronization.
The document outlines an agenda to finish reviewing Java threads. It will discuss thread creation by extending the Thread class or implementing Runnable, thread synchronization using locks, wait/notify, and join, and thread states and scheduling. A short demo will also be included.
Threads allow a program to split into multiple threads that can run concurrently. A thread is a lightweight subprocess that shares memory and resources with other threads in a process. Threads allow programs to perform multiple tasks simultaneously or asynchronously. Threads have a life cycle and priority levels that determine their order of execution. Threads can be created by implementing the Runnable interface or extending the Thread class. Synchronization ensures that only one thread can access a shared resource at a time to prevent race conditions. Inter-thread communication allows threads to coordinate using wait(), notify(), and notifyAll() methods. Deadlocks can occur when threads are waiting indefinitely for resources held by each other.
Similar to C#: Understanding ConfigureAwait(false) (20)
International Conference on NLP, Artificial Intelligence, Machine Learning an...gerogepatton
International Conference on NLP, Artificial Intelligence, Machine Learning and Applications (NLAIM 2024) offers a premier global platform for exchanging insights and findings in the theory, methodology, and applications of NLP, Artificial Intelligence, Machine Learning, and their applications. The conference seeks substantial contributions across all key domains of NLP, Artificial Intelligence, Machine Learning, and their practical applications, aiming to foster both theoretical advancements and real-world implementations. With a focus on facilitating collaboration between researchers and practitioners from academia and industry, the conference serves as a nexus for sharing the latest developments in the field.
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELgerogepatton
As digital technology becomes more deeply embedded in power systems, protecting the communication
networks of Smart Grids (SG) has emerged as a critical concern. Distributed Network Protocol 3 (DNP3)
represents a multi-tiered application layer protocol extensively utilized in Supervisory Control and Data
Acquisition (SCADA)-based smart grids to facilitate real-time data gathering and control functionalities.
Robust Intrusion Detection Systems (IDS) are necessary for early threat detection and mitigation because
of the interconnection of these networks, which makes them vulnerable to a variety of cyberattacks. To
solve this issue, this paper develops a hybrid Deep Learning (DL) model specifically designed for intrusion
detection in smart grids. The proposed approach is a combination of the Convolutional Neural Network
(CNN) and the Long-Short-Term Memory algorithms (LSTM). We employed a recent intrusion detection
dataset (DNP3), which focuses on unauthorized commands and Denial of Service (DoS) cyberattacks, to
train and test our model. The results of our experiments show that our CNN-LSTM method is much better
at finding smart grid intrusions than other deep learning algorithms used for classification. In addition,
our proposed approach improves accuracy, precision, recall, and F1 score, achieving a high detection
accuracy rate of 99.50%.
Low power architecture of logic gates using adiabatic techniquesnooriasukmaningtyas
The growing significance of portable systems to limit power consumption in ultra-large-scale-integration chips of very high density, has recently led to rapid and inventive progresses in low-power design. The most effective technique is adiabatic logic circuit design in energy-efficient hardware. This paper presents two adiabatic approaches for the design of low power circuits, modified positive feedback adiabatic logic (modified PFAL) and the other is direct current diode based positive feedback adiabatic logic (DC-DB PFAL). Logic gates are the preliminary components in any digital circuit design. By improving the performance of basic gates, one can improvise the whole system performance. In this paper proposed circuit design of the low power architecture of OR/NOR, AND/NAND, and XOR/XNOR gates are presented using the said approaches and their results are analyzed for powerdissipation, delay, power-delay-product and rise time and compared with the other adiabatic techniques along with the conventional complementary metal oxide semiconductor (CMOS) designs reported in the literature. It has been found that the designs with DC-DB PFAL technique outperform with the percentage improvement of 65% for NOR gate and 7% for NAND gate and 34% for XNOR gate over the modified PFAL techniques at 10 MHz respectively.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...University of Maribor
Slides from talk presenting:
Aleš Zamuda: Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapter and Networking.
Presentation at IcETRAN 2024 session:
"Inter-Society Networking Panel GRSS/MTT-S/CIS
Panel Session: Promoting Connection and Cooperation"
IEEE Slovenia GRSS
IEEE Serbia and Montenegro MTT-S
IEEE Slovenia CIS
11TH INTERNATIONAL CONFERENCE ON ELECTRICAL, ELECTRONIC AND COMPUTING ENGINEERING
3-6 June 2024, Niš, Serbia
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
Embedded machine learning-based road conditions and driving behavior monitoringIJECEIAES
Car accident rates have increased in recent years, resulting in losses in human lives, properties, and other financial costs. An embedded machine learning-based system is developed to address this critical issue. The system can monitor road conditions, detect driving patterns, and identify aggressive driving behaviors. The system is based on neural networks trained on a comprehensive dataset of driving events, driving styles, and road conditions. The system effectively detects potential risks and helps mitigate the frequency and impact of accidents. The primary goal is to ensure the safety of drivers and vehicles. Collecting data involved gathering information on three key road events: normal street and normal drive, speed bumps, circular yellow speed bumps, and three aggressive driving actions: sudden start, sudden stop, and sudden entry. The gathered data is processed and analyzed using a machine learning system designed for limited power and memory devices. The developed system resulted in 91.9% accuracy, 93.6% precision, and 92% recall. The achieved inference time on an Arduino Nano 33 BLE Sense with a 32-bit CPU running at 64 MHz is 34 ms and requires 2.6 kB peak RAM and 139.9 kB program flash memory, making it suitable for resource-constrained embedded systems.
2. If you’ve already read this blog, Finish reading
this slides. Do not waste your time!
3. Agenda
• Understanding SynchronizationContext and TaskScheduler
• How do SynchronizationContext and TaskScheduler relate to await?
• Problems of Posting callbacks
• What does ConfigureAwait(false) do?
5. Official definition of SynchronizationContext
Official document says…
“Provides the basic functionality for propagating a synchronization
context in various synchronization models.”
Too abstract!!!
6. Easier explanation of SynchronizationContext
• Provides Post method which passes a
delegate(callback, action..) from one
thread to another
• Base method just enqueues a callback
into ThreadPool
Current
Thread
ThreadPool
Thread
Post
7. Sample code of SynchronizationContext
Output
ThreadId: 1
Action Called
ThreadId: 11
8. Derived-Type of SynchronizationContext
• Some frameworks have a specific thread
• E.X. Winforms sets Derived-Type of
SynchronizationContext to allow the context to be
brought onto the UI thread.
• The callback is invoked on UI thread
Current
Thread
UI Thread
Post
(BeginInvoke)
9. Sample code of SynchronizationContext
Output
ThreadId: 1
Action Called
ThreadId: 1
10. TaskScheduler
• Very Roughly Speaking: Task’s version of SynchronizationContext
• Provides “QueueTask” method which enqueues tasks to the Thread
pool.
• If the LongRunning option is true, it creates a new thread.
12. Write asynchronous code
(Before .NET 4.0)
• Use TaskScheduler
• Use SynchronizationContext
Thread 1 Thread 2
ContinueWith
GetStringAsync
Post back
13. Write asynchronous code
(Before .NET 4.0)
• Use TaskScheduler
• Use SynchronizationContext
Thread 1 Thread 2
ContinueWith
GetStringAsync
SynchronizationContext is captured!
Post back
14. Write asynchronous code
(After .NET 4.5)
Can use async await keyword
ContinueWith
GetStringAsync
Post back
Thread 1 Thread 2
17. Problems of Posting callbacks
• Deadlock
• If an original thread calls Wait(),
Result, or GetResult(), it gets
blocked until the thread running
the task finishes.
• The subsequent thread waits until
the original thread becomes
available.
• Performance
• Enqueueing the callback to
another thread is an expensive
operation
Cannot do
post back
Thread 1 Thread 2
Blocking
HeavyAsync()
.Result
Doing heavy tasks
Deadlock!
18. Problems of Posting callbacks
• Deadlock
• If an original thread calls Wait(),
Result, or GetResult(), it gets
blocked until the thread running
the task finishes.
• The subsequent thread waits until
the original thread becomes
available.
• Performance
• Enqueueing the callback to
another thread is an expensive
operation
Cannot do
post back
Thread 1 Thread 2
Blocking
HeavyAsync()
.Result
Doing heavy tasks
I will restart after
Thread 2’s method is
done.
Deadlock!
19. Problems of Posting callbacks
• Deadlock
• If an original thread calls Wait(),
Result, or GetResult(), it gets
blocked until the thread running
the task finishes.
• The subsequent thread waits until
the original thread becomes
available.
• Performance
• Enqueueing the callback to
another thread is an expensive
operation
Cannot do
post back
Thread 1 Thread 2
Blocking
HeavyAsync()
.Result
Doing heavy tasks
I will restart after
Thread 2’s method is
done.
I will do post-back when
Thread1 becomes available
Deadlock!
20. Sample code of deadlock
Result:
1 : Main Start
1 : ChildSampleAsync Start
This block is trying to be executed
in Thread1, but Thread 1 is
blocked, so the deadlock occurs.
Since the “Result” method is
called, Thread1 gets blocked
22. ConfigureAwait(false) = Prevents capturing
SynchronizationContext
• Sample code of capturing process
• ConfigureAwait(false) bypasses the following block of code.
23. If ConfigureAwait(false) is called..
• It will not post the callback.
• The code block after the “await”
keyword will continue running
on the same thread.
Thread 1 Thread 2
Blocking
HeavyAsync()
.Result
Doing heavy tasks
No post happens and the
method is processed in
the same thread.
24. Sample code of NON-deadlock
Result:
1 : Main Start
1 : ChildSampleAsync Start
7 : ChildSampleAsync End
1 : Main End
This code block runs on another
thread, not in original thread.
ConfiureAwait(false) is called.
25. Advantages of calling ConfigureAwait(false)
• Avoiding deadlocks
• Performance
• Since no queueing of the callback occurs.
26. Guidance of using ConfigureAwait(false)
• Should use ConfigureAwait(false)
• general-purpose libraries
• ASP.NET Core
• Console App
• Should NOT use ConfigureAwait(false)
• Win Forms
• ASP.NET (HttpContext.Current might be badly affected)
• WPF
• Silverlight