Organization of a computer

Similar documents
EE516: Embedded Software Project 1. Setting Up Environment for Projects

Linux Shell Script. J. K. Mandal

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Introduction to the UNIX command line

Chapter-3. Introduction to Unix: Fundamental Commands

Introduction to Linux. Fundamentals of Computer Science

Using Linux as a Virtual Machine

Operating Systems. Copyleft 2005, Binnur Kurt

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Linux/Cygwin Practice Computer Architecture

Set 1 MCQ Which command is used to sort the lines of data in a file in reverse order A) sort B) sh C) st D) sort -r

Introduction to Unix: Fundamental Commands

Introduction: What is Unix?

Practical Session 0 Introduction to Linux

Linux at the Command Line Don Johnson of BU IS&T

Computer Systems and Architecture

Short Read Sequencing Analysis Workshop

Computer Systems and Architecture

3/13/2012. ESc101: Introduction to Computers and Programming Languages

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

Operating Systems and Using Linux. Topics What is an Operating System? Linux Overview Frequently Used Linux Commands

The Unix Shell. Pipes and Filters

Introduction to UNIX/Linux

Lecture 1. A. Sahu and S. V. Rao. Indian Institute of Technology Guwahati

Introduction to remote command line Linux. Research Computing Team University of Birmingham

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Useful Unix Commands Cheat Sheet

Linux Command Line Primer. By: Scott Marshall

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

Unix Tools / Command Line

Name of chapter & details

Introduction to Linux Environment. Yun-Wen Chen

Introduction p. 1 Who Should Read This Book? p. 1 What You Need to Know Before Reading This Book p. 2 How This Book Is Organized p.

Perl and R Scripting for Biologists

CSCI 2132 Software Development. Lecture 4: Files and Directories

acmteam/unix.pdf How to manage your account (user ID, password, shell); How to compile C, C++, and Java programs;

Systems Programming and Computer Architecture ( ) Exercise Session 01 Data Lab

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

Introduction to Linux

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

Some useful UNIX Commands written down by Razor for newbies to get a start in UNIX

Physics REU Unix Tutorial

Introduction to UNIX command-line II

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

UNIX Essentials Featuring Solaris 10 Op System

Unix background. COMP9021, Session 2, Using the Terminal application, open an x-term window. You type your commands in an x-term window.

Exercise 1: Basic Tools

Introduction to the Linux Command Line

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

Programming and Data Structure Laboratory (CS13002)

Introduction to UNIX command-line

A Brief Introduction to Unix

1. The Mac Environment in Sierra Hall 1242

User Guide Version 2.0

Linux Tutorial. Ken-ichi Nomura. 3 rd Magics Materials Software Workshop. Gaithersburg Marriott Washingtonian Center November 11-13, 2018

Mills HPC Tutorial Series. Linux Basics I

commandname flags arguments

Computational Skills Primer. Lecture 2

CS19001/CS19002 Programming and Data Structures Lab Autumn/Spring Semester. Introduction. Abhijit Das. January 4, 2015

The Linux Command Line & Shell Scripting

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename

1. The Mac Environment in SIE 1222

Getting Started. Running Utilities. Shells. Special Characters. Special Characters. Chapter 2 Unix Utilities for non-programmers

Utilities. September 8, 2015

Arkansas High Performance Computing Center at the University of Arkansas

Introduction to Linux

Files and Directories

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Unix L555. Dept. of Linguistics, Indiana University Fall Unix. Unix. Directories. Files. Useful Commands. Permissions. tar.

Unix System Architecture, File System, and Shell Commands

Introduction to Linux

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

On successful completion of the course, the students will be able to attain CO: Experiment linked. 2 to 4. 5 to 8. 9 to 12.

Kumaun University Nainital Proposed Syllabus for B. Sc. Semester program to be implemented from session Subject: Computer Science

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

Introduction to Unix. University of Massachusetts Medical School. October, 2014

h/w m/c Kernel shell Application s/w user

Operating systems fundamentals - B02

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

List of Linux Commands in an IPm

CS11001/CS11002 Programming and Data Structures Autumn/Spring Semesters. Introduction

CHAPTER 1 UNIX FOR NONPROGRAMMERS

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

Linux Essentials Objectives Topics:

Quick Start Guide. by Burak Himmetoglu. Supercomputing Consultant. Enterprise Technology Services & Center for Scientific Computing

CS CS Tutorial 2 2 Winter 2018

Unix. 1 tblgrant projects 0 Jun 17 15:40 doc1.txt. documents]$ touch doc2.txt documents]$ ls -l total 0

Introduction to UNIX. Introduction EECS l UNIX is an operating system (OS). l Our goals:

Linux hep.wisc.edu

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

COSC UNIX. Textbook. Grading Scheme

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

Linux Essentials. Smith, Roderick W. Table of Contents ISBN-13: Introduction xvii. Chapter 1 Selecting an Operating System 1

CS 3410 Intro to Unix, shell commands, etc... (slides from Hussam Abu-Libdeh and David Slater)

First of all, these notes will cover only a small subset of the available commands and utilities, and will cover most of those in a shallow fashion.

Basic UNIX Commands BASIC UNIX COMMANDS. 1. cat command. This command is used to create a file in unix. Syntax: $ cat filename

Introduction to UNIX I: Command Line 1 / 21

UNIX Quick Reference

Transcription:

Organization of a computer Organization of a computer Control Unit Task is to repeatedly perform fetch-decode-execute cycle. It consists of Two important registers PC, IR, and Instruction decoder: circuit that takes opcode and delivers output and control signals to EU. The expanded form of fetch-decode-execute is as follow: Fetch an instruction Increment the PC Fetch operands Execute the instruction Store the result. R. K. Ghosh (IIT-Kanpur) December 30, 2010 4 / 21

Organization of a computer Organization of a computer Memory Memory Hard disk Storage DVD/CD Volatile RAM Non volatile FLASH requires power power not required Saves data/instructions before execution Saves intermediate results. Non-volatile, persistent, and stores them in folders. Slow compared to non-volatile memory. R. K. Ghosh (IIT-Kanpur) December 30, 2010 4 / 21

Organization of a computer Organization of a computer Input/Output Input data provided by human, if large in size should be stored before used for program execution. Typical form of input is string (representing values). Stored in files in hard-disks. Results produced in human readable form, the output should also be stored before display. Typical output device is computer screen. R. K. Ghosh (IIT-Kanpur) December 30, 2010 4 / 21

Program organization Program Organization Analogy with Book Sl No. Book Program 1 Title page Heading 2 Table of contents Listing of function locations 3 Chapter Module or a package 4 Section Function 5 Paragraph Conceptual Block 6 Sentences Statements 7 Word Variable 8 Glossary Variable declarations R. K. Ghosh (IIT-Kanpur) December 30, 2010 5 / 21

Program organization Program Organization Important for beginners... How do we log into a computer? How do we write a program into a computer s hard disk? How do we create a program? We use an editor: vi, gedit, emacs, nano, so on. Most editors tend to become slow for large files (exceeding 3000 lines). R. K. Ghosh (IIT-Kanpur) December 30, 2010 5 / 21

System Softwares Software Stack Bare h/w is not enough Electrical circuits need electrical signals as input. There should be an interface for communication with m/c. Several levels of abstractions make it possible. op code operands 10001011 01000101 11100000 8B 45 E0 add R3 R7 R. K. Ghosh (IIT-Kanpur) December 30, 2010 6 / 21

System Softwares Software Stack Layering Abstraction Next level of abstration is assembly language. Final level of abstraction is high level language. Not the end of story, even ML programs will need many library programs to be able to execute (output/input). In summary many layers of abstractions needed for execution of user programs. R. K. Ghosh (IIT-Kanpur) December 30, 2010 6 / 21

System Softwares Software Stack Layering Abstraction These layers define the software stack of the machine. O/S Kernel signal terminal handling character I/O system terminal driver terminal controllers terminals file systems swapping... app prog 1 app prog 2 app prog n shells and commands compilers, system libraries sytem call interface to kernel block I/O sytem disk drivers kernel interface to hardware devic controllers disks CPU scheduling page replacements demand paging virtual memory memory controller physical memory R. K. Ghosh (IIT-Kanpur) December 30, 2010 6 / 21

Algorithms Design of Algorithms Definition A step-wise solution of a given problem A step is a finite sequence of 1 or more simple and precise operations that can be work out by pen and paper in finite amount of time. Common arithmetic operations. Character manipulations in a string. Reading a number, string, etc. The number of steps in a solution must be finite. So algorithm must terminate. R. K. Ghosh (IIT-Kanpur) December 30, 2010 7 / 21

Algorithms Design of Algorithms Historical Note Algorithm is a corruption of the name of Al-Kharizmi. Mohammad ibn-musa Al-Khwarizmi (resident of Khwarizm now Khiva in Uzbekistan) was a royal in the court of Baghdad during 780-850 AD. Known more as the author of the book: Al-Kitab al-mukhtasar fi hisab al-gabr wal-muqabala Fibonacci later popularized the preferred form of commercial calculations. R. K. Ghosh (IIT-Kanpur) December 30, 2010 7 / 21

Algorithms Design of Algorithms Example Steps of calculation are broken down into smaller primitives. Execution of primitives solves the problem. Eg., multiplying two numbers with primitive: 1 determining parity: odd or even. 2 adding two numbers 3 doubling a number 4 halving a number R. K. Ghosh (IIT-Kanpur) December 30, 2010 7 / 21

Algorithms Design of Algorithms Example 123 61 30 15 x y result 7 3 1 467 0 467 934 1401 1868 3736 7472 14944 29888 1401 5137 12609 27553 555441 while (x > 0) { if (x is odd) result = result + y x = x/2 y = y + y } R. K. Ghosh (IIT-Kanpur) December 30, 2010 7 / 21

Algorithms Design of Algorithms Algorithm and Program Algorithm is a step-wise specification of solution. Program is an implementation of the algorithm. Program is written for a specific machine. Program may not terminate (Event driven, buggy programs) R. K. Ghosh (IIT-Kanpur) December 30, 2010 7 / 21

Shell Commands & Vi Learning to using computers Login Login requires a UserId and a Password. After login goto application on the panel, a popup window appears, click on System Tools then on the second popup click on Terminal. Now a terminal appears which actually runs command shell interpreter. We must first understand a subset of shell commands. R. K. Ghosh (IIT-Kanpur) December 30, 2010 8 / 21

Shell Commands & Vi Learning to using computers Basic Unix commands For files: Create & access control: touch, vi, chmod Copy, move and link: mv, cp, rm, ln Information: ls, more, cat, head, tail, wc File comparisons: diff, comm Packing, compression & decompression: tar, gzip, gunzip For directories: pwd, mkdir, rmdir, mv, cd cp, and rm also can also be used. R. K. Ghosh (IIT-Kanpur) December 30, 2010 8 / 21

Shell Commands & Vi Learning to using computers Using Internet Many browsers are there: firefox, opera, lynx. Firefox is most popular. Set proxy to vsnlproxy.iitk.ac.in Provide user id and password. For mail use the web interface. R. K. Ghosh (IIT-Kanpur) December 30, 2010 8 / 21