There are hundreds of JVM parameters and options out there. Here we are going to take a closer look at the internal structure of HotSpot VM while over-viewing memory spaces and different types of Garbage Collectors.
There are hundreds of JVM parameters and options out there. Here we are going to take a closer look at the internal structure of HotSpot VM while over-viewing memory spaces and different types of Garbage Collectors.
Atlantida el continente perdido de PlatónChoi Ha Young
La Unión Europea ha acordado un paquete de sanciones contra Rusia por su invasión de Ucrania. Las sanciones incluyen restricciones a las importaciones de productos rusos clave como el acero y la madera, así como medidas contra bancos y funcionarios rusos. Los líderes de la UE esperan que las sanciones aumenten la presión económica sobre Rusia y la disuadan de continuar su agresión contra Ucrania.
O documento explica conceitos básicos de informática, definindo informação digital como dados organizados com significado, processados em computadores usando unidades como bits (0 ou 1), bytes (8 bits) e kilobytes (1024 bytes).
Проект «Одноклассники» Mail.Ru Group, Андрей ПаньгинEYevseyeva
Презентация с технической секции #BitByte - фестиваля профессионального развития, который прошел 19 мая в Санкт-Петербурге.
Андрей Паньгин, Ведущий инженер проекта компании Mail.Ru Group «Одноклассники»: «Незаурядная Java как инструмент разработки высоконагруженного сервера».
Atlantida el continente perdido de PlatónChoi Ha Young
La Unión Europea ha acordado un paquete de sanciones contra Rusia por su invasión de Ucrania. Las sanciones incluyen restricciones a las importaciones de productos rusos clave como el acero y la madera, así como medidas contra bancos y funcionarios rusos. Los líderes de la UE esperan que las sanciones aumenten la presión económica sobre Rusia y la disuadan de continuar su agresión contra Ucrania.
O documento explica conceitos básicos de informática, definindo informação digital como dados organizados com significado, processados em computadores usando unidades como bits (0 ou 1), bytes (8 bits) e kilobytes (1024 bytes).
Проект «Одноклассники» Mail.Ru Group, Андрей ПаньгинEYevseyeva
Презентация с технической секции #BitByte - фестиваля профессионального развития, который прошел 19 мая в Санкт-Петербурге.
Андрей Паньгин, Ведущий инженер проекта компании Mail.Ru Group «Одноклассники»: «Незаурядная Java как инструмент разработки высоконагруженного сервера».
«История строителя: Maven - от новичка до мастера. Сборка простых и сложных Java- проектов.»
BitByte: 20 апреля 2013, Санкт-Петербург
http://bitbyte.itmozg.ru/
Курс "Программирование на Java". Лекция 01 "Основы Java".
История Java, мотивация её появления, JVM, примитивы, упоминание об объектной природе.
МФТИ, 2016 год. Лектор - Лаврентьев Федор Сергеевич
The document discusses concurrency and synchronization in distributed computing. It provides an overview of Petr Kuznetsov's research at Telecom ParisTech, which includes algorithms and models for distributed systems. Some key points discussed are:
- Concurrency is important due to multi-core processors and distributed systems being everywhere. However, synchronization between concurrent processes introduces challenges.
- Common synchronization problems include mutual exclusion, readers-writers problems, and producer-consumer problems. Tools for synchronization include semaphores, transactional memory, and non-blocking algorithms.
- Characterizing distributed computing models and determining what problems can be solved in a given model is an important area of research, with implications for distributed system design.
The document discusses weakly supervised learning from video and images using convolutional neural networks. It describes using scripts as weak supervision for learning actions from movies without explicit labeling. Methods are presented for jointly learning actors and actions from scripts, and for action learning with ordering constraints. The use of CNNs for object and action recognition in images is also summarized, including work on training CNNs using only image-level labels without bounding boxes.
This document discusses common C++ bugs and tools to find them. It describes various types of memory access bugs like buffer overflows on the stack, heap, and globals that can lead to crashes or security vulnerabilities. Threading bugs like data races, deadlocks, and race conditions on object destruction are also covered. Other undefined behaviors like initialization order issues, lack of sequence points, and integer overflows are explained. The document provides examples of each type of bug and emphasizes that undefined behavior does not guarantee a predictable result. It concludes with a quiz to find bugs in a code sample and links to additional reading materials.
AddressSanitizer, ThreadSanitizer, and MemorySanitizer are compiler-based tools that detect bugs like buffer overflows, data races, and uninitialized memory reads in C/C++ programs. AddressSanitizer instruments loads and stores to detect out-of-bounds memory accesses. ThreadSanitizer intercepts synchronization calls to detect data races between threads. MemorySanitizer tracks initialized and uninitialized memory using shadow memory to find uses of uninitialized values. The tools have found thousands of bugs with low overhead. Future work includes supporting more platforms and languages and detecting additional bug classes.
This document discusses common C++ bugs and tools to find them. It describes various types of memory access bugs like buffer overflows on the stack, heap, and globals that can lead to crashes or security vulnerabilities. Threading bugs like data races, deadlocks, and race conditions on object destruction are also covered. Other undefined behaviors like initialization order issues, lack of sequence points, and integer overflows are explained. The document provides examples of each type of bug and quizzes the reader to find bugs in a code sample. It recommends resources for further reading on debugging techniques and thread sanitizers that can detect races and data races.
This document provides examples and snippets of code for MapReduce, Pig, Hive, Spark, Shark, and Disco frameworks. It also includes two sections of references for related papers and Disco documentation. The examples demonstrate basic MapReduce jobs with drivers, mappers, and reducers in Java, Pig and Hive queries, Spark and Shark table operations, and a Disco MapReduce job.
2. Требования к системе
управления памятью в Java
• Стандарт не специфицирует алгоритмы управления
памятью, но налагает требования:
Память всегда выделяется под объект (явно или
неявно)
Память всегда инициализируется в значения по
умолчанию
Для завершения инициализации должен вызывться
конструктор
Память (возможно) освобождается при
недоступности объекта, weak references
Не допускается алиасинг (перекрытие памяти
объектов)
equals() и hashCode()
При недостатке памяти бросается исключение
java.lang.OutOfMemoryError и его можно поймать
При освобождении объекта вызывается
protected void finalize() throws Throwable
2
3. Фазы жизни объекта
• Участок в хипе
• Память выделенная аллокатором
(заполнена нулями)
• Инициализированный объект
• Недостижимый объект (а как с классами?)
• Финализируемый объект
• Фантомный объект
• Участок в хипе
3
4. Достижимость
• Rootset – корневые объекты
Объекты на стеке Ява
Глобальные переменные Ява (какие?)
Структуры данных ВМ
Регистры процессора содержащие ссылки
Ещѐ?
• Достижимо транзитивное замыкание
корневых объектов по отношению “иметь
ссылку”
• Собирать можно (а всегда ли нужно?)
дополнение множества достижимых
объектов - мусор
4
5. Слабые ссылки, финализация,
хэш-код
• Типы ссылок:
Сильная (обычная ссылка на объект
foo.bar)
Мягкая (soft) java.lang.ref.SoftReference
Слабая (weak)
java.lang.ref.WeakReference
Фантомная (phantom)
java.lang.ref.PhantomReference
• java.lang.Object.finalize()
• Разные политики обработки коллектором,
интерфейс между коллектором и Ява-кодом
• Стабильность хэшкода
5
6. Факторы учитываемые при
создании коллектора
• Требования по объѐму данных
• Требования по производительности (с какой
скоростью может создаваться мусор)
• Требования по времени жизни приложения
(серверные программы могут работать
годами)
• Требования по гарантии на время отклика
(мягкие, жѐсткие)
• Ожидаемые сценарии нагрузки
• Ожидаемое аппаратное обеспечение
6
7. Информация о типичном
поведении
• Анализ реальных систем показал:
Большинство объектов “умирают
молодыми” (generational hypothesis)
Объекты делятся на несколько категорий с
различным временем жизни
Потоки используют, в основном, данные
которые сами создают
Немногие объекты используются для
синхронизации
Немногие объекты хранятся в хэшах (а
следовательно, требуют стабильного хэш-
кода)
Взаимоотносящиеся объекты ссылаются
друг на друга
7
8. Реализации коллектора
(китайская классификация)
• Подсчѐт ссылок, удаление при 0
• Точные/приближѐнные
• Копирование живых объектов (semi-space)
• Пометить-вычистить
• Останавливающие/инкрементальные
• Реального времени
• С учѐтом гипотезы поколений
• С учѐтом потоковой локальности
• Комбинированные
8
9. Вопросы
• Стековые переменные – это явное
или неявное освобождение памяти?
• Какие проблемы и преимущества внѐс
бы в Яву алиасинг?
• Как влияет поддержка мягких и
слабых ссылок на дизайн коллектора?
• Всегда ли наблюдается “типичное”
поведение? Что, если нет?
9