18
5 The Shell, the IOCS, and the File System

5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

Embed Size (px)

Citation preview

Page 1: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

5

The Shell, the IOCS, and the File System

Page 2: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Figure 5.1 The components of a modern operating system.

User interfaceDevice

managementFile

management

Memorymanagement

Processor(or process)management

Communicationservices

Operating system layer

Application program layer

Hardware layer

Page 3: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Operating System Functions

• User interface– Mechanism for communicating with OS

• File system– Manipulate files by name

• Device management– Communicate with peripherals

Page 4: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Operating System Functions

• Processor management– Manage the processor’s time

• Memory management– Manage memory space

• Communication support– Inter-computer communication

• See Chapter 6

Page 5: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

The Application Program’s Interfaces

• User interface part of application program– Active when program running

• Application programming interface– Link to operating system– Library of system calls– Referenced in source code

Page 6: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

The Operating System’s User Interface

• Allows user to issue commands to OS

• Types of user interfaces– Command line interface or shell– Menu interface– Graphical user interface– Voice-activated interface– Web-form interface

Page 7: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Figure 5.2 The user interface accepts, interprets, and carries out commands.

User interface layer

Other operating system layers

Hardware layer

Application program layer

Systemoperator

User

Operating system layer

Commands Commands

API

Userinterface

Page 8: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Figure 5.3 A graphical user interface.

Page 9: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Figure 5.4 The user interface layer can support several different interfaces.

User interface layer

Other operating system layers

Operating system

Linecommandinterface

Graphic userinterface

Voice-activatedinterface

Page 10: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

The Command Language

• Command language– The set of available commands and syntax rules– Each command activates a specific service

• Batch file– A set of pre-defined commands stored in a file

Page 11: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Figure 5.5 The user interface links to a number of routines, each of which performs a single service.

Memory

Operating system

Application programs

User interface layer

Other operating system layers

Launchprogram

Close program Create file

Open file Close file Format disk

List directory Check disk Other functions

Page 12: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Figure 5.6 Launching an application program.

Memory

Operating system

RUN MYPGM

User interface layer

Other operating system layers

Launchprogram

Close program Create file

Open file Close file Format disk

RUN MYPGM

MYPGM

a. The user selects the program.

Page 13: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

b. The user interface calls the launch program routine.

Memory

Operating system

RUN MYPGM

User interface layer

Other operating system layers

Close program Create file

Open file Close file Format disk

RUN MYPGM

MYPGM

Launchprogram

Page 14: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

c. The application program is loaded into memory and started.

Memory

Operating system

MYPGM

User interface layer

Other operating system layers

Close programLaunchprogram

Create file

Open file Close file Format disk

RUN MYPGM

MYPGM

Page 15: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Figure 5.7 The file system layer.

The file system keeps track of the data and programs stored on disk.

User interface layer

Other operating system layers

Hardware

Operating system

File system layer

Application program layer

Page 16: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Figure 5.8 The location of every file stored on a disk can be found by searching the disk’s directory.

The disk directory

Page 17: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Launching a Program

• User issues a launch command– Command names target program

• File system reads directory

• File system searches directory

• File system extracts program address

• Device management layer loads program

• Operating system starts program

Page 18: 5 The Shell, the IOCS, and the File System. © 2005 Pearson Addison-Wesley. All rights reserved Figure 5.1 The components of a modern operating system

© 2005 Pearson Addison-Wesley. All rights reserved

Open and Close

• Open– New file – create directory entry– Existing file – retrieve directory– Make file available

• Close– Update directory– Make file unavailable