|
|
libcats.org
Java ThreadsScott Oaks, Henry WongThis book makes the following claims which as far as I can see are entirely baseless, for the reasons given:
> A Java virtual machine is required to implement a preemptive, priority-based scheduler The word 'pre-emptive' does not appear in the JLS. > The Java virtual machine never changes the priority of a thread, even if the thread has been running for a certain period of time Can't find that anywhere either. > the contract between the Java virtual machine and the underlying operating system is that the operating system must generally choose to run the Java thread with the highest priority The 'contract' is between the Java code and the JVM, not the JVM and the O/S. > That's what we mean when we say that Java implements a priority-based scheduler Java isn't required to 'implement' a scheduler at all. > This scheduler is implemented in a preemptive fashion, meaning that when a higher-priority thread comes along, that thread interrupts (preempts) whatever lower-priority thread is running at the time. This appears nowhere in the JLS. > The contract with the operating system, however, is not absolute, which means that the operating system can sometimes choose to run a lower-priority thread. In other words it's +not+ pre-emptive. Make up your mind. > Java's requirement for a priority-based, preemptive scheduling mechanism ... Which is nowhere to be found. > A Java thread can have one of 11 priorities MIN_PRIORITY is 1, MAX_PRIORITY is 10: that makes 10, not 11. > In fact, preemption means only that a higher-priority thread runs instead of a lower-priority one No it doesn't. It means that when a higher-priority thread becomes ready it pre-empts the execution of any lower-priority threads that are currently executing regardless of time-slice etc. This is a feature of real-time systems that Java is +not+ required to implement. This book cannot be recommended in the presence of these egregious errors. Doug Lea's book as recommended by other reviewers is the one to go for. EPUB | FB2 | MOBI | TXT | RTF
* Конвертация файла может нарушить форматирование оригинала. По-возможности скачивайте файл в оригинальном формате.
Популярные книги за неделю:
Проектирование и строительство. Дом, квартира, садАвтор: Петер Нойферт, Автор: Людвиг Нефф
Размер книги: 20.83 Mb
Система упражнений по развитию способностей человека (Практическое пособие)Автор: Петров Аркадий НаумовичКатегория: Путь к себе
Размер книги: 818 Kb
Сотворение мира (3-х томник)Автор: Петров Аркадий НаумовичКатегория: Путь к себе
Размер книги: 817 Kb
Радиолюбительские схемы на ИС типа 555Автор: Трейстер Р.Категория: Электротехника и связь
Размер книги: 13.64 Mb
Только что пользователи скачали эти книги:
From Primordial Quantum Fluctuations to the Anisotropies of CMBRАвтор: Straumann N.
Размер книги: 834 Kb
Электромиграционный метод в неорганическом анализеАвтор: Степанов А.В., Автор: Корчемная Е.К.
Размер книги: 2.70 Mb
Crusade propaganda and ideology: model sermons for the preaching of the crossАвтор: Christoph T. Maier
Размер книги: 1.13 Mb
|
|
|