lecture l10 operating systems · functions of operating systems operating system is the interface...
TRANSCRIPT
![Page 1: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/1.jpg)
Dr. Yinong Chen
Lecture L10 Operating Systems
Introduction to Engineering Using Robotics Experiments
![Page 2: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/2.jpg)
Functions of Operating Systems
Operating System is the interface between humanand computer
Oversee operations of a computer
Store and retrieve files
Schedule programs for execution
Coordinate the execution of programs
3-2
An OS course will discuss OS design and implementation in detail
What is theinterfacebetween
hardware andsoftware?
![Page 3: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/3.jpg)
Evolution of Shared Computing Batch processing
Interactive processing
Requires real-time processing
Time-sharing/Multitasking Implemented by
multiprogramming
Multiprocessor machines
Web operating systems
3-3
Process queue
start
ready
running
waiting sleeping blockedterminated
wait sleepblock
quantumexpires
dispatch
complete
![Page 4: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/4.jpg)
Batch processing
3-4
![Page 5: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/5.jpg)
Interactive processing
3-5
![Page 6: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/6.jpg)
Software Classification
3-6
Compilers
Games
Device managers
Software Engineersin System
Software Engineersin Application
E-commerce
![Page 7: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/7.jpg)
Operating System Components
Shell: Communicates with users
Text based
Graphical user interface (GUI)
Kernel: Performs basic required functions
File manager
Memory manager
Scheduler and dispatcher
Device managers
Drivers that can be installed and uninstalled by users
3-7
Not replaceable
Replaceable
![Page 8: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/8.jpg)
The shell as an interface betweenusers and the operating system
3-8
Kernel
Managers
Drivers
Middleware
Agents
Shell
Windows
Applications
Users
Users
![Page 9: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/9.jpg)
File Manager
Directory (or Folder): A user-created bundle of filesand other directories (subdirectories)
Directory Path: A sequence of directories withindirectories
Example: DOS (Disk Operating System) is basically afile manager, as the shell and other kernel mangers arevery simple. DOS runs one program at a time, and thusmemory manager is almost nothing:
3-9
640K ought to be enough for anybody. Bill Gates, Microsoft
![Page 10: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/10.jpg)
Memory Manager Allocates space in main memory
May create the illusion that the machine has morememory than it actually does (virtual memory) byplaying a “shell game”, in which blocks of data (pages)are shifted back and forth between main memory andmass storage (disk)
Memory manger is complex in multitasking andmulti-processor system
Memory sharing
Faster memory Cache Level 1 and Level 2
3-10
Computer Organization and Architecture courses will discussthe topics in detail
![Page 11: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/11.jpg)
Getting it Started (Bootstrapping)
Bootstrap: Program in ROM (example of firmware)
Run by the CPU when power is turned on
Transfers operating system from mass storage (disk) tomain memory (RAM)
Executes jump to operating system
3-11
![Page 12: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/12.jpg)
The booting process
3-12
Step 3: Load application programs
Applicationprograms
1 1
![Page 13: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/13.jpg)
Programs vs. Processes
A program is a sequence of instructions
Process: a program in execution, with intermediateresults (process state)
Process State: Current status of the process
Program counter (what instruction is to be executednext?)
Register values (temporary space for values beingprocessed)
Related portion of main memory contents
3-13
![Page 14: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/14.jpg)
Process Administration in Multitasking OS
Scheduler: Adds new processes to the process table andremoves completed processes from the process table
Dispatcher: Controls the allocation of time slices to theprocesses in the process table (ready state)
The end of a time slice is signaled by an interrupt.
3-14
Process queue
start
ready
running
waiting sleeping blockedterminated
sleepintervalexpires
notify
unlocked
wait
sleep
block
quantumexpires
dispatch
complete
Scheduler
Dispatcher
![Page 15: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/15.jpg)
Web Operating System Started around 1999 at UC Berkeley
Started to challenge desktop OS, when Web-basedcomputing started to compete with desktop-basedcomputing in the recent years
Web-based computing concepts;
Service-oriented computing, e-commerce applications
Web 2.0: Web as computing platform
Web 3.0: Semantic Web
Cloud computing
Software as a Service (SaaS)
Infrastructure as a Service (IaaS)
Platform as a Service (PaaS)
Big Data 3-152015, 5th Edition
SOC &SoftwareIntegration
![Page 16: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/16.jpg)
A Main Issue in OS Design: Deadlock16
• A deadlock is a situation wherein two ormore competing actions are waiting for theother to finish, and thus neither ever does.
• A typical situation is, two or more actionsneed more than one resource to proceed, andeach holds one resource while waiting forothers to release the resources.
![Page 17: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/17.jpg)
A deadlock resulting from competition fornonshareable railroad intersections
3-17
![Page 18: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/18.jpg)
Traffic Deadlock
18
Deadlock possible:Each vehicle needs two sections of the road
to proceed.
Deadlock occurs:Each vehicle hold one section of the road,
waiting for the second section to clear.
![Page 19: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/19.jpg)
Resolving Deadlock (1)
19
• Deadlock prevention: use an algorithm which can
guarantee that no deadlock can occur.
![Page 20: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/20.jpg)
Resolving Deadlock (2)20
• Deadlock avoidance: use an algorithm which will
anticipate that a deadlock is likely to occur and
therefore refuse a resource request.
![Page 21: Lecture L10 Operating Systems · Functions of Operating Systems Operating System is the interface between human and computer Oversee operations of a computer Store and retrieve files](https://reader030.vdocuments.net/reader030/viewer/2022041106/5f086d197e708231d421f3f7/html5/thumbnails/21.jpg)
Resolving Deadlock (3)
21
• Deadlock detection and recovery: use an algorithm
to detect the occurrence of a deadlock and force the
actions to release the resources that are hold while
waiting.