36 Pages

Lecture27

Course: CS 411, Spring 2009
School: Oregon State
Rating:
 
 
 
 
 

Word Count: 1154

Document Preview

May Friday, 29 Project #4 Due Wednesday, June 3 before midnight Evaluation criteria are posted Questions / Comments? Do the Projects Survey Contribution credit Responses will be posted on the course wiki Today's topics Linux Virtual File System Intro to Synchronization Quiz #2 Virtual File Systems Subsystem of the OS that implements the file system interface for userspace Provides a set of...

Register Now

Unformatted Document Excerpt

Coursehero >> Oregon >> Oregon State >> CS 411

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
May Friday, 29 Project #4 Due Wednesday, June 3 before midnight Evaluation criteria are posted Questions / Comments? Do the Projects Survey Contribution credit Responses will be posted on the course wiki Today's topics Linux Virtual File System Intro to Synchronization Quiz #2 Virtual File Systems Subsystem of the OS that implements the file system interface for userspace Provides a set of system calls that work regardless of the "real" file system and underlying hardware File system should be transparent to users/applications open(), read(), write(), etc. Linux VFS Interface between the OS and the file systems as they exist on external devices. Implements generic calls to file I/O functions Hides differences in many supported devices and media All file systems implement basic structures and operations Some file systems may require additional features in order to be usable by the Linux VFS Linux VFS unix bias Supports other systems many require additional interfacing sysfs rootfs bdev proc sockfs binfmt_misc usbfs usbdevfs futexfs tmpfs rpc_pipefs eventpollfs devpts ext2 ext3 ext4 ramfs hugetlbfs iso9660 relayfs mqueue autofs nfs nfs4 ... and more Major VFS structures file dentry inode superblock File on disk: stream of bytes file structure: defined in <linux/fs.h> file structure represents an open file associated with a process in memory Similar to File Control Block Contains file perprocess information about file pointer to operations that manipulate a file pointers to file data stored in memory permissions, etc. read/write positions, etc. buffers, system perfile information, etc. dentry Component of a path dentry structure: defined in <linux/dcache.h> May be instantiated and cached as needed Contains directory name or file name not a full path name a directory is a file information about nodes in the file system's directory tree pointer to operations for dentry lookup etc. inode Stores one specific file's metadata Similar to Systemwide Openfile Table Copied to memory when file is first opened inode structure: defined in <linux/fs.h> Contains all information about a file pointer to operations that update the inode pointer to operations defined for the file structure etc. superblock Represents a specific mounted file system superblock structure: defined in <linux/fs.h> Contains pointer to operations that update the list of inodes etc. Other important VFS structures file_system_type structure defined in <linux/fs.h> contains pointer to function to get the superblock from the disk, etc. vfsmount structure defined in <linux/mount.h> acts as the mount point contains pointers to root, superblock for this file system, etc. Perprocess VFS structures files_struct structure defined in <linux/file.h> contains pointer to an array of open files for the process fs_struct structure defined in <linux/fs_struct.h> contains pointers to root, default directory, mount point, etc. Objects and Abstract Data Types Linux VFS defines certain structures and operations generically Structures contain pointers to structures of operations Structures of operations contain pointers to functions, etc. Objects and Abstract Data Types Function pointers point to functions implemented by the "real" file system File system types, I/O scheduling algorithms, etc. may be selected, enabled and built into kernel by boottime options on kernel command line default behaviors at file system mount time default overrides Objectorientation in Linux VFS (C) interface: struct contains class: implemented by assigning file system type instantiation: mounting a file system data fields (instance data) pointers to structs (generic data types) pointer to struct of function pointers (methods) function pointers reference actual file system functions Questions on Linux VFS? Introduction to Synchronization Cooperating Processes An independent process cannot affect or be affected by the execution of another process. Cooperating processes may affect each other Advantages of process cooperation Information sharing Computation Modularity speedup Convenience see discussion of parallelism Process Synchronization Concurrent access to shared data may result in data inconsistency. To maintain data consistency, must have mechanisms to ensure orderly execution of cooperating processes. ProducerConsumer Problem Paradigm for cooperating processes unboundedbuffer places no theoretical limit on the size of the buffer producer process produces data and sends it to a buffer consumer process takes data from the buffer Unbounded queue Circular queue boundedbuffer assumes that there is a fixed buffer size UnboundedBuffer SharedMemory Solution Shared data, initialization struct { . . . } item; queue q = create_q(); Producer Process UnboundedBuffer item nextProduced(); while (1) { q.enqueue(nextProduced()); } Consumer Process item nextConsumed; while (1) { if (!q.empty()){ nextConsumed = q.front(); q.dequeue(); } } BoundedBuffer SharedMemory Solution Shared data, initialization #define BUFFER_SIZE 10 struct { . . . } item; item buffer[BUFFER_SIZE]; int in = 0; int out = 0; BoundedBuffer SharedMemory Solution Buffer is implemented as a circular queue. (in == out) indicates empty buffer. indicates full buffer. Solution is correct, but can only use BUFFER_SIZE1 elements (((in + 1) % BUFFER_SIZE) == out) BoundedBuffer Producer Process item nextProduced(); while (1) { while (((in + 1) % BUFFER_SIZE) == out) ; /* buffer full - do nothing */ buffer[in] = nextProduced(); in = (in + 1) % BUFFER_SIZE; } BoundedBuffer Consumer Process item nextConsumed; while (1) { while (in == out) ; /* buffer empty - do nothing */ nextConsumed = buffer[out]; out = (out + 1) % BUFFER_SIZE; } Process Synchronization Sharedmemory solution to boundedbuffer problem allows at most n 1 items in the buffer. One way to use all spaces in the buffer: modify the producerconsumer code by adding a variable counter initialized to 0 incremented each time a new item is added to the buffer decremented each time an item is removed from the buffer counter == 0 means buffer is empty counter == BUFFER_SIZE means buffer is full BoundedBuffer Shared memory with counter Shared data, initialization #define BUFFER_SIZE 10 typedef struct { . . . } item; item buffer[BUFFER_SIZE]; int in = 0; int out = 0; int counter = 0; BoundedBuffer Producer process item nextProduced(); while (1) { while (counter == BUFFER_SIZE) ; /* do nothing */ buffer[in] = nextProduced(); in = (in + 1) % BUFFER_SIZE; counter++; } BoundedBuffer Consumer process item nextConsumed; while (1) { while (counter == 0) ; /* do nothing */ nextConsumed = buffer[out]; out = (out + 1) % BUFFER_SIZE; counter--; } BoundedBuffer Parts of each function must be performed atomically. Atomic operation Critical section ... an operation that completes in its entirety without interruption. Some may be implemented in hardware Otherwise, CPU scheduler may switch context before the operation is complete One of the problems: Interleaving If both the producer and consumer attempt to update the buffer concurrently, the assembly language statements may get interleaved. Interleaving depends on how the producer and consumer processes are scheduled by the CPU scheduler. Example The statement "count ++" may be implemented in assembly language as: register1 = counter register1 = register1 + 1 counter = register1 The statement "count " may be implemented as: register2 = counter register2 = register2 1 Example Assume counter is initially 5. Assembly level statements might get interleaved as: producer: register1 = counter (register1 = 5) producer: register1 = register1 + 1 (register1 = 6) consumer: register2 = counter (register2 = 5) consumer: register2 = register2 1 (register2 = 4) Race Condition When two or more processes access and manipulate shared data concurrently, and the final value of the shared data depends on which process finishes last ... a race condition exists. To prevent race conditions, concurrent processes must be synchronized Debugging is difficult, because the particular context switch that caused the race condition may not be reproducible To be continued ... Questions? Read Love Chapter 8 Quiz #2 Do the Projects Survey
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Oregon State - CS - 411
Quiz #2 is due now Project #4 Monday, June 1Do the Projects Survey Due Wednesday, June 3 before midnight Evaluation criteria are posted Questions / Comments? Contribution credit Responses (only 3 so far) are posted on the course wiki
Oregon State - CS - 411
Quiz #2 is gradedWednesday, June 3Project #4 Check scoresHomework #5 is posted Due tonight before midnight Evaluation criteria are posted Credit Distribution Agreement (hardcopy) is due by end of class Friday Review document is
Oregon State - CS - 411
Project #4 Friday, June 5Homework #5 Credit Distribution Agreement (hardcopy) is due by end of class Review document is due by midnight Solutions are postedDo the Projects Survey Paulson: Responses are posted on the wiki Contribu
Oregon State - CS - 411
CS411 Spring 2009 Project #1 Due 5 April 2009 Possible 3 5 6 6 6Team:Graded byPointsCommentsgzipped file correctly submitted Repository set up proj01 I/O scheduler Source code file shows changes Add a header block containing your team namea
Oregon State - CS - 411
CS411 Operating Systems IIProject #1Due on Sunday, April 5, before midnightSpring 2009Introduction: The projects for this course will involve modifications and additions to the linux kernel. For most students, this is unfamiliar and intimidatin
Oregon State - CS - 411
Spring 2009 CS411 Project #2 Due 11:59 pm, Sunday, April 26 PossibleTeam:Graded byPointsCommentsPreliminaries (9 pts) gzipped file submission, with all required files Submitted schedule.c Submitted schedule.h Submitted Makefile Compiles Doc
Oregon State - CS - 411
CS411 Operating Systems IIProject #2Spring 2009Due on Sunday, April 19 April 26, before midnightObjectives: 1. understand the basics of the Linux Scheduler 2. understand how a scheduler operates 3. be able to user the Linux kernel's Linked Lis
Oregon State - CS - 411
CS411 Project #3 Due before midnight Sunday, May 10Team:Graded byPoints PossiblePoints EarnedCommentsPreliminaries (20 pts) Plan of Attack (due Sunday, May 3) gzipped file submission Submitted slob.c, patch file, vmlinuz.proj3.teamXX, cha
Oregon State - CS - 411
CS411 Operating Systems IIProject #3Due before midnight Sunday, May 10Spring 2009(Plan of Attack due on Sunday, May 3)Introduction: The memory management layer is the part of the kernel that services all memory allocation requests. To handle
Oregon State - CS - 411
CS411 Operating Systems IISpring2009 NAME Michael Burns Project #4 Follow-up (Individual) (5% of Project #4 grade) Submit this evaluation at http:/engr.oregonstate.edu/teach before midnight Friday, June 5 TEAM # 12Part 1: Self-evaluation 1. Explai
Oregon State - CS - 411
CS411 Project #4 Due before midnight, Wednesday, June 3Team:Graded byPoints PossiblePoints EarnedCommentsPreliminaries (15 pts) Plan of Attack gzipped file submission Submitted source code file, compiled image, compiled module, patch file
Oregon State - CS - 411
CS444 3/04/05 Linux Virtual File SystemVFS Intro The Linux Virtual File System (VFS) is not a file system at all. It is a generic interface that can be used to create file systems for the Linux kernel. All file systems that are supported within
Oregon State - CS - 411
CS411 Operating Systems II Quiz # 2 Take-home, open-book, open-notes. Calculator permitted.Spring 2009Answers should be word-processed, printed, and attached to this page. This quiz is NOT a group project. You may NOT discuss this quiz with anyon
Oregon State - CS - 411
CS411 Operating Systems II Quiz # 2 1. (2 pts) 2. (3 pts)Spring 2009Solutions for selected problemsGiven a record file structure in a file system that provides only sequential access methods (i.e., create_file, reset, read_next_record, write_rec
Oregon State - CS - 411
CS 411 Operating Systems IIHomework Assignment #1 To be discussed in class FridayProblems adapted from Silberschatz, Galvin &amp; GagneSpring 20091. (Easy, but long) Given the following set of processes with arrival times, etc. Smaller priority num
Oregon State - CS - 411
CS 411 Operating Systems IIHomework Assignment #1 To be discussed in classSpring 2009SolutionsProblems adapted from Silberschatz, Galvin &amp; Gagne1. Given the following set of processes with arrival times, etc. Smaller priority numbers indicat
Oregon State - CS - 411
CS 411 Operating Systems II Homework Assignment #2Spring 2009 To be discussed in class1. Given the following memory partitions and processes 0 - 3 to be loaded (in numerical order) using contiguous allocation. Specify any processes that can not b
Oregon State - CS - 411
CS 411 Operating Systems II Homework Assignment #2Spring 2009 Solutions1. Given the following memory partitions and processes 0 - 3 to be loaded (in numerical order) using contiguous allocation. Specify any processes that can not be loaded, and c
Oregon State - CS - 411
CS 411 Operating Systems II Homework Assignment #3Spring 2009 To be discussed in classA system that uses demand paging has 5 frames, all initially empty. Given the page-reference string: 1,1,3,5,2,2,6,8,7,6,2,1,5,5,5,1,4,9,7,7 1. FIFO page-replac
Oregon State - CS - 411
CS 411 Operating Systems II Homework Assignment #3Spring 2009 SolutionsA system that uses demand paging has 5 frames, all initially empty. Given the page-reference string: 1,1,3,5,2,2,6,8,7,6,2,1,5,5,5,1,4,9,7,7 (Use FIFO to resolve ties.) 1. FIF
Oregon State - CS - 411
CS 411 Operating Systems IIHomework Assignment #4Spring 2009To be discussed in classGiven a disk drive with 5000 cylinders, numbered 0 to 4999. Assume that the disk head is positioned at cylinder 1023, and the previous request was at cylinder 1
Oregon State - CS - 411
CS 411 Operating Systems IIHomework Assignment #4Spring 2009SolutionsGiven a disk drive with 5000 cylinders, numbered 0 to 4999. Assume that the disk head is positioned at cylinder 1023, and the previous request was at cylinder 1088. (Note: thi
Oregon State - CS - 411
CS 411 Operating Systems IIHomework Assignment #5 To be discussed in classSpring 20091. Following is an algorithm for solving the critical section problem. Does this solve the problem of mutual exclusion? If so, prove it. If not, give an example
Oregon State - CS - 411
CS 411 Operating Systems IIHomework Assignment #5Spring 2009Solutions1. Following is an algorithm for solving the critical section problem. Does this solve the problem of mutual exclusion? If so, prove it. If not, give an example that disproves
Oregon State - CS - 312
CS 312 Linux System Administration I: IntroductionJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg KeeneInstructor IntroductionsCarlos Jensen Lance Albertson Jeff SheltrenGoals for this CourseInstall and Configure a Linux System Learn S
Oregon State - CS - 312
CS 312 Linux System Administration 2: Intro Pt 2 / VM DetailsJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseToday's Objectives Perl / Python Documentation / Wiki's SSH Installation / VM DetailsScripting
Oregon State - CS - 312
CS 312 Linux System Administration III: Linux InstallJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg KeeneAdministriva Note Taker Needed Groups for VMsToday's Objectives Disk Partitions Linux Packages (RPMs) CentOS InstallationPartit
Oregon State - CS - 312
CS 312 Linux System Administration 4: BootingJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseToday's Objectives Boot loaders Single-user mode Start-up scripts Shutting downBootstrapping &quot;pull itself
Oregon State - CS - 312
Announcements Note Taker Needed HW1 Due HW2 Posted; due 4/21 by 2PM Read Chapter 3, Chapter 5 (only Section 5.5), Chapter 6 (skip sections 6.2 and 6.3)2Usernames User info: /etc/passwd Passwords: /etc/shadow in hashed format $1$xxUwcovy$J
Oregon State - CS - 312
CS 312 Linux System Administration 6: ProcessesJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseAnnouncementsHW2 Due next Tuesday at 2PMemail tarball to cs312@osuosl.orgthMidterm April 28 Reading
Oregon State - CS - 312
CS 312 Linux System Administration 7: FilesystemsJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseAnnouncements HW 2 Due Connecting to Engineering Servers Midterm April 28 Reading rdChapter 5 &amp; 8 Ch
Oregon State - CS - 312
CS 312 Linux System Administration 8: LVM, RAID, &amp; PerformanceJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseAnnouncementsHW1 Grades HW3 Due April 30th Midterm April 28rd Reading LVM HOWTO (Chapte
Oregon State - CS - 312
CS 312 Linux System Administration 9: Cron, Backups, &amp; SyslogJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseAnnouncements HW3 Due Today Midterm Review next Tuesday ReadingBook Chapter 9, 10, &amp; 11(Rea
Oregon State - CS - 312
CS 312 Linux System Administration 11: NetworkingJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseToday's Objectives Networking DNS Kernel SettingsSetting up networking Assign IP &amp; Hostname Configure
Oregon State - CS - 312
CS 312 Linux System Administration XII: RPM &amp; yumJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg KeeneAdministrivaHW4 will be posted on 5/14; due 5/21 by 2PM Read Ch. 9, 10, 11, 14 from Max-RPM book (snapshot) http:/www.rpm.org/max-rpm-snaps
Oregon State - CS - 312
CS 312 Linux System Administration XIII: RPM &amp; yum (cont.)Jeff Sheltren &amp; Lance AlbertsonOSU Picture Greg KeeneAdministriva HW4 posted; due 5/21 by 2PM Read Ch. 9, 10, 11, 14 from Max-RPM book (snapshot) http:/www.rpm.org/max-rpm-snapshot Us
Oregon State - CS - 312
CS 312 Linux System Administration 14: Services: Email &amp; DNSJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseToday's ObjectivesEmail service How it works Configuration Postfix Planning Caching vs. Authori
Oregon State - CS - 312
CS 312 Linux System Administration 14: Services: Apache &amp; MySQLJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseToday's Objectives Apache Mysql DrupalApache LAMP &quot;stack&quot; Apache PHP/Perl/etc Database
Oregon State - CS - 312
CS 312 Linux System Administration XVI: Security Part 1Jeff Sheltren &amp; Lance AlbertsonOSU Picture Greg KeeneAdministrivaHW5 due Thursday, 5/28 by 2PM Thursday class is moved to Owen 101 Read: Chapter 21 Evaluations: Help us improve! To
Oregon State - CS - 312
CS 312 Linux System Administration 17: Security Part 2Jeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseAdministrivaHW5 due TODAY by 2PMToday's Objectives Part 2 of 2 on Security Account Policy Attack
Oregon State - CS - 312
CS 312 Linux System Administration 18: CFEngineJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseToday's Objectives Central Config Management Solutions CFEngine examplehttp:/www.cfengine.org http:/www.cfengi
Oregon State - CS - 312
CS 312 Linux System Administration 19: Misc TopicsJeff Sheltren &amp; Lance AlbertsonOSU Picture Greg Keene used under CC SA 3.0 licenseBuilding software Test new a application Bleeding edge Fix a bug manually Just good to know!How to build
Oregon State - CS - 312
Final ReviewCS312 Final Review things you should know for the test. Remember that the best resource for studying for the final will be reviewing the homework assignments. There will be a few questions not from the homework like before and any que
Oregon State - CS - 161
CS162: Introduction to Computer Science IIJava Fundamentals1Primitive types Primitive types:byte, short, int, long, float, double, char, boolean Example:int size = 42; size is a primitive variable, i.e., a variable that contains a data val
Oregon State - CS - 161
CS162: Introduction to Computer Science IIJava Fundamentals II1Primitive types Last time, we reviewed primitive types:byte, short, int, long, float, double, char, boolean Today, we'll review reference or class types2Outline1. Reference
Oregon State - CS - 161
CS162: Introduction to Computer Science IIClasses1Objects Object: An entity you can manipulate in a program An object is a specific instance of a class Class: defines the methods that you can apply to its objects and has a private impleme
Oregon State - CS - 161
CS162: Introduction to Computer Science IIClasses III1Outline1. Misc. items Clarification on overloading Layouts Inner classes Packages2. Classes3. Arrays2Clarification on Overloading Overloading: same method name for two or more m
Oregon State - CS - 161
CS162: Introduction to Computer Science IIArrays, ArrayLists, Exceptions1ArraysData structure (encapsulated data &amp; operations) Data elements of the same type (primitive or Object reference) Access method is indexing Fixed length Get array l
Oregon State - CS - 161
CS 162: Introduction to Computer Science IISpring 2006 Location: Cordley 1109 Time: M, W, F 9:00-9:50Instructor Dr. Weng-Keen Wong Office: KEC 2075 Office Hours: M, W 10:00 am - 12:00 pm F 3:00 pm -5:00 pm By appointmentTeaching Assistan
Oregon State - CS - 151
CS 151 Introduction to C ProgrammingGary Watson Wiegand 115 Fall 2005, MWF 12:00-12:509/26/051Overview Pretty much an electronic course See Handout for web address Black Board for quizzes and email9/26/052Who You No previous (prog
Oregon State - CS - 151
First Program9/26/051Programming Programming is an unnatural act. Humans solve problems without knowing how. Computers need step-by-step solution (i.e an algorithm). Our task: Learn the language (i.e. the tools). Learn to create algorithm
Oregon State - CS - 151
Using Code Warrior9/26/051CodeWarrior Used For: Creating projects Compiling programs Testing (running) programs9/26/0521. Create Folder for Programs Create a folder on your z: drive (lab) (e.g. &quot;cs151&quot;) or on your computer. Always cr
Oregon State - CS - 151
Electronic Program Submission9/26/051http:/engr.oregonstate.edu/teachUse this link to get your engr login9/26/052Your Engr. Account (login) Allows you to use the engineering electronic submission system Allows you to use the computers
Oregon State - CS - 151
Starting a C Program10/3/051Program1 Grading ExecutionAll required files present (source, grading criteria) Compiles (without Warnings or Errors) Executes (produces expected output)(45)15 15 15 InspectionProgrammed correctly as specifie
Oregon State - CS - 151
Identifiers, Variables, Operators10/3/051printf formatting %f can be used to print either float or double variables. Real number output formatting, %n.mfm specifies number of digits to right of decimal n specifies minimum width of printing f
Oregon State - CS - 151
Character Data Type10/3/051A New Data Type - char Just when you were starting understand the difference between int, float, and double!char b = 'z'; Holds one character (i.e a-z, A-Z, 0-9, etc). Uses one byte of storage A small integer ty
Oregon State - CS - 151
Data Types - Details10/10/051Numeric Types Learned So Far char small integer representing a symbol int positive/negative integers(10 digits) float positive/negative reals (6-7 digits) double positive/negative reals (15-16 digits)10/10/05
Oregon State - CS - 151
Basic File Input10/10/051File Properties Files have names. Files have size (in bytes). Files hold different kinds of data. Text file: Text characters and white space. Binary file: Any 8-bit byte OK. Files are like memory stored on a disk.
Oregon State - CS - 151
Flow of Control 110/10/051Relational Operators (Tests) &lt; &gt; &lt;= &gt;= = and != Binary operators with integer values. In C, zero means false and one means true. But also anything non-zero is true.10/10/052Some Examples Given a = 2, b =
Oregon State - CS - 151
Flow of Control 210/17/051DebuggingStart Debugging Window10/17/052Debugger Windowstop run program counter step over step into variablesIgnorebreak point10/17/053Two Steps Laterfp changedpc10/17/054Break Pointsclic
Oregon State - CS - 151
Library Functions10/17/051Function Libraries &lt;stdio.h&gt; - printf(), fprintf(), scanf(), fscanf(), fopen(), putchar(), getchar(), etc. &lt;math.h&gt; - pow(), sqrt(), fabs(), etc. &lt;ctype.h&gt; - toupper(), tolower(), isalpha(), isdigit(), etc. &lt;stdlib