What is Systems Programming?
- Systems programs form the infrastructure of computing: Operating Systems, device drivers, Network Protocol Stacks
- Key characteristics:
- Strict performance constraints
- Need for Memory Management efficiency
- Require control over data representation
- Need to effectively manage O Operations
- Must handle Shared State effectively
Systems Programming vs. Application Programming
- Systems programming requires low-level control over data layout and memory
- Systems components are often bottlenecks as they form the foundation for higher-level components
- Languages like C/C++ remain popular for systems programming due to the control they provide
- Languages such as Java, Python, and Go lack the necessary low-level control for true systems programming
Current State of Operating Systems
- Most modern systems run some variant of Unix (Linux, macOS, iOS)
- Windows is an exception, being influenced by VMS
- Unix and C have proven remarkably resilient, with core APIs recognizably the same after decades
- Success factors include:
- Portability
- Source code availability to universities
- Relatively clean and consistent API
- The pointer abstraction in C provided a simple yet powerful mechanism
Limitations of Current Systems
- Unix Networking and Filesystem APIs can be performance bottlenecks
- Security Models designed for multi-user systems don’t fit personal data protection needs
- Lack of portable APIs for modern concerns (mobility, Power Management)
- C is flexible but error-prone, making Security Vulnerabilities common
- Limited support for Concurrency
Environmental Changes Affecting Systems Programming
-
End of Moore’s Law and Dennard Scaling
- Clock frequencies have stalled since mid-2000s due to power constraints
- Number of Cores increasing exponentially instead
- Parallelism becoming essential
-
Increasing Concurrency
- Multi-core Systems are now standard
- Concurrency Bugs becoming more visible
- Writing correct concurrent software is difficult
-
- Always-on Internet Connectivity exposes vulnerabilities
- Number of security vulnerabilities increasing annually
- Memory Safety issues are a primary concern
-
Connectivity and Mobility
- Devices are mobile, battery-powered, and network-connected
- Cloud Computing and offloading computation is common
- Applications need to adapt to network variations
The Way Forward
- Need for safer systems programming languages that maintain control over data representation
- Modern Type Systems can help improve expressivity, correctness, and security
- Apply Functional Programming techniques to systems programming
- Use Type-Driven Development to catch issues at compile time