舉報

會員
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 更新時間:2021-07-02 14:43:17
推薦閱讀
- LibGDX Game Development Essentials
- Python絕技:運用Python成為頂級數據工程師
- Unity 5.x Game AI Programming Cookbook
- 工業大數據分析算法實戰
- 數據庫開發實踐案例
- 算法與數據中臺:基于Google、Facebook與微博實踐
- Ceph源碼分析
- 數亦有道:Python數據科學指南
- Learning Proxmox VE
- 從0到1:JavaScript 快速上手
- LabVIEW 完全自學手冊
- SQL Server 2012數據庫管理教程
- Hadoop集群與安全
- 中文版Access 2007實例與操作
- 數據庫與數據處理:Access 2010實現
- MySQL技術內幕:InnoDB存儲引擎
- 數據分析思維:產品經理的成長筆記
- 數據應用工程:方法論與實踐
- 數據挖掘算法實踐與案例詳解
- SOLIDWORKS 2018中文版機械設計基礎與實例教程
- 基于數據發布的隱私保護模型研究
- Mobile Application Penetration Testing
- 數據挖掘:實用案例分析
- 軟件定義數據中心:Windows Server SDDC技術與實踐
- PostgreSQL實戰
- 大數據技術和應用
- SQL語言與關系數據庫
- 游戲數據分析的藝術
- R Deep Learning Essentials
- 網站數據分析:數據驅動的網站管理、優化和運營