Transcript
Page 1: Lecture  #  37 Operating Systems

Lecture # 37

Operating Systems

Page 2: Lecture  #  37 Operating Systems

Operating Systems

• Program that starts when you turn on your computer

• Controls devices (printers, disk drives, displays, networks)

• manages information in files and folders

• runs other programs

Page 3: Lecture  #  37 Operating Systems

Example Operating Systems

• Microsoft Windows

• UNIX

• MacOS (Apple)

Page 4: Lecture  #  37 Operating Systems

How are they the same?

• They have files

• They have folders or directories

• They run programs

Page 5: Lecture  #  37 Operating Systems

How are they different?

• The user interface

• The things that a user must do to work with files, folders and programs

Page 6: Lecture  #  37 Operating Systems

Managing Information

• Find files

• Look at the contents of files

• Organize your files and folders

• Create and delete files and folders

• Printers and disks

Page 7: Lecture  #  37 Operating Systems

What is a File?

• An array of bytes

• What do those bytes mean?– Depends on the type of file

• Word, Excel, Gif, HTML, Jpg, VRML, Java

Page 8: Lecture  #  37 Operating Systems

Finding files

• By Address - – every file has a particular address on a

particular disk drive– We don’t want to know

• By Name– Pathname in a tree of folders (directories) and

files

• By Search

Page 9: Lecture  #  37 Operating Systems

File Types

• Folders• PowerPoint Slides• Microsoft Word

• How does the computer know the file type?

Page 10: Lecture  #  37 Operating Systems

Showing File Extensions

• An extension is at the end of the file name

• Each extension has a program associated with it– .ppt => PowerPoint– .doc => Word

Page 11: Lecture  #  37 Operating Systems

File Extensions - just a record

• Many extensions can map to the same program

Page 12: Lecture  #  37 Operating Systems

Deleted Files

• Deleted files are not really gone

• Recycle folder is just a special folder

• Can sometimes recover files

Warning: Reformat drives if they have

personal information before getting rid of

Page 13: Lecture  #  37 Operating Systems

OS Running a program

• Reads the bytes from the file

• Places the bytes into memory

• Tells the computer to start running the instructions in those bytes

Page 14: Lecture  #  37 Operating Systems

Operating Systems Review

• Everything is just a big tree– Files– Folders

• OS has record with a program name stored under each extension name

• A program is just a file filled with instructions for the computer

Page 15: Lecture  #  37 Operating Systems

Files, User Interfaces, and the OS

• Files: programs (.exe); data (.jpg, .html, .doc, etc.)

• User Interface: used to run programs and manage files and folders through the OS.

• User Interface also manages and controls other devices (printers, disk drives, displays, networks)

Page 16: Lecture  #  37 Operating Systems

Communicating with the OS

User

UserInterface

… but what does a User Interface look like?

OperatingSystem

Page 17: Lecture  #  37 Operating Systems

Look at your screen

Page 18: Lecture  #  37 Operating Systems

DOS (Command-line) User Interface

Page 19: Lecture  #  37 Operating Systems

DOS (Command-line) User Interface

The Command Prompt

Page 20: Lecture  #  37 Operating Systems

Viewing the contents of a Folder

• In DOS “Folders” = “Directories”

• So type “dir” followed by enter at the command prompt:

D:\CS100\CS100 Lectures >dir

Page 21: Lecture  #  37 Operating Systems

Viewing the contents of a Folder

• In DOS “Folders” = “Directories”

Page 22: Lecture  #  37 Operating Systems

Viewing the contents of a Folder

• In DOS “Folders” = “Directories”

Page 23: Lecture  #  37 Operating Systems

Viewing the contents of a Folder

• In DOS “Folders” = “Directories”

• So type “dir” followed by enter at the command prompt:

D:\CS100\CS100 Lectures >dir

• The prompt is the path in the folder tree

Page 24: Lecture  #  37 Operating Systems

Getting to DOS

1. Start menu

2. Programs

3. MS-DOS Prompt

Page 25: Lecture  #  37 Operating Systems

File Management

• Change Folder/Directory

• Make Folder/Directory

• Copy Files

• Delete and Undelete Files

• Rename Files

Page 26: Lecture  #  37 Operating Systems

Change Drive/Folder/Directory

• GUI (Windows or Mac)- double click on folders (up & down the tree)

• DOS: to change from C:\> to D:\CS100- type “d:”- Then type “cd cs100” (cd = change directory)- Type “cd \” to get back to the root (top of tree)

Page 27: Lecture  #  37 Operating Systems

Make Folder/Directory

• GUI (Windows or Mac)- File > New > Folder

• DOS: to make a new folder “gronk”- type “mkdir gronk”- To remove/delete: type “rmdir gronk”

Page 28: Lecture  #  37 Operating Systems

Copying Files

• GUI (Windows or Mac)- “drag & drop”

• DOS: to copy a file “foo.doc” to d:\cs100- type “copy foo.doc d:\cs100”- To rename as you copy

Type “copy foo.doc d:\cs100\newname”

Page 29: Lecture  #  37 Operating Systems

Deleting Files

• GUI (Windows or Mac)- drag to recycle bin (Windows) or trash (Mac)- Empty to really delete

• DOS: to delete a file “notworthkeeping”- type “del notworthkeeping”

• To delete every file in the current folder or directory:

- type “del *.*”

Page 30: Lecture  #  37 Operating Systems

Renaming Files

• GUI (Windows or Mac)- Click on the name of the file …. Pause ….- Then click on it again and edit it

• DOS: to rename file “bug” to “itruns”- type “ren bug itruns”

Page 31: Lecture  #  37 Operating Systems

Running Programs

• GUI (Windows or Mac)- Double click on the program or file … or …

- “Drag & drop” file onto program

• DOS: to program “ItRuns”- type “ItRuns” and hit the enter key

Page 32: Lecture  #  37 Operating Systems

Printing Files

• GUI (Windows or Mac)- Print from within the application … or …- “Drag & drop” file onto printer

• DOS: to print a text file “MyPaper”- type “print MyPaper”- type “type MyPaper” outputs it to the screen

Page 33: Lecture  #  37 Operating Systems

Editing Files

• GUI (Windows or Mac)- Edit from within the application … or …- Open with Notepad as shown with html files


Top Related