lecture 1 introduction 325

33
CSE 325: Operating Systems Summer 2014 .

Upload: turjo987

Post on 15-Jun-2015

121 views

Category:

Engineering


6 download

DESCRIPTION

this is total guideline for course on operating system (OS). THIS is highly recommended for CSE students who are doing OS or CSE325

TRANSCRIPT

Page 1: Lecture 1 introduction 325

CSE 325: Operating Systems

Summer 2014

.

Page 2: Lecture 1 introduction 325

Today’s agenda

• Administrivia– Course overview

• General structure• The text(s) • Policies• To-do list • Announcements

• OS overview– Trying to make sense of the topic

Page 3: Lecture 1 introduction 325

Introduction to OS (CSE 325)

• Why take this course? Why with MSJ?– it’s mandatory – it’s a great class– it’s easy (NOT!!!! do not fool thyself!)– it’s good for you

• Life is not life anymore while the course progresses• Be careful! Specially if you’re taking also AI or some

other hard programming classes … … …

Page 4: Lecture 1 introduction 325

About Class

• Course Code: CSE-325• Course Title: Operating System• Course Teacher: Md. Shamsujjoha • Credit: 3 (Theory) + 1 (Lab) = 4

Page 5: Lecture 1 introduction 325

Office Hour

• S: 8.00-10.00, 11.50-01.20• M: 8.00-08.30, 11.50-01.20• T: 11.50-01.20• W: 8.30-10.00, 11.50-01.20• R: 8.30-10.00, 11.50-01.20

• 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 [email protected] and [email protected].

Page 6: Lecture 1 introduction 325

Syllabus

• Principles of operating systems; Process management, memory management, auxiliary storage management and resource allocation. Operating system design and construction 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.

Page 7: Lecture 1 introduction 325

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 context.

– 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.

Page 8: Lecture 1 introduction 325

Gist of Syllabus Cont …

• MID : 2– Problems of concurrent processes, critical sections, mutual

exclusion, synchronisation, deadlock.

– Mutual exclusion, process co-operation, producer and consumer processes.

– Semaphores: definition, init, wait, signal operations. Use of semaphores to implement mutex, process synchronisation 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.

Page 9: Lecture 1 introduction 325

• Final– Memory organization and management, storage allocation.

– Virtual memory concepts, paging and segmentation, address mapping. Virtual storage management, page replacemant strategies.

– 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.)

Gist of Syllabus Cont …

Page 10: Lecture 1 introduction 325

• Text-1:– Not quite all there– Really outstanding– Written by current

experts– Do not ignore it – read it

and ask questions about it!

Reference Book

Page 11: Lecture 1 introduction 325

Reference Book Cont …

• Ref-1:– Easy to read– Problem solving– Well organized

Page 12: Lecture 1 introduction 325

Reference Book Cont …

• Ref-2:– Hard to read– Detailed discussion on

problems – Math problems

Page 13: Lecture 1 introduction 325

Marks Distribution

• Mark Distribution:• Class Participation 5%• Quiz (Avg. of Two) 5%• Viva & Presentation 10%• 1st Mid Term Exam 20%• 2nd Mid Term Exam 20%• Final Exam 20%• Labs 20%

------------------------------------------------

Total 100%

Page 14: Lecture 1 introduction 325

Exam Dates

• Exam Dates: • 1st Midterm Exam – 08th Jun 2014, Sunday • 2nd Midterm Exam – 06th Jul 2014, Sunday • Final Exam – 19th August 2014, Tueday

Page 15: Lecture 1 introduction 325

Course Website

– http://groups.yahoo.com/group/cse_ewu_msj– CSE-325

– You will find • Syllabus• Course lecture• Lab Manual• PDF documents• Midterm exam news• Results• Assignments • Others…

Page 16: Lecture 1 introduction 325

Lab Environment

• Any Unix Environment: – Programming Language C/C++– Any Unix Environment– GDB

Page 17: Lecture 1 introduction 325

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

Page 18: Lecture 1 introduction 325

• Assignments– Lab 1: Next Week

– Introduction to programming in Linux and make file

– Lab 2-10: significant OS “internals” projects to be done in teams of at-most 3

– You’re likely to be happier if you form a team on your own than if I form one for you!

– You’ll need to do this over the weekend– Lab 2 will begin in week 3– I’ll ask for your input by next Sunday and create teams as

needed

Learning Style Cont …

Page 19: Lecture 1 introduction 325

More about 325

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

sequence

• The world isn’t perfect • By the end of the course, you’ll see how it all fits

together!– There will be a lot of work– You’ll learn a lot– In the end, you’ll understand much more deeply how

computer systems work

• “There is no magic”

Page 20: Lecture 1 introduction 325

What is an Operating System?

• Answers:– I don't know.– Nobody knows.– The books claim to know – read Chapter 1.– They’re programs – big hairy programs

– The Linux source you'll be compiling has over 1.7M lines of C

Okay. What are some goals of an OS?

Page 21: Lecture 1 introduction 325

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

Page 22: Lecture 1 introduction 325

Four Components of a Computer System

Page 23: Lecture 1 introduction 325

What Operating Systems Do

• Depends on the point of view• Users want convenience, ease of use

– Don’t 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

Page 24: Lecture 1 introduction 325

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

Page 25: Lecture 1 introduction 325

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.

Page 26: Lecture 1 introduction 325

Intro to OS Pitt Mossé

Brief History

• First Generation of computers had no OS: single-user. All coding done directly in machine language, memory resident code (no other resources to manage)

• 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

Page 27: Lecture 1 introduction 325

Intro to OS Pitt Mossé

History Cont …

• Fourth Generation: PCs and workstations. Cheaper, faster, more user-friendly (Thank Macs for interfaces!)

• 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!

Page 28: Lecture 1 introduction 325

Intro to OS Pitt Mossé

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 anymore.

Page 29: Lecture 1 introduction 325

Intro to OS Pitt Mossé

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 decades-

old technology initially developed at Xerox then Macs)

• 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.

Page 30: Lecture 1 introduction 325

Intro to OS Pitt Mossé

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

Page 31: Lecture 1 introduction 325

Intro to OS Pitt Mossé

More on Languages

• Different process types have different requirements• Different requirements beg for different languages• Assembly, Lisp, Prolog, Java, RT-C, etc.• Real-time languages inform the OS about its needs in

order to enhance the predictability of its execution– deadline of a thread (by when do I need this done)– period of a thread (what is the frequency of this task?)– resources to be used (amount of memory or semaphores)– precedence constraints (door must be open for a robot to

exit)

Page 32: Lecture 1 introduction 325

Questions or Suggestions

Page 33: Lecture 1 introduction 325

Thank You!

inquiry

dishcseATyahooDOTcom & msjATewubdDOTedu