CIS 191: Linux and Unix Class 9 April 1, 2015 Hardware, Project, and Devices.

Slides:



Advertisements
Similar presentations
Hardware Lesson 3 Inside your computer.
Advertisements

Chapter 9 Part III Linux File System Administration
An Overview of the Computer System
Copyright © Allyn & Bacon 2008 POWER PRACTICE Chapter 3 Computers in the Learning Environment START This multimedia product and its contents are protected.
Basic Unix system administration
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Linux+ Guide to Linux Certification, Second Edition
Chapter One The Essence of UNIX.
11/13/01CS-550 Presentation - Overview of Microsoft disk operating system. 1 An Overview of Microsoft Disk Operating System.
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Operating Systems File systems
New Human Computer Interfaces Amnon Dekel HUJI – CSE, Spring 2007 Class 3 March
Guide To UNIX Using Linux Third Edition
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.
Basic Unix Dr Tim Cutts Team Leader Systems Support Group Infrastructure Management Team.
CIS 191: Linux and Unix Class 6 March 4, 2015 Processes, Scheduling, and Devices.
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.
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
Linux Installation and Administration – Lesson 5 Tutor: George Papamarkos Topic: Devices in Linux.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Computer Terms.
Unix Basics Chapter 4.
RjpSystem Level Programming Operating Systems 1 Having fun withy the Unix Operating System Praxis Week 7 Rob Pooley.
COMP 3438 – Part I - Lecture 4 Introduction to Device Drivers Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Computing and the Web Operating Systems. Overview n What is an Operating System n Booting the Computer n User Interfaces n Files and File Management n.
1 Project 3: An Introduction to File Systems CS3430 Operating Systems University of Northern Iowa.
Chapter 6: Linux Filesystem Administration
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
Lesson 9-Setting and Using Permissions. Overview Describing file permissions. Using execute permissions with a file. Changing file permissions using mnemonics.
Chapter 2 (Cont.) The Unix Way Essential System Administration, 3rd Edition.
CSN08101 Digital Forensics Lecture 4: System Level Disk Control Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak.
CIS 191: Linux and Unix Class 4 September 30th, 2015.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Unix Commands PowerPoint Presentation developed for LS 560 Information Technology online class - University of Alabama by Debey Sklenar TENacious Cohort.
Linux+ Guide to Linux Certification Chapter Six Linux Filesystem Administration.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
CSC414 “Introduction to UNIX/ Linux” Lecture 2. Schedule 1. Introduction to Unix/ Linux 2. Kernel Structure and Device Drivers. 3. System and Storage.
Filesystem Management and Backups. 2 Section Overview Devices and Files Filesystem Management Network Filesystems Backups.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
I/O Software CS 537 – Introduction to Operating Systems.
CEG 2400 FALL 2012 Linux/UNIX Network Operating Systems.
C Programming Day 2. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/LA07/003 Version No. 1.0 Union –mechanism to create user defined data types.
CIS 191: Linux and Unix Class 6 February 25th, 2016.
This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses. ©Copyright Network Development Group Module 10 Understanding.
OPERATING SYSTEMS (OS) By the end of this lesson you will be able to explain: 1. What an OS is 2. The relationship between the OS & application programs.
Linux Filesystem Administration
INTRODUCTION TO COMPUTERS. A computer system is an electronic device used to input data, process data, store data for later use and produce output in.
Basic Computer Fundamentals
Filesystem Management and Backups
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
Computer System Laboratory
An Overview of the Computer System
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Project 3: An Introduction to File Systems
Introduction to Computers
Lighting LEDs with a RASPBERRY PI
Looking Inside the machine (Types of hardware, CPU, Memory)
Internet-of-Things (IoT)
An Overview of the Computer System
An Overview of the Computer System
Linux File Systems Partitioning Mounting File Systems
CS703 - Advanced Operating Systems
I/O Experiments Assignment 1.
Presentation transcript:

CIS 191: Linux and Unix Class 9 April 1, 2015 Hardware, Project, and Devices

Outline Final Project Overview Amazingly Short Hardware Brief rm –rf / Part Handout

Raspberry PI For the final project, you’ll be working with a raspberry pi project to make something cool using your unix skills There are plenty of projects out there that can run on pis We’ll be giving you the pis, and you already have access to the internet

Raspberry PI For the final project, you’ll be working with a raspberry pi project to make something cool using your unix skills There are plenty of projects out there that can run on pis We’ll be giving you the pis, and you already have access to the internet We just want you to make something cool And sufficiently difficult…

Due Date The final project will be due on our last day of class, which is April 29 th. So you have 4 weeks – Which should honestly be more than enough time to make something great

Raspberry PIs are… A full multipurpose computer on a chip Strong enough to run an Xbox media center emulation! fully equipped with general purpose I/O pins – We’ll go over how to use these a bit next week unable to handle anything more than 5 volts – so don’t try to output more than that or you’ll break it – In fact, don’t try to output more than 3.3V really cool

Running the raspberry pi You’ll have to load up an image We’re not going to force you to use any in particular – The official distribution is “raspbian”, which should also be fine It’s also a derivative of debian, after all This means apt-get is a-go

Raspberry PI project ideas… Let’s just look at youtube!look at youtube!

Outline Final Project Overview Amazingly Short Hardware Brief rm –rf / Part Handout

Ohm’s Law V = IR

Vary Resistance You can vary resistance to modify the behavior of a circuit For example, in this fart detector project linked to on piazza, the circuit is modified to the ambient gas environment using a resistor ladderthis fart detector projectresistor ladder – This prevents false fart positives

Breadboards

How to strip a wire

Color Coding your Circuit Red should come from source Black should go to ground Inner colors aren’t important

Polarized Parts Current can flow from the anode (the + terminal) to the cathode (the – terminal). BUT NOT THE OTHER WAY AROUND! Damage the parts and (maybe) even yourself See this sparkfun link to learn morethis sparkfun link Polarized LED

How to make a basic LED circuit

Raspberry Pi GPIO GPIO on the Raspberry Pi can be controlled pretty easily GPIO on the Raspberry Pi To write to output, you can either write to a few files through the terminal, use the gpio utility, or use a python interface.python interface To read from the input, you can use the gpio utility or use the python interface. – Note that this can be a little iffy… they are digital input pins after all – Anyone see how this might be a problem? How to work around it?

Outline Amazingly Short Hardware Brief A Little More About /dev rm –rf / Part Handout

Remember /dev? /dev contains system device files Linux systems accomplish tons of magic by treating devices as special files – And by pretending that certain non-device objects are files… – Linux employs devices to provide lightweight “system services” The contents of /dev have odd permissions if you check with ls -l

Device Files are “Pseudofiles” When you read from or write to a device “file”, the operating system silently intercepts your request and feeds it to a driver The driver knows how to interact with the device Drivers are typically written in C – Can anyone tell me why that might be?

Device File Permissions If you took the liberty of running ls –l on the files, you might see something like this The “b” means that this is a “block” device You could also see a “c”, which would mean it is a “character” device The size field has been replaced by a csv field where – The first value represents the major device number – The second value represents the minor device number

Types of Devices Character Devices – Denoted by “c” character at start of permissions – Provide direct, unbuffered access to the hardware – Examples: Serial ports, keyboards, sound cards, modems Block Devices – Denoted by “b” character at start of permissions – Provide buffered access to the hardware – Always allowed to read/write any sized block – Buffered => We don’t know when the data will be written Pseudo Devices – Fake devices that are useful

Some Pseudo Devices /dev/null – Accepts all data written to it and does nothing – /dev/full – Always full; returns a continuous stream of NULL bytes when read and returns “disk full” error when written to /dev/zero – Produces endless string of zero bits when read /dev/random and /dev/urandom – Contains a stream of random bytes

Hard Disk Partitions Each computer may have several hard drives attached, and each hard drive can be divided into several partitions – Windows assigns each partition its own drive letter (like C:) – Linux allows you to specify where the data on a given partition should appear in the filesystem Every hard drive is assigned a name in /dev – Like /dev/sda for the first drive, or /dev/sdb for the second – Naming starts at sd followed by a letter The n th partition of the drive sdb is sdb(n) – So sdb3 is the third partition on the second hard disk

Mounting and Unmounting To use a partition, you can use the mount command – The usage is mount device location – For example, mount /dev/sda2 /media/windows The mounted filesystems and devices are tracked in /etc/mtab. You’ll probably need to be root to access it. umount unmounts a directory – Note the absence of the ‘n’ in umount

fstab Non-changing filesystem information is written in /etc/fstab – According to the man page, “it is the duty of the system administrator to properly create and maintain this file” – At boot, fstab tells the system which filesystems should be loaded – Afterwards, fstab is used (by mount/umount) to describe how to mount and unmount filesystems fstab entries contain the filesystem location, the mount point, the file system type, options, and information about core dumping and checking the filesystem

Outline Amazingly Short Hardware Brief A Little More About /dev rm –rf / Project Help

Outline Amazingly Short Hardware Brief A Little More About /dev rm –rf / Part Handout