• Complain

Milan Stevanovic - Advanced C and C++ Compiling

Here you can read online Milan Stevanovic - Advanced C and C++ Compiling full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2014, publisher: Apress, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Milan Stevanovic Advanced C and C++ Compiling
  • Book:
    Advanced C and C++ Compiling
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2014
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Advanced C and C++ Compiling: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Advanced C and C++ Compiling" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Learning how to write C/C++ code is only the first step. To be a serious programmer, you need to understand the structure and purpose of the binary files produced by the compiler: object files, static libraries, shared libraries, and, of course, executables.

Advanced C and C++ Compiling explains the build process in detail and shows how to integrate code from other developers in the form of deployed libraries as well as how to resolve issues and potential mismatches between your own and external code trees.

With the proliferation of open source, understanding these issues is increasingly the responsibility of the individual programmer. Advanced C and C++ Compiling brings all of the information needed to move from intermediate to expert programmer together in one place -- an engineering guide on the topic of C/C++ binaries to help you get the most accurate and pertinent information in the quickest possible time.

Milan Stevanovic: author's other books


Who wrote Advanced C and C++ Compiling? Find out the surname, the name of the author of the book and a list of all author's works by series.

Advanced C and C++ Compiling — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Advanced C and C++ Compiling" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Milan Stevanovic Advanced C and C++ Compiling 10.1007/978-1-4302-6668-6_1
Milan Stevanovic 2014
1. Multitasking OS Basics
Milan Stevanovic 1
(1)
CA, United States
Abstract
The ultimate goal of all the art related to building executables is to establish as much control as possible over the process of program execution. In order to truly understand the purpose and meaning of certain parts of the executable structure, it is of the utmost importance to gain the full understanding of what happens during the execution of a program, as the interplay between the operating system kernel and the information embedded inside the executable play the most significant roles. This is particularly true in the initial phases of execution, when it is too early for runtime impacts (such as user settings, various runtime events, etc.) which normally happen.
The ultimate goal of all the art related to building executables is to establish as much control as possible over the process of program execution. In order to truly understand the purpose and meaning of certain parts of the executable structure, it is of the utmost importance to gain the full understanding of what happens during the execution of a program, as the interplay between the operating system kernel and the information embedded inside the executable play the most significant roles. This is particularly true in the initial phases of execution, when it is too early for runtime impacts (such as user settings, various runtime events, etc.) which normally happen.
The mandatory first step in this direction is to understand the surroundings in which the programs operate. The purpose of this chapter is to provide in broad sketches the most potent details of a modern multitasking operating systems functionality.
Modern multitasking operating systems are in many aspects very close to each other in terms of how the most important functionality is implemented. As a result, a conscious effort will be made to illustrate the concepts in platform-independent ways first. Additionally, attention will be paid to the intricacies of platform-specific solutions (ubiquitous Linux and ELF format vs. Windows) and these will be analyzed in great detail.
Useful Abstractions
Changes in the domain of computing technology tend to happen at very fast pace. The integrated circuits technology delivers components that are not only rich in variety (optical, magnetic, semiconductor) but are also getting continually upgraded in terms of capabilities. According to the Moores Law, the number of transistors on integrated circuits doubles approximately every two years. Processing power, which is tightly associated with the number of available transistors, tends to follow a similar trend.
As was found out very early on, the only way of substantially adapting to the pace of change is to define overall goals and architecture of computer systems in an abstract/generalized way, at the level above the particulars of the ever-changing implementations. The crucial part of this effort is to formulate the abstraction in such a way that any new actual implementations fit in with the essential definition, leaving aside the actual implementation details as relatively unimportant. The overall computer architecture can be represented as a structured set of abstractions, as shown in Figure .
Figure 1-1 Computer Architecture Abstractions The abstraction at the - photo 1
Figure 1-1.
Computer Architecture Abstractions
The abstraction at the lowest level copes with the vast variety of I/O devices (mouse, keyboard, joystick, trackball, light pen, scanner, bar code readers, printer, plotter, digital camera, web camera) by representing them with their quintessential property of byte stream. Indeed, regardless of the differences between various devices purposes, implementations, and capabilities, it is the byte streams these devices produce or receive (or both) that are the detail of utmost importance from the standpoint of computer system design.
The next level abstraction, the concept of virtual memory, which represents the wide variety of memory resources typically found in the system, is the subject of extraordinary importance for the major topic of this book. The way this particular abstraction actually represents the variety of physical memory devices not only impacts the design of the actual hardware and software but also lays a groundwork that the design of compiler, linker, and loader relies upon.
The instruction set that abstracts the physical CPU is the abstraction of the next level. Understanding the instruction set features and the promise of the processing power it carries is definitely the topic of interest for the master programmer. From the standpoint of our major topic, this level of abstraction is not of primary importance and will not be discussed in great detail.
The intricacies of the operating system represent the final level of abstraction. Certain aspects of the operating system design (most notably, multitasking) have a decisive impact on the software architecture in general. The scenarios in which the multiple parties try to access the shared resource require thoughtful implementation in which unnecessary code duplication would be avoidedthe factor that directly led to the design of shared libraries.
Lets make a short detour in our journey of analyzing the intricacies of the overall computer system and instead pay special attention to the important issues related to memory usage.
Memory Hierarchy and Caching Strategy
There are several interesting facts of life related to the memory in computer systems:
  • The need for memory seems to be insatiable. There is always a need for far more than is currently available. Every quantum leap in providing larger amounts (of faster memory) is immediately met with the long-awaiting demand from the technologies that have been conceptually ready for quite some time, and whose realization was delayed until the day when physical memory became available in sufficient quantities.
  • The technology seems to be far more efficient in overcoming the performance barriers of processors than memory. This phenomenon is typically referred to as the processor-memory gap.
  • The memorys access speed is inversely proportional to the storage capacity. The access times of the largest capacity storage devices are typically several orders of magnitude larger than that of the smallest capacity memory devices.
Now, lets take a quick look at the system from the programmer/designer/engineer point of view. Ideally, the system needs to access all the available memory as fast as possiblewhich we know is never possible to achieve. The immediate next question then becomes: is there anything we can do about it?
The detail that brings tremendous relief is the fact that the system does not use all the memory all of the time, but only some memory for some of the time. In that case, all we really need to do is to reserve the fastest memory for running the immediate execution, and to use the slower memory devices for the code/data that is not immediately executed. While the CPU fetches from the fast memory the instructions scheduled for the immediate execution, the hardware tries to guess which part of the program will be executed next and supplies that part of the code to the slower memory to await the execution. Shortly before the time comes to execute the instructions stored in the slower memory, they get transferred into the faster memory. This principle is known as caching.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Advanced C and C++ Compiling»

Look at similar books to Advanced C and C++ Compiling. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Advanced C and C++ Compiling»

Discussion, reviews of the book Advanced C and C++ Compiling and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.