Synchronization in Java Part 1 | Lecture 10
Автор: Tech Learning
Загружено: 2023-11-12
Просмотров: 54
Описание:
Java Tutorial For Beginners 10(Step by Step tutorial) | Synchronization in Java Part 1 | Lecture 10 #java #javaforbeginners #intellij
Lecture 10: Synchronization in Java Part 1
Synchronization in Java is the capability to control the access of multiple threads to any shared resource.
In Synchronization, we allow only one thread to access the shared resource.
There are 2 types of thread synchronization:
1. mutual exclusive
2. inter-thread communication
Mutual Exclusive is of 3 types:
1. Synchronized method
2. Synchronized block
3. Static synchronization
Lecture 11: Synchronization in Java Part 2: Cooperation (Inter-thread communication in java)
Deadlock in Java: Deadlock in Java is a part of multithreading. Deadlock can occur in a situation when a thread is waiting for an object lock, that is acquired by another thread and second thread is waiting for an object lock that is acquired by first thread. Since, both threads are waiting for each other to release the lock, the condition is called deadlock.
Solution1: allocate resource accordingly
Solution2: Inter-thread communication:
Inter-thread communication or Co-operation is all about allowing synchronized threads to communicate with each other.
It is implemented by following methods of Object class:
1. wait(): The wait() method causes current thread to release the lock and wait until either another thread invokes the notify() method or the notifyAll() method for this object, or
a specified amount of time has elapsed. Wait must be in synchronized method
2. notify()
3. notifyAll()
Example: deposit/withdrwal
Lecture 1: Installing JDK | First java program | intellij java
• Java Tutorial For Beginners 1(Step by Step...
Lecture 2: Java Variables and Data Types in Java
• Видео
Lecture 3: control statements in java
• Java Tutorial For Beginners 3 | control st...
Lecture 4: OOPs concept in Java
• OOPs concept in Java | Lecture 4 #java #ja...
Lecture 5: Java Arrays
• Arrays in Java | Lecture 5 #java #javaforb...
Lecture 6: Exception Handling in Java
• Exception Handling in Java | Lecture 6 #ja...
Lecture 7: Multithreading in Java
• Multithreading in Java | Lecture 7 | Step ...
Lecture 8: Garbage Collection in Java
• Garbage Collection in Java | Lecture 8 | S...
Lecture 9: Runtime class in Java
• Multithreading in Java | Lecture 7 | Step ...
#java #javaprogramming #javatutorial #javalanguage #jdk #intellij #intellijidea #learnjava #javaforbeginners #learnjavaonline #javainstall #javabeginner #javabeginners #code #coding #learnprogramming #programming
Tags:
java
install java
install jdk
java 17
java beginner
java first program
java environment variables
intellij
intellij java
java tutorial
java tutorials
java tutorial for begineers
java full course
java classes
java for begineers
java scripting tutorial for begineers
java programming
java course
java setup for windows 10
java setup for windows
java setup in intellij
java setup
java environment setup
java environment setting class path
jdk installation in windows 10
jdk download
jdk in java
jdk 11 lakh
jdk 17 installation in windows 10
java path set
java path setting in windows 10
java path setup
java learning
java learning for beginners
java learn coding
java learning step by step
java learning path
intellij idea
intellij idea tutorial java
intellij installation
intellij idea setup for java
intellij idea tutorial
intellij tutorial
intellij java
java first program
intellij for java
intellij first java project
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: