skip to main content
10.1145/3477113.3487274acmconferencesArticle/Chapter ViewAbstractPublication PagessospConference Proceedingsconference-collections
research-article

How ISO C became unusable for operating systems development

Published: 25 October 2021 Publication History

Abstract

The C programming language was developed in the 1970s as a fairly unconventional systems and operating systems development tool, but has, through the course of the ISO Standards process, added many attributes of more conventional programming languages and become less suitable for operating systems development. Operating system programming continues to be done in non-ISO dialects of C. The differences provide a glimpse of operating system requirements for programming languages.

Supplementary Material

MP4 File (How ISO C became unsuitable for operating systems.mp4)
How ISO C became unsuitable for operating systems development. A talk about how the ISO Standards process produced a version of C that does not work well for OS development and what mechanisms and objectives affected it.

References

[1]
Will Dietz, Peng Li, John Regehr, and Vikram Adve. 2012. Understanding Integer Overflow in C/C++. Proceedings - International Conference on Software Engineering 25 (07 2012). https://doi.org/10.1109/ICSE.2012.6227142
[2]
M. Anton Ertl. 2015. What every compiler writer should know about programmers. In 18. Kolloquium Programmiersprachen und Grundlagen der Programmierung (KPS'15), Jens Knoop and M. Anton Ertl (Eds.). 112--133. http://www.complang.tuwien.ac.at/kps2015/proceedings/KPS_2015_submission_29.pdf
[3]
M. Anton Ertl. 2017. The Intended Meaning of Undefined Behaviour in C Programs. In 19. Kolloquium Programmiersprachen und Grundlagen der Programmierung (KPS'17), Wolfram Amme and Thomas Heinze (Eds.). 20--28. http://www.complang.tuwien.ac.at/papers/ertl17kps.pdf
[4]
Felix-gcc. 2007. Bug 30475 - assert(int+100 > int) optimized away. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30475
[5]
Jens Gustedt, Peter Sewell, Kayvan Memarian, Victor B. F. Gomes, and Martin Uecker. 2021. A Provenance-aware Memory Object Model for C. Draft Technical Specification N2577. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2577.pdf
[6]
Chris Hathhorn, Chucky Ellison, and Grigore Roşu. 2015. Defining the Undefinedness of C. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (Portland, OR, USA) (PLDI '15). Association for Computing Machinery, New York, NY, USA, 336--345. https://doi.org/10.1145/2737924.2737979
[7]
M. Hind and Anthony Pioli. 2000. Which pointer analysis should I use?. In ISSTA '00.
[8]
ISO PL22.11 - SC22/WG14. 2018. Programming language: C: ISO/IEC 9899:2018 (C18). Number ISO/IEC 9899:2018).
[9]
INCITS J11 and SC22 WG14. 2003. Rationale for International Standard. Programming Languages. C Revision 5.10. http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf
[10]
Derek Jones. 2017. How indeterminate is an indeterminate value. http://shape-of-code.coding-guidelines.com/2017/06/18/how-indeterminate-is-an-indeterminate-value/
[11]
Jeehoon Kang, Chung-Kil Hur, William Mansky, Dmitri Garbuzov, Steve Zdancewic, and Viktor Vafeiadis. 2015. A Formal C Memory Model Supporting Integer-Pointer Casts. SIGPLAN Not. 50, 6 (June 2015), 326--335. https://doi.org/10.1145/2813885.2738005
[12]
Brian W. Kernighan. [n.d.]. Why Pascal is Not My Favorite Programming Language. http://www.lysator.liu.se/c/bwk-on-pascal.html
[13]
Brian W. Kernighan and Dennis M. Ritchie. 1988. The C Programming Language (2nd ed.). Prentice Hall Professional Technical Reference.
[14]
W. Landi and B. Ryder. 1992. A safe approximate algorithm for inter-procedural aliasing. In PLDI '92.
[15]
Chris Lattner. 2011. What every C programmer should know. http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
[16]
Chris Lattner. 2011. What Every C Programmer Should Know About Undefined Behavior 2/3. https://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html
[17]
Juneyoung Lee, Yoonseung Kim, Youngju Song, Chung-Kil Hur, Sanjoy Das, David Majnemer, John Regehr, and Nuno P. Lopes. 2017. Taming Undefined Behavior in LLVM. SIGPLAN Not. 52, 6 (June 2017), 633--647. https://doi.org/10.1145/3140587.3062343
[18]
Xavier Leroy. 2009. Formal verification of a realistic compiler. Commun. ACM 52, 7 (2009), 107--115. http://xavierleroy.org/publi/compcert-CACM.pdf
[19]
Xavier Leroy. 2021. Personal Communication.
[20]
Xavier Leroy, Andrew W. Appel, Sandrine Blazy, and Gordon Stewart. 2012. The CompCert Memory Model, Version 2. Research Report RR-7987. INRIA. 26 pages. https://hal.inria.fr/hal-00703441
[21]
Vladimir Makarov. 2020. MIR: A lightweight JIT compiler project. https://developers.redhat.com/blog/2020/01/20/mir-a-lightweight-jit-compiler-project
[22]
Paul E. McKenney, Maged Michael, Jens Mauer, Peter Sewell, Martin Uecker, Hans Boehm, Hubert Tong, and Niall Douglas. 2019. Pointer lifetime-end zap. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1726r0.pdf
[23]
Joseph Myers. 2014. "Bug 61502: comparison on "one-past" pointer gives wrong result, comment 1". https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61502
[24]
Thi Viet Nga Nguyen and François Irigoin. 2003. Alias verification for Fortran code optimization. J. UCS 9, 3 (2003), 270.
[25]
Vegard Nossum. 2016. "Subject [PATCH] firmware: declare _start, end_builtin_fw as pointers". https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61502
[26]
X3J11 Technical Committee on the C Programming Language. 1989. ANSI X3.159, 1989 Edition, 1989 - INFORMATION SYSTEMS - PROGRAMMING LANGUAGE - C.
[27]
Clang Project. 2021. Clang 13 Documentation. https://clang.llvm.org/docs/UsersManual.html
[28]
GNU Project. 2021. GCC Documentation. https://gcc.gnu.org/onlinedocs/
[29]
Ganesan Ramalingam. 1994. The undecidability of aliasing. ACM Transactions on Programming Languages and Systems (TOPLAS) 16, 5 (1994), 1467--1471.
[30]
John Regehr. 2010. https://blog.regehr.org/archives/213
[31]
John Regehr. 2016. The Strict Aliasing Situation is Pretty Bad. https://blog.regehr.org/archives/1307
[32]
Dennis Ritchie. 1988. noalias comments to X3J11. (March 1988). https://groups.google.com/g/comp.lang.c/c/K0Cz2s9il3E/m/YDyo_xaRG5kJ
[33]
DM Ritchie, SC Johnson, ME Lesk, and BW Kernighan. 1978. The C programming language, Bell Systems Tech. J 57, 6 (1978), 1991--2020.
[34]
Eskil Steenberg. 2021. "Compiler Explorer UShort promotion UB". https://godbolt.org/z/7q9dPzEfM
[35]
Eskil Steenberg. 2021. Redefining Undefined Behavior N2769. (21 6 2021). http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2769.pdf
[36]
Linus Torvalds. [n.d.]. Reloc-Hide in Linux Kernel. https://github.com/torvalds/linux/blob/35e43538af8fd2cb39d58caca1134a87db173f75/include/linux/compiler-gcc.h
[37]
Linus Torvalds. 2009. Re Gcc inlining heuristics. https://www.mailarchive.com/linux- [email protected]/msg01647.html
[38]
Linus Torvalds. 2018. Re: [GIT PULL] Device properties framework update for v4.18-rc1. https://lkml.org/lkml/2018/6/5/769
[39]
Linus Torvalds. 2018. Re: LKMM litmus test for Roman Penyaev's rcu-rr. https://lkml.org/lkml/2018/6/7/761
[40]
Xi Wang, Haogang Chen, Alvin Cheung, Zhihao Jia, Nickolai Zeldovich, and M. Frans Kaashoek. 2012. Undefined Behavior: What Happened to My Code?. In Proceedings of the Asia-Pacific Workshop on Systems (Seoul, Republic of Korea) (APSYS '12). Association for Computing Machinery, New York, NY, USA, Article 9, 7 pages. https://doi.org/10.1145/2349896.2349905
[41]
Xi Wang, Nickolai Zeldovich, M. Frans Kaashoek, and Armando Solar-Lezama. 2015. A Differential Approach to Undefined Behavior Detection. ACM Trans. Comput. Syst. 33, 1, Article 1 (March 2015), 29 pages. https://doi.org/10.1145/2699678
[42]
William A Wulf. 1972. Systems for systems implementors: some experiences from Bliss. In Proceedings of the December 5-7, 1972, fall joint computer conference, part II. 943--948.
[43]
Victor Yodaiken. 2021. Compiler Explorer ISO C Division. https://godbolt.org/z/zWh9c5e84
[44]
Victor Yodaiken. 2021. Example of Clang and type based alias. https://godbolt.org/z/nq19n8dhE

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLOS '21: Proceedings of the 11th Workshop on Programming Languages and Operating Systems
October 2021
96 pages
ISBN:9781450387071
DOI:10.1145/3477113
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 October 2021

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. C
  2. ISO-C
  3. UNIX
  4. compiler
  5. operating systems
  6. programming languages

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

SOSP '21
Sponsor:

Acceptance Rates

Overall Acceptance Rate 17 of 32 submissions, 53%

Upcoming Conference

SOSP '25
ACM SIGOPS 31st Symposium on Operating Systems Principles
October 13 - 16, 2025
Seoul , Republic of Korea

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)51
  • Downloads (Last 6 weeks)10
Reflects downloads up to 30 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Efficiently Adapting Stateless Model Checking for C11/C++11 to Mixed-Size AccessesProgramming Languages and Systems10.1007/978-981-97-8943-6_17(346-364)Online publication date: 23-Oct-2024
  • (2024)Accurate Static Data Race Detection for CFormal Methods10.1007/978-3-031-71162-6_23(443-462)Online publication date: 11-Sep-2024
  • (2023)Catch-23: The New C Standard Sets the World on FireQueue10.1145/358824221:1(12-30)Online publication date: 29-Mar-2023
  • (2023)A Research Agenda for Space Flight Software Security2023 IEEE 9th International Conference on Space Mission Challenges for Information Technology (SMC-IT)10.1109/SMC-IT56444.2023.00016(68-77)Online publication date: Jul-2023
  • (2022)Hardware/Software Co-Assurance using the Rust Programming Language and ACL2Electronic Proceedings in Theoretical Computer Science10.4204/EPTCS.359.16359(202-216)Online publication date: 24-May-2022

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media