Vous êtes sur la page 1sur 32

CSE 325: Operating Systems

Fall 2013

Todays agenda
Course overview

General structure
The text(s)
To-do list

OS overview
Trying to make sense of the topic

Introduction to OS (CSE 325)

Why take this course?

its mandatory
its a great class
its easy (NOT!!!! do not fool thyself!)
its good for you

Life is not life anymore while the course progresses

Be careful! Specially if youre taking also some other
hard programming classes

About Class

Course Code: CSE-325

Course Title: Operating System
Course Teacher: Md. Shamsujjoha
Credit: 3 (Theory) + 1 (Lab) = 4

Theory Class (CSE -325)

Two classes per week:
Sunday : 10:10 11:40 am
Thursday : 10:10 11:40 am
Room No :
Sunday : 407
Thursday : 309

Lab Class: (CSE 325 Lab)

One lab class per week
Monday: 04:50 pm 06:50 am
Room No : 604

Office Hour
T 10:10-11:40 Am, R 11.50-01.20 Pm, R
03.10-04.40 Pm, STR 04.50-05.20 Pm
The best way to contact the Instructor and the TA is
by electronic mail. To get help quickly, your best bet is
to send email to dishacse@yahoo.com and

management, memory management, auxiliary
storage management and resource allocation.
techniques; Concurrent programming, operating
system kernels, correctness, deadlock, protection,
transaction processing, design methodologies,
comparative structure of different kinds of
operating systems and other topics. The course
includes lab works based on theory taught.

Gist of Syllabus
MID : 1
Overview of operating systems functionalities and characteristics.
Hardware concepts related to OS, CPU states, I/O channels,
memory hierarchy, microprogramming.
The concept of a process, operations on processes, process
states, concurrent processes, process control block, process
UNIX process control and management, PCB, signals, forks and
pipes. Interrupt processing, operating system organisation, OS
kernel FLIH, dispatcher. Job and processor scheduling, scheduling
algorithms, process hierarchies.

Gist of Syllabus Cont

MID : 2
Problems of concurrent processes, critical sections, mutual
exclusion, synchronization, deadlock.
Mutual exclusion, process co-operation, producer and consumer
Semaphores: definition, init, wait, signal operations. Use of
semaphores to implement mutex, process synchronization etc.,
implementation of semaphores.
Critical regions, Conditional Critical Regions,
Monitors, Interprocess Communication (IPC), Message Passing,
Direct and Indirect Deadlock: prevention, detection, avoidance,
banker's algorithm.

Gist of Syllabus Cont

Memory organization and management, storage allocation.
Virtual memory concepts, paging and segmentation, address
mapping. Virtual storage management, page replacemant
File organization: blocking and buffering, file descriptor, directory
structure. File and Directory structures, blocks and fragments,
directory tree, inodes, file descriptors, UNIX file structure.
(The exact syllabus for the course will depend on how quickly we can cover
the introductory chapters. Our aim for this semester is to cover chapters 1
through 14 of text book, and parts of chapter 18. Any exclusion will be
announced in class.)

Reference Book
Not quite all there
Really outstanding
Written by current
Do not ignore it read it
and ask questions about

Reference Book Cont

Easy to read
Problem solving
Well organized

Reference Book Cont

Hard to read
Detailed discussion on

Marks Distribution
Mark Distribution:

Class Participation
Viva & Presentation
1st Mid Term Exam
2nd Mid Term Exam
Final Exam


Exam Dates

Exam Dates:
1st Midterm Exam 06th Oct 2013, Sunday
2nd Midterm Exam 09th Nov 2013, Sunday
Viva & Presentation - 8th Dec 2013, Sunday
Final Exam 15th Dec 2013, Sunday

Course Website
You will find

Course lecture
Lab Manual
PDF documents
Midterm exam news

However, Now, we need a CR for CSE 325

Lab Environment
Any Unix Environment:
Programming Language C/C++
Fundamental Data Structures

Learning Style
This course is practical oriented.
We will give lots of assignments.
(because practice makes a man perfect )

Memorization will not help you to get a good result.

Copying Code:
Strictly prohibited.
Will be severely punished if you are caught.

Coding Style :
According to Style Guide

Learning Style Cont

Lab 1: a warm-up (week 2)
Lab 2-10: significant OS internals projects to be done in
teams of at-most 3
Youre likely to be happier if you form a team on your own than
if I form one for you!
Youll need to do this over the weekend
Lab 2 will begin in week 3
Ill ask for your input by next Sunday and create teams as

More about 325

This is really two linked classes:
A classroom/textbook part
A project/lab part
In a perfect world, we would do this as a two-quarter

The world isnt perfect

By the end of the course, youll see how it all fits
There will be a lot of work
Youll learn a lot
In the end, youll understand much more deeply how
computer systems work

There is no magic

What is an Operating System?


I don't know.
Nobody knows.
The books claim to know read Chapter 1.
Theyre programs big hairy programs
The source you'll be compiling has over 50M lines of Codes

Okay. What are some goals of an OS?

Computer System Structure

Computer system can be divided into four
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

People, machines, other computers

Four Components of a Computer System

What Operating Systems Do

Depends on the point of view
Users want convenience, ease of use
Dont care about resource utilization

But shared computer such as mainframe or

minicomputer must keep all users happy
Users of dedicate systems such as workstations
have dedicated resources but frequently use shared
resources from servers
Handheld computers are resource poor, optimized
for usability and battery life
Some computers have little or no user interface, such
as embedded computers in devices and automobiles

Operating System Definition

OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and fair
resource use

OS is a control program
Controls execution of programs to prevent errors and
improper use of the computer

Operating System Definition Cont

No universally accepted definition
Everything a vendor ships when you order an
operating system is good approximation
But varies wildly

The one program running at all times on the

computer is the kernel. Everything else is either a
system program (ships with the operating system)
or an application program.

Brief History
First Generation of computers had no OS: singleuser. All coding done directly in machine language,
memory resident code (no other resources to
Second Generation has basic OS: batch
processing. Read input (tape/cards), process,
output to tape or print
Third Generation improved life: multiprogramming!
Careful partitioning of memory space (4-12KB),
drums and disks added for reading cards and
spooling outputs (Simultaneous Peripherals
Operations On-Line)
Time-sharing created several virtual machines

History Cont
Fourth Generation: PCs and workstations.
Cheaper, faster, more user-friendly (Thank Macs for
UNIX precursor MULTICS (MULTIplexed Information
and Computing Services) was the first modern OS.
Bell+MIT+GE (MULTICS --> units --> Unix)
Berkeley improved on it: paging, virtual memory, file
systems, signals (interrupts), networking!

Networked OSs are connected through a network, but user
needs to know the name/type/location of everything
Distributed OSs (e.g., Amoeba, Mach, Locus) provide
transparency to user, yielding one huge virtual machine!
Specialized OSs are built for specific purposes: routing
engines (Networking), lisp machines (AI), time constrained
applications (Real-Time), Internet (WWW servers),
massively parallel uses (supercomputers), etc
All these are coming together, hard to identify boundaries

Microsoft World
Excellent marketing, some good products
OSs started with DOS (Disk OS), no nothing, just
very simple commands!
Windows 3.1 was a huge jump (based on decadesold technology initially developed at Xerox then
Windows 95 (released in 96) improved tremendously
the state-of-the-affairs for MS, but still unreliable
Windows NT approaches Unix distributions, with
more user-friendly interface.

Unix World
Created at AT&T, re-written/improved by Berkeley
ATT had majority control and good support (reliable OS)
OSF (Open SW Foundation, now Open Group) is a
consortium of several companies to standardize UNIX
Different subgroups (syscalls, shells, RT, etc)
Standardization is with respect to interfaces and not
implementation of primitives. Impln is left to the implr
Modern applications are time constrained (tel, video, etc)
Real-Time playing an increasingly important role

Questions or Suggestions

Thank You!
dishcseATyahooDOTcom &