Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Practical Systems Programming in Go
  • Table Of Contents Toc
Practical Systems Programming in Go

Practical Systems Programming in Go

By : Mihalis Tsoukalos
close
close
Practical Systems Programming in Go

Practical Systems Programming in Go

By: Mihalis Tsoukalos

Overview of this book

Go has become a leading language for Systems Programming thanks to its simplicity, strong concurrency model, and excellent performance. Practical Systems Programming in Go shows how to use Go beyond application development by building software that interacts with the operating system, networks, and data at scale. The book starts with a focused introduction to Go, covering the language features and standard packages most relevant to systems programming, including those handling concurrency, interfaces, testing, and runtime internals. It then moves into essential system-level topics such as file handling and I/O, UNIX signals, file systems, structured data formats, databases, and TCP/IP networking. Readers build practical command-line tools, web services, and network clients and servers along the way. In the final section, the book explores advanced applications, including writing an interpreter for a small programming language, processing time series data, building data-mining tools, and creating efficient indexes for UNIX file systems. By the end, readers will be able to design and implement robust systems software in Go for real-world environments.
Table of Contents (21 chapters)
close
close
Lock Free Chapter
1
Part 1: A quick introduction to Go
6
Part 2: Systems Programming Essentials
12
Part 3: Applications
20
Index

The Go program execution process

The Go program execution process begins with Go source code, which is then compiled and linked using go build. This creates a statically linked binary. The OS loader then executes this binary, which in turn triggers the Go runtime initialization. Once the Go runtime is set up, it starts the main() function. From here, the runtime system manages several key components. Let's look at Figure 4.1, which shows the progression starting from Go source code files at the top and moving down to the runtime system:

Image 1

Figure 4.1 – How a Go program is executed

The garbage collector is responsible for memory management and works with the memory allocator to handle the heap and stack. Goroutines and the scheduler manage concurrent execution, allowing for efficient use of system resources. Goroutines can interact with the system calls layer to perform I/O operations, network communication, and file access. main() can also directly interact with goroutines and...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Practical Systems Programming in Go
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon