![Page 1: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/1.jpg)
CS 217 - Operating SystemsLectutre-01Introduction and Overview
Somia RazzaqNFC IET
![Page 2: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/2.jpg)
Goals for today• What is an Operating System?
▫ And – what is it not?
• Why study Operating Systems?
• How the course will proceed?▫ Course content▫ Grading▫ Regulations
Interaction is important!Ask Questions!
Note: Some slides and/or pictures in the following lectures are adapted from author slides by Silberschatz, Galvin, and Gagne and some from different instructor lectures taken from internet.
2
![Page 3: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/3.jpg)
Computer System
1. Hardware 2. Operating system 3. Applications programs 4. Users
![Page 4: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/4.jpg)
Purpose of a Computer System
•Computer systems consist of software and hardware that are combined to provide a tool to solve specific problems in an efficient manner
•Execute programs
4
![Page 5: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/5.jpg)
Layered View of a Computer System
![Page 6: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/6.jpg)
Computer System Hardware
Keyboard Mouse
PrinterRAM/ROM
HDMemBus
System Bus
Monitor
CD
Processor
Floating PointUnit
IntegerUnit
Cache
ControlUnit
![Page 7: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/7.jpg)
What is an Operating System?•A program that acts as an intermediary
between a user of a computer and the computer hardware
•A program that allocates and de-allocates computer system resources in an efficient, fair, and secure manner—a resource manager
7
![Page 8: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/8.jpg)
Goals of Operating System
•Operating system goals:▫Execute user programs and make solving
user problems easier▫Make the computer system convenient to
use▫Use the computer hardware in an efficient
manner
8
![Page 9: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/9.jpg)
Technology Trends: Moore’s Law
2X transistors/Chip Every 1.5 years
Called “Moore’s Law”
Moore’s Law
Microprocessors have become smaller, denser, and more powerful.
Gordon Moore (co-founder of Intel) predicted in 1965 that the transistor density of semiconductor chips would double roughly every 18 months.
9
![Page 10: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/10.jpg)
ManyCore Chips: The future is here
• “ManyCore” refers to many processors/chip▫ 64? 128? Hard to say exact boundary
• How to program these?▫ Use 2 CPUs for video/audio▫ Use 1 for word processor, 1 for browser▫ 76 for virus checking???
• Parallelism must be exploited at all levels
• Intel 80-core multicore chip (Feb 2007)– 80 simple cores– Two floating point engines /core– Mesh-like "network-on-a-chip“– 100 million transistors– 65nm feature size
Frequency Voltage Power Bandwidth Performance3.16 GHz 0.95 V 62W 1.62 Terabits/s 1.01
Teraflops5.1 GHz 1.2 V 175W 2.61 Terabits/s 1.63
Teraflops5.7 GHz 1.35 V 265W 2.92 Terabits/s 1.81
Teraflops
10
![Page 11: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/11.jpg)
Computer System Organization• Computer-system operation
▫ One or more CPUs, device controllers connect through common bus providing access to shared memory
▫ Concurrent execution of CPUs and devices competing for memory cycles
11
![Page 12: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/12.jpg)
Functionality comes with great complexity!
Proc
CachesBusses
Memory
I/O Devices:
Controllers
adapters
DisksDisplaysKeyboards
Networks
Pentium IV Chipset
12
![Page 13: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/13.jpg)
Sample of Computer Architecture Topics
Instruction Set Architecture
Pipelining, Hazard Resolution,Superscalar, Reordering, Prediction, Speculation,Vector, Dynamic Compilation
Addressing,Protection,Exception Handling
L1 Cache
L2 Cache
DRAM
Disks, WORM, Tape
Coherence,Bandwidth,Latency
Emerging TechnologiesInterleavingBus protocols
RAID
VLSI
Input/Output and Storage
MemoryHierarchy
Pipelining and Instruction Level Parallelism
NetworkCommunication
Oth
er
Pro
cess
ors
13
![Page 14: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/14.jpg)
Example: Some Mars Rover (“Pathfinder”) Requirements• Pathfinder hardware limitations/complexity:
▫ 20Mhz processor, 128MB of DRAM, VxWorks OS ▫ cameras, scientific instruments, batteries,
solar panels, and locomotion equipment▫ Many independent processes work together
• Can’t hit reset button very easily!▫ Must reboot itself if necessary▫ Must always be able to receive commands from Earth
• Individual Programs must not interfere▫ Better not crash antenna positioning software!
• Further, all software may crash occasionally▫ Automatic restart with diagnostics sent to Earth▫ Periodic checkpoint of results saved?
• Certain functions time critical:▫ Need to stop before hitting something▫ Must track orbit of Earth for communication
14
Why processor is so limited?
What if you had to move the rover paying attention to every little component? Taking care of the motors, measuring soil/distances, coordinating with the controller at Earth…!
![Page 15: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/15.jpg)
How do we tame complexity?• Every piece of computer hardware is different
▫ Different CPU Pentium, PowerPC, ColdFire, ARM, MIPS
▫ Different amounts of memory, disk, …▫ Different types of devices
Mice, Keyboards, Sensors, Cameras, Fingerprint readers▫ Different networking environment
Cable, DSL, Wireless, Firewalls,…
• Questions:▫ Does the programmer need to write a single program that
performs many independent activities?▫ Does every program have to be altered for every piece of
hardware?▫ Does a faulty program crash everything?▫ Does every program have access to all hardware?
15
![Page 16: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/16.jpg)
OS Tool: Virtual Machine Abstraction
• Software Engineering Problem:
▫ Turn hardware/software quirks
what programmers want/need
▫ Optimize for convenience, utilization, security, reliability, etc…
• For Any OS area (e.g. file systems, virtual memory, networking,
scheduling):
▫ What’s the hardware interface? (physical reality)
▫ What’s the application interface? (nicer abstraction)
Application
Operating System
HardwarePhysical Machine Interface
Virtual Machine Interface
16
![Page 17: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/17.jpg)
What does an Operating System do?• Silerschatz and Galvin:
“An OS is Similar to a government”▫ Begs the question: does a government do anything useful by
itself?• Coordinator and Traffic Cop:
▫ Manages all resources▫ Settles conflicting requests for resources▫ Prevents errors and improper use of the computer
• Facilitator:▫ Provides facilities that everyone needs▫ Standard Libraries, Windowing systems▫ Make application programming easier, faster, less error-
prone• Some features reflect both tasks:
▫ E.g. File system is needed by everyone (Facilitator)▫ But File system must be Protected (Traffic Cop)
17
![Page 18: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/18.jpg)
So what is this course all about?
• What we’ll be covering? and
• How we shall proceed?
18
![Page 19: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/19.jpg)
Tentative Course OutlineWeek # Module Topics
1 Introduction Introduction to the course Operating System Concepts System Structures
2 Process Concepts Process Concepts Process Scheduling Process Operations Inter process Communication Communication in Client Server Systems
3 Multithreaded Programming
Overview Multithreading Models Thread Libraries
4 Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling
19
![Page 20: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/20.jpg)
Course OutlineWeek # Module Topics
5 Synchronization Overview Critical Section Problem Semaphores Monitors
6 Deadlocks System Model Deadlock Characterization Methods for handling Deadlocks Deadlock Prevention
7 Memory Management Background Swapping Contiguous Memory Allocation Paging
20
![Page 21: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/21.jpg)
Course OutlineWeek # Module Topics
8 Mid Term Exam
9 Virtual Memory Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing
10 File System File Concept Access Methods Directory and Disk Structure File System Mounting
11-12 Secondary Storage Structure Overview of Mass Storage Structure Disk Structure Disk Scheduling RAID Structure Overview
21
![Page 22: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/22.jpg)
Course OutlineWeek # Module Topics12-13 I/O Systems Overview
Hardware Application I/O Interface Kernel I/O Subsystem Transforming Requests to Hardware Operations Streams
13-14 Protection Goals Principles Domain Access Matrix Access Control
15 Security The issue Threats Cryptography Authentication Defense
16 Distributed Operating Systems
An overview of Distributed Operating System Concepts
22
![Page 23: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/23.jpg)
Tentative Lab Exercise Plan
Lab # Module WeekLab 1 Process Creation in Java
RMI Example (Optional)Week 2
Lab 2 Threads in Java Week 3
Lab 3 Threads in Java (priority scheduling example) Week4
Lab 4 Synchronization in Java Week 5
Lab 5 Deadlock Example with handling of deadlocks in Java Week 6
Lab 6 Memory Management Exercise Week 8
23
![Page 24: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/24.jpg)
Textbook
• Operating System Concepts – 7/8th Edition
Silberschatz, Galvin, and Gagne (Textbook)
• Modern Operating Systems,3rd Edition,
Tanenbaum A.S., 2008 (Reference)
24
![Page 25: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/25.jpg)
Grading Scheme
• Quizzes 5% (unannounced/announced)
• Assignment 5%
• Attendance/
Class participation 5%
• Midterm Exam: 30%
• Final Exam: 50%
• Term Assignment 5%
25
![Page 26: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/26.jpg)
Academic Dishonesty Policy
• Copying all or part of another person's work, or using reference material not specifically allowed, are forms of cheating and will not be tolerated. A student involved in an incident of cheating will be subject to strict disciplinary action as per the institute’s policies.
• The instructor may take actions such as:
▫ require repetition of the subject work,
▫ assign a'zero' grade to the subject work,
26
![Page 27: CS 217 - Operating Systems Lectutre-01 Introduction and Overview Somia Razzaq NFC IET](https://reader035.vdocument.in/reader035/viewer/2022070305/5514420a5503462d4e8b49ab/html5/thumbnails/27.jpg)
Remember
•Interaction is important!
27