SlideShare ist ein Scribd-Unternehmen logo
1 von 2
MODULE IN ITE229 - OPERATING SYSTEMS 20
                               Prepared by: For-Ian V. Sandoval



                           LESSON 10
              APPLICATION PROGRAM INTERFACE (API)


      Just as drivers provide a way for applications to make use of
hardware subsystems without having to know every detail of the
hardware's operation, application program interfaces (APIs) let
application programmers use functions of the computer and operating
system without having to directly keep track of all the details in the CPU's
operation. Let's look at the example of creating a hard disk file for holding
data to see why this can be important.

       A programmer writing an application to record data from a
scientific instrument might want to allow the scientist to specify the name
of the file created. The operating system might provide an API function
named MakeFile for creating files. When writing the program, the
programmer would insert a line that looks like this:

      MakeFile [1, %Name, 2]

        In this example, the instruction tells the operating system to create a
file that will allow random access to its data (signified by the 1 -- the other
option might be 0 for a serial file), will have a name typed in by the user
(%Name) and will be a size that varies depending on how much data is
stored in the file (signified by the 2 -- other options might be zero for a
fixed size, and 1 for a file that grows as data is added but does not shrink
when data is removed). Now, let's look at what the operating system does
to turn the instruction into action.

      The operating system sends a query to the disk drive to get the
location of the first available free storage location.

        With that information, the operating system creates an entry in the
file system showing the beginning and ending locations of the file, the
name of the file, the file type, whether the file has been archived, which
users have permission to look at or modify the file, and the date and time
of the file's creation.

       The operating system writes information at the beginning of the file
that identifies the file, sets up the type of access possible and includes
other information that ties the file to the application. In all of this
information, the queries to the disk drive and addresses of the beginning
MODULE IN ITE229 - OPERATING SYSTEMS 21
                              Prepared by: For-Ian V. Sandoval

and ending point of the file are in formats heavily dependent on the
manufacturer and model of the disk drive.

       Because the programmer has written the program to use the API for
disk storage, the programmer doesn't have to keep up with the instruction
codes, data types and response codes for every possible hard disk and
tape drive. The operating system, connected to drivers for the various
hardware subsystems, deals with the changing details of the hardware.
The programmer must simply write code for the API and trust the
operating system to do the rest.

       APIs have become one of the most hotly contested areas of the
computer industry in recent years. Companies realize that programmers
using their API will ultimately translate this into the ability to control and
profit from a particular part of the industry. This is one of the reasons that
so many companies have been willing to provide applications like readers
or viewers to the public at no charge. They know consumers will request
that programs take advantage of the free readers, and application
companies will be ready to pay royalties to allow their software to provide
the functions requested by the consumers.

Weitere ähnliche Inhalte

Ähnlich wie Lesson 10 Application Program Interface

Android application structure
Android application structureAndroid application structure
Android application structureAlexey Ustenko
 
Computer Software Ultimate History and Benefits
Computer Software Ultimate History and BenefitsComputer Software Ultimate History and Benefits
Computer Software Ultimate History and BenefitsTyler Aaron
 
Android overview
Android overviewAndroid overview
Android overviewHas Taiar
 
computer notes - Introduction to operating system
computer notes - Introduction to operating systemcomputer notes - Introduction to operating system
computer notes - Introduction to operating systemecomputernotes
 
Automatic answer checker
Automatic answer checkerAutomatic answer checker
Automatic answer checkerYesu Raj
 
apidays LIVE Paris - Bring the API culture to DevOps teams by Christophe Bour...
apidays LIVE Paris - Bring the API culture to DevOps teams by Christophe Bour...apidays LIVE Paris - Bring the API culture to DevOps teams by Christophe Bour...
apidays LIVE Paris - Bring the API culture to DevOps teams by Christophe Bour...apidays
 
Operatig System Tutorial Level3
Operatig System Tutorial Level3Operatig System Tutorial Level3
Operatig System Tutorial Level3willye83
 
App Engine Application for Detecting Similar Files in Google Drive
App Engine Application for Detecting Similar Files in Google DriveApp Engine Application for Detecting Similar Files in Google Drive
App Engine Application for Detecting Similar Files in Google DriveIRJET Journal
 
Operating System- Structures of Operating System
Operating System- Structures of Operating SystemOperating System- Structures of Operating System
Operating System- Structures of Operating SystemJimmyWilson26
 
Unit 2 Foc
Unit 2 FocUnit 2 Foc
Unit 2 FocJAYA
 
C LECTURE NOTES FULL_1.pdf
C LECTURE NOTES FULL_1.pdfC LECTURE NOTES FULL_1.pdf
C LECTURE NOTES FULL_1.pdfPriyanka542143
 

Ähnlich wie Lesson 10 Application Program Interface (20)

Android application structure
Android application structureAndroid application structure
Android application structure
 
Computer Software Ultimate History and Benefits
Computer Software Ultimate History and BenefitsComputer Software Ultimate History and Benefits
Computer Software Ultimate History and Benefits
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Fg b
Fg bFg b
Fg b
 
191
191191
191
 
Srs
SrsSrs
Srs
 
intro to OS
intro to OSintro to OS
intro to OS
 
Note book pc
Note book pcNote book pc
Note book pc
 
Android overview
Android overviewAndroid overview
Android overview
 
System software vt
System software vtSystem software vt
System software vt
 
computer notes - Introduction to operating system
computer notes - Introduction to operating systemcomputer notes - Introduction to operating system
computer notes - Introduction to operating system
 
Automatic answer checker
Automatic answer checkerAutomatic answer checker
Automatic answer checker
 
apidays LIVE Paris - Bring the API culture to DevOps teams by Christophe Bour...
apidays LIVE Paris - Bring the API culture to DevOps teams by Christophe Bour...apidays LIVE Paris - Bring the API culture to DevOps teams by Christophe Bour...
apidays LIVE Paris - Bring the API culture to DevOps teams by Christophe Bour...
 
Job portal
Job portalJob portal
Job portal
 
Operatig System Tutorial Level3
Operatig System Tutorial Level3Operatig System Tutorial Level3
Operatig System Tutorial Level3
 
App Engine Application for Detecting Similar Files in Google Drive
App Engine Application for Detecting Similar Files in Google DriveApp Engine Application for Detecting Similar Files in Google Drive
App Engine Application for Detecting Similar Files in Google Drive
 
Operating System- Structures of Operating System
Operating System- Structures of Operating SystemOperating System- Structures of Operating System
Operating System- Structures of Operating System
 
Unit 2 Foc
Unit 2 FocUnit 2 Foc
Unit 2 Foc
 
Internship msc cs
Internship msc csInternship msc cs
Internship msc cs
 
C LECTURE NOTES FULL_1.pdf
C LECTURE NOTES FULL_1.pdfC LECTURE NOTES FULL_1.pdf
C LECTURE NOTES FULL_1.pdf
 

Mehr von Laguna State Polytechnic University

Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyFormal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyLaguna State Polytechnic University
 
Exploring the Difference Between Information Technology and Information System
Exploring the Difference Between Information Technology and Information SystemExploring the Difference Between Information Technology and Information System
Exploring the Difference Between Information Technology and Information SystemLaguna State Polytechnic University
 

Mehr von Laguna State Polytechnic University (20)

Number Theory - Lesson 1 - Introduction to Number Theory
Number Theory - Lesson 1 - Introduction to Number TheoryNumber Theory - Lesson 1 - Introduction to Number Theory
Number Theory - Lesson 1 - Introduction to Number Theory
 
Formal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and QuantifiersFormal Logic - Lesson 8 - Predicates and Quantifiers
Formal Logic - Lesson 8 - Predicates and Quantifiers
 
Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)Machine Learning Algorithms (Part 1)
Machine Learning Algorithms (Part 1)
 
Artificial Intelligence Algorithms
Artificial Intelligence AlgorithmsArtificial Intelligence Algorithms
Artificial Intelligence Algorithms
 
Formal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of InferenceFormal Logic - Lesson 7 - Rules of Inference
Formal Logic - Lesson 7 - Rules of Inference
 
Formal Logic - Lesson 6 - Switching Circuits
Formal Logic - Lesson 6 - Switching CircuitsFormal Logic - Lesson 6 - Switching Circuits
Formal Logic - Lesson 6 - Switching Circuits
 
Formal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical EquivalenceFormal Logic - Lesson 5 - Logical Equivalence
Formal Logic - Lesson 5 - Logical Equivalence
 
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and ContingencyFormal Logic - Lesson 4 - Tautology, Contradiction and Contingency
Formal Logic - Lesson 4 - Tautology, Contradiction and Contingency
 
Formal Logic - Lesson 3 - Truth Tables
Formal Logic - Lesson 3 - Truth TablesFormal Logic - Lesson 3 - Truth Tables
Formal Logic - Lesson 3 - Truth Tables
 
Formal Logic - Lesson 2 - Logical Connectives
Formal Logic - Lesson 2 - Logical ConnectivesFormal Logic - Lesson 2 - Logical Connectives
Formal Logic - Lesson 2 - Logical Connectives
 
Formal Logic - Lesson 1 - Introduction to Logic
Formal Logic - Lesson 1 - Introduction to LogicFormal Logic - Lesson 1 - Introduction to Logic
Formal Logic - Lesson 1 - Introduction to Logic
 
Ethical Issues and Relevant Laws on Computing
Ethical Issues and Relevant Laws on ComputingEthical Issues and Relevant Laws on Computing
Ethical Issues and Relevant Laws on Computing
 
Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
Number Systems Basic Concepts
Number Systems Basic ConceptsNumber Systems Basic Concepts
Number Systems Basic Concepts
 
Exploring the Difference Between Information Technology and Information System
Exploring the Difference Between Information Technology and Information SystemExploring the Difference Between Information Technology and Information System
Exploring the Difference Between Information Technology and Information System
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Introduction to Computers
Introduction to ComputersIntroduction to Computers
Introduction to Computers
 
Introduction to Computing Logic Formulation
Introduction to Computing Logic FormulationIntroduction to Computing Logic Formulation
Introduction to Computing Logic Formulation
 
Oasis of Sparkling and Refreshing Truisms
Oasis of Sparkling and Refreshing TruismsOasis of Sparkling and Refreshing Truisms
Oasis of Sparkling and Refreshing Truisms
 
My Teacher Got IT v2.0 - Software Installation Track
My Teacher Got IT v2.0 - Software Installation TrackMy Teacher Got IT v2.0 - Software Installation Track
My Teacher Got IT v2.0 - Software Installation Track
 

Kürzlich hochgeladen

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 

Kürzlich hochgeladen (20)

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 

Lesson 10 Application Program Interface

  • 1. MODULE IN ITE229 - OPERATING SYSTEMS 20 Prepared by: For-Ian V. Sandoval LESSON 10 APPLICATION PROGRAM INTERFACE (API) Just as drivers provide a way for applications to make use of hardware subsystems without having to know every detail of the hardware's operation, application program interfaces (APIs) let application programmers use functions of the computer and operating system without having to directly keep track of all the details in the CPU's operation. Let's look at the example of creating a hard disk file for holding data to see why this can be important. A programmer writing an application to record data from a scientific instrument might want to allow the scientist to specify the name of the file created. The operating system might provide an API function named MakeFile for creating files. When writing the program, the programmer would insert a line that looks like this: MakeFile [1, %Name, 2] In this example, the instruction tells the operating system to create a file that will allow random access to its data (signified by the 1 -- the other option might be 0 for a serial file), will have a name typed in by the user (%Name) and will be a size that varies depending on how much data is stored in the file (signified by the 2 -- other options might be zero for a fixed size, and 1 for a file that grows as data is added but does not shrink when data is removed). Now, let's look at what the operating system does to turn the instruction into action. The operating system sends a query to the disk drive to get the location of the first available free storage location. With that information, the operating system creates an entry in the file system showing the beginning and ending locations of the file, the name of the file, the file type, whether the file has been archived, which users have permission to look at or modify the file, and the date and time of the file's creation. The operating system writes information at the beginning of the file that identifies the file, sets up the type of access possible and includes other information that ties the file to the application. In all of this information, the queries to the disk drive and addresses of the beginning
  • 2. MODULE IN ITE229 - OPERATING SYSTEMS 21 Prepared by: For-Ian V. Sandoval and ending point of the file are in formats heavily dependent on the manufacturer and model of the disk drive. Because the programmer has written the program to use the API for disk storage, the programmer doesn't have to keep up with the instruction codes, data types and response codes for every possible hard disk and tape drive. The operating system, connected to drivers for the various hardware subsystems, deals with the changing details of the hardware. The programmer must simply write code for the API and trust the operating system to do the rest. APIs have become one of the most hotly contested areas of the computer industry in recent years. Companies realize that programmers using their API will ultimately translate this into the ability to control and profit from a particular part of the industry. This is one of the reasons that so many companies have been willing to provide applications like readers or viewers to the public at no charge. They know consumers will request that programs take advantage of the free readers, and application companies will be ready to pay royalties to allow their software to provide the functions requested by the consumers.