20
Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Embed Size (px)

Citation preview

Page 1: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Overview: Linux and Unix

Credit: Cailan Hao (Lancy)Instructor: Mort Anvari

Date: 11/3/1999

Southeastern University

(OS comparison)

The symbol of Linux

Page 2: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

• FREE (GPL Licensed), based heavily on the POSIX and UNIX API's.

• Supports both 32 and 64 bit hardware; Provide a stable multi-user Internet ready OS.

Basic Linux Information

Note: The word “Linux” throughout the presentation refers to Red Hat Linux 6.0 – the most popular type of Linux.

Slide 2

SECTION I: LINUX OVERVIEW

Page 3: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

• Linux uses the Buddy algorithm to effectively allocate and de-allocate blocks of pages. (Left Figure)

• Linux assumes that there are three levels of page tables. (Right Figure)

Slide 3Memory Management

SECTION I: LINUX OVERVIEW

Page 4: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Cache Management• The role of the Linux page cache is to speed up access

to files on disk.• When swapping pages out to the swap files, Linux

avoids writing pages if it does not have to.

Slide 4

SECTION I: LINUX OVERVIEW

Page 5: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

How Linux Processes• Linux is a multiprocessing

operating system

• Its objective is to have a process running on each CPU in the system at all times -maximize CPU utilization.

• Linux supports a number of different executable file formats. EX: ELF and Java

• Linux can manage the processes in the system, each process is represented by a task_struct data structure

• Some common function areas:– State

• Running: ready to run• Waiting: waiting for an event• Stopped: process stopped• Zombie: halted

• Scheduling Information: which program most deserve to run

• Identifiers: used to control this processes access to the files and devices in the system

• Times and Timers: Each clock tick, the kernel updates the amount of time in jiffies that the current process has spent in system and in user mode

Slide 5

SECTION I: LINUX OVERVIEW

Page 6: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Linux Networking• Linux implements the

internet protocol address family as a series of connected layers of software:

• Linux supports the following socket address families or domains: – UNIX - Unix domain

sockets, – INET – TCP/IP protocols – AX25 - Amateur radio

X25 – IPX - Novell IPX – APPLETALK – AppleTalk

DDP – X25 - X25

Slide 6

SECTION I: LINUX OVERVIEW

Page 7: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Linux PCI Initialization• The PCI initialization code in

Linux is broken into three logical parts:

• PCI Device Driver– searches the PCI system;

starting at Bus 0 and locates all PCI devices and bridges in the system; builds a linked list of data

• PCI BIOS– provides the services described

in bib-pci-bios-specification

• PCI Fix-up– tidies up the system specific

loose ends of PCI initialization.

SECTION I: LINUX OVERVIEW

Slide 7

Page 8: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Unix OS Structure

• Unix is a layered operating system

• User programs interact with the kernel through a set of standard system calls

• Unix is a multi-user, multi-tasking operating system

SECTION 2 – UNIX OVERVIEW

Slide 8

Page 9: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Unix File System• You start with the root directory, denoted by /, at the

top and work down through sub-directories underneath

it.

Slide 9

SECTION 2 – UNIX OVERVIEW

Page 10: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Unix Directories Structure

• Every directory and file is listed in its parent directory.

• An inode is a special file designed to be read by the kernel to learn the information about each file. – function: specifies the permissions on the file, ownership, date of creation and of last access and change.

• The system – does not require particular structure for the data in the file itself.

• There's no header, trailer, label information or EOF character as part of the file.

SECTION 2 – UNIX OVERVIEW

Slide 10

Page 11: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Unix Common Control Keys

• Control keys - used to perform special functions on the command line or within an editor in Unix

• ^S, With control keys upper and lower case are the same, so ^S is the same as ^s. This particular example is a stop signal and tells the terminal to stop accepting input

• EX: Control-U is normally the "line-kill" signal for your terminal. It erases the entire input file.

Slide 11

SECTION 2 – UNIX OVERVIEW

Page 12: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Unix Shell

• The shell - acting as a command interpreter - reads your terminal input and translates the commands into actions taken by the system.

• The shell is analogous to command.com in DOS. The original shell was the Bourne shell, sh. Every Unix platform will either have the Bourne shell, or a Bourne compatible shell available.

• The default prompt for the Bourne shell is $ (or #, for the root user). The default prompt for the C shell is %.

SECTION 2 – UNIX OVERVIEW

Slide 12

Page 13: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Similarity - File System

• For both OS: – Separate filesystems

that the system may use are not accessed by device identifiers (such as a drive number or a drive name) but instead they are combined into a single hierarchical tree structure that represents the filesystem as a single entity.

• Unix and Linux transparently supports many different filesystems (for example MS-DOS and EXT2) and presents all of the mounted files and filesystems as one integrated virtual filesystem.

SECTION 3 - COMPARISON

Slide 13

Page 14: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Similarity – Memory Management

• Linux supports the Unix TM System V shared memory IPC.

SECTION 3 - COMPARISON

Slide 14

Page 15: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Similarity - IPC

• Inter-Process Communication

– Linux supports the classic Unix TM IPC mechanisms of signals, pipes and semaphores and also the System V IPC mechanisms of shared memory, semaphores and message queues.

SECTION 3 - COMPARISON

Slide 15

Page 16: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Similarity – Identifiers

• Linux and Unix - uses user and group identifiers to check for access rights to files and images in the system.

• All of the files in a Linux system have ownerships and permissions, these permissions describe what access the system's users have to that file or directory.

Slide 16

SECTION 3 - COMPARISON

Page 17: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Similarity – Executing Programs

• In both OS - programs and commands are normally executed by a command interpreter. (A command interpreter is a user process like any other process and is called a shell 2)

• Shells - searches the directories in the process's search path, held in the PATH environment variable, for an executable image with a matching name.

SECTION 3 - COMPARISON

Slide 17

Page 18: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Similarity - EXT2 File System

• A Linux filename has the same format as all Unix TM filenames have. It is a series of directory names separated by forward slashes (``/'') and ending in the file's name.

• EX: /home/rusling/.cshrc where /home and /rusling are directory names and the file's name is .cshrc.

• Like Unix TM systems, Linux does not care about the format of the filename itself; it can be any length and consist of any of the printable characters.

Slide 18

SECTION 3 - COMPARISON

Page 19: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

DIFFERENCE

• Although Linux share a lot of similarities with Unix, It is not Unix.

• Many people think Linux is a kind of Unix but actually, they do not come from the same source code base.

END NOTE: THE MAJOR DIFFERENCE

Slide 19

Page 20: Overview: Linux and Unix Credit: Cailan Hao (Lancy) Instructor: Mort Anvari Date: 11/3/1999 Southeastern University (OS comparison) The symbol of Linux

Presentation Info

• Presentation designer: Cailan Hao (Lancy)

• Presentation Instructor: Mort Anvari

• Presentation content: Overview Linux and Unix – Comparison

• Presentation Slides #: 20

• Contact Me– [email protected]– Name: Lancy

*OS Comparison Presentation11/3/1999