Chapter 1. General Unix and Advanced C
2011-07-19 22:46
288 查看
Computer Science from the Bottom Up | ||
---|---|---|
Prev | Next |
Chapter 1. General Unix and Advanced C
Table of ContentsEverything is a file!Abstraction and function pointersStandard File DescriptorsEverything is a file!
If you learn nothing else, you should remember that in UNIX everything is a file.Imagine a file in the context something familiar like a word processor. There are two fundamental operations we can use on this imaginary word processing file
Read it (existing saved data from the word processor).
Write to it (new data from the user).
Now consider some of the common things attached to a computer and how they relate to our fundamental file operations.
The screen
The keyboard
A printer
A CDROM
The screen and printer are both like a write-only file, but instead of being stored as bits on a disk the information is displayer as dots on a screen or lines on a page. The keyboard is like a read only file with the data coming from keystrokes and the CDROM is similar but rather than randomly coming from the user the data is stored directly on the disk.
Thus a file is a good abstraction of all the devices attached to the computer. Some files may be read-only, or write-only, or indeed both.
Prev | Home | Next |
About the course | | Abstraction and function pointers |
原文链接:http://bottomupcs.sourceforge.net/csbu/c57.htm
相关文章推荐
- M202: MongoDB Advanced Deployment and Operations - Chapter 4: Sharded Cluster Management
- Advanced DBA certification guide and reference for DB2 universal database v8 for Linux, UNIX, and Wi
- APUE学习笔记 - Chapter 2 . Unix Standardization and Implementations
- Advanced Programming in the UNIX® Environment: Second Edition(Chapter 3. File I/O 3.1 3.2 3.3)
- M202: MongoDB Advanced Deployment and Operations - Chapter 5: Log Files
- !!!Chapter 12 Advanced Data Structure and Implementation
- Chapter 7. Advanced DirectDraw and Bitmapped Graphics
- 本周技术关注:Advanced Linux and Unix Programming
- Advanced Project Management: A Complete Guide to the Key Processes, Models and Technique
- Expressions and Statements(Chapter 6 of The C++ Programming Language)
- Chapter 1 Arrays and Strings
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Think Python - Chapter 17 - Classes and methods
- An Architecture for Fast and General Data Processing on Large Clusters
- Files and Strings(Chapter 10 of Python 3 Object Oriented Programming)
- 【CSS3】Advanced3:Universal, Child, and Adjacent Selectors
- Linux and Unix websites,books
- Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COER
- Tutorial for building J2EE Applications using JBOSS and ECLIPSE Chapter 3
- Chapter 2. Binary and Number Representation