CS222: Systems Programming

Similar documents
How To Write A Windows Operating System (Windows) (For Linux) (Windows 2) (Programming) (Operating System) (Permanent) (Powerbook) (Unix) (Amd64) (Win2) (X

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Chapter 6, The Operating System Machine Level

Introduction to Virtual Machines

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

OPERATING SYSTEMS STRUCTURES

Introduction. What is an Operating System?

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 2 Introducing Operating Systems

VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D

Mobile Operating Systems. Week I


Operating Systems. 05. Threads. Paul Krzyzanowski. Rutgers University. Spring 2015

OPERATING SYSTEM SERVICES

Operating System Structures

Chapter 15 Windows Operating Systems

History of Windows. INLS 576 Spring 2009 Tuesday, 1/13/2009

IBM Software Group. Lotus Domino 6.5 Server Enablement

x64 Servers: Do you want 64 or 32 bit apps with that server?

CSE 120 Principles of Operating Systems. Modules, Interfaces, Structure

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Operating System Components and Services

4.1 Introduction 4.2 Explain the purpose of an operating system Describe characteristics of modern operating systems Control Hardware Access

Embedded Software development Process and Tools: Lesson-4 Linking and Locating Software

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Example of Standard API

Tuning U2 Databases on Windows. Nik Kesic, Lead Technical Support

Data Centers and Cloud Computing

Host-based Intrusion Prevention on Windows and UNIX. Dr. Rich Murphey White Oak Labs

OPERATING. William Stallings

Building Applications Using Micro Focus COBOL

Components of a Computer System

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

CPS221 Lecture: Operating System Structure; Virtual Machines

System Structures. Services Interface Structure

Kernel Types System Calls. Operating Systems. Autumn 2013 CS4023

Virtualization. Jukka K. Nurminen

Full and Para Virtualization

Performance Comparison of RTOS

Computer Architecture. Secure communication and encryption.

POSIX. RTOSes Part I. POSIX Versions. POSIX Versions (2)

SYSTEM ecos Embedded Configurable Operating System

CS161: Operating Systems

Chapter 2 System Structures

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

ELEC 377. Operating Systems. Week 1 Class 3

Programación de Sistemas Empotrados y Móviles (PSEM)

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Chapter 2: OS Overview

Operating Systems for Parallel Processing Assistent Lecturer Alecu Felician Economic Informatics Department Academy of Economic Studies Bucharest

22S:295 Seminar in Applied Statistics High Performance Computing in Statistics

Win32 API Emulation on UNIX for Software DSM

Freescale Semiconductor, I

Network operating systems typically are used to run computers that act as servers. They provide the capabilities required for network operation.

POSIX : Certified by IEEE and The Open Group a briefing.

Introducing PgOpenCL A New PostgreSQL Procedural Language Unlocking the Power of the GPU! By Tim Child

OS Concepts and structure

Providing a jump start to EFI application development and a uniform pre-boot environment

Operating System Components

Red Hat Linux Internals

theguard! ApplicationManager System Windows Data Collector

Real-time processing the basis for PC Control

Sun xvm VirtualBox Product Overview

The Lagopus SDN Software Switch. 3.1 SDN and OpenFlow. 3. Cloud Computing Technology

Origins of Operating Systems OS/360. Martin Grund HPI

The Microsoft Windows Hypervisor High Level Architecture

White Paper. Real-time Capabilities for Linux SGI REACT Real-Time for Linux

Virtualization Technology. Zhiming Shen

Introduction to Computer & Information Systems

Obj: Sec 1.0, to describe the relationship between hardware and software HW: Read p.2 9. Do Now: Name 3 parts of the computer.

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

Oracle9i Release 2 Database Architecture on Windows. An Oracle Technical White Paper April 2003

Software: Systems and Application Software

Functions of NOS Overview of NOS Characteristics Differences Between PC and a NOS Multiuser, Multitasking, and Multiprocessor Systems NOS Server

Eloquence Training What s new in Eloquence B.08.00

CS3600 SYSTEMS AND NETWORKS

Performance Characterization of SPEC CPU2006 Integer Benchmarks on x Architecture

Development of complex KNX Devices

GCCSI. Ihr Dienstleister in:

Design Cycle for Microprocessors

QoS and Communication Performance Management

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

COS 318: Operating Systems

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Operating Systems. Lecture 03. February 11, 2013

Cross-platform event logging in Object Pascal

Operating System Structures

System Calls and Standard I/O

Security Overview of the Integrity Virtual Machines Architecture

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Chapter 11 I/O Management and Disk Scheduling

VMware Server 2.0 Essentials. Virtualization Deployment and Management

IOS110. Virtualization 5/27/2014 1

Operating System Organization. Purpose of an OS

Web Server Architectures

Release Notes for Open Grid Scheduler/Grid Engine. Version: Grid Engine

Transcription:

CS222: Systems Programming The Basics January 24, 2008 A Designated Center of Academic Excellence in Information Assurance Education by the National Security Agency

Agenda Operating System Essentials Windows API Hardware Abstraction Layer Windows Principles Win64 2 1/25/2008

Deep Thought for the Day There are only 10 types of people in this world those who understand binary, and those who don t. 3 1/25/2008

Class Email List I will use the email address listed on BanWeb for the class email list If you prefer I use another address, email it to me. 4 1/25/2008

Computer Architecture System of Layers 5 1/25/2008

Operating Systems What is an operating system? Where do we find operating systems? 6 1/25/2008

Operating System Features Memory File systems Resource naming and location Multitasking Communication and synchronization Security and protection 7 1/25/2008

The Kernel Central component of an OS Manages resources Interface between software and hardware Provides lowest level abstraction layer that applications must control Memory, Processor, I/O 8 1/25/2008

The Kernel 9 1/25/2008

Hardware Abstraction Layer (HAL) Enables porting to different processor architectures Primary architecture: x86 (Intel), AMD 64-bit processors Intel Itanium, AMD Athlon 64 and Opteron 64 (AMD64) Intel 64-bit x86 extensions Other architectures Windows Mobile and Windows CE run on mobile platforms Windows NT was originally supported on DEC Alpha 10 1/25/2008

Windows API Application Programming Interface (API) Makes the OS components available Has its own set of conventions and programming techniques Scalable Evolving Also known as Win32 API 11 1/25/2008

Windows API Functional Categories Administration and Management Diagnostics Graphics and Multimedia Networking Security System Services Windows User Interface 12 1/25/2008

Other API s POSIX Portable Operating System Interface for unix Formally designated IEEE 1003 Specifies user and software interface to the OS Standard command line and scripting interface User-level programs, services, and utilities Program-level services Standard threading library Supported by NT Kernel 13 1/25/2008

Windows Principles Many system resources are represented as a kernel object identified and referenced by a handle Kernel objects must be manipulated by Windows APIs Objects include files, processes, threads, pipes, memory mapping, events, etc. Objects have security attributes Many functions perform the same or similar operations Function calls will often have numerous parameters and flags, many of which can normally be ignored 14 1/25/2008

Windows Principles Windows offers numerous synchronization and communication mechanisms tailored for different requirements The thread is the basic unit of execution. A process can contain one or more threads. Windows function names are long and descriptive WaitForSingleObject WaitForSingleObjectEx WaitForMultipleObjects WaitNamedPipe 15 1/25/2008

Windows Principles Conventions for type names Predefined data types, required by the API, are in uppercase and descriptive BOOL HANDLE DWORD LPTSTR LPSECURITY_ATTRIBUTES Many others 16 1/25/2008

Naming Conventions (cont.) Predefined types avoid the * operator and make distinctions such as differentiating LPTSTR (defined as TCHAR *) LPTCTSTR (defined as const TCHAR *) Variable names in function prototypes also have conventions lpszfilename Long pointer to a zero-terminated string dwaccess A double word (32 bits) containing file access flags dw denotes flags in a double word 17 1/25/2008

Naming Conventions (cont.) The Windows API is backward compatible with the Win16 API The long pointer is simply a 32-bit or 64-bit pointer. Win32 sometimes appears in macro names (WIN32_FIND_DATA) even though the macro is also used with Win64 Numerous 16-bit functions are available, but should not be used OpenFile (16-bit) CreateFile (32-bit) 18 1/25/2008

Win64 vs Win32 Main differences Size of the pointer variables Size of the virtual address space 2 32 = 4294967296 4 GB 2 64 = 18446744073709551616 18 exabytes (kilo, mega, giga, tera, peta, exa) Be careful about assumptions concerning pointers and integers being the same size DWORD32 and DWORD64 are defined POINTER_32 and POINTER_64 control pointer size 19 1/25/2008

When to use C Most file processing can be done using ANSI Standard C library Why use C, instead of Windows system calls? Portability Why use Windows system calls? More powerful Better performance Additional capability File locking Memory mapping Asynchronous I/O Inter-process Communication 20 1/25/2008

Example Sequential File Copy Using C Using Windows Using convenience function 21 1/25/2008

Review Operating System Essentials Windows API Hardware Abstraction Layer Windows Principles Win64 Development Environment Setup and Demo 22 1/25/2008

For next class Monday, January 29 Read Chapter 2 in Windows System Programming Assignment 1 will be delivered next week 23 1/25/2008