CS 350 Operating Systems & Programming Languages Ethan Race Oren Rasekh Christopher Roberts Christopher Rogers Anthony Simon Benjamin Ramos.

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Lecture 10: Heap Management CS 540 GMU Spring 2009.
Chap 2 System Structures.
Day 10 Threads. Threads and Processes  Process is seen as two entities Unit of resource allocation (process or task) Unit of dispatch or scheduling (thread.
Reasons to study concepts of PL
Reference Book: Modern Compiler Design by Grune, Bal, Jacobs and Langendoen Wiley 2000.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Chapter 6: An Introduction to System Software and Virtual Machines
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
Introduction. Why Study OS? Understand model of operation –Easier to see how to use the system –Enables you to write efficient code Learn to design an.
Slide 1-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 1.
Computer Software.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent
P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Compilers, Interpreters and Debuggers Ruibin Bai (Room AB326) Division of Computer Science.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 4: Threads.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
SB ScriptBasic Introduction to ScriptBasic There are more people writing programs in BASIC than the number of people capable programming.
CS 350 Operating Systems & Programming Languages Group: Victor Yevtukh, Kyle Tassey, Ankit Tamakuala, Matt Wetzel, David Yeager, Michael Wang, Yuan Xu.
HERY H AZWIR Computer Software. Computer Software Outline Software and Programming Languages  Software  Programming  Programming language development.
Threads, Thread management & Resource Management.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
Threads in Java. History  Process is a program in execution  Has stack/heap memory  Has a program counter  Multiuser operating systems since the sixties.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
المحاضرة الاولى Operating Systems. The general objectives of this decision explain the concepts and the importance of operating systems and development.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
CST320 - Lec 11 Why study compilers? n n Ties lots of things you know together: –Theory (finite automata, grammars) –Data structures –Modularization –Utilization.
Invitation to Computer Science 5 th Edition Chapter 6 An Introduction to System Software and Virtual Machine s.
INVITATION TO COMPUTER SCIENCE, JAVA VERSION, THIRD EDITION Chapter 6: An Introduction to System Software and Virtual Machines.
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
Getting started with Programming using IDE. JAVA JAVA IS A PROGRAMMING LANGUAGE AND A PLATFORM. IT CAN BE USED TO DELIVER AND RUN HIGHLY INTERACTIVE DYNAMIC.
Chapter 4 – Threads (Pgs 153 – 174). Threads  A "Basic Unit of CPU Utilization"  A technique that assists in performing parallel computation by setting.
The course. Description Computer systems programming using the C language – And possibly a little C++ Translation of C into assembly language Introduction.
Lecture 5: Threads process as a unit of scheduling and a unit of resource allocation processes vs. threads what to program with threads why use threads.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
CPSC 171 Introduction to Computer Science System Software and Virtual Machines.
Department of Computer Science and Software Engineering
 Programming - the process of creating computer programs.
Thread basics. A computer process Every time a program is executed a process is created It is managed via a data structure that keeps all things memory.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
1 Process Description and Control Chapter 3. 2 Process A program in execution An instance of a program running on a computer The entity that can be assigned.
Getting ready. Why C? Design Features – Efficiency (C programs tend to be compact and to run quickly.) – Portability (C programs written on one system.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Operating Systems: Summary INF1060: Introduction to Operating Systems and Data Communication.
Copyright © Curt Hill More on Operating Systems Continuation of Introduction.
Software. Introduction n A computer can’t do anything without a program of instructions. n A program is a set of instructions a computer carries out.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
CMPS Operating Systems Prof. Scott Brandt Computer Science Department University of California, Santa Cruz.
Chapter 4: Threads Modified by Dr. Neerja Mhaskar for CS 3SH3.
Java Programming: From the Ground Up
Ashima Wadhwa Assistant Professor(giBS)
Advanced OS Concepts (For OCR)
Processes and Threads Processes and their scheduling
Microprocessor and Assembly Language
Chapter 9 – Real Memory Organization and Management
Chapter 4 Threads.
Introduction to Operating System (OS)
Lecture 1 Runtime environments.
Many-core Software Development Platforms
Chapter 4: Threads.
Lecture Topics: 11/1 General Operating System Concepts Processes
Lecture Topics: 11/1 Hand back midterms
Presentation transcript:

CS 350 Operating Systems & Programming Languages Ethan Race Oren Rasekh Christopher Roberts Christopher Rogers Anthony Simon Benjamin Ramos

Introduction to Programming Languages

Programming Languages According to Wikipedia, a programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely For us computer science students, it is the lifeblood of all the programs, homework assignments and projects that we do during our time here in Binghamton University

Languages that contain libraries Languages that are object-oriented based We have dealt with many Programming Languages

We have also dealt with many functions, libraries and methods The C Specials free() malloc() printf() With Java, you get The scanner library System.out.print.ln() With C++, you get introduced to numerous libraries, like the STL Library and the POSIX Library. WRPDRV() ?

The question to ask though is? How does a specific programming language communicate with the operating system in order to achieve what the programmer wants in their program? How does the operating system interpret and compile the libraries, functions and methods of a specific programming language so that we have a working program? How can we as a programmer make our program so that it can run efficiently in the operating system?

What we will discuss in this presentation How to wisely use the Operating systems memory in our programs? - Memory Management How to transfer a piece of code from one language to another? - Portability How do you run multiple programs or processes at the same time? - Multiprogramming What Tools are needed in the execution of a language on a given OS? - Compilers. The idea about OS Libraries, Security through System calls and there Reusability - Libraries, API's & System Calls

Memory Management How to Overclock a Positronic Brain Ethan Race

In most Modern Languages: Automatic Computer Managed Memory & Manual Human managed Memory Types of Memory Management

Faster, and more Efficient Makes the programmer's job easier BUT You take a performance hit Might keep memory that is reachable, but never used again Automatic Memory Management

The memory is managed by the Computer. o As part of the language, or an extension thereof One form is Garbage Collecting o First in LISP in 1959 o Required by C#, Java and most scripting languages. o Allowed in C++, ADA, along with manual management o Can be turned off in D Automatic Memory Management (Cont.)

The programmer decides when memory is freed (free, delete, etc.). Available in C/C++, ADA, etc. Performance is increased The programmer knows what is going on. BUT The programmer has more to keep track of There are generally more errors. o Pointer errors, and memory leaks Manual Memory Management

Automatic o Managed by Computer o Easier to program Manual o Managed by Programmer o More performance Memory Management (Summary)

Oren Rasekh Portability

What is it? How can we achieve it? Do we want it?

What is portability? Dictionary.com: Capable of being transported or conveyed Can move from platform to platform Must be efficient Little to no change in code

Where is portability? GNU Compiler Collection Java Posix Standards X Window System

Things to consider System specific functions o sleep vs. Sleep System word size o compile to 32 bit | 64 bit sizeof o int * pointer = malloc(sizeof(int) * 10);

How can we be portable? JAVA

How can we be portable? Posix Standards Portable Operating System Interface Standards for cross platform portability Prevent system dependency issues

Do we want it? Cons Speed decrease Higher level of abstraction Learning curve Implementation time Pros Write code once Easier to maintain Cost I DON'T KNOW (but probably)

Christopher Roberts Multiprogramming

1. What is it? 2. How can we do it? a) Processes b) Threads 3. What does the OS need? a) Scheduling b) Memory Management 4. Challenges and Benefits

What Is Multiprogramming? D efinition: o Multiple programs running at the same time What is involved: o Space multiplexing o Time multiplexing

Processes and Threads Process o a program and its address space ‘ Thread o a unit of work Need to be managed efficiently

Multiprogramming and the Operating System Memory o OS must set up Process Control Block and Thread Control Block o Must provide memory protection o Memory swapping  Allows the OS to provide more memory than is physically available

Multiprogramming and the Operating System Scheduling o Determine which program/process/thread runs next o Keep track of state of process  Ready  Running  Waiting o Two basic types of schedulers  Non-preemptive - batch systems Priority  Preemptive - modern systems Round Robin

Benefits and Challenges Challenges o Protecting critical sections (threads) o Debugging o Using "safe" functions Benefits o Can fully utilize powerful processors o Performance increase

Christopher Rogers Compilers

What is a compiler? Several types: o Native Compiler o Cross-compiler o Decompiler o Language Translator Responsible for performing various tasks: o Lexical analysis, Semantic analysis, Preprocessing, parsing, and code generation and optimization. Environment for compiler and program Compilers

Executable is platform independent. Used in: o Embedded Systems o Microcontrollers o Multiple systems Utilized when arch or OS differs. GCC can be configured to cross compile. Cross-Compilers

Platform dependence Windows: o Visual Basic o Microsoft Visual C# o IAR C/C++ Compilers (Proprietary) Unix: o Gambas (Basic) o HP aC++ (C++) o TenDRA (C++) Both: o GCC (C/C++) o Multi (C++) Compilers and the OS

Anthony Simon Libs, API's & System Calls

An API or Library offers a reusable and standard interface to a programming package What does this mean for a programming language?? Reusability

System Calls are API's that provide "secure" execution environments So What?? Security

The End