Lecture%2001%20-%20Introduction%20to%20Unix%20and%20C

Lecture%2001%20-%20Introduction%20to%20Unix%20and%20C -...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Copyright @ 2009 Ananda Gunawardena Lecture 1 Introduction to Unix and C In this lecture Operating System Unix system shell Why learn C Program Development Process Compilation, Linking and Preprocessing ANSI-C The C compiler – gcc Jobs and Processes Killing a Process Moving from Java to C Additional Readings Exercises Operating System Each machine needs an Operating System (OS). An operating system is a software program that manages coordination between application programs and underlying hardware. OS manages devices such as printers, disks, monitors and manage multiple tasks such as processes. UNIX is an operating system. The following figure demonstrates the high level view of the layers of a computer system. It demonstrates that the end users interface with the computer at the application level, while programmers deal with utilities and operating system level. On the other hand, an OS designed must understand how to interface with the underlying hardware architecture.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Copyright @ 2009 Ananda Gunawardena Unix is an operating system developed by AT&T in the late 60’s. BSD (Berkeley Unix) and Linux, are unix-like operating systems that are widely used in servers and many other platforms such as portable devices. Linux, an open source version of Unix-like operating system was first developed by Linus Torvalds. Linux has become a popular operating system used by many devices. Many volunteer developers have contributed to the development of many linux based resources. Linux is free, open source, and have very low hardware requirements. This makes linux a popular operating system for devices with limited hardware capabilities as well as running low cost personal computers. In this course, we will begin with an introduction to the unix operating system. We will be using Andrew Linux and we will see how we can use the power of unix to manipulate the Andrew File System (AFS) and use unix tools and shell scripting to accomplish interesting tasks. Our focus would be on the unix features that are more directly related to writing, debugging and maintaining C programs. We will also focus on unix shell scripting, so we can develop powerful scripts for managing tasks such as unix system calls, file manipulation etc. To find out which version of the operating system you are running type % uname –o At the shell prompt. Application programs Utilities Operating System Computer Hardware OS Designer End user Programmer
Background image of page 2
Copyright @ 2009 Ananda Gunawardena In general, uname prints system information. Uname –a will print all information. The Unix System Shell Although unix has graphical user interfaces (such as x- windows) to access its tools, we will be focusing our work at the shell level. After login, we interact with the unix through a program called a “unix shell”. Shell is a command interpreter. In other words, you provide commands that you would like to be interpreted by the shell. The command interpretation cycle of the shell is as follows. Prompt
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/27/2009 for the course CS 123 taught by Professor Bajkzek during the Fall '08 term at Carnegie Mellon.

Page1 / 14

Lecture%2001%20-%20Introduction%20to%20Unix%20and%20C -...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online