Advanced Unix System Administration

Similar documents
Process Management forks, bombs, zombies, and daemons! Lecture 5, Hands-On Unix System Administration DeCal

Authored by: Brian E. Brzezicki Copyright 2013, Paladin Group LLC Reuse without permission is strictly prohibited

RHCE BOOT CAMP. The Boot Process. Wednesday, November 28, 12

CSE 265: System and Network Administration

CSE 265: System and Network Administration

Chapter 2 Booting Up and Shutting Down

Booting Up and Shutting Down. lctseng / Liang-Chi Tseng

The Linux IPL Procedure

Certification. System Initialization and Services

CST8177 Linux II. Linux Boot Process

Booting Up and Shutting Down

minit Felix von Leitner September 2004 minit

OPERATING SYSTEMS LINUX

System Administration. Startup Process

OPERATING SYSTEMS. Božo Krstajić, PhD, University of Montenegro Podgorica.

LPI Exam LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2 Version: 6.0 [ Total Questions: 120 ]

University of Pennsylvania Zachary Goldberg. CIS c. More Kernel Bits. 10/03/09 Slide 1

Booting up and Shutting down A primer for troubleshooting

CompTIA Exam LX0-103 CompTIA Linux+ [Powered by LPI] Exam 1 Version: 6.0 [ Total Questions: 120 ]

Runlevels, System Shutdown and Reboot

Advanced Operating Systems and Virtualization. Alessandro Pellegrini A.Y. 2017/2018

LPI EXAM LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2. Buy Full Product.

SANE 2006 Solaris SMF 15/05/06 11:03

launchd (and other fun stuff) James Reynolds University of Utah Student Computing Labs Macintosh Support

Processes. CS3026 Operating Systems Lecture 05

PL-I Assignment Broup B-Ass 5 BIOS & UEFI

Proceedings of the FREENIX Track: 2001 USENIX Annual Technical Conference

Automating Linux App Startup

Lab 3a Using the vi editor

Linux/Citrix Virtual Environment Documentation

LX0-103 Exam Questions Demo CompTIA. Exam Questions LX CompTIA Linux+ [Powered by LPI] 1

OS security mechanisms:

The Early System Start-Up Process. Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu

CS 486 Capstone Project Software Design Specification (Revision 1.0) Submitted to Dr. Doerry

LPIC-1 Exam 101, Part 1 of 2, version 4.0

Linux System Administration

Basic Shell Commands. Bok, Jong Soon

THE PROCESS ABSTRACTION. CS124 Operating Systems Winter , Lecture 7

Please choose the best answer. More than one answer might be true, but choose the one that is best.

HOW LINUX BOOTS. As it turns out, there isn t much to the boot process:

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

What is a Process? Processes and Process Management Details for running a program

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2018 Lecture 20

OS Structure, Processes & Process Management. Don Porter Portions courtesy Emmett Witchel

Vendor: RedHat. Exam Code: RH133. Exam Name: Red Hat Linux System Administration. Version: Demo

client X11 Linux workstation

Introduction to Linux Init Scripts

UNIX System Administration

HP-UX System Administration Course Overview. Skills Gained. Who will the Course Benefit?

A Survey of Unix Init Schemes

Introducing. By Olivier COCHARD LABBÉ, FreeNAS author and project manager until april 2008

UNIX / LINUX - GETTING STARTED

ECE 471 Embedded Systems Lecture 16

Initialization: runlevels

FreeBSD Overview Comparison with Linux. Welcome. Class Schedule. Some Practical Matters. Introduction. SANOG VI IP Services Workshop

Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Automating Linux App Startup

ITDUMPS QUESTION & ANSWER. Accurate study guides, High passing rate! IT dumps provides update free of charge in one year!

The System Monitor Handbook. Chris Schlaeger John Tapsell Chris Schlaeger Tobias Koenig

Processes. System tasks Campus-Booster ID : **XXXXX. Copyright SUPINFO. All rights reserved

simplevisor Documentation

Some Practical Matters. Introduction to Unix. What's Our Goal? Linux!= UNIX

Mac OS X 10.4 Tiger. What's New for UNIX Users?

G54ADM Sample Exam Questions and Answers

Fall 2017 :: CSE 306. Process Abstraction. Nima Honarmand

CompTIA Linux+/LPIC-1 COPYRIGHTED MATERIAL

DUAL OS INSTALLATION

Introduction to UNIX/LINUX Security. Hu Weiwei

CS61 Scribe Notes Date: Topic: Fork, Advanced Virtual Memory. Scribes: Mitchel Cole Emily Lawton Jefferson Lee Wentao Xu

The UNIX operating system is a set of programs that act as a link between the computer and the user.

Unix/Linux: History and Philosophy

Chapter. Basic Administration. Secrets in This Chapter. Monitoring the System Viewing Log Files Managing Services and Programs Monitoring Disk Usage

More on file systems, Booting Todd Kelley CST8177 Todd Kelley 1

exam.30q. Number: Passing Score: 800 Time Limit: 120 min File Version: 1 LPI

Kernel Types Simple OS Examples System Calls. Operating Systems. Autumn CS4023

CL030 is a csage Certification Preparatory Course!

Linux and scripting. Fontys Venlo Software Engineering series LINUX. Ir. Pieter van den Hombergh

L4/Darwin: Evolving UNIX. Charles Gray Research Engineer, National ICT Australia

Unix Introduction to UNIX

Android System Development Training 4-day session

Operating System Kernels

"Charting the Course... Enterprise Linux System Administration Course Summary

CMPS 105 Systems Programming. Prof. Darrell Long E2.371

Vendor: LPI. Exam Code: Exam Name: LPI Level 1 Exam 101, Junior Level Linux Certification, Part 1 of 2. Version: Demo

Run Cron Job Every 5 Minutes Aix

Bamuengine.com. Chapter 7. The Process

. Fill in the Blank: A directory named mydir has just been... Points:10. Add Question Success: 64 questions added as a copy.

OpenRC vs rc.d. Compare and contrast

Basic Linux Security. Roman Bohuk University of Virginia

GL-280: Red Hat Linux 7 Update. Course Description. Course Outline

Operating Systems, Fall Lecture 10 1

Using grub to Boot various Operating Systems

INTRODUCTION TO LINUX

ECE 471 Embedded Systems Lecture 16

Booting Up & Processes

Course 55187B Linux System Administration

OCTVQE Zaptel Echo Canceller (PRELIMINARY)

Embedded lightweight unix

Programs. Program: Set of commands stored in a file Stored on disk Starting a program creates a process static Process: Program loaded in RAM dynamic

Transcription:

Advanced Unix System Administration Lecture 5 February 14, 2007 Steven Luo <sluo+decal@ocf.berkeley.edu>

Shared Libraries The dynamic linker Binaries have a symbol table containing functions, etc. and their locations Dynamic binaries have tables with blanks it's the responsibility of the dynamic linker to resolve these Linker loads listed dynamic libraries and tries to resolve the symbols Allows shared code, but incurs a performance penalty on most architectures

Shared Libraries Binary compatibility Programs expect the ABI offered by a shared library to stay the same (structs, function prototypes, etc.) When this assumption breaks, things go horribly or worse, subtly wrong Hence mechanisms for versioning shared libraries and symbols

Bootloader Highly architecture-dependent behavior Kernel Need to get enough loaded to find root partition, mount it, and launch userspace Traditional fully monolithic kernels load everything here init Mounts filesystems, launches daemons, and brings up the system

init(8) PID 1, the ultimate parent Spawns and respawns various children, according to configuration Two traditional varieties: System V, BSD System V init binary Used on Linux, Solaris, most commercial Unix Configured via /etc/inittab Uses runlevels to define the stages of boot and what should be running

System V style runlevel handling Usually performs actions when changing runlevels based on the contents of /etc/rcn.d, where N is the new runlevel Scripts starting with S are run with argument start, scripts starting with K are run with argument stop Two-digit number following S or K gives the ordering Runlevel S is notionally invoked at the beginning of startup, 0 and 6 at halt or reboot

BSD init binary Used primarily on the BSDs Launches a script /etc/rc when invoked, then spawns and respawns programs based on the contents of /etc/ttys /etc/rc.shutdown is run on shutdown BSD style init handling Only used by OpenBSD nowadays /etc/rc and /etc/rc.shutdown do most/all of the work themselves

Comparing BSD and SysV init handling BSD-style init handling is simple and straightforward, but difficult to modify automatically SysV init has more flexibility and modularity With appropriate configuration of /etc/inittab or /etc/rc, SysV init binaries can be configured to behave BSD style (i.e. Slackware) and vice versa or could behave entirely differently from either

System shutdown Run shutdown scripts first Kill all processes: send SIGTERM to all processes, wait a few seconds, then send SIGKILL to make sure they're dead Sync/unmount disks, then power down or restart SysV: last two steps actually run from the shutdown scripts, invoked by init BSD: halt(8)/reboot(8) take care of all steps

Criticisms of classic init Inefficient processes not started in parallel, SysV init requires launching lots of shells Manual establishment of order of tasks and daemon load order required Provides no monitoring of services and restarting of those that died Shutdown procedure is an ugly hack

Requires-depends init handling Used in FreeBSD and NetBSD Standard BSD init binary /etc/rc{,.shutdown} uses a program rcorder(8) to examine Requires, Depends, Provides lines in scripts in /etc/rc.d and provide an order to run them in Allows dynamic ordering of tasks, parallelization (though currently not parallel)

Replacing init SMF (Solaris 10+): dependency-based XML config allowing parallel launch of processes and restarting of services; milestones separate stages of bootup launchd (OS X 10.4+): dependency-based config allowing parallel launch; also replaces/extends cron and inetd Upstart (Ubuntu 6.10+): event-based structure for controlling processes; also replaces/extends cron and inetd