1 Application & Systems Software Operating Systems – a deeper look.

Post on 20-Dec-2015

221 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

1

Application & Systems Software

Operating Systems –

a deeper look

2

Included in today’s work:

• Follow up Lecture• What is an Operating System (OS)?• What different types are there?• A deeper look at Operating Systems

• Some finer points of MS-DOS• Files and Directories• Extending the command set

3

What are Operating Systems?

• They define our computing experience.• First software we see when we turn a

computer on.• ‘Enables’ all the programs we use.• Organises and controls all the hardware.• Hides the details of all the actual

processing from the user.

4

Some Examples

• Not all computers have operating systems.

• All desktop computers have an OS:– Windows family (95, 98, 2000, NT);– UNIX family (Linux, BSD, UNIX, etc);– Macintosh OS;

• Hundreds of others:– Mainframes, robotics, manufacturing,

etc.

5

So what does an OS do?

• Manages the hardware and software resources of the computer system:– e.g. processor, memory, disk space.

• Provides a stable, consistent way for applications to deal with the hardware without having to know all the details of the hardware.

6

• Various programs and input methods compete for the attention of the CPU and demand memory, storage and input/output (I/O) bandwidth for their own purposes.

• The OS acts like a “good parent”, making sure that each application gets the necessary resources , ensuring that the limited capacity of the system is shared out for the greatest good of all users and applications.

7

• The provision of an consistent application interface is very important when there is more than one type of computer using the OS.

• Windows 98, for example, runs on hardware from thousands of vendors and accommodates thousands of different printers, disk drives and special peripherals.

8

Four Types of OS

• Real-Time OS (RTOS)– Control machinery, scientific

instruments and industrial systems.– Very little user interface capability– Very important that a particular

operation executes in precisely the same amount of time every time it occurs.

9

Four Types of OS

• Single-User, Single Task– This OS is designed to manage the

computer so that one user can effectively do one thing at a time.

– The Palm OS, for Palm computers, is an example of this type of OS.

10

Four Types of OS

• Single-User, Multi-Tasking– The most common type of OS on

desktops and laptops.– e.g. Windows 98, MacOS– You can be writing a note in a word

processor while downloading a file from the internet while printing the text of an email message.

11

Four Types of OS

• Multi-User– Allows many different users to take

advantage of the computer’s resources simultaneously.

– Needs to make sure that the requirements of the various users are balanced.

– Examples include Unix, VMS and mainframe operating systems

12

Four Types of OS

• Don’t confuse multi-user operating systems and single-user operating systems that support networking.

• Windows 2000 and Novell Netware can each support hundreds or thousands of networked users, but they are not true multi-user operating systems

13

Basic Functions of OS

• Wake-Up Call– The first program that runs is usually a set of

instructions kept in the computers ROM. This examines the system hardware to make sure everything is functioning properly

– This is the Power-On Self Test (POST)– After POST, the software loaded in ROM will

begin to activate the computer’s disk drives.– In most modern computers, the first bit of

OS loaded is the bootstrap loader.

14

Bootstrap Loader

• 1 single function– Loads the OS into memory and allows it to

begin operation• Sets up the small driver programs that

interface with and control the various hardware sub-systems of the computer.

• Divides the memory into those bits that hold the OS, user information and applications.

• Finally turns control of the computer over to the OS

15

OS Tasks

• Falls into 6 general categories– Processor management– Memory management– Device management– Storage management– Application interface– User interface

16

Processor management

Managing the processor concerns two issues:

• ensuring that each process & application receives enough CPU time

• maximising the number of CPU cycles used for real work

The OS controls and schedules processes.It handles interrupts, and prioritises tasks

17

Memory Management

Two tasks are performed:• the OS works out how much memory to

allocate to a particular process• the OS decides which type of memory in

the system can be used for which part of each process

The crucial factor here is the different types of memory and their speeds.

18

Device Management

Each peripheral requires a driver• This is a special program to translate

between the hardware and high-level programming languages.

• Part of the OS function is to communicate with these drivers and to assign priorities to data and commands going to and coming from the device.

19

Storage management

Drivers are also used to manage memory storage peripherals e.g. disks, tape etc.

• One function of the OS is to configure and manage part of the storage device for virtual memory.

• A further function of the OS is to determine which parts of “current processes” are consigned to this virtual memory.

• A third function is that of file manager, to keep track of and to recall all the files and programs stored in the device.

20

Application interface

• An Application Program Interface (API) allows Application programmers to use and program various functions of the computer and OS without needing to know all the details of the CPU operations.

• Such an API may, for example allow a programmer access to disk storage and to read mouse commands, without having to worry about the different kinds of disks and mice which might be used.

21

User Interface

• The UI provides a consistent way for the user to interact with the computer, which is common to all models and manufacturers

• There are two main types of UI:– Graphical User Interface (eg Windows)– Command Line Interface (e.g MS-DOS)

• Other Operating Systems may deliver a mixture of these two.

22

Finding out more about Operating Systems

• The information presented here is an introduction to a very extensive subject.

• You should follow up some of these ideas by:– reading the IMC booklet for weeks 7 &

8– reading ch. 2 & 3 of the set book.– http://www.howstuffworks.com/operating-sy

stem.htm

23

A brief overview of MS-DOS

• When you activate the Command Prompt, a new window should open (called command prompt) and it will probably contain something like:

– Microsoft Windows 2000 [version 5.00.2195](C) Copyright 1985-2000 Microsoft Corp.

C:\>

24

DOS Conventions

• All DOS commands are activated by typing the commands and pressing the <Enter> key.

• DOS is not case-sensitive.• Spaces are the primary separators in DOS

commands. One or more spaces must follow each command word, and file names are delimited by spaces – therefore, files names may not contain spaces.

25

The DOS Prompt

• e.g. C:\WINDOWS\SYSTEM>

• C: the default disk drive• \ the root directory• WINDOWS name of a subdirectory in

the root• SYSTEM name of a directory in the

WINDOWS subdirectory• > Ready for your command

26

DOS Disk Concepts

• Each disk drive is assigned a letter• A colon after the drive letter identifies it

as a drive name, as opposed to a file name

• The letter is associated with the drive, not the disk.

• Certain letters– A: = floppy disk– C: = primary hard disk drive

27

DOS File Concepts

• Files on the disk are named things like Year1.doc , notes.ppt and go.exe etc.

• A filename potentially has two parts to it:– the filename (up to 8 letters)– the extension (up to three letters)

• The “.” is merely a separator, used to keep the two elements apart, so that DOS can find files of a particular type.

28

DOS Directory Concepts

• Files are collected together in folders – so for example a folder called

semester1 might contain the documents week1.doc, week2.doc etc.

Semester 1

week1.doc week2.doc week3.doc

29

DOS Directory Concepts

• groups of folders can be put into other folders, – so for example a folder called year1 might

contain the folders semester1 and semester2 Year 1

Semester1 Semester2

week1.doc

week2.doc

week3.doc

30

DOS Directory Concepts

• This process of putting files into folders and folders into other folders continues up to the level of the root directory, the disk drive’s main folder.

C:\

IMC BACE

Year 1 Programs Games

31

Directories, Subdirectories

• If you look in any folder you will see a collection of files and folders

• Listing the Directory will tell you what is in there.

• A subdirectory is merely a list of what is in any of the folders within the current directory.

32

Example Directory Structure

33

Listing a Directory

• Command– dir

• This command is an instruction to DOS to list the directory for the folder which you have selected.

• DOS remembers the “position” that you are in the directory structure. This is called the “default”.

34

Directory Commands

Other Commands:• To put the listing across the screen

(Wide)– dir /w

• To order the listing by name– dir /o

• To include subdirectories– dir /s

35

Interpreting a Directory Listing

Volume in drive A is MINI_BOOT

Volume Serial Number is 4106-18E9

Directory of A:\

COMMAND COM 52925 03-10-93 6:00a

DEFRAG EXE 75033 03-10-93 6:00a

DEFRAG HLP 9227 03-10-93 6:00a

3 file(s) 137185 bytes

1188352 bytes free

36

Interpreting a Directory Listing

• Volume in drive A is MINI_BOOT– Volume label can be given when

formatting a disk, or by using the label command

• Volume Serial Number is 4106-18E9– Serial number is assigned

automatically when formatting.

37

Interpreting a Directory Listing

• Directory of A:\– This disk is in A: drive, and we’re

looking at the “root” directory• COMMAND COM 52925 03-10-93

6:00a– A file called command.com, which

occupies 52,925 bytes and was last modified 03-10-93 at 6 am

38

Interpreting a Directory Listing

• 3 file(s) 137185 bytes– There are three files occupying a total

of 137,185 bytes in this directory• 1188352 bytes free

– You could store another 1,188,352 bytes on this disk

39

Changing Drives/Directories

• Make C: the default– c:

• Make the root default– cd\

• Change to winword directory– cd \msoffice\winword

• Change to the parent directory (one up)– cd..

40

Copying, Deleting, & Renaming

• Copy from default to a:\– Copy file.ext a:\

• Copy from a:\ to default– Copy a:\file.ext

• Delete one file– Del a:\file.ext

• Rename a file.abc to file.xyz– Rename file.abc file.xyz

41

Using Wildcard Characters

• A Wildcard Character allows you to type in a name without specifying it completely. This means that you can work on all files of a particular type

• For example, suppose that you wished to find all word files. These have the extension DOC, so you would use specify *.DOC as the filename. The * is a wildcard.

42

Using Wildcard Characters

• Matching any group of letters– * (star or asterisk) matches any group

of letters in the file name after the asterisk

• Matching any single letter– ? (question mark) matches any single

letter in the file name.

43

Listing a Directory using wildcards

• List all files– dir *.*

• All files with same extension– dir *.ext

• All files with a particular name, regardless of their extension– dir name.*

• All files within a specific directory– dir c:\web\site\*.*

44

Creative use of Wildcards

• dir q*.*– List all files beginning with the letter q

• copy *.bat b:– Copy all files with the extension bat to

drive b:• dir budget?a.dat

– List files whose name begins with budget, has any single character, ends with a and has the extension dat.

45

Finding out more about DOS

Links to help you with DOS Commands

MS-DOS Survival Guide• http://courses.wccnet.edu/computer/mo

d/q02cd.htm• EasyDOS Command Index• http://www.easydos.com/dosindex.htmlDOS 7 Full Command list• http://www3.sympatico.ca/rhwatson/dos

7/

top related