- Taschenbuch: 386 Seiten
- Verlag: Wordware Pub Co (September 2002)
- Sprache: Englisch
- ISBN-10: 1556223471
- ISBN-13: 978-1556223471
- Größe und/oder Gewicht: 15,4 x 2,7 x 22,9 cm
- Durchschnittliche Kundenbewertung: Schreiben Sie die erste Bewertung
- Amazon Bestseller-Rang: Nr. 951.840 in Fremdsprachige Bücher (Siehe Top 100 in Fremdsprachige Bücher)
Memory Management Algorithms and Implementation in C/C+ (Windows Programming/Development) (Englisch) Taschenbuch – September 2002
Es wird kein Kindle Gerät benötigt. Laden Sie eine der kostenlosen Kindle Apps herunter und beginnen Sie, Kindle-Bücher auf Ihrem Smartphone, Tablet und Computer zu lesen.
Geben Sie Ihre Mobiltelefonnummer ein, um die kostenfreie App zu beziehen.
This book presents several concrete implementations of garbage collection and explicit memory management algorithms. Every implementation is complemented by an in-depth presentation of theory, followed by benchmark tests, a complete listing of C/C++ source code, and a discussion of each implementation's trade-offs. With this book, you can: Find out how memory is managed at the hardware level by the processor; Discover the ways in which different operating systems take advantage of processor facilities to provide memory services via the system call interface; Understand how development libraries and run-time systems build upon the operating system services to manage memory on behalf of user applications; Learn about five complete memory management subsystems that utilise both explicit and automatic collection algorithms.
Die hilfreichsten Kundenrezensionen auf Amazon.com (beta)
This book is clearly written, and well researched. It is not for beginners.
This book spends time on the hardware aspects of Memory management based on the Intel 386 and above architecture. Real Mode versus protected mode and how the processor design allows for memory protection in protected mode.
This is then followed by a survey of Operating Systems, from DOS to Linux to Windows - which is moving from the simple to the complex - and how the OS provides Memory Management services.
Then the development of computer languages, and how they allow for memory management starting with COBOL and moving on to Object oriented C++ and Java Virtual Machines.
Finally the last part of the book has a lot of code listings with very simplistic memory management and moving into slightly more complex algorithms for memory management for programs. The focus is on introducing multiple approaches and how to measure the real performance of each - some parts of this part of the book seemed like they were repeating the same text in making comments about the code.
Overall, I liked the book. I read the Pentium Protected Mode architecture book last year, and it prepared me for this book.
I have not done much assembly level x86 programming, but enough to understand what was being shown in the early examples.
The book has a very good bibilography of sources for each chapter - six long chapters. I felt, while looking at these bibilographies, that the time spent in going through all of the items in the bibliography was part of the reason that this books price was set so high. The references here are thorough and identify some turning points in computer sciences to me.
The structure of the book is the layers by which memory managment is accomplshed - the memory management code is more of an intro. I felt that the book might be targeting Computer Science courses as its real market - the books structure lays down a good foundation for further exploration.
The deeper development of Memory Management algorithms is where I too found the book lacking, and the title a bit deceiving - a complaint from another that I would agree with. This is the reason for not giving 5 stars. It would have taken a lot more time to develop the code and write explanations for more complex approaches and the author states this repeatedly in this algorithm section of the book.
I am inspired from this book to learn more about x86 assembly language, and to study the actual code of the Linux Kernel.
If that sounds of interest to you too, then you should buy this book.
It begins with an introduction of the lowest levels - the hardware, namely the CPU memory management unit. Then it goes on to explain how operating systems manage memory - segmentation, paging, virtual memory and what's between them. Next, memory is examined on the programming-language level - compiler-level and heap allocation mechanisms in Fortran, COBOL, Pascal, C and finally Java.
The second part of the book is the practice: the author implements several manual memory management schemes (own implementations of malloc/free) in C++, and compares them in terms of performance and other characteristics (like memory fragmentation). Finally, he implements a couple of simple garbage collectors (reference-counting, and mark-sweep), and in the last chapter of the book also briefly mentions the important topic of sub-allocators (also known as "pools" or "arenas").
Overall, I enjoyed the book. But I do have a few points of (constructive) criticism. First of all, the book is a bit too conversational for such a technical work. It feels like a collection of blog posts, and thus also lacks in depth. For example, the section on memory management of Windows is quite disappointing. As much as I can admire the author's attempt to show his exploration process armed by various tracing and monitoring tools, much of this information is well known and has been described. Instead, I would expect a more thorough presentation of the topic.
The other problem is the C++ code. C++ code in books is a pet peeve of mine - for some reason it tends to be exceptionally bad in most of them, and this book is no exception. I won't go into examples because there are simply too many, so just a word of advice: if you intend to follow through this book actually implementing the code (always a good idea!) read about the algorithms the author describes, but write your own implementation. There's nothing good to learn from the C++ code in this book, so you might as well get some more practice on your own.
Where source code is used like the manual memory manager, it's always kept
as simple as possible, I appreciate Bill made effort for the reader to "get it" instead of impressing them with syntactic acrobatics.
The quotes from the first three chapters are:
"Everyone has a photographic memory. Some people just don't have film."
-- Mel Brooks
"If I could remember the names of all these particles, I'd be a botanist."
-- Enrico Fermi
"My problem is that I have been persecuted by an integer."
-- George A. Miller
The author runs out of quote from chapter 4, even thouth, the book still worth a five star given the enlightenment and fun I got from reading, by the way, the author never loses humor even handling the driest topic, makes technical reading an entertainment.
The closing quotes at the last page of the book sounds rather like a prophets:
"We are the middle children of history, raised by television to believe that someday we'll be millionaires and movie stars and rock stars, but we won't."
-- Tyler Durden
"In time, you will come to regard me with not only awe and respect, but love."
-- Colossus, speaking to Charles Forbin in Colossus: The Forbin Project (1969)
After this, he then jumps into the high level details of memory management for applications.
If you're a system programmer, do yourself a favour and buy this book. However, it should be noted that this book is not for the inexperienced. It digs into low level stuff and also assumes that the reader is fluent in C/C++ and assembly.
In closing, skip this book and pick up either 'Operating System Concepts 6th ed' or 'Operating Systems: Design and Implemenation 2nd ed' which actually have meaningful insight into practical approaches for memory management and concerns.