Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithms File Systems Lab Environment.

Similar presentations


Presentation on theme: "Algorithms File Systems Lab Environment."— Presentation transcript:

1 Algorithms File Systems Lab Environment

2 What makes a good algorithm?
Algorithms File Systems Lab Environment What makes a good algorithm?

3 Algorithms File Systems Lab Environment What is abstraction?

4 Algorithms File Systems Lab Environment Example Problem Create an address list that includes each person’s name, address, telephone number, and address This list should then be printed in alphabetical order The names to be included in the list are on scraps of paper and business cards

5 A Computer Example – a Top Down approach
Page 156

6 A Computer Example Page 157

7 A Computer Example Page 158

8 A Computer Example Page 159

9 A new structure and a new feature of a good algorithm
This algorithm features the use of abstraction, that is, removing the detail from a step. Example, first step of main says “enter names into list” This step does not say how; it simply says to do this activity. In another place, we find the detail.

10 This approach allows us to break a problem solution down into small components allows us to think of each component independently allows reuse

11 Graphically Enter names in list Fill in missing data
Main Enter names in list Fill in missing data Put list in alphabetic order Print the list Our brains can grasp this amount of information. Only 5 things to worry about. Each of those 5 things has more detail but not an overwhelming amount. Prompt for and enter names

12 What makes a good algorithm?
Algorithms File Systems Lab Environment What makes a good algorithm? Exercise

13 Algorithms File Systems Lab Environment

14 Algorithms File Systems Lab Environment One of the resources that the operating system manages is auxiliary storage. Some terminology A file is a named collection of related data A file system is the logical view that an operating system provides so that users can manage information as a collection of files A file system is often organized by grouping files into directories

15 Directory Trees - Windows
Algorithms File Systems Lab Environment Directory Trees - Windows

16 Algorithms File Systems Lab Environment A Unix Directory Tree

17 A directory of files can be contained within another directory
Algorithms File Systems Lab Environment A directory of files can be contained within another directory The directory containing another is usually called the parent directory, and the one inside is called a subdirectory A file system is often viewed as a directory tree The directory at the highest level is called the root directory At any point in time, you can be thought of as working in a particular location (that is, a particular subdirectory) This subdirectory is referred to as the current working directory

18 A relative path name begins from the current working directory
Algorithms File Systems Lab Environment To indicate a particular file using text, we specify that file’s path, which is the series of directories through which you must go to find the file An absolute path name begins at the root and specifies each step down the tree until it reaches the desired file or directory A relative path name begins from the current working directory


Download ppt "Algorithms File Systems Lab Environment."

Similar presentations


Ads by Google