OS features can be described by considering the most important resources that a modern OS manages: Memory: The OS manages a large, flat, virtual memory.

Slides:



Advertisements
Similar presentations
Lesson 4 0x Operating Systems.
Advertisements

Operating System.
An Overview Of Windows NT System Student: Yifan Yang Student ID:
COURSE: COMPUTER PLATFORMS
Drives, Directories and Files. A computer file is a block of arbitrary information, or resource for storing information. Computer files can be considered.
Chap 2 System Structures.
Operating System Structure
Operating-System Structures
Case study 1 Windows 7.
3: OS Structures 1 OPERATING SYSTEM STRUCTURES PROCESS MANAGEMENT A process is a program in execution: (A program is passive, a process active.) A process.
11/13/01CS-550 Presentation - Overview of Microsoft disk operating system. 1 An Overview of Microsoft Disk Operating System.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Case Study: Windows 2000 Part I Will Richards CPSC 550 Spring 2001.
2: OS Structures 1 Jerry Breecher OPERATING SYSTEMS STRUCTURES.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Computer Forensics Principles and Practices by Volonino, Anzaldua, and Godwin Chapter 6: Operating Systems and Data Transmission Basics for Digital Investigations.
F2032 Fundamental of OS Chapter 1 Introduction to Operating System Part 4.
1 JMH Associates © 2004, All rights reserved Chapter 1 Getting Started with Win32/64.
1 DOS with Windows 3.1 and 3.11 Operating Environments n Designed to allow applications to have a graphical interface DOS runs in the background as the.
Operating System Organization
Operating Systems.
Operating Systems.
Installing Windows XP Professional Using Attended Installation Slide 1 of 41Session 2 Ver. 1.0 CompTIA A+ Certification: A Comprehensive Approach for all.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Section 6.1 Explain the development of operating systems Differentiate between operating systems Section 6.2 Demonstrate knowledge of basic GUI components.
System Software. BIOS Basic Input Output System A kind of ROM Execute routines Checking RAM, detecting hard disk, floppy disk, CDROM, … etc.
Operating Systems Basic PC Maintenance, Upgrade and Repair Mods 1 & 2.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
 FILE S SYSTEM  DIFFERENT FILE SYSTEMS  FILE SYSTEM COMPONENTS  FILE OPERATIONS  LOG STRUCTERD FILE SYSTEM  FILE EXAMPLES.
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 11 Case Study 2: Windows Vista Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall,
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 2: System Structures.
Operating System. Architecture of Computer System Hardware Operating System (OS) Programming Language (e.g. PASCAL) Application Programs (e.g. WORD, EXCEL)
Ch 21 Command Syntax Using the DIR Command with Parameters and Wildcards.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Managing Disks and Drives Chapter 13 powered by dj.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Getting Started Additional information. Important DOS Commands Getting Started dirlists disk directories verdisplays OS version clsclear command prompt.
Slide 3-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 3.
MCSE Guide to Microsoft Windows Vista Professional Chapter 5 Managing File Systems.
OPERATING SYSTEMS BY LANDON, KYLE, AND ETHAN. WHAT IS THEIR PURPOSE? (1) manage the computer's resources, such as the central processing unit (2) establish.
Chapter Three The UNIX Editors.
Operating Systems Objective n The historic background n What the OS means? n Characteristics and types of OS n General Concept of Computer System.
1 Lecture 6 Introduction to Process Management COP 3353 Introduction to UNIX.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
UNIX & Windows NT Name: Jing Bai ID: Date:8/28/00.
Chapter 9: Networking with Unix and Linux. Objectives: Describe the origins and history of the UNIX operating system Identify similarities and differences.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
Copyright © Curt Hill Operating Systems An Introductory Overview.
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.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
Processes and Threads MICROSOFT.  Process  Process Model  Process Creation  Process Termination  Process States  Implementation of Processes  Thread.
What is a Process ? A program in execution.
IT Essentials 1 v3 Module 4 JEOPARDY IT Essentials 1 RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands RouterModesWANEncapsulationWANServicesRouterBasicsRouterCommands.
Operating System. What is Operating System OS is system software, which may be viewed as collection of software consisting of procedures for operating.
CITA 171 Section 1 DOS/Windows Introduction. DOS Disk operating system (DOS) –Term most often associated with MS-DOS –Single-tasking operating system.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
CSCI/CMPE 4334 Operating Systems Review: Exam 1 1.
A+ Guide to Managing and Maintaining Your PC, 7e Chapter 2 Introducing Operating Systems.
Operating System & Application Software
Lesson 4 0x Operating Systems.
Process Management Presented By Aditya Gupta Assistant Professor
Guide To UNIX Using Linux Third Edition
Lecture 1 Runtime environments.
Chapter 3: Windows7 Part 1.
Chapter 2: System Structures
Chapter 3: Processes.
Lecture 1 Runtime environments.
Outline Operating System Organization Operating System Examples
OPERATING SYSTEMS STRUCTURES
Presentation transcript:

OS features can be described by considering the most important resources that a modern OS manages: Memory: The OS manages a large, flat, virtual memory address space and transparently moves information between physical memory and disk and other secondary storage. File systems: The OS manages a named file space and provides both direct and sequential access as well as directory and file management. Resource naming and location: File naming allows for long, descriptive names, and the naming scheme is extended to objects such as devices, synchronization, and interprocess communication objects. Multitasking: The OS must manage processes, threads, and other units of independent, asynchronous execution. Tasks can be preempted and scheduled according to dynamically determined priorities. Communication and synchronization: The OS manages task-to-task communication and synchronization within single systems as well as communication between networked systems and with the Internet. Security and protection: The OS provides flexible mechanisms to protect resources from unauthorized and accidental access and corruption.

The original Microsoft Operating System was MS-DOS, in the 1980's. This was a simple OS with no security, no multiprocessing, and a command line interface. Apple was making inroads into Microsoft's business with its GUI based systems, and so Microsoft put a GUI on top of MS-DOS. Windows 3.0 came out in 1990, Windows 3.1 (a dramatic improvement) in But all programs ran in the same address space. Windows 95 (1995) contained most of the features of modern operating systems including virtual memory, process management, and multiprogramming. But there was still no security. Windows 95 was a commercial success, in spite of the fact that it crashed a lot. By this time Microsoft had figured out that they could not just keep adding more features to MS-DOS, so they decided to build a new operating system from scratch. The result was Windows NT (New Technology). The API system was called WIN32. Microsoft operating systems have to be backward compatible; that is, all of the applications that ran on the old Windows systems should still run on newer systems. This requires another layer in the API software to deal with this.

Windows 2000 introduced Plug-and-Play (PnP) which allowed users to install new devices on the fly. Prior to this, users would sometimes have to manually set jumper switches or dip switches, and occasionally two (or more) devices would use the same interrupt handler address, and so one interrupt would trash the other. The original release of NT was about 3 million lines of C/C++ code. Windows Vista is more than 70 million lines of code. Part of this is due to the need for backward compatibility, nothing ever gets deleted, but most of the bloat is due to the addition of new features.

There are multiple layers of system calls. At the core is the NT kernel ntoskrnl.exe, which has traditional system call interfaces, this is only used by Microsoft programmers. There are a number of subsystems that run on top of NTOS. The only subsystem that we will use is Win32. Windows can run on a number of different hardware architectures, not only different processors, but different support chipsets. In order to minimize the amount of hardware specific programming, the lowest layer of the OS is the Hardware Abstraction Layer (HAL). This layer translates all calls which deal directly with hardware into hardware accesses. Examples include the CPU itself, the Memory Management Unit, Interrupt controllers, physical devices, and the BIOS.

The registry is a special file system, (optimized for small files) attached to the NT namespace. The registry is organized into separate volumes called hives, which are like files. One of these hives is called SYSTEM. This is a file which keeps track of the system configuration. Other hives keep track of the configuration of installed software etc. Here is a list of some of the hives. In Unix systems, generally each program consults a plain text resource file when it is opened. This contains all of the configuration information. Example:.bashrc

In the Microsoft world, a system call is referred to as an Win32 API (Application Program Interface) (or a WIN64 API). If you use any of these, you should include the header file windows.h. This file contains definitions, macros, and structures for source code. As in Unix, the Win32 APIs have the same form as C function calls. The number of Win32 APIs is much larger than the number of Unix system calls. One of the major reason why the number is so much larger is that all of the graphics calls which create and manipulate windows are part of the Win32 APIs. All versions of the Windows operating systems use the Win32 APIs, but each uses a slightly different subset. The Windows API is different in many ways from the Linux POSIX (Portable Operating System Interface) API – Many system resources are represented as a kernel object identified and referenced by a handle (file descriptors and process IDs in Linux) – Kernel objects must be manipulated by Windows APIs – Objects include files, processes, threads, memory mapping, events, and many more – The Windows thread is the basic unit of execution. A process can contain one or more threads

To understand Microsoft C/C++ documentation or Microsoft sample code, you will need to understand Hungarian Notation. This is a method of naming variables (Microsoft convention). For example, the online help which describes the function ReadFile looks like this: BOOL ReadFile( HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped ); A variable name consists of an optional prefix, a tag which indicates the variable type, and the variable name. The prefix is lower case, the variable name itself starts with an upper case letter.

DWORD unsigned long (stands for double word) WORD unsigned short (16 bits) BOOL boolean (Possible values are TRUE and FALSE) BYTE unsigned char LPDWORD pointer to a DWORD LPVOID Pointer to type void (a generic pointer) LPCTSTR Pointer to a const string Most Microsoft sample code includes the header file which redefines most data types.

Windows supports four file systems on directly attached devices 1.The NT file system (NTFS) is a modern file system supporting long file names, security, fault tolerance, encryption, compression, extended attributes, and support for very large files and volumes. 2.The File Allocation Table (FAT and FAT32) file systems descend from the original MS-DOS and Windows 3.1 FAT (or FAT16) file systems. FAT does not support Windows security, among other limitations. FAT is increasingly obsolete and is most frequently seen on older systems 3.The CD-ROM file system (CDFS), as the name implies, is for accessing information provided on CD-ROMs. 4.The Universal Disk Format (UDF) supports DVD drives and will ultimately supplant CDFS. The format of a file system (FAT, NTFS), as a disk volume or partition, is determined when a disk is partitioned

The full pathname of a disk file starts with a drive name, such as A: or C:. Alternatively, a full pathname, or Universal Naming Code (UNC), can start with a double backslash (\\), indicating the global root, followed by a server name and a share name to indicate a path on a network file server. The first part of the pathname, then, is \\servername\sharename. The pathname separator is the backslash (\), although the forward slash (/) can be used in API parameters, which is more convenient in C. Directory and file names cannot contain any of the ASCII characters with values in the range 131 or any of these characters: : " | ? * \ / Names can contain blanks. However, when using file names with blanks on a command line, be sure to put each file name in quotes so that the name is not interpreted as naming two distinct files. Directory and file names are case-insensitive, but they are also case-retaining, so that if the creation name is MyFile, the file name will show up as it was created, but the file can also be accessed with the name myFILE. File and directory names can be as many as 255 characters long, and pathnames are limited to MAX_PATH characters (currently 260). A period (.) separates a file's name from its extension, and extensions (usually two or three characters after the rightmost period in the file name) conventionally indicate the file's type. Thus, atou.EXE would be an executable file, and atou.C would be a C language source file. File names can contain multiple periods. A single period (.) and two periods (..), as directory names, indicate the current directory and its parent, respectively.

Batch files allow Microsoft Windows users to create a lists of commands to run in sequence. A good example of a batch file for someone who is more familiar with Windows is to think of a batch file as a shortcut. Much like a shortcut, batch files could be used to run one or more commands and/or programs through the command line. To create a batch file do the following: o open a Command Prompt window o Type edit b.bat (we are creating a batch file named b.bat) o Type in the following off echo Hello this is a test batch file pause o Save and close the file o To run the file, type in the file name

Just like all MS-DOS commands, all batch file commands are not case sensitive. %1 The percent followed by a numeric value, allows users to receive arguments a batch file. :: A way to add remarks in the batch file :LABEL By adding a colon in front of a word, such as LABEL, you create a label. This allows you to skip to certain sections of a batch file. See GOTO CALL This is used to run another batch file within a batch file. When the batch file that is called is completed, the remainder of the original batch file is completed. Note if the batch file does not exist it will give an error message CLSClear the screen ECHO Will echo a message in the batch file. However, OFF at the beginning of the batch file you'll also get each line of the batch file. Type ECHO. To create an empty line.

EXIT Exits out of the DOS window if the batch file is running from Windows. GOTO LABEL Used to go to a certain label IF Used to check for a certain condition if the condition exists PAUSE Prompt the user to press any key to continue. START Used to start an application SET [variable=[string]] Specifies the environment-variable name and value You can type SET to display environment variables. /P to prompt the user to enter a value Environment variable substitution can be as follow: %PATH:~0,-2% extract all but the last 2 characters of the PATH variable. %PATH:~-10% extract the last 10 characters of the PATH variable. %PATH:str1=str2% would expand the PATH environment variable, substituting each occurrence of str1 in the expanded result with str2 To get help for any of the batch commands: type help followed by the command. If you type help only, you will get the list of commands (but not all)

@ECHO off cls :start ECHO. ECHO 1. Print Hello ECHO 2. Print Bye ECHO 3. Print Test set choice= set /p choice=Type the number to print text:. if not '%choice%'=='' set choice=%choice:~0,1% if '%choice%'=='1' goto hello if '%choice%'=='2' goto bye if '%choice%'=='3' goto test ECHO "%choice%" is not valid please try again ECHO. goto start :hello ECHO HELLO goto end :bye ECHO BYE goto end :test ECHO TEST goto end :end You should know: To terminate a job Ctrl+C

For loop FOR variable IN (argument list) DO command Example: FOR %a IN (Andrew Bob Carol Daisy Ellen) DO echo %a FOR %a IN (*.txt) DO echo %a You should know: To run the Windows calculator use the command calc To open a new Command prompt window type start cmd taskkill and tasklist are important commands try them with care

In this exercise you are requested to create a batch file similar to question 4 of the homework related to lecture 3…. Oh yes Build a batch file that does the following: Give a menu and wait for an input 1.Launch a calculator 2.Launch a terminal window 3.Close the calculator 4.Exit

@echo off :start cls echo "Please select one of the following options:" echo " 1 - Launch a calculator" echo " 2 - Launch a terminal" echo " 3 - close calculator" echo " 4 - exit" set /P choice="You choice is: " if '%choice%' == '1' goto launchcalc if '%choice%' == '2' goto launchterminal if '%choice%' == '3' goto closecalc if '%choice%' == '4' goto end echo "Bad selection: goto start :launchcalc start calc goto start :launchterminal start cmd goto start :closecalc taskkill /IM calc.exe goto start :end