SlideShare a Scribd company logo
1 of 10
Download to read offline
Lecture 1: Introduction to
Operating Systems
Lecture 1: Introduction to
Operating Systems
Mythili Vutukuru
IIT Bombay
What is an operating system?
• Middleware between
user programs and
system hardware
• Manages hardware:
CPU, main memory, IO
devices (disk, network
card, mouse,
keyboard etc.)
• Middleware between
user programs and
system hardware
• Manages hardware:
CPU, main memory, IO
devices (disk, network
card, mouse,
keyboard etc.)
2
What happens when you run a
program? (Background)
• A compiler translates high level programs into an
executable (“.c” to “a.out”)
• The exe contains instructions that the CPU can
understand, and data of the program (all
numbered with addresses)
• Instructions run on CPU: hardware implements
an instruction set architecture (ISA)
• CPU also consists of a few registers, e.g.,
– Pointer to current instruction (program counter or PC)
– Operands of instructions, memory addresses
• A compiler translates high level programs into an
executable (“.c” to “a.out”)
• The exe contains instructions that the CPU can
understand, and data of the program (all
numbered with addresses)
• Instructions run on CPU: hardware implements
an instruction set architecture (ISA)
• CPU also consists of a few registers, e.g.,
– Pointer to current instruction (program counter or PC)
– Operands of instructions, memory addresses 3
So, what happens when you run a
program?
• To run an exe, CPU
– fetches instruction pointed at
by PC from memory
– loads data required by the
instructions into registers
– decodes and executes the
instruction
– stores results to memory
• Most recently used
instructions and data are in
CPU caches for faster access
• To run an exe, CPU
– fetches instruction pointed at
by PC from memory
– loads data required by the
instructions into registers
– decodes and executes the
instruction
– stores results to memory
• Most recently used
instructions and data are in
CPU caches for faster access
4
So, what does the OS do?
• OS manages program
memory
– Loads program executable
(code, data) from disk to
memory
• OS manages CPU
– Initializes program
counter (PC) and other
registers to begin
execution
• OS manages external
devices
– Read/write files from disk.
• OS manages program
memory
– Loads program executable
(code, data) from disk to
memory
• OS manages CPU
– Initializes program
counter (PC) and other
registers to begin
execution
• OS manages external
devices
– Read/write files from disk.
5
OS manages CPU
• OS provides the process abstraction
– Process: a running program
– OS creates and manages processes
• Each process has the illusion of
having the complete CPU, i.e., OS
virtualizes CPU
• Timeshares CPU between processes
• Enables coordination between
processes
• OS provides the process abstraction
– Process: a running program
– OS creates and manages processes
• Each process has the illusion of
having the complete CPU, i.e., OS
virtualizes CPU
• Timeshares CPU between processes
• Enables coordination between
processes
6
OS manages memory
• OS manages the memory
of the process: code, data,
stack, heap etc
• Each process thinks it has a
dedicated memory space
for itself, numbers code
and data starting from 0
(virtual addresses)
• OS abstracts out the details
of the actual placement in
memory, translates from
virtual addresses to actual
physical addresses
• OS manages the memory
of the process: code, data,
stack, heap etc
• Each process thinks it has a
dedicated memory space
for itself, numbers code
and data starting from 0
(virtual addresses)
• OS abstracts out the details
of the actual placement in
memory, translates from
virtual addresses to actual
physical addresses
7
OS manages devices
• OS has code to manage disk, network card,
and other external devices: device drivers
• Device driver talks the language of the
hardware devices
– Issues instructions to devices (fetch data from a
file)
– Responds to interrupt events from devices (user
has pressed a key on keyboard)
• Persistent data organized as a filesystem on
disk
• OS has code to manage disk, network card,
and other external devices: device drivers
• Device driver talks the language of the
hardware devices
– Issues instructions to devices (fetch data from a
file)
– Responds to interrupt events from devices (user
has pressed a key on keyboard)
• Persistent data organized as a filesystem on
disk
8
Design goals of an operating system
• Convenience, abstraction of hardware
resources for user programs
• Efficiency of usage of CPU, memory, etc.
• Isolation between multiple processes
• Convenience, abstraction of hardware
resources for user programs
• Efficiency of usage of CPU, memory, etc.
• Isolation between multiple processes
9
History of operating systems
• Started out as a library to provide common
functionality across programs
• Later, evolved from procedure call to system
call: what’s the difference?
• When a system call is made to run OS code,
the CPU executes at a higher privilege level
• Evolved from running a single program to
multiple processes concurrently
• Started out as a library to provide common
functionality across programs
• Later, evolved from procedure call to system
call: what’s the difference?
• When a system call is made to run OS code,
the CPU executes at a higher privilege level
• Evolved from running a single program to
multiple processes concurrently
10

More Related Content

Similar to lecture1 details of operating system abraham silberchatz

Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)Vaibhav Bajaj
 
introduce computer .pptx
introduce computer .pptxintroduce computer .pptx
introduce computer .pptxSHUJEHASSAN
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)NehaTadam
 
3. basic organization of a computer
3. basic organization of a computer3. basic organization of a computer
3. basic organization of a computerSHIKHA GAUTAM
 
Bba i-introduction to computer-u-3-functions operating systems
Bba  i-introduction to computer-u-3-functions operating systemsBba  i-introduction to computer-u-3-functions operating systems
Bba i-introduction to computer-u-3-functions operating systemsRai University
 
Windows 1Fundaments.ppt
Windows 1Fundaments.pptWindows 1Fundaments.ppt
Windows 1Fundaments.pptkarthikvcyber
 
OS-20210426203801 introduction to os.ppt
OS-20210426203801 introduction to os.pptOS-20210426203801 introduction to os.ppt
OS-20210426203801 introduction to os.pptnaghamallella
 
Chapter 1-2 _ Operating Systems.pdf
Chapter 1-2 _ Operating Systems.pdfChapter 1-2 _ Operating Systems.pdf
Chapter 1-2 _ Operating Systems.pdfAfendeyAthurJinir
 
Introduction and fundamentals of Operating System.ppt
Introduction and fundamentals of Operating System.pptIntroduction and fundamentals of Operating System.ppt
Introduction and fundamentals of Operating System.pptminaltmv
 
Operating Systems & Applications
Operating Systems & ApplicationsOperating Systems & Applications
Operating Systems & ApplicationsMaulen Bale
 
2 operating system structures
2 operating system structures2 operating system structures
2 operating system structuresDr. Loganathan R
 

Similar to lecture1 details of operating system abraham silberchatz (20)

Unit 4
Unit  4Unit  4
Unit 4
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)
 
introduce computer .pptx
introduce computer .pptxintroduce computer .pptx
introduce computer .pptx
 
Week 01.pdf
Week 01.pdfWeek 01.pdf
Week 01.pdf
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)
 
3. basic organization of a computer
3. basic organization of a computer3. basic organization of a computer
3. basic organization of a computer
 
Operating system.pptx
Operating system.pptxOperating system.pptx
Operating system.pptx
 
Operating system.pptx
Operating system.pptxOperating system.pptx
Operating system.pptx
 
Bba i-introduction to computer-u-3-functions operating systems
Bba  i-introduction to computer-u-3-functions operating systemsBba  i-introduction to computer-u-3-functions operating systems
Bba i-introduction to computer-u-3-functions operating systems
 
OS-20210426203801.ppt
OS-20210426203801.pptOS-20210426203801.ppt
OS-20210426203801.ppt
 
OS-20210426203801.ppt
OS-20210426203801.pptOS-20210426203801.ppt
OS-20210426203801.ppt
 
OS-20210426203801.ppt
OS-20210426203801.pptOS-20210426203801.ppt
OS-20210426203801.ppt
 
OS full chapter.ppt
OS full chapter.pptOS full chapter.ppt
OS full chapter.ppt
 
Windows 1Fundaments.ppt
Windows 1Fundaments.pptWindows 1Fundaments.ppt
Windows 1Fundaments.ppt
 
OS-20210426203801 introduction to os.ppt
OS-20210426203801 introduction to os.pptOS-20210426203801 introduction to os.ppt
OS-20210426203801 introduction to os.ppt
 
OS-20210426203801.ppt
OS-20210426203801.pptOS-20210426203801.ppt
OS-20210426203801.ppt
 
Chapter 1-2 _ Operating Systems.pdf
Chapter 1-2 _ Operating Systems.pdfChapter 1-2 _ Operating Systems.pdf
Chapter 1-2 _ Operating Systems.pdf
 
Introduction and fundamentals of Operating System.ppt
Introduction and fundamentals of Operating System.pptIntroduction and fundamentals of Operating System.ppt
Introduction and fundamentals of Operating System.ppt
 
Operating Systems & Applications
Operating Systems & ApplicationsOperating Systems & Applications
Operating Systems & Applications
 
2 operating system structures
2 operating system structures2 operating system structures
2 operating system structures
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 

lecture1 details of operating system abraham silberchatz

  • 1. Lecture 1: Introduction to Operating Systems Lecture 1: Introduction to Operating Systems Mythili Vutukuru IIT Bombay
  • 2. What is an operating system? • Middleware between user programs and system hardware • Manages hardware: CPU, main memory, IO devices (disk, network card, mouse, keyboard etc.) • Middleware between user programs and system hardware • Manages hardware: CPU, main memory, IO devices (disk, network card, mouse, keyboard etc.) 2
  • 3. What happens when you run a program? (Background) • A compiler translates high level programs into an executable (“.c” to “a.out”) • The exe contains instructions that the CPU can understand, and data of the program (all numbered with addresses) • Instructions run on CPU: hardware implements an instruction set architecture (ISA) • CPU also consists of a few registers, e.g., – Pointer to current instruction (program counter or PC) – Operands of instructions, memory addresses • A compiler translates high level programs into an executable (“.c” to “a.out”) • The exe contains instructions that the CPU can understand, and data of the program (all numbered with addresses) • Instructions run on CPU: hardware implements an instruction set architecture (ISA) • CPU also consists of a few registers, e.g., – Pointer to current instruction (program counter or PC) – Operands of instructions, memory addresses 3
  • 4. So, what happens when you run a program? • To run an exe, CPU – fetches instruction pointed at by PC from memory – loads data required by the instructions into registers – decodes and executes the instruction – stores results to memory • Most recently used instructions and data are in CPU caches for faster access • To run an exe, CPU – fetches instruction pointed at by PC from memory – loads data required by the instructions into registers – decodes and executes the instruction – stores results to memory • Most recently used instructions and data are in CPU caches for faster access 4
  • 5. So, what does the OS do? • OS manages program memory – Loads program executable (code, data) from disk to memory • OS manages CPU – Initializes program counter (PC) and other registers to begin execution • OS manages external devices – Read/write files from disk. • OS manages program memory – Loads program executable (code, data) from disk to memory • OS manages CPU – Initializes program counter (PC) and other registers to begin execution • OS manages external devices – Read/write files from disk. 5
  • 6. OS manages CPU • OS provides the process abstraction – Process: a running program – OS creates and manages processes • Each process has the illusion of having the complete CPU, i.e., OS virtualizes CPU • Timeshares CPU between processes • Enables coordination between processes • OS provides the process abstraction – Process: a running program – OS creates and manages processes • Each process has the illusion of having the complete CPU, i.e., OS virtualizes CPU • Timeshares CPU between processes • Enables coordination between processes 6
  • 7. OS manages memory • OS manages the memory of the process: code, data, stack, heap etc • Each process thinks it has a dedicated memory space for itself, numbers code and data starting from 0 (virtual addresses) • OS abstracts out the details of the actual placement in memory, translates from virtual addresses to actual physical addresses • OS manages the memory of the process: code, data, stack, heap etc • Each process thinks it has a dedicated memory space for itself, numbers code and data starting from 0 (virtual addresses) • OS abstracts out the details of the actual placement in memory, translates from virtual addresses to actual physical addresses 7
  • 8. OS manages devices • OS has code to manage disk, network card, and other external devices: device drivers • Device driver talks the language of the hardware devices – Issues instructions to devices (fetch data from a file) – Responds to interrupt events from devices (user has pressed a key on keyboard) • Persistent data organized as a filesystem on disk • OS has code to manage disk, network card, and other external devices: device drivers • Device driver talks the language of the hardware devices – Issues instructions to devices (fetch data from a file) – Responds to interrupt events from devices (user has pressed a key on keyboard) • Persistent data organized as a filesystem on disk 8
  • 9. Design goals of an operating system • Convenience, abstraction of hardware resources for user programs • Efficiency of usage of CPU, memory, etc. • Isolation between multiple processes • Convenience, abstraction of hardware resources for user programs • Efficiency of usage of CPU, memory, etc. • Isolation between multiple processes 9
  • 10. History of operating systems • Started out as a library to provide common functionality across programs • Later, evolved from procedure call to system call: what’s the difference? • When a system call is made to run OS code, the CPU executes at a higher privilege level • Evolved from running a single program to multiple processes concurrently • Started out as a library to provide common functionality across programs • Later, evolved from procedure call to system call: what’s the difference? • When a system call is made to run OS code, the CPU executes at a higher privilege level • Evolved from running a single program to multiple processes concurrently 10