0% found this document useful (0 votes)
12 views31 pages

Lecture 1 - OS Intro

Uploaded by

bilalgillani1000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views31 pages

Lecture 1 - OS Intro

Uploaded by

bilalgillani1000
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

OPERATING SYSTEM

Bilal Ahmed
1
Course Overview
• Pre-Requisites
• EE-321 Computer Organization and Architecture

• Textbook
• “Operating System Concepts”, By Abraham
Silberschatz, Peter Galvin, and Greg Gagne, 10th Edition,
Publisher: John Wiley and Sons

• Reference Books
• “Operating Systems: Principles and Practice” by Thomas
Anderson, Michael Dahlin, 2nd Edition

• “Operating Systems. Internals and Design Principles” by


William Stallings, Prentice-Hall
2
Grading Policy

•30 % OHTs
•50 % Final Exam
•10 % Assignments (3)
•10 % Quizzes (3)

• Class Discussions & Labs will be part of syllabus


• Distribution of Marks is Tentative

3
Misc
• Late submission: -10% per day
• Familiarize yourself with policies on
• Plagiarism
• Missing quizzes, assignments, Mids, exams etc
• Attendance
• I grade, F grade, minimum required CGPA

4
Contact
• Email: [email protected]

• Office Hours: Monday 1420 – 1500 hrs

• Class Time & Location

• Tuesday 1420-1510 hrs (CR 3)

• Thursday 1000-1150 hrs (CR 3)

5
Course Outline
• Operating System - Objectives and Functions

• Processes and Threads

• Synchronization

• Process Scheduling

• Memory Management

• File System

• I/O Management & Disk Scheduling

6
Course Objectives
• To provide knowledge how operating systems work

• To introduce basic resource management techniques,


issues of performance, avoiding deadlocks etc. to equip
students with sufficient knowledge about the working
mechanism of Operating System

• To apply knowledge for conducting research and


development

7
Course Learning Outcomes (CLOs)

Sr PLO BT
CLO
No. No. Level*

1 Explain and summarize OS services and Abstractions 1 C-2

2 Analyse the applicability of different OS Services 2 C-4

3 Apply the knowledge of OS services to implement algorithms 3 C-3

Practice the use and implementation of OS services on


4 5 P-3
different platforms

* BT= Bloom’s Taxonomy: C=Cognitive domain, P=Psychomotor domain, A= Affective domain

Remembering (C-1), Understanding (C-2), Applying (C-3), Analyzing (C-4),


Evaluating (C-5), Creating (C-6)
8
Mapping of CLOs to Program Learning Outcomes (PLOs)

PLOs/CLOs CLO1 CLO2 CLO3 CLO4


PLO 1 (Engineering Knowledge) √
PLO 2 (Problem Analysis) √

PLO 3 (Design/Development of Solutions) √

PLO 4 (Investigation)
PLO 5 (Modern tool usage) √
PLO 6 (The Engineer and Society)
PLO 7 (Environment and Sustainability)
PLO 8 (Ethics)
PLO 9 (Individual and Team Work)
PLO 10 (Communication)
PLO 11 (Project Management)
PLO 12 (Lifelong Learning)
9
Week Topic CLOs
1. Operating System Overview and Services CLO1
2. Operating System Overview and Services CLO1
CLO1
3. Process Management
CLO2
4. Process Management CLO3
5. Threads CLO2
6. Threads CLO3
7. Process Scheduling CLO2
8,9. Process Scheduling CLO3
10. Midterm
11. Process Synchronization CLO2
12. Process Synchronization CLO3
13. Memory Management (Main Memory) CLO3
14. Memory Management (Virtual Memory) CLO3
CLO1
15. File Management
CLO2
CLO1
16. I/O Management
CLO2
CLO2
17. Advanced Topics (Virtualization/ Distributed OS)

18 Final Exam
10
What is an Operating System?
• A program that acts as an intermediary between a user of a
computer and the computer hardware

• 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

11
Abstract View of Components of Computer

12
Computer System Structure
• Computer system can be divided into four components:
• Hardware – provides basic computing resources
• CPU, memory, I/O devices
• Operating system
• Controls and coordinates use of hardware among various applications
and users
• Application programs
• define the ways in which the system resources are used to solve the
computing problems of the users
• Word processors, compilers, web browsers, database systems, video
games
• Users
• People, machines, other computers

13
What Operating Systems Do
• Depends on the point of view

User View

• Users want convenience, ease of use and good performance


• Don’t care about resource utilization
• Users of dedicated systems such as workstations have dedicated
resources but frequently use shared resources from servers
• Mobile devices like smartphones and tables are resource poor, optimized
for usability and battery life
• Mobile user interfaces such as touch screens, voice recognition
• Some computers have little or no user interface, such as embedded
computers in devices and automobiles
• Run primarily without user intervention

14
What Operating Systems Do (Contd.)

System View

• Operating system is a resource allocator and control program making efficient


use of Hardware and managing execution of User programs

15
Operating System Definition
• No universally accepted definition
• “Everything a vendor ships when you order an operating system” is a
good approximation
• But varies wildly
• “The one program running at all times on the computer” is the kernel,
part of the operating system

• Everything else is either


• A system program (ships with the operating system, but not part of the
kernel) , or
• An application program, all programs not associated with the operating
system

• Today’s OSes for general purpose and mobile computing also include
middleware – a set of software frameworks that provide additional services
to application developers such as databases, multimedia, graphics 16
KERNAL
• Kernel is central component of an operating system that manages operations of
computer and hardware

• It basically manages operations of memory and CPU time

• Kernel acts as a bridge between applications and data processing performed at


hardware level using inter-process communication and system calls

• Kernel loads first into memory when an operating system is loaded and remains
into memory until operating system is shut down again

• It is responsible for various tasks such as disk management, task management,


and memory management

• Kernel has a process table that keeps track of all active processes

17
OBJECTIVES OF KERNAL
• To establish communication between user level application and hardware

• To decide state of incoming processes

• To control disk management

• To control memory management

• To control task management

18
Overview of Computer System Structure

19
Computer
Components

Top-Level View

20
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

21
Computer System Organization
• Each device controller oversees a specific type of device (for
example, a disk drive, audio device, or graphics display)
• Depending on the controller, more than one device may be
attached
• For instance, one system USB port can connect to a USB hub, to
which several devices can connect
• A device controller maintains some local buffer storage (a
temporary data storage holding place) and a set of special-
purpose registers
• The device controller is responsible for moving the data b\w the
peripheral devices that it controls and its local buffer storage

22
Computer System Organization

• OS have a device driver for each device controller

• This device driver understands the device controller and provides


the rest of the OS with a uniform interface to the device

• The CPU and the device controllers can execute in parallel,


competing for memory cycles

• To ensure orderly access to the shared memory, a memory


controller synchronizes access to the memory

23
Computer System Organization
• To start an I/O operations, the device driver loads the appropriate registers

in the device controller

• The device controller, in turn, examines the contents of these registers to

determine what action to take (such as “read a character from the

keyboard”)

• The controller starts the transfer of data from the device to its local buffer

• Once the transfer of data is complete, the device controller informs the

device driver that it has finished its operation

24
Computer System Organization
• The device driver then gives control to other parts of the OS,

possibly returning the data or a pointer to the data if the

operation was a read

• For other operations, the device driver returns status

information such as “write completed successfully” or

“device busy”

• But how does the controller inform the device driver that it has

finished its op? This is accomplished via an interrupt


25
INTERRUPT
• An interrupt is a signal emitted by a device attached to a computer or
from a program within the computer
• It requires the operating system (OS) to stop and figure out what to
do next
• An interrupt temporarily stops or terminates a service or a current
process
• Most I/O devices have a bus control line called Interrupt Service
Routine (ISR) for this purpose

26
BOOTSTRAP PROGRAM

28
HOW OS LOADED
• When the system is powered on, it runs the BIOS program stored in
the read-only memory (ROM)

• The BIOS contains the code to locate and execute the MBR in order to
locate various hard disk partitions and load the OS

• Initially, the BIOS program evaluates the system hardware and checks
the available boot devices containing an MBR

• It then reads the first sector to 0000:7C00H and determines if the


final signature is 55AA

• Next, it transfers control to the MBR to boot the OS


HOW OS LOADED
HOW OS LOADED
• If the final signature does not match, the BIOS looks for additional bootable
devices

• If no devices are found, the OS does not boot, and the user receives an
error message

• If the MBR is missing -- the computer does not start

You might also like