SlideShare a Scribd company logo
Operating Systems
Course Code: CS311
Instructor: Dr. Sarah Iqbal
Lecture # 1
“Introduction to the Course”
LH 1
10:30 – 11:20
MONDAY
LH 1
10:30 – 11:20
THURSDAY
LH 1
10:30 – 11:20
FRIDAY
Course Info. & Lecture Schedule
• Course Pre-Requisite: CS221 Data Structures
• Credit Hours: 3 Hrs.
• Lecture Time and Venue:
• Instructor: Dr. Sarah Iqbal
Office: G-12 FCSE Lobby, GIK Institute
sarah.iqbal@giki.edu.pk
Office Hours: Tuesday 10:00 AM – 12:00 PM
2
Grading Policy
3
Weightage
Assessment Items
10 %
Quizzes
05 %
Assignments
15 %
Project & Presentations
30 %
Mid Exam
40 %
Final Exam
Text & Reference Books
• Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, “Operating
Systems: Three Easy Pieces”, CreateSpace Independent Publishing
Platform, 2018
• William Stallings "Operating Systems: Internals & Design Principles",
9th Ed., Prentice Hall, 2017
• A. Silberschatz, P. B. Galvin and G. Gagne, “Operating System
Concepts, Internals & Design Principles”, 10th Ed., Wiley , 2021
4
Agenda for Today
• Introduction and purpose of the course
• Organization of a computer system
• Purpose of a computer system—setting the stage for OS
concepts and principles
• Outline of topics to be discussed in the course
• What is an operating system?
5
Computer System
1. Hardware : basic computing resources
2. Operating system: controls & coordinates
3. Applications programs
4. Users
6
Organization of a Computer System
7
A computer system can be divided roughly into four components:
• The hardware—the central processing unit (CPU), the memory, and the input/output
(I/O) devices—provides the basic computing resources for the system.
• The application programs—such as word processors, spreadsheets, compilers, and
web browsers—define the ways in which these resources are used to solve users’
computing problems.
• The operating system controls the hardware and coordinates its use among the various
application programs for the various users. We can also view a computer system as
consisting of hardware, software, and data. The operating system provides the means
for proper use of these resources in the operation of the computer system.
• The Users — which includes people, machines or other computers.
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 (tools helps to develop a programs)
• The fundamental goal of computer systems is to execute/run programs
• Computer hardware is constructed toward this goal. But bare
hardware alone is not easy to use so application programs are
developed.
• These programs require certain common operations, such as
controlling the I/O devices
• The common functions of controlling and allocating resources are then
brought together into one piece of software: the operating system.
8
What is an Operating System
• A more common definition, and the one that we usually follow, is that the
operating system is the one program running at all times on the computer—
usually called the kernel.
• Along with the kernel, there are two other types of programs: system
programs, which are associated with the operating system but are not
necessarily part of the kernel, and application programs, which include all
programs not associated with the operation of the system.
• Mobile operating systems often include not only a core kernel but also
middleware—a set of software frameworks that provide additional services
to application developers.
• In summary, for our purposes, the operating system includes the always
running kernel, middleware frameworks that ease application development
and provide features, and system programs that aid in managing the system
while it is running. 9
What Happens When You Run a Program
10
• The primary purpose of a computer system is to generate executable program and execute them.
The main issues involved in performing these tasks are as follows;
1. Storing an executable on a secondary storage
device such as hard disk
2. Loading executable from disk into the main
memory
3. Setting the CPU state appropriately so that the
program execution could begin
4. Creating multiple cooperating processes,
synchronizing their access to shared data and
allowing them to communicate with each other
Required Services by the OS
11
• Manage secondary storage devices
• Manage primary storage (Main memory management)
• Manage processes (through CPU scheduling)
Course Outline
 Computer System Organization and Architecture
 Operating System Operations and Structure
 Interrupts
 Process Management
 Processes and threads—scheduling, concurrency, synchronization,
etc.
 Mutual Exclusion
 Semaphores
 Deadlock
 The Memory Hierarchy, Memory Management, Secondary Storage
Management
 Virtual Memory
 File System
 Security Issues 12
Computer System Organization
13
Computer System Organization
 Interrupts, traps, and software interrupts (UNIX signals)
 Hardware protection
14
Computer System Architecture
 Single-Processor Systems
 Multiprocessor Systems
 Clustered Systems
15
Operating System Operations
 Multiprogramming & Multitasking
 Dual-Mode & Multimode Operation
 Timer
16
Operating System Structures
 Operating system services
 System calls
 Semantics of system call execution
 Operating system structures (monolithic, microkernel-based,
layered, virtual machines, DOS/Windows, UNIX/Linux)
 System design and implementation
17
Processes
 Process concept (process, states, attributes, etc.)
 Process scheduling (scheduler)
 Context switching (dispatcher)
 Operations on processes (creation, termination, signaling, suspend,
foreground, background, etc.)
 Process management in UNIX (fork, wait, exec, exit, etc.)
 Sample code for UNIX/Linux process management
 Concurrent processes
 Interprocess communication (IPC)
• IPC in UNIX/Linux (pipe, FIFO, socket, message queue, etc.)
• Communication between UNIX/Linux processes (pipe, mkfifo,
read, write, close, etc.)
18
CPU Scheduling
• Basic concepts
• Scheduling criteria
• Scheduling triggers
• Scheduling algorithms
• UNIX System scheduling algorithm
• Optimal scheduling
• Algorithm evaluation
19
Process Synchronization
• Basic concept
• The Critical Section Problem
• Software-based solutions—the Bakery Algorithm
• Hardware-based solutions
• Semaphores
• Classic problems of synchronization
• Deadlocks and starvation
• Critical regions
• Monitors
• Synchronization tools used in Linux, and Windows
20
Threads
• Thread concept (thread, states, attributes, etc.)
• Thread communication issues
• Interthread Communication
• Thread Synchronization
• User- and kernel-level threads
• POSIX threads (the pthread library)
21
Deadlocks
• Basic concept
• Deadlock characterization
• Deadlock handling (prevention, avoidance, detection and
recovery)
• Banker’s algorithm
22
Memory Management
• Basic concepts
• Various techniques for memory management
• Logical to physical address translation
• Swapping
• External fragmentation
• Paging
• Hardware support for paging
• Internal fragmentation
• Performance of paging
• Protection and sharing
• Page table issues: Multi-level paging, Hashed page tables, Inverted page
tables
• Segmentation
• Segmentation with paging
23
File-System Management
• Basic concepts (file attributes, operations, types, structure, etc.)
• Access methods (sequential, random, etc.)
• UNIX/Linux directory structure (links in UNIX)
• File system mounting, sharing, and protection
• UNIX/Linux examples for sharing and protection, and relevant commands
(chmod, ln, ln –s, etc.)
• Directory implementation
• Free space management methods
• Space Allocation Methods
• Time and space performance of allocation methods
24
Mass Storage Structure and Scheduling
• Disk structure and scheduling
• Disk management (formatting, boot block etc.)
25
Virtual Memory
• Basic concept
• Demand paging
• Page fault
• Performance of demand paging
• Page replacement
• Allocation of frames
• Thrashing
• Operating-system examples
26
Two Viewpoints
27
User View
• it varies according to the interface being used.
• a laptop or a PC is designed for one user to monopolize its resources. In this case, the
OS is designed mostly for ease of use, with some attention paid to performance and
security and none paid to resource utilization.
• many users interact with mobile devices such as smartphones and tablets—features a
touch screen and many mobile devices also allow users to interact through a voice
recognition interface.
• Some computers have little or no user view. For example, embedded computers in
home devices and automobiles but they and their operating systems and applications
are designed primarily to run without user intervention.
Two Viewpoints…
28
System View
• From the computer’s point of view, the operating system is the program most intimately
involved with the hardware.
• In this context, we can view an operating system as a resource allocator or a manager of
these resources. Facing numerous and possibly conflicting requests for resources.
• The operating system must decide how to allocate them to specific programs and users
so that it can operate the computer system efficiently and fairly.
• A slightly different view of an operating system emphasizes the need to control the
various I/O devices and user programs.
• An operating system is a control program. A control program manages the execution of
user programs to prevent errors and improper use of the computer. It is especially
concerned with the operation and control of I/O devices.
What is an Operating System?
• A program that acts as an intermediary between a user of a
computer and the computer hardware—provides the user a
simpler (virtual) machine to work with
• A program that allocates and deallocates computer system
resources in an efficient, fair, and secure manner—a resource
manager
29
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.
Reference & Reading Material
• Operating Systems Concepts, Chapter 1
30

More Related Content

PPT
PPT
Introduction to Operating Systems - Mary Margarat
PPT
Unit I OS CS.ppt
PPTX
OS_Basics_in_OPewrtgbejrbkewjgegjergberkwg.pptx
PDF
OPERATING SYSTEMS NOTES R18 .pdf
PDF
M.c.a. (sem ii) operating systems
PPTX
OS- Introduction to opertaing systems.pptx
Introduction to Operating Systems - Mary Margarat
Unit I OS CS.ppt
OS_Basics_in_OPewrtgbejrbkewjgegjergberkwg.pptx
OPERATING SYSTEMS NOTES R18 .pdf
M.c.a. (sem ii) operating systems
OS- Introduction to opertaing systems.pptx

Similar to CS311-Lec1.pdfCS311-Lec1.pdfCS311-Lec1.pdf (20)

PPTX
Operating System Introduction.pptx
DOC
operating system lecture notes
PPT
Operating systems1[1]
PDF
Imports topics from Galvin Operating System .pdf
PPT
Overview of Operating System.ppt introduction
PPT
Module 1 Introduction.ppt
PPTX
CSE3120- Module1 part 1 v1.pptx
PDF
Csc 2313 (lecture 2)
PDF
Csc 2313 (lecture 2)
PDF
Lecture 1- Introduction to Operating Systems.pdf
PPTX
Chapter02-rev.pptx
PPTX
OS-lec0(1DWQEDQWEFWQEFWQEFWQFWQFWQEFWFs).pptx
PPTX
Unit 1-Operating Systems Overview .pptx
PPTX
Unit 1ndjhdiushdhisdhuishiuhsuhduhfshufdhduh.pptx
PPTX
Introduction to OS.pptx
PPT
OSLecture1.ppt
PPTX
Lecture_01 Operating System Course Introduction
PPT
OSLec1&2.ppt
PPTX
Operating system
PPT
Operating system Lecture no 1. Introduction
Operating System Introduction.pptx
operating system lecture notes
Operating systems1[1]
Imports topics from Galvin Operating System .pdf
Overview of Operating System.ppt introduction
Module 1 Introduction.ppt
CSE3120- Module1 part 1 v1.pptx
Csc 2313 (lecture 2)
Csc 2313 (lecture 2)
Lecture 1- Introduction to Operating Systems.pdf
Chapter02-rev.pptx
OS-lec0(1DWQEDQWEFWQEFWQEFWQFWQFWQEFWFs).pptx
Unit 1-Operating Systems Overview .pptx
Unit 1ndjhdiushdhisdhuishiuhsuhduhfshufdhduh.pptx
Introduction to OS.pptx
OSLecture1.ppt
Lecture_01 Operating System Course Introduction
OSLec1&2.ppt
Operating system
Operating system Lecture no 1. Introduction
Ad

Recently uploaded (20)

PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Institutional Correction lecture only . . .
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Business Ethics Teaching Materials for college
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Classroom Observation Tools for Teachers
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
RMMM.pdf make it easy to upload and study
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
O7-L3 Supply Chain Operations - ICLT Program
PPH.pptx obstetrics and gynecology in nursing
Institutional Correction lecture only . . .
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Business Ethics Teaching Materials for college
2.FourierTransform-ShortQuestionswithAnswers.pdf
Complications of Minimal Access Surgery at WLH
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Module 4: Burden of Disease Tutorial Slides S2 2025
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Classroom Observation Tools for Teachers
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Week 4 Term 3 Study Techniques revisited.pptx
Cell Types and Its function , kingdom of life
Microbial disease of the cardiovascular and lymphatic systems
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
RMMM.pdf make it easy to upload and study
Ad

CS311-Lec1.pdfCS311-Lec1.pdfCS311-Lec1.pdf

  • 1. Operating Systems Course Code: CS311 Instructor: Dr. Sarah Iqbal Lecture # 1 “Introduction to the Course”
  • 2. LH 1 10:30 – 11:20 MONDAY LH 1 10:30 – 11:20 THURSDAY LH 1 10:30 – 11:20 FRIDAY Course Info. & Lecture Schedule • Course Pre-Requisite: CS221 Data Structures • Credit Hours: 3 Hrs. • Lecture Time and Venue: • Instructor: Dr. Sarah Iqbal Office: G-12 FCSE Lobby, GIK Institute sarah.iqbal@giki.edu.pk Office Hours: Tuesday 10:00 AM – 12:00 PM 2
  • 3. Grading Policy 3 Weightage Assessment Items 10 % Quizzes 05 % Assignments 15 % Project & Presentations 30 % Mid Exam 40 % Final Exam
  • 4. Text & Reference Books • Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, “Operating Systems: Three Easy Pieces”, CreateSpace Independent Publishing Platform, 2018 • William Stallings "Operating Systems: Internals & Design Principles", 9th Ed., Prentice Hall, 2017 • A. Silberschatz, P. B. Galvin and G. Gagne, “Operating System Concepts, Internals & Design Principles”, 10th Ed., Wiley , 2021 4
  • 5. Agenda for Today • Introduction and purpose of the course • Organization of a computer system • Purpose of a computer system—setting the stage for OS concepts and principles • Outline of topics to be discussed in the course • What is an operating system? 5
  • 6. Computer System 1. Hardware : basic computing resources 2. Operating system: controls & coordinates 3. Applications programs 4. Users 6
  • 7. Organization of a Computer System 7 A computer system can be divided roughly into four components: • The hardware—the central processing unit (CPU), the memory, and the input/output (I/O) devices—provides the basic computing resources for the system. • The application programs—such as word processors, spreadsheets, compilers, and web browsers—define the ways in which these resources are used to solve users’ computing problems. • The operating system controls the hardware and coordinates its use among the various application programs for the various users. We can also view a computer system as consisting of hardware, software, and data. The operating system provides the means for proper use of these resources in the operation of the computer system. • The Users — which includes people, machines or other computers.
  • 8. 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 (tools helps to develop a programs) • The fundamental goal of computer systems is to execute/run programs • Computer hardware is constructed toward this goal. But bare hardware alone is not easy to use so application programs are developed. • These programs require certain common operations, such as controlling the I/O devices • The common functions of controlling and allocating resources are then brought together into one piece of software: the operating system. 8
  • 9. What is an Operating System • A more common definition, and the one that we usually follow, is that the operating system is the one program running at all times on the computer— usually called the kernel. • Along with the kernel, there are two other types of programs: system programs, which are associated with the operating system but are not necessarily part of the kernel, and application programs, which include all programs not associated with the operation of the system. • Mobile operating systems often include not only a core kernel but also middleware—a set of software frameworks that provide additional services to application developers. • In summary, for our purposes, the operating system includes the always running kernel, middleware frameworks that ease application development and provide features, and system programs that aid in managing the system while it is running. 9
  • 10. What Happens When You Run a Program 10 • The primary purpose of a computer system is to generate executable program and execute them. The main issues involved in performing these tasks are as follows; 1. Storing an executable on a secondary storage device such as hard disk 2. Loading executable from disk into the main memory 3. Setting the CPU state appropriately so that the program execution could begin 4. Creating multiple cooperating processes, synchronizing their access to shared data and allowing them to communicate with each other
  • 11. Required Services by the OS 11 • Manage secondary storage devices • Manage primary storage (Main memory management) • Manage processes (through CPU scheduling)
  • 12. Course Outline  Computer System Organization and Architecture  Operating System Operations and Structure  Interrupts  Process Management  Processes and threads—scheduling, concurrency, synchronization, etc.  Mutual Exclusion  Semaphores  Deadlock  The Memory Hierarchy, Memory Management, Secondary Storage Management  Virtual Memory  File System  Security Issues 12
  • 14. Computer System Organization  Interrupts, traps, and software interrupts (UNIX signals)  Hardware protection 14
  • 15. Computer System Architecture  Single-Processor Systems  Multiprocessor Systems  Clustered Systems 15
  • 16. Operating System Operations  Multiprogramming & Multitasking  Dual-Mode & Multimode Operation  Timer 16
  • 17. Operating System Structures  Operating system services  System calls  Semantics of system call execution  Operating system structures (monolithic, microkernel-based, layered, virtual machines, DOS/Windows, UNIX/Linux)  System design and implementation 17
  • 18. Processes  Process concept (process, states, attributes, etc.)  Process scheduling (scheduler)  Context switching (dispatcher)  Operations on processes (creation, termination, signaling, suspend, foreground, background, etc.)  Process management in UNIX (fork, wait, exec, exit, etc.)  Sample code for UNIX/Linux process management  Concurrent processes  Interprocess communication (IPC) • IPC in UNIX/Linux (pipe, FIFO, socket, message queue, etc.) • Communication between UNIX/Linux processes (pipe, mkfifo, read, write, close, etc.) 18
  • 19. CPU Scheduling • Basic concepts • Scheduling criteria • Scheduling triggers • Scheduling algorithms • UNIX System scheduling algorithm • Optimal scheduling • Algorithm evaluation 19
  • 20. Process Synchronization • Basic concept • The Critical Section Problem • Software-based solutions—the Bakery Algorithm • Hardware-based solutions • Semaphores • Classic problems of synchronization • Deadlocks and starvation • Critical regions • Monitors • Synchronization tools used in Linux, and Windows 20
  • 21. Threads • Thread concept (thread, states, attributes, etc.) • Thread communication issues • Interthread Communication • Thread Synchronization • User- and kernel-level threads • POSIX threads (the pthread library) 21
  • 22. Deadlocks • Basic concept • Deadlock characterization • Deadlock handling (prevention, avoidance, detection and recovery) • Banker’s algorithm 22
  • 23. Memory Management • Basic concepts • Various techniques for memory management • Logical to physical address translation • Swapping • External fragmentation • Paging • Hardware support for paging • Internal fragmentation • Performance of paging • Protection and sharing • Page table issues: Multi-level paging, Hashed page tables, Inverted page tables • Segmentation • Segmentation with paging 23
  • 24. File-System Management • Basic concepts (file attributes, operations, types, structure, etc.) • Access methods (sequential, random, etc.) • UNIX/Linux directory structure (links in UNIX) • File system mounting, sharing, and protection • UNIX/Linux examples for sharing and protection, and relevant commands (chmod, ln, ln –s, etc.) • Directory implementation • Free space management methods • Space Allocation Methods • Time and space performance of allocation methods 24
  • 25. Mass Storage Structure and Scheduling • Disk structure and scheduling • Disk management (formatting, boot block etc.) 25
  • 26. Virtual Memory • Basic concept • Demand paging • Page fault • Performance of demand paging • Page replacement • Allocation of frames • Thrashing • Operating-system examples 26
  • 27. Two Viewpoints 27 User View • it varies according to the interface being used. • a laptop or a PC is designed for one user to monopolize its resources. In this case, the OS is designed mostly for ease of use, with some attention paid to performance and security and none paid to resource utilization. • many users interact with mobile devices such as smartphones and tablets—features a touch screen and many mobile devices also allow users to interact through a voice recognition interface. • Some computers have little or no user view. For example, embedded computers in home devices and automobiles but they and their operating systems and applications are designed primarily to run without user intervention.
  • 28. Two Viewpoints… 28 System View • From the computer’s point of view, the operating system is the program most intimately involved with the hardware. • In this context, we can view an operating system as a resource allocator or a manager of these resources. Facing numerous and possibly conflicting requests for resources. • The operating system must decide how to allocate them to specific programs and users so that it can operate the computer system efficiently and fairly. • A slightly different view of an operating system emphasizes the need to control the various I/O devices and user programs. • An operating system is a control program. A control program manages the execution of user programs to prevent errors and improper use of the computer. It is especially concerned with the operation and control of I/O devices.
  • 29. What is an Operating System? • A program that acts as an intermediary between a user of a computer and the computer hardware—provides the user a simpler (virtual) machine to work with • A program that allocates and deallocates computer system resources in an efficient, fair, and secure manner—a resource manager 29 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.
  • 30. Reference & Reading Material • Operating Systems Concepts, Chapter 1 30