舉報(bào)

會(huì)員
Hands-On System Programming with C++
C++isageneral-purposeprogramminglanguagewithabiastowardsystemprogrammingasitprovidesreadyaccesstohardware-levelresources,efficientcompilation,andaversatileapproachtohigher-levelabstractions.ThisbookwillhelpyouunderstandthebenefitsofsystemprogrammingwithC++17.YouwillgainafirmunderstandingofvariousC,C++,andPOSIXstandards,aswellastheirrespectivesystemtypesforbothC++andPOSIX.AfterabriefrefresheronC++,ResourceAcquisitionIsInitialization(RAII),andthenewC++GuidelineSupportLibrary(GSL),youwilllearntoprogramLinuxandUnixsystemsalongwithprocessmanagement.Asyouprogressthroughthechapters,youwillbecomeacquaintedwithC++'ssupportforIO.Youwillthenstudyvariousmemorymanagementmethods,includingachapteronallocatorsandhowtheybenefitsystemprogramming.YouwillalsoexplorehowtoprogramfileinputandoutputandlearnaboutPOSIXsockets.ThisbookwillhelpyougettogripswithsafelysettingupaUDPandTCPserver/client.Finally,youwillbeguidedthroughUnixtimeinterfaces,multithreading,anderrorhandlingwithC++exceptions.Bytheendofthisbook,youwillbecomfortablewithusingC++toprogramhigh-qualitysystems.
目錄(316章)
倒序
- coverpage
- Title Page
- Copyright and Credits
- Hands-On System Programming with C++
- Dedication
- About Packt
- Why subscribe?
- Packt.com
- Contributors
- About the author
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Conventions used
- Get in touch
- Reviews
- Getting Started with System Programming
- Technical requirements
- Understanding system calls
- The anatomy of a system call
- Learning about different types of system calls
- Console input/output
- Memory allocation
- File input/output
- Networking
- Time
- Threading and process creation
- System call security risks
- SYSRET
- Meltdown and Spectre
- Benefits of using C++ when system programming
- Type safety in C++
- Objects of C++
- Templates used in C++
- Functional programming associated with C++
- Error handling mechanism in C++
- APIs and C++ containers in C++
- Summary
- Questions
- Further reading
- Learning the C C++17 and POSIX Standards
- Technical requirements
- Beginning with the C standard language
- How the standard is organized
- Environment
- Language
- Libraries
- How a C program starts
- All about linking
- Static libraries
- Dynamic libraries
- Scope
- Pointers and arrays
- Libraries
- Learning about the C++ standard
- How the standard is organized
- General conventions and concepts
- Language syntax
- Libraries
- Linking C++ applications
- Scope
- Pointers versus references
- Libraries
- Beginning with the POSIX standard
- Memory management
- Filesystems
- Sockets
- Threading
- Summary
- Questions
- Further reading
- System Types for C and C++
- Technical requirements
- Exploring C and C++ default types
- Character types
- Integer types
- Floating – point numbers
- Boolean
- Learning standard integer types
- Structure packing
- Summary
- Questions
- Further reading
- C++ RAII and the GSL Refresher
- Technical requirements
- A brief overview of C++17
- Language changes
- Initializers in if/switch statements
- Additions to compile-time facilities
- Namespaces
- Structured bindings
- Inline variables
- Changes in the library
- String View
- std::any std::variant and std::optional
- Resource Acquisition Is Initialization (RAII)
- The Guideline Support Library (GSL)
- Pointer ownership
- Pointer arithmetic
- Contracts
- Utilities
- Summary
- Questions
- Further Reading
- Programming Linux/Unix Systems
- Technical requirements
- The Linux ABI
- The System V ABI
- The register layout
- The stack frame
- Function prologs and epilogs
- The calling convention
- Exception handling and debugging
- Virtual memory layout
- Executable and Linkable Format (ELF)
- ELF sections
- ELF segments
- The Unix filesystem
- Unix processes
- The fork() function
- The wait() function
- Interprocess communication (IPC)
- Unix pipes
- Unix shared memory
- The exec() function
- Output redirection
- Unix signals
- Summary
- Questions
- Further reading
- Learning to Program Console Input/Output
- Technical requirements
- Learning about stream-based IO
- The basics of stream
- Advantages and disadvantages of C++ stream-based IO
- Advantages of C++ stream-based IO
- Disadvantages of C++ stream-based IO
- Beginning with user-defined types
- Safety and implicit memory management
- Common debugging patterns
- Performance of C++ streams
- Learning about manipulators
- Recreating the echo program
- Understanding the Serial Echo server example
- Summary
- Questions
- Further reading
- A Comprehensive Look at Memory Management
- Technical requirements
- Learning about the new and delete functions
- The basics for writing a program
- Aligning memory
- nothrow
- Placement of new
- Overloading
- Understanding smart pointers and ownership
- The std::unique_ptr{} pointer
- The std::shared_ptr pointer
- Learning about mapping and permissions
- The basics
- Permissions
- Smart pointers and mmap()
- Shared memory
- Learning importance of memory fragmentation
- External fragmentation
- Internal fragmentation
- Internal over external fragmentation
- External over internal fragmentation
- Summary
- Questions
- Further reading
- Learning to Program File Input/Output
- Technical requirements
- Opening a file
- Different ways to open a file
- Modes for opening a file
- Reading and writing to a file
- Reading from a file
- Reading by field
- Reading bytes
- Reading by line
- Writing to a file
- Writing by field
- Writing bytes
- Understanding file utilities
- Paths
- Understanding the logger example
- Learning about the tail file example
- Comparing C++ versus mmap benchmark
- Summary
- Questions
- Further reading
- A Hands-On Approach to Allocators
- Technical requirements
- Introducing the C++ allocators
- Learning about the basic allocator
- Understanding the allocator's properties and options
- Learning the properties
- The value pointer type
- Equality
- Different allocation types
- Copying equal allocators
- Moving equal allocators
- Exploring some optional properties
- Optional functions
- Studying an example of stateless cache–aligned allocator
- Compiling and testing
- Studying an example of a stateful memory–pool allocator
- Compiling and testing
- Summary
- Questions
- Further reading
- Programming POSIX Sockets Using C++
- Technical requirements
- Beginning with POSIX sockets
- Beginning with APIs
- The socket() API
- The bind() and connect() APIs
- The listen() and accept() APIs
- The send() recv() sendto() and recvfrom() APIs
- Studying an example on the UDP echo server
- Server
- The client logic
- Compiling and testing
- Studying an example on the TCP echo server
- Server
- The client logic
- Compiling and testing
- Exploring an example on TCP Logger
- Server
- The client logic
- Compiling and testing
- Trying out an example for processing packets
- The client logic
- Compiling and testing
- Processing an example of processing JSON
- Server
- The client logic
- Compiling and testing
- Summary
- Questions
- Further reading
- Time Interfaces in Unix
- Technical requirements
- Learning about POSIX time.h APIs
- Learning about the types of APIs
- The time() API
- The ctime() typedef
- The localtime() and gmtime() APIs
- The asctime() function
- The strftime() function
- The difftime() function
- The mktime() function
- The clock() function
- Exploring C++ Chrono APIs
- The system_clock() API
- The time_point API
- Duration
- The steady_clock function
- The high_resolution_clock function
- Studying an example on the read system clock
- Compiling and testing
- Studying an example on high-resolution timer
- Compiling and testing
- Summary
- Questions
- Further reading
- Learning to Program POSIX and C++ Threads
- Technical requirements
- Understanding POSIX threads
- The basics of POSIX threads
- Yielding
- Synchronization
- Exploring C++ threads
- The basics of C++ threads
- Yielding
- Synchronization
- Studying an example on parallel computation
- Compiling and testing
- Studying an example on benchmarking with threads
- Compiling and testing
- Studying an example on thread logging
- Compiling and testing
- Summary
- Questions
- Further reading
- Error – Handling with Exceptions
- Technical requirements
- Error handling POSIX-style
- Learning about set jump exceptions
- Understanding exception support in C++
- Studying an example on exception benchmark
- Compiling and testing
- Summary
- Questions
- Further reading
- Assessments
- Chapter 1
- Chapter 2
- Chapter 3
- Chapter 4
- Chapter 5
- Chapter 6
- Chapter 7
- Chapter 8
- Chapter 9
- Chapter 10
- Chapter 11
- Chapter 12
- Chapter 13
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時(shí)間:2021-07-02 14:43:17
推薦閱讀
- 同步:秩序如何從混沌中涌現(xiàn)
- Hands-On Data Structures and Algorithms with Rust
- Voice Application Development for Android
- Enterprise Integration with WSO2 ESB
- 金融商業(yè)算法建模:基于Python和SAS
- 科研統(tǒng)計(jì)思維與方法:SPSS實(shí)戰(zhàn)
- MySQL DBA修煉之道
- 區(qū)塊鏈+:落地場景與應(yīng)用實(shí)戰(zhàn)
- 利用Python進(jìn)行數(shù)據(jù)分析(原書第2版)
- Unity Game Development Blueprints
- 代碼的未來
- Configuration Management with Chef-Solo
- Mastering Java for Data Science
- 數(shù)據(jù)可視化五部曲
- Applying Math with Python
- 數(shù)據(jù)庫高效優(yōu)化:架構(gòu)、規(guī)范與SQL技巧
- Oracle 11g數(shù)據(jù)庫系統(tǒng)設(shè)計(jì)、開發(fā)、管理與應(yīng)用
- 大數(shù)據(jù)SQL優(yōu)化:原理與實(shí)踐
- 自己動(dòng)手做大數(shù)據(jù)系統(tǒng)(第2版)
- 新基建:大數(shù)據(jù)中心時(shí)代
- Kubernetes云原生數(shù)據(jù)管理
- 計(jì)算機(jī)視覺與深度學(xué)習(xí)實(shí)戰(zhàn):以MATLAB、Python為工具
- MySQL技術(shù)大全:開發(fā)、優(yōu)化與運(yùn)維實(shí)戰(zhàn)(視頻教學(xué)版)
- 架構(gòu)整潔之道
- Hands-On Design Patterns with C# and .NET Core
- PostgreSQL服務(wù)器編程
- 數(shù)據(jù)治理與數(shù)據(jù)安全
- R Deep Learning Essentials
- 大數(shù)據(jù)定義智能運(yùn)維
- 高效自動(dòng)化測試平臺(tái):設(shè)計(jì)與開發(fā)實(shí)戰(zhàn)