An Overview of C/C++ Programming Language and Programming Environment

Size: px
Start display at page:

Download "An Overview of C/C++ Programming Language and Programming Environment"

Transcription

1 1 An Overview of C/C++ Programming Language and Programming Environment 1-1 An Overview of Programming Languages Introduction to Operating Systems MS-DOS and Network Operating System Commands Basic Terms of Software Systems C Programming Examples 1-13

2 P. Lin/ August, An Overview of Programming Languages The structure and operation of a computer - Computer system: Hardware and firmware - Processor (registers, primitive operations) - Main memory (RAM, ROM) - Data items (integers, real or floating-point numbers, strings, etc.) - Sequence and data control - Storage management - Operating environment Major influences on the evolution of programming language 1. Computer hardware and operating systems 2. Applications 3. Programming methods 4. Implementation methods 5. Standardization Programming languages - Assembly language - Machine Language (Machine instructions in binary strings) - ALGOL - FORTRAN (Formula Translator; IBM now) - APL - BASIC (Beginners All-purpose Symbolic Instructional Code) - COBOL (Common Business Oriented Language; 1959) - RPG - Pascal (Professor Nicklaus Wirth, 1971) - PL/I - Lisp (Artificial Intelligence applications) - PROLOG - C language (General purpose programming language; 1972, AT&T) - ADA (Real-time distributed system; Department of Defense; 1980s - now) - C++ language (1999 now) - Java (1995 now) - Visual BASIC.NET (1999 now) - C# (2000s now) Types of Programs - High-Level Language Program - Low-Level Language Program

3 P. Lin/ August, Procedure-Oriented Language - Object-Oriented Language - Event-Driven Programming language (Visual Basic) - Component-based language Some Example of Computer Program Applications - Business systems (data processing) - System programming - Real time and/or embedded systems - Network applications - Scientific and engineering Program Development Process 1. Understand a given problem 2. Requirement specification (make necessary assumptions) 3. Analysis (analyze the problem and accumulate facts 4. Design and refine programs 5. Implementation 6. Verification and Testing A Set of Tools for Programmers Text editor Compiler Library utilities Linker Make utilities Debugger Programmer s Task 1. Coding: translate an algorithm into suitable computer language statements (Editor) 2. Test the resultant program (Compile and build) 3. Debug the program 4. Document the program Program = Algorithm + Data Data Structures - Organization of data for computer processing - Choice of data structure (Arrays, vectors, matrices, tables, etc)

4 P. Lin/ August, Algorithms: Webster dictionary: A procedure for solving a mathematical problem in a finite number of steps that frequently involves repetition of an operation An unambiguous procedure for solving a problem A finite sequence of well defined steps or operations for the solution of a given problem Algorithm analysis (time and/or memory efficiency): - The best case - The worst case - The average case How to express algorithms: 1. Flow chart (lack of control structure; represent a procedure in terms of if() and goto statements) 2. Computer programs (ALGOL) 3. Mathematical algorithms 4. Pseudo code (English-like description of the solution) Example 1-1. Average of N numbers Write an algorithm to read in N numbers, computer and print the average. Step 1: Input N1, N2,.., N numbers Step 2: Compute the sum of N numbers Step 3: Divide sum by N and save the result Step 4: Print the average Criteria for Programming Language Evaluation 1. Data types and structures 2. Modularity 3. Input-output facilities 4. Portability 5. Efficiency 6. Standardization 7. Mix-language programming support

5 P. Lin/ August, Introduction to Operating Systems Operating systems A software system contains many programs for controlling the computer hardware System Resource manager: processor, memory, input/output devices, communication devices, and data Functions: User interface Input/output systems Job and Task management (loading, resource allocation, error termination, communication between jobs and operating systems) File system management (management, allocation, protection, backup, etc.) Data sharing among users Resource sharing and scheduling Real memory management Virtual memory management Networking and communications Other system utilities Network Operating Systems A collection of software and associated protocols that allows a set of interconnected computers to be used together on resource sharing Client-server applications Remote access services Security control Printer management Internet and Intranet services Server and network monitoring Some examples: - Windows XP, Vista - UNIX - Linux Some Examples of Operating Systems CP/M (first operating system for Intel 8085/8086-based microcomputer) DOS (Disk Operating System) 1980; Character oriented UNIX 1970; Character oriented Microsoft Windows 1990; Graphical User Interface (GUI) Digital Equipment Corporation (DEC) VAX/VMS operating system

6 P. Lin/ August, MVS (1974, Multiple virtual storage) and VM (1990, Virtual Machine) of IBM mainframe operating systems UNIX, AIX, Linux Microsoft XP, Vista, Server 2003, Server 2005, Mobile 6.0 Windows Definition: A window is an application written for the Microsoft Windows operating system A rectangular area of the screen where an application displays output and receives input from the user. A window shares the screen with other windows Only one window at a time can receive input from the user The user can use the mouse, keyboard, or other input device to interact with a window and the application that owns it.

7 P. Lin/ August, MS-DOS and Network Operating System Commands Windows/DOS Commands are not case sensitive Windows/DOS commands are available under only MS-DOS console window: Window XP/Vista Start button Command or cmd to inovoke Window cosole or command line window Some commands: Md Mkdir Cd Rmdir Rename Copy Xcopy Del Type Sys Chkdsk Scandisk Fdisk Format Date Time Ver Cls Debug Edit Mem Regedit Uninstall Help Create directory (file folder) Same as Md command Change director Remove director Rename a file Copy a file Copy groups of files or subdirectories for one location to another Delete a file Display content of a file on the screen Copy the system files to a disk to make it bootable disk Display information about the disk; identify and correct errors A utility to identify disk errors and fix them Create disk partitions and sets the boot and active partitions Format a hard disk with sectors and tracks Display current system date and prompt desired new date Display current system time and prompt desired new time Display the version of operating system Clear the monitor screen Invoke the Intel 8086 mini-assembler Invoke Microsoft text-based editor Display info about how system memory is used Window s Registry editor Used to remove Windows 95 form a system that has been upgraded from MS-DOS Helps on DOS commands Some Network Related Net Commands (available only if the PC is connected to a network) Net time Net file Net name Net use Used to synchronize the server s clock Show the currently open share files and file locks Display, add, and remove computer names that can participate in the message service Show information about shared resources

8 P. Lin/ August, Net view Netstat Ping Tracert Show a list of domains, the computers and servers in a domain Display information about the TCP/IP session at the server Poll another TCP/IP node to verify that you can communicate with it Used to view the number of hops, and other routing information, on the path to the specified server or host

9 P. Lin/ August, Basic Terms of Software System ANSI C The standardized C programming language (American National Standard Institute) Program An executable file that usually created by a link editor and resides on a disk file A static sequence of computer instructions System software Software that provide services for the users of the computer system Application software Software that were written for specific tasks Word processor, game programs, spreadsheet Compiler A program that translate a source code program into machine language program Editor A program that is used to enter and/or modify source code program and save it on a disk file Linker A program that combine object files and libraries to produce an executable file Loader A program that place the executable program into appropriate main memory area for execution Run-time library Functions included with a compiler that program can call to perform various basic operations Console The Windows subsystem that runs character-based applications as opposed to applications that have a graphical user interface Kernel Also called core or nucleus

10 P. Lin/ August, A small portion of the most intensively used code that resides in the main memory (RAM/ROM) Some typical service functions provided by a Windows kernel: File system Security system Memory management (virtual memory) Device I/O and network drivers Thread scheduling Message passing Various application program interfaces (APIs), and Networking, etc. File A stream of characters An instance of an opened file or I/O devices Task An executing program in Win16 is known a task Application Programming Interface (API) A set of functions supported by the Windows operating system Dynamic Link Libraries A program module containing functions that other programs or DLLs can call. Not self executable, other programs must load them Non-preemptive Multitasking Operating System An operating system can load and run multiple programs simultaneously One application must tell the operating system that it s finished processing before the operating system can switch to perform another task Preemptive Multitasking Operating System An operating system performs a form of multitasking in which the operating system does not wait for a thread to voluntarily yield the processor to other programs. The operating system interrupts a program after the program has run for a preset amount of time Process

11 P. Lin/ August, An instance of a running program Contains actual code, data, and system resources (semaphores, communication ports, files, etc.) Every process has at least one thread After a thread begins, it can create additional threads Heap Used to allocate data space for a process dynamically when the process is running Windows 95 allows applications to support multiple heaps in the same process Stack Used dynamically while the process is running Stack frames contain the data elements required by a function and return address linkage for each function call System Calls Obtain services from the kernel Thread A entity within a process that the kernel schedules for execution An independent program counter Major components of a thread: A client ID A set of registers holding the state of the processor Two stacks: One for use in the user mode, Another one for use while executing in kernel mode A private storage area for use by subsystems, runtime libraries, and dynamic link libraries (DLL) Virtual Memory Management A memory sharing scheme An operating system distributes the available memory among processes while protecting the code and data of one process from other processes Cache High speed static RAM (random access memory) memory for buffering frequently used data File caching

12 P. Lin/ August, Exceptions Synchronous errors or irregular events that cause the execution of program outside the normal flow of control Rich text Text saved with formatting instructions that multiple applications can read and interpret Unicode A universal character encoding standard for worldwide applications Uses a fixed-width, 16-bit character or double-byte character sets (DBCS)s encoding scheme Unicode supporting examples: Windows NT and Windows 95 wchar_t: 16 or 32-bit wide-character type defined in the ANSI C Visual C++ supports wide characters as data, but not as source file text Callbacks Windows operating systems might not be able to send a reply immediately to client applications that post messages in the thread message queue A client may send a request and then wait for a reply callbacks from the operating system Clipboard Data Transfer Operations A Windows utility used a buffer for copying and pasting text, graphics, and windows OLE (Object Linking and Embedding) style of Drag and Drop A set of standard software services built on top of the OLE Components Object Model (COM) that allows software components from different vendors (possibly written in different programming language) to be combined with another to form complete applications Allows the user to move data among desktop, folders, and other applications

13 P. Lin/ August, C Programming Examples Types of Applications and Environment Console applications (Character-oriented) using ANSI C standard libraries Console applications (Character-oriented) using ANSI C and C++ libraries Console applications (Character-oriented) using ANSIC, C++ libraries and API (Application Program Interface) functions Windows Applications using API functions Windows Applications using MFC (Microsoft Foundation Class) Libraries and API functions Visual Studio: C#, VB.NET, etc Visual C /2008 Express Edition Example 1-1: Create and run the Hello C! program using Visual C Express edition. We will create a New Console Application, Add a Source File, then Build the Application using Visual C express edition. Here we will show you how to create a New Console Application from an Empty Project in Visual C (or 2008) Express Edition 1. Start Visual C++ Express Edition (2005 or 2008) 2. File menu => New => Project, to show the New Project dialog box 3. In the Project types subwindow, click on Win32 4. In the Templates subwindow, click on Win32 Console Application

14 P. Lin/ August, Make a 264F08 folder on your C drive, and use the default Location for housing this new project which is the setup by Visual C or Enter project Name: Demo1; also enter the same name: Hello as the Solution Name, then click OK button (see above New Project screen) 7. In the Win32 Application Wizard, click Next 8. Then Click the box in front of the Empty project (no code will be generated), then click Finish

15 P. Lin/ August, In the Solution Explorer, right click on Source Files, Add => New Items

16 P. Lin/ August, Now, you will add a source file to the project as follows. a. In the Add New Item dialog box, select Code node in the Categories b. Select C++ File (.cpp) c. Enter the file name as Hello.c, then click Add button

17 P. Lin/ August, d. Then enter the following source code right inside the editing window

18 P. Lin/ August, #include <stdio.h> void main(void) { } printf("%s, Hello C!\n"); 11. Now, Build, Test, and Debug the program a. Click Build => Build All (this action, will compile, link, and construct an executable file) b. Click Debug => Start without Debugging c. The result is shown in the following console screen

19 P. Lin/ August, Example 1-2: This program output three lines of text on the console screen. /* output.c */ #include <stdio.h> #include <stdlib.h> void main() { system("cls"); printf("\t\t*********************************************\n"); printf("\t\teet 264 C Programming Lang. With Applications\n"); printf("\t\t*********************************************\n"); printf("\a"); /* beep */ return 0; } Program Output: ********************************************* EET 264 C Programming Lang. With Applications ********************************************* Symbols Meaning output.c The saved program or file name /* Begin program s comment */ End program s comment void Nothing to return to the operating system main()

20 P. Lin/ August, Entry point of a C program A function name Allow only one main() function in a C program { } Begin a function block End a function block # include <stdio.h> printf() ; \ t \ n \ a Preprocessor command for file inclusion The header file defines all standard input and output drivers that is located in the C compiler s include sub-directory Screen output function defined in <stdio.h> End of a statement (a delimiter) Horizontal tab (control character) New line (control character) Audible beep Double quotes for enclosing a ASCII character string

21 P. Lin/ August, Example 1-3: This program displays a title box. /* box.c */ #include <stdio.h> Define string constants Text replacement done by the C preprocessor before compiling the program #define M1 "********************\n" #define M2 "* *\n" void main() { printf(m1); /* printf("********************\n") */ } printf(m2); /* printf("* *\n") */ printf(m2); /* printf("* *\n") */ printf(m1); /* printf("********************\n") */ Program Output: ******************** * * * * ********************

22 P. Lin/ August, Example 1-4: This program uses a simple for loop to repeat the message output process. /* message.c */ Define a symbolic constant #include <stdio.h> #define COUNT 3 void main() { Define an integer variable int i; Check ending condition Initialization Updating for(i = 0; i < COUNT; i++) { Begin for loop printf("welcome to C!\n"); printf("\a"); /* beep */ } } End for loop Program Output: Welcome to C! Welcome to C! Welcome to C! Symbols message.c #define COUNT For Meaning The saved program or file name Preprocessor command for defining a symbolic constant A named constant The for() loop control structure < Less than conditional operator ++ Increment by 1

23 P. Lin/ August, Review Questions 1. List at least three programming languages and their major applications. 2. Name the major steps of the program development process. 3. What is a C program? 4. What are the main functions of an operating system? 5. Distinguish the difference between main memory and secondary storage. 6. List some differences between personal computer operating systems and network operating systems. 7. Give two methods of copy a file from one drive to another with the same name. 8. What is a process? 9. What is a thread? 10. Define each of the following terms: cache, program, file, dynamic link library, virture memory. 11. List three programs that work together in order to execute a C program. 12. Give MS-DOS commands for the following activities: (a) Display the directory of a diskette in the A drive (b) Clear the screen (c) Check the version of the operating system (d) Check the memory utilization of the PC 13. Give a definition of the term algorithm 14. What is the purpose of the main() in a C program? 15. Explain the purpose of a pair of braces surround a C program. 16. Write an algorithm to find the roots of the equation: y = Ax 2 + Bx + C.

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction Chapter 1: An Overview of Computers and Programming Languages Objectives Objectives (cont d.) In this chapter, you will: Learn about different types of computers Explore hardware and software Learn about

More information

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History Chapter 1 Introduction to Computers, Programs, and Java CS170 Introduction to Computer Science 1 What is a Computer? A machine that manipulates data according to a list of instructions Consists of hardware

More information

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 1

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 1 BIL 104E Introduction to Scientific and Engineering Computing Lecture 1 Introduction As engineers and scientists why do we need computers? We use computers to solve a variety of problems ranging from evaluation

More information

Chapter 2 Operating-System Structures

Chapter 2 Operating-System Structures This chapter will discuss the following concepts: 2.1 Operating System Services 2.2 User Operating System Interface 2.3 System Calls 2.4 System Programs 2.5 Operating System Design and Implementation 2.6

More information

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy Operating Systems Designed and Presented by Dr. Ayman Elshenawy Elsefy Dept. of Systems & Computer Eng.. AL-AZHAR University Website : eaymanelshenawy.wordpress.com Email : eaymanelshenawy@yahoo.com Reference

More information

Chapter 1 INTRODUCTION

Chapter 1 INTRODUCTION Chapter 1 INTRODUCTION A digital computer system consists of hardware and software: The hardware consists of the physical components of the system. The software is the collection of programs that a computer

More information

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA

EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA EKT 120/4 Computer Programming KOLEJ UNIVERSITI KEJURUTERAAN UTARA MALAYSIA AZUWIR MOHD NOR ROOM: Pusat Pengajian CABIN C PHONE: (04) 979 8249 Email: azuwir@kukum.edu.my Office hours: make appoinment or

More information

Windows 7 Overview. Windows 7. Objectives. The History of Windows. CS140M Fall Lake 1

Windows 7 Overview. Windows 7. Objectives. The History of Windows. CS140M Fall Lake 1 Windows 7 Overview Windows 7 Overview By Al Lake History Design Principles System Components Environmental Subsystems File system Networking Programmer Interface Lake 2 Objectives To explore the principles

More information

ELEC 377 Operating Systems. Week 1 Class 2

ELEC 377 Operating Systems. Week 1 Class 2 Operating Systems Week 1 Class 2 Labs vs. Assignments The only work to turn in are the labs. In some of the handouts I refer to the labs as assignments. There are no assignments separate from the labs.

More information

Types and Functions of Win Operating Systems

Types and Functions of Win Operating Systems LEC. 2 College of Information Technology / Software Department.. Computer Skills I / First Class / First Semester 2017-2018 Types and Functions of Win Operating Systems What is an Operating System (O.S.)?

More information

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs Operating System

More information

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017 Programming 1 Lecture 1 COP 3014 Fall 2017 August 28, 2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer. ISA - Instruction Set Architecture: the specific set of

More information

Lab 1: Introduction to C Programming. (Creating a program using the Microsoft developer Studio, Compiling and Linking)

Lab 1: Introduction to C Programming. (Creating a program using the Microsoft developer Studio, Compiling and Linking) Lab 1: Introduction to C Programming (Creating a program using the Microsoft developer Studio, Compiling and Linking) Learning Objectives 0. To become familiar with Microsoft Visual C++ 6.0 environment

More information

Chapter 2 Software Components

Chapter 2 Software Components Chapter 2 Software Components Objectives Describe historical milestones for three popular operating systems Describe the architecture of common PC operating systems Describe the functions of an operating

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Fall 2016 Lecture 5 Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 User Operating System Interface - CLI CLI

More information

VMISFT-RFM2G. Drivers for Windows NT, 2000, 2003 Server and XP Operating Systems Installation Guide Document Number # Rev.

VMISFT-RFM2G. Drivers for Windows NT, 2000, 2003 Server and XP Operating Systems Installation Guide Document Number # Rev. GE Fanuc Automation VMISFT-RFM2G Drivers for Windows NT, 2000, 2003 Server and XP Operating Systems Installation Guide Document Number # 520-000447-940 Rev. B FANUC Parts Table of Contents Chapter 1 -

More information

Download from Powered By JbigDeaL

Download from  Powered By JbigDeaL 1. If a word is typed that is not in Word s dictionary, a wavy underline appears below the word. (A) red (B) green (C) blue (D) black 2. The button on the quick access Toolbar allows you to cancel your

More information

Chapter 3: Operating-System Structures

Chapter 3: Operating-System Structures 1 Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation 3.1

More information

C++ Programming Language Lecture 1 Introduction

C++ Programming Language Lecture 1 Introduction C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Introduction In this course you will learn C++ and the legacy C code. It is

More information

Operating System Services

Operating System Services CSE325 Principles of Operating Systems Operating System Services David Duggan dduggan@sandia.gov January 22, 2013 Reading Assignment 3 Chapter 3, due 01/29 1/23/13 CSE325 - OS Services 2 What Categories

More information

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls (important!) Types of System Calls (important!) System

More information

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language 1 History C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC

More information

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York

CSc 10200! Introduction to Computing. Lecture 1 Edgardo Molina Fall 2013 City College of New York CSc 10200! Introduction to Computing Lecture 1 Edgardo Molina Fall 2013 City College of New York 1 Introduction to Computing Lectures: Tuesday and Thursday s (2-2:50 pm) Location: NAC 1/202 Recitation:

More information

Lecture 1: Preliminaries

Lecture 1: Preliminaries Lecture 1: Preliminaries Edgardo Molina Department of Computer Science City College of New York August 30, 2011 Edgardo Molina (CS@CCNY) Lecture 1 August 30, 2011 1 / 44 Info and Schedule Course Info and

More information

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures 2.1 Silberschatz, Galvin and Gagne 2009 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System

More information

Objectives. Chapter 2: Operating-System Structures. 2.1 Operating System Services

Objectives. Chapter 2: Operating-System Structures. 2.1 Operating System Services Objectives Chapter 2: Operating-System Structures To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system

More information

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1 BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1 Learning Outcomes At the end of this lecture, you should be able to: tell the purpose of computer programs. describe

More information

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan

Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah. Lecturer Department of Computer Science & IT University of Balochistan Programming Fundamentals (CS 302 ) Dr. Ihsan Ullah Lecturer Department of Computer Science & IT University of Balochistan 1 Outline p Introduction p Program development p C language and beginning with

More information

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. OS and Computer Architecture Last class: OS and Architecture OS and Computer Architecture OS Service Protection Interrupts System Calls IO Scheduling Synchronization Virtual Memory Hardware Support Kernel/User Mode Protected Instructions

More information

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components Last class: OS and Architecture Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation

More information

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on Chapter 2: Operating-System Structures Operating System Concepts 9 th Edit9on Silberschatz, Galvin and Gagne 2013 Objectives To describe the services an operating system provides to users, processes, and

More information

Chapter 2: Operating-System Structures. Operating System Concepts Essentials 8 th Edition

Chapter 2: Operating-System Structures. Operating System Concepts Essentials 8 th Edition Chapter 2: Operating-System Structures Operating System Concepts Essentials 8 th Edition Silberschatz, Galvin and Gagne 2011 Chapter 2: Operating-System Structures Operating System Services User Operating

More information

Introduction to C/C++ Programming

Introduction to C/C++ Programming Chapter 1 Introduction to C/C++ Programming This book is about learning numerical programming skill and the software development process. Therefore, it requires a lot of hands-on programming exercises.

More information

Introduction to the C Programming Language

Introduction to the C Programming Language Introduction to the C Programming Language Michael Griffiths Corporate Information and Computing Services The University of Sheffield Email m.griffiths@sheffield.ac.uk Course Outline Part 1 Introduction

More information

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Silberschatz, Galvin and Gagne 2009 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System

More information

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed. CHAPTER 2: SYSTEM STRUCTURES By I-Chen Lin Textbook: Operating System Concepts 9th Ed. Chapter 2: System Structures Operating System Services User Operating System Interface System Calls Types of System

More information

IT ESSENTIALS V. 4.1 Module 5 Fundamental Operating Systems

IT ESSENTIALS V. 4.1 Module 5 Fundamental Operating Systems IT ESSENTIALS V. 4.1 Module 5 Fundamental Operating Systems 5.0 Introduction 1. What controls almost all functions on a computer? The operating system 5.1 Explain the purpose of an operating system 2.

More information

Chapter 2: Operating-System

Chapter 2: Operating-System Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services! User Operating System Interface! System Calls! Types of System Calls! System Programs! Operating

More information

Chapter 3: Operating-System Structures

Chapter 3: Operating-System Structures Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation 3.1

More information

Chapter 2: Operating-System Structures. Chapter 2: Operating-System Structures. Objectives. Operating System Services

Chapter 2: Operating-System Structures. Chapter 2: Operating-System Structures. Objectives. Operating System Services Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs Operating System

More information

Chapter 1 Introduction to Computers and C++ Programming

Chapter 1 Introduction to Computers and C++ Programming Chapter 1 Introduction to Computers and C++ Programming 1 Outline 1.1 Introduction 1.2 What Is a Computer? 1.3 Computer Organization 1.4 Evolution of Operating Systems 1.5 Personal Computing, Distributed

More information

Operating-System Structures

Operating-System Structures Recap Chapter 2: Operating-System Structures Presented By: Dr. El-Sayed M. El-Alfy Note: Most of the slides are compiled from the textbook and its complementary resources From: OS by Tanenbaum, 2008 March

More information

A1-R3: IT TOOLS & APPLICATIONS

A1-R3: IT TOOLS & APPLICATIONS A1-R3: IT TOOLS & APPLICATIONS NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered in the TEAR-OFF ANSWER

More information

Operating System. Operating System Overview. Layers of Computer System. Operating System Objectives. Services Provided by the Operating System

Operating System. Operating System Overview. Layers of Computer System. Operating System Objectives. Services Provided by the Operating System Operating System Operating System Overview Chapter 2 A program that controls the execution of application programs An interface between applications and hardware 1 2 Operating System Objectives Layers

More information

Operating System Overview. Operating System

Operating System Overview. Operating System Operating System Overview Chapter 2 1 Operating System A program that controls the execution of application programs An interface between applications and hardware 2 1 Operating System Objectives Convenience

More information

Chapter 2. Operating-System Structures

Chapter 2. Operating-System Structures Chapter 2 Operating-System Structures 2.1 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs Operating System

More information

WRITING CONSOLE APPLICATIONS IN C

WRITING CONSOLE APPLICATIONS IN C WRITING CONSOLE APPLICATIONS IN C with Visual Studio 2017 A brief step-by-step primer for ME30 Bryan Burlingame, San José State University The Visual Studio 2017 Community Edition is a free integrated

More information

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound). ELECTRONIC COMPUTERS THEN AND NOW Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound). In the Past (i.e., during

More information

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management Last class: OS and Architecture OS and Computer Architecture OS Service Protection Interrupts System Calls IO Scheduling Synchronization Virtual Memory Hardware Support Kernel/User Mode Protected Instructions

More information

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University ITC213: STRUCTURED PROGRAMMING Bhaskar Shrestha National College of Computer Studies Tribhuvan University Lecture 04: Introduction to C Readings: Chapter 1.5-1.7 What is C? C is a general-purpose, structured

More information

Operating Systems Overview. Chapter 2

Operating Systems Overview. Chapter 2 Operating Systems Overview Chapter 2 Operating System A program that controls the execution of application programs An interface between the user and hardware Masks the details of the hardware Layers and

More information

Introduction to Java Programming

Introduction to Java Programming Introduction to Java Programming Lecture 1 CGS 3416 Spring 2017 1/9/2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer ISA - Instruction Set Architecture: the specific

More information

EL2310 Scientific Programming

EL2310 Scientific Programming Lecture 6: Introduction to C (pronobis@kth.se) Overview Overview Lecture 6: Introduction to C Roots of C Getting started with C Closer look at Hello World Programming Environment Schedule Last time (and

More information

High Performance Computing Lecture 1. Matthew Jacob Indian Institute of Science

High Performance Computing Lecture 1. Matthew Jacob Indian Institute of Science High Performance Computing Lecture 1 Matthew Jacob Indian Institute of Science Agenda 1. Program execution: Compilation, Object files, Function call and return, Address space, Data & its representation

More information

Lab 4: Introduction to Programming

Lab 4: Introduction to Programming _ Unit 2: Programming in C++, pages 1 of 9 Department of Computer and Mathematical Sciences CS 1410 Intro to Computer Science with C++ 4 Lab 4: Introduction to Programming Objectives: The main objective

More information

Problem Solving and Program Design - Chapter 1. Cory L. Strope

Problem Solving and Program Design - Chapter 1. Cory L. Strope Problem Solving and Program Design - Chapter 1 Cory L. Strope Overview of Computers and Programming Computer Hardware Computer Software Software Development (Problem Solving) Pseudocode Flowchart Intro.

More information

Instructor. Mehmet Zeki COSKUN Assistant Professor at the Geodesy & Photogrammetry, Civil Eng. (212)

Instructor. Mehmet Zeki COSKUN Assistant Professor at the Geodesy & Photogrammetry, Civil Eng. (212) Instructor Mehmet Zeki COSKUN Assistant Professor at the Geodesy & Photogrammetry, Civil Eng. (212) 285-6573 coskunmeh@itu.edu.tr http://atlas.cc.itu.edu.tr/~coskun Address Consultation of Students: Monday

More information

Introduction to Computer Systems

Introduction to Computer Systems CS-213 Introduction to Computer Systems Yan Chen Topics: Staff, text, and policies Lecture topics and assignments Lab rationale CS 213 F 06 Teaching staff Instructor TA Prof. Yan Chen (Thu 2-4pm, Tech

More information

Chapter 2: System Structures. Operating System Concepts 9 th Edition

Chapter 2: System Structures. Operating System Concepts 9 th Edition Chapter 2: System Structures Silberschatz, Galvin and Gagne 2013 Chapter 2: System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs

More information

OPERATING SYSTEMS & UTILITY PROGRAMS

OPERATING SYSTEMS & UTILITY PROGRAMS OPERATING SYSTEMS & UTILITY PROGRAMS System Software System software consists of the programs that control the operations of the computer and its devices. Functions that system software performs include:

More information

Chapter 2: System Structures

Chapter 2: System Structures Chapter 2: System Structures Chapter 2: System Structures 2.1 Operating-System Services 2.2 User and Operating-System Interface 2.3 System Calls 2.4 Types of System Calls 2.5 System Programs 2.6 Operating-System

More information

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2005

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2005 CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2005 The process of creating a project with Microsoft Visual Studio 2005.Net is similar to the process in Visual

More information

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2003

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2003 CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2003 The process of creating a project with Microsoft Visual Studio 2003.Net is to some extend similar to the process

More information

Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang

Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang Topics History of Programming Languages Compilation Process Anatomy of C CMSC 104 Coding Standards Machine Code In the beginning,

More information

EC 413 Computer Organization

EC 413 Computer Organization EC 413 Computer Organization C/C++ Language Review Prof. Michel A. Kinsy Programming Languages There are many programming languages available: Pascal, C, C++, Java, Ada, Perl and Python All of these languages

More information

Introduction to Computer Systems

Introduction to Computer Systems Introduction to Computer Systems Today: Welcome to EECS 213 Lecture topics and assignments Next time: Bits & bytes and some Boolean algebra Fabián E. Bustamante, Spring 2010 Welcome to Intro. to Computer

More information

Operating Systems CS3502 Spring 2018

Operating Systems CS3502 Spring 2018 Operating Systems CS3502 Spring 2018 Presented by Dr. Guoliang Liu Department of Computer Science College of Computing and Software Engineering Kennesaw State University Computer Systems See Appendix G

More information

EL2310 Scientific Programming

EL2310 Scientific Programming (yaseminb@kth.se) Overview Overview Roots of C Getting started with C Closer look at Hello World Programming Environment Discussion Basic Datatypes and printf Schedule Introduction to C - main part of

More information

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs Operating System

More information

Systems Programming. The Unix/Linux Operating System

Systems Programming. The Unix/Linux Operating System Systems Programming The Unix/Linux Operating System 1 What is UNIX? A modern computer operating system Operating system: a program that acts as an intermediary between a user of the computer and the computer

More information

Getting Started. Chapter 1. Java Programming FROM THE BEGINNING. Chapter 1: Getting Started

Getting Started. Chapter 1. Java Programming FROM THE BEGINNING. Chapter 1: Getting Started Chapter 1 Getting Started 1 1.1 What Do Computers Do? A computer system is an integrated collection of hardware and software components. Hardware refers to the electronics inside a computer. Software consists

More information

1) Which of the following is an example of a programming language? 1) A) Microsoft Word B) English C) HTML D) Java

1) Which of the following is an example of a programming language? 1) A) Microsoft Word B) English C) HTML D) Java FALL 07-08 CIS105(CP105)/CE205 MIDTERM-2 EXAM /FACULTY OF ECON. &ADMIN. SCIENCES OF EUL Student Registration No: Instructor: Prof.Dr.Hüseyin Oğuz Student Name-Surname: Dept. of Computer Information Systems

More information

NEW CEIBO DEBUGGER. Menus and Commands

NEW CEIBO DEBUGGER. Menus and Commands NEW CEIBO DEBUGGER Menus and Commands Ceibo Debugger Menus and Commands D.1. Introduction CEIBO DEBUGGER is the latest software available from Ceibo and can be used with most of Ceibo emulators. You will

More information

A software view. Computer Systems. The Compilation system. How it works. 1. Preprocesser. 1. Preprocessor (cpp)

A software view. Computer Systems. The Compilation system. How it works. 1. Preprocesser. 1. Preprocessor (cpp) A software view User Interface Computer Systems MTSU CSCI 3240 Spring 2016 Dr. Hyrum D. Carroll Materials from CMU and Dr. Butler How it works hello.c #include int main() { printf( hello, world\n

More information

Chris Riesbeck, Fall Introduction to Computer Systems

Chris Riesbeck, Fall Introduction to Computer Systems Chris Riesbeck, Fall 2011 Introduction to Computer Systems Welcome to Intro. to Computer Systems Everything you need to know http://www.cs.northwestern.edu/academics/courses/213/ Instructor: Chris Riesbeck

More information

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition Chapter 2: Operating-System Structures Silberschatz, Galvin and Gagne 2013 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System

More information

Introduction to Programming

Introduction to Programming Introduction to Programming session 3 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2010 These slides are created using Deitel s slides Sahrif University of Technology Outlines

More information

From High Level to Machine Code. Compilation Overview. Computer Programs

From High Level to Machine Code. Compilation Overview. Computer Programs From High Level to Algorithm/Model Java, C++, VB Compilation Execution Cycle Hardware 27 October 2007 Ariel Shamir 1 Compilation Overview Algorithm vs. Programs From Algorithm to Compilers vs. Interpreters

More information

Chapter 3: Operating-System Structures

Chapter 3: Operating-System Structures Chapter 3: Operating-System Structures System Components Operating System Services System Calls POSIX System Programs System Structure Virtual Machines System Design and Implementation System Generation

More information

2 ABOUT VISUALDSP++ In This Chapter. Figure 2-0. Table 2-0. Listing 2-0.

2 ABOUT VISUALDSP++ In This Chapter. Figure 2-0. Table 2-0. Listing 2-0. 2 ABOUT VISUALDSP++ Figure 2-0. Table 2-0. Listing 2-0. In This Chapter This chapter contains the following topics: What Is VisualDSP++? on page 2-2 VisualDSP++ Features on page 2-2 Program Development

More information

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010

CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010 CST8152 Compilers Creating a C Language Console Project with Microsoft Visual Studio.Net 2010 The process of creating a project with Microsoft Visual Studio 2010.Net is similar to the process in Visual

More information

Syllabus for Computer Science General Part I

Syllabus for Computer Science General Part I Distribution of Questions: Part I Q1. (Compulsory: 20 marks). Any ten questions to be answered out of fifteen questions, each carrying two marks (Group A 3 questions, Group B, Group C and Group D 4 questions

More information

C++ Support Classes (Data and Variables)

C++ Support Classes (Data and Variables) C++ Support Classes (Data and Variables) School of Mathematics 2018 Today s lecture Topics: Computers and Programs; Syntax and Structure of a Program; Data and Variables; Aims: Understand the idea of programming

More information

ST. MARY S COLLEGE FORM 4

ST. MARY S COLLEGE FORM 4 Term 1 Week 1 Week 2 FUNDAMENTALS OF HARDWARE AND SOFTWARE 1. The generalpurpose computer system 2. Functions of the major hardware components of a computer system 3. Functions and uses of primary storage

More information

CSC180: Lecture 2. Wael Aboulsaadat.

CSC180: Lecture 2. Wael Aboulsaadat. CSC180: Lecture 2 Wael Aboulsaadat wael@cs.toronto.edu http://portal.utoronto.ca/ Acknowledgement: These slides are partially based on the slides supplied with Prof. Savitch book: Problem Solving with

More information

Computer Software: Introduction

Computer Software: Introduction Software: A collection of programs Computer Software: Introduction Program: Sequence of instructions for the computer to carry out Programs written using a programming language Types of languages: Machine

More information

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System?

Introduction. What is an Operating System? A Modern Computer System. Computer System Components. What is an Operating System? Introduction CSCI 315 Operating Systems Design Department of Computer Science What is an Operating System? A Modern Computer System Computer System Components Disks... Mouse Keyboard Printer 1. Hardware

More information

Topics. Operating System I. What is an Operating System? Let s Get Started! What is an Operating System? OS History.

Topics. Operating System I. What is an Operating System? Let s Get Started! What is an Operating System? OS History. Topics Operating System I What is an OS? OS History OS Concepts OS Structures Introduction Let s Get Started! What is an Operating System? What are some OSes you know? Pick an OS you know: What are some

More information

SOFTWARE ARCHITECTURE

SOFTWARE ARCHITECTURE 1 SOFTWARE ARCHITECTURE Tatsuya Hagino hagino@sfc.keio.ac.jp Slide URL https://vu5.sfc.keio.ac.jp/slide/ 2 Lecture Slide System Please access to: https://vu5.sfc.keio.ac.jp/slide/ Select: Software Architecture

More information

Programming 1 - Honors

Programming 1 - Honors Programming 1 - Honors Lecture 1 COP 3014 Spring 2017 January 10, 2017 Main Components of a computer CPU - Central Processing Unit: The brain of the computer. ISA - Instruction Set Architecture: the specific

More information

Low-Level Languages. Computer Programs and Programming Languages

Low-Level Languages. Computer Programs and Programming Languages Computer Programs and Programming Languages What is a computer program? Set of instructions that directs computer to perform tasks Programming used to write instructions 1 Computer Programs and Programming

More information

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer? Elements of Computers and Programming Dr. William C. Bulko What is a Computer? 2017 What is a Computer? A typical computer consists of: a CPU memory a hard disk a monitor and one or more communication

More information

CHAPTER 1 Introduction to Computers and Java

CHAPTER 1 Introduction to Computers and Java CHAPTER 1 Introduction to Computers and Java Copyright 2016 Pearson Education, Inc., Hoboken NJ Chapter Topics Chapter 1 discusses the following main topics: Why Program? Computer Systems: Hardware and

More information

0 Introduction: Computer systems and program development

0 Introduction: Computer systems and program development 0 Introduction: Computer systems and program development Outline 1 Introduction 2 What Is a Computer? 3 Computer Organization 4 Evolution of Operating Systems 5 Personal Computing, Distributed Computing

More information

About the Presentations

About the Presentations About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning of each presentation. You may customize the presentations

More information

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski

Operating Systems Design Fall 2010 Exam 1 Review. Paul Krzyzanowski Operating Systems Design Fall 2010 Exam 1 Review Paul Krzyzanowski pxk@cs.rutgers.edu 1 Question 1 To a programmer, a system call looks just like a function call. Explain the difference in the underlying

More information

CS307: Operating Systems

CS307: Operating Systems CS307: Operating Systems Chentao Wu 吴晨涛 Associate Professor Dept. of Computer Science and Engineering Shanghai Jiao Tong University SEIEE Building 3-513 wuct@cs.sjtu.edu.cn Download Lectures ftp://public.sjtu.edu.cn

More information

Conventions in this tutorial

Conventions in this tutorial This document provides an exercise using Digi JumpStart for Windows Embedded CE 6.0. This document shows how to develop, run, and debug a simple application on your target hardware platform. This tutorial

More information

Introduction to Operating Systems (Part II)

Introduction to Operating Systems (Part II) Introduction to Operating Systems (Part II) Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) Introduction 1393/6/24 1 / 45 Computer

More information

Chapter 8 Operating Systems and Utility Programs

Chapter 8 Operating Systems and Utility Programs Chapter 8 Operating Systems and Utility Programs Chapter 8 Objectives Identify the types of system software Summarize the startup process on a personal computer Summarize the features of several stand-alone

More information