UNIX System Overview.

Slides:



Advertisements
Similar presentations
CSCI 1730 April 1 st, Materials Class notes slides & some “plain old” html & source code examples linked from course calendar board notes & diagrams.
Advertisements

Slide 2-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 2 Using the Operating System 2.
1 Introduction to UNIX Ke Liu
CHAPTER 2 THE UNIX SHELLS by U ğ ur Halıcı. layers in a unix system 1 Users Standard utility programs (shell, editors, compilers, etc.) Standard utility.
CS 497C – Introduction to UNIX Lecture 26: - The Process Chin-Chih Chang
Structure of Processes
Page 1 Processes and Threads Chapter 2. Page 2 Processes The Process Model Multiprogramming of four programs Conceptual model of 4 independent, sequential.
Process Process: the UNIX abstraction of a stand-along computer that manages resources (memory, CPU, I/O resources) comprising a running program. Processes.
Introduction to Kernel
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
More Shell Basics CS465 - Unix. Unix shells User’s default shell - specified in /etc/passwd file To show which shell you are currently using: $ echo $SHELL.
Guide To UNIX Using Linux Third Edition
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
Unix System Overview Programmer’s Perspective Chien-Chung Shen CIS, UD
Chapter 3 Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
The file structure and related utilities CS240 Computer Science II.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Linux in More Detail Shirley Moore CPS5401 August 29,
An Introduction to UNIX System --- Cosc513 Presentation n Instructor: Morteza Anvari n Author: Yonghong Pan n ID#: n Date: Jan.29, 2001.
The UNIX Shell. The Shell Program that constantly runs at terminal after a user has logged in. Prompts the user and waits for user input. Interprets command.
Adding New Users User as an entity - username(UID), GID. UID - typically a number for system to identify the user. GID – a number that recognizes a set.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
Operating Systems Recitation 1, March th, 2002.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 6 System Calls OS System.
Lesson 9-Setting and Using Permissions. Overview Describing file permissions. Using execute permissions with a file. Changing file permissions using mnemonics.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
CS 590 Programming Environments with UNIX. Computer Lab Account Course Homepage
Operating Systems Lecture November 2015© Copyright Virtual University of Pakistan 2 Agenda for Today Review of previous lecture Hardware (I/O, memory,
Process Control Process identifiers Process creation fork and vfork wait and waitpid Race conditions exec functions system function.
Scis.regis.edu ● CS 468: Advanced UNIX Class 4 Dr. Jesús Borrego Regis University 1.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
Operating Systems Process Creation
CS4315A. Berrached:CMS:UHD1 Process Management Chapter 6.
UNIX Unit 1- Architecture of Unix - By Pratima.
Advanced Programming in the UNIX Environment Hop Lee.
Lesson 3-Touring Utilities and System Features. Overview Employing fundamental utilities. Linux terminal sessions. Managing input and output. Using special.
Basic UNIX Concepts. Why We Need an Operating System (OS) OS interacts with hardware and manages programs. A safe environment for programs to run is required.
Manually Creating a New User Account Presented by Carl South.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Tarek Abdelzaher Vikram Adve CS241 Systems Programming System Calls and I/O.
What is a Process ? A program in execution.
1 Lecture 19: Unix signals and Terminal management n what is a signal n signal handling u kernel u user n signal generation n signal example usage n terminal.
Unix System Overview ( Programmer’s Perspective) Chien-Chung Shen CIS/UD
Agenda The Bourne Shell – Part I Redirection ( >, >>,
Introduction to Kernel
Implementation of a simple shell, xssh (Section 1 version)
Avani R.Vasant V.V.P. Engineering College
Using the Terminal Lab 3+.
Structure of Processes
An Introduction to UNIX System --- Cosc513 Presentation
Unix : Introduction and Commands
CS703 - Advanced Operating Systems
Process Description and Control
Introduction Paul Flynn
Process Description and Control
Process Description and Control
Operating Systems Lecture 3.
Process Control B.Ramamurthy 2/22/2019 B.Ramamurthy.
Process Description and Control
Controlling Processes
Unix Process Control B.Ramamurthy 4/11/2019 B.Ramamurthy.
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
CS510 Operating System Foundations
Process Description and Control in Unix
Chapter 3 The UNIX Shells
Process Description and Control in Unix
Access Control and Audit
Lecture Topics: 11/20 HW 7 What happens on a memory reference Traps
Presentation transcript:

UNIX System Overview

UNIX Architecture Kernel of os Software that controls hardware resources & provides environment under which programs can run System calls - Interface to kernel Libraries of common functions – built on top of system calls Shell – interface for running other programs

UNIX Architecture

Logging In Login name Password file – usually in /etc/passwd 7 colon separated fields Encrypted password Numeric user id Numeric group id Comment field Home directory Shell program

Shells Command line interpreter – reads user input & executes commands Bourne shell – written by Steve Bourne C shell – written by Bill Joy Korn shell – written by David Korn Bourne-again shell (bash) – GNU shell

File System Hierarchical arrangement of files & directories Starts at root – symbolic name is / Directory – file that contains directory entries Directory entry – filename & file attribute Size, owner, permissions, date last modified, ...

File Names Slash (/) & null characters – cannot appear in a file name . (current directory) & .. (parent directory) are automatically created

Pathname Sequence of 1 or more filenames separated by /'s & potentially starting with a / Start with / - absolute pathname Otherwise – relative pathname

Directories Working directory Current directory Home directory Each user has home directory – subdirectory of home

Input & Output File descriptor – non-negative integer used by kernel Predefined descriptors – automatically opened whenever new program is run Standard input Standard output Standard error

Input & Output Unbuffered I/O Provided by functions open, read, write, lseek, close Standard I/O Buffered interface to unbuffered functions printf fgets

Programs & Processes Program – executable file on disk Read into memory & executed by kernel Process – executing instance of a program Process id – unique numeric identifier Process control Fork Exec waitpid

Threads Threads within a process share address space Have own stack Need to synchronize access to shared variables Each thread – own id

Error Handling System functions – usually return a numeric error flag - <error.h> Each thread needs its own copy of errno Errno – not reinitialized each time – only use if an error has occurred Never set to 0 strerror – returns pointer to error message perror – creates error message on standard error

Error Recovery 2 types of errors: fatal & nonfatal Fatal error – no recovery possible Nonfatal – delay & try later

User Identification User ID - numeric value – assigned by system administrator when account is created root – id 0 Group id – assigned by system administrator Groups – collection of users with common characteristics Sharing of resources within group

Signals Technique to notify a process that a condition has occurred Choices for dealing with signal Ignore Let default action occur Provide a function which is called

Time Values Calendar time – number of seconds since Epoch (Jan 1, 1970) time_t data type Process time – measures CPU resources used Measured in terms of clock ticks clock_t data type

Time Values Execution time of a process Wall Clock time Amount of time for process to run User CPU time CPU time for user instructions System CPU time CPU time for kernel executing instructions for user time command

System Calls & Library Functions System calls – functions to request services from kernel C library function with same name as system call