0% found this document useful (0 votes)
8 views

1- OS Basics

Uploaded by

abdullahzahidhp
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

1- OS Basics

Uploaded by

abdullahzahidhp
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

1

CSC351-Operating Systems
Week-1 Lecture-1
Semester #05
2
Instructor Contact Details

 Name: Khola Farooq


 Course Instructor: CSC351- Operating Systems
 Credit Hours: 3+1
 Designation : Lecturer CS
 Contact: [email protected]

Lahore Garrison University


3
Course Learning Outcomes

Upon completion of the course, students will be able to:

 Understand the characteristics of different structures of the Operating Systems and identify
the core functions of the Operating Systems.
 2. Analyze and evaluate the algorithms of the core functions of the Operating Systems.
 3. Demonstrate the knowledge in applying system software and tools available in modern
operating systems.
4
Recommended Resources

 Textbook
 Operating Systems Concepts, 9th edition by Abraham Silberschatz
 Other
 Modern Operating Systems, 4th edition by Andrew S. Tanenbaum
 Operating Systems, Internals and Design Principles, 9th edition by William Stallings
 Davis, W.S. and Rajkumar, T.M. (2004) Operating Systems: A Systematic View. 3rd Ed.Harlow, Addison-
Wesley.
Operating Systems

LECTURE 1
Agenda for Today

◼ Introduction 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?
◼ History and Evolution
Structure of a Computer System

 A Computer System consists of:


• Users (people who are using the computer)
• Application Programs (Compilers, Databases,
Games, Video player, Browsers, etc.)
• System Programs (Shells, Editors, Compilers,
etc.)
• Operating System ( A special program which acts
as an interface between user and hardware )
• Hardware ( CPU, Disks, Memory, etc.)
Layered View of a Computer System
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
Computer System Hardware
Integer Control Keyboard Mouse
Unit Unit
CD
Floating Point
Unit
Cache

Processor
System Bus
HD
Mem
Bus

RAM/ROM Printer Monitor


11
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 system. It takes preventive measures whenever required
to avoid errors.

◼ Why do we need an OS
It manages the computer's memory and processes, as well as all of its software and hardware.
It also allows you to communicate with the computer without knowing how to speak the
computer's language. Without an operating system, a computer is useless.

Lahore Garrison University


Functions of Operating System 12

 It boots the computer


 It performs basic computer tasks e.g., managing the various peripheral devices e.g., mouse,
keyboard
 It provides a user interface, e.g., command line, graphical user interface (GUI)
 It handles system resources such as computer's memory and sharing of the central processing
unit(CPU) time by various applications or peripheral devices.
 It provides file management which refers to the way that the operating system manipulates,
stores, retrieves and saves data.
 Error Handling is done by the operating system. It takes preventive measures whenever required
to avoid errors.

Lahore Garrison University


13
Functions of Operating System

Lahore Garrison University


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.
15
How OS Start and develop through
ages

 The first operating systems were developed in the 1950s, when computers could only run one
program at a time. Later in the following decades, computers began to include more and more
software programs, sometimes called libraries, that came together to create the start of today's
operating systems.
 In the late 1960s, the first version of the Unix operating system was developed. Written in
programming language C
 Many modern operating systems, including Apple OS X and all different versions of Linux, date
back or rely on the Unix OS.
 Microsoft Windows was developed in response to an IBM request for an operating system to run
its range of personal computers or PCs.

Lahore Garrison University


16
How OS Start and develop through
ages (Legacy OS to Modern OS)

 The first operating system created by Microsoft was not called Windows, it was
called MS-DOS and it was built in 1981 when it bought the 86-DOS operating
system from Seattle Computer Products and modified it to meet IBM
requirements.
 The Windows name was first used in 1985 when a graphical user interface was
created and paired or joined with the MS-DOS.
 Today, Apple, OS X, Microsoft Windows and the various forms of Linux
dominate the vast majority of the modern operating systems market,

Lahore Garrison University


17
MS-DOS

 Short for Microsoft Disk Operating System, MS-DOS is a non-


graphical command line operating system derived from 86-DOS that
was created for IBM compatible computers
 MS-DOS allows the user to navigate, open, and otherwise manipulate
files on their computer from a command line instead of
a GUI like Windows.
 Today, MS-DOS is no longer used; however, the command shell, more
commonly known as the Windows command line is still used by
many users.
 In MS-DOS, you would navigate to the folder using the cd
command and then list the files in that folder using the dir command.

Lahore Garrison University


18
Windows

 The Windows operating system (Windows OS) for desktop PCs is more
formally called Microsoft Windows and is actually a family of operating
systems for personal computers.
 Windows provides a graphical user interface (GUI), virtual memory
management, multitasking, and support for many peripheral devices. In
addition to Windows operating systems for personal computers,
Microsoft also offers operating systems for servers and mobile devices.
 Windows comes pre-loaded on most new PCs, which helps to make it the most
popular operating system in the world.

Lahore Garrison University


19
UNIX/LINUX

 Unix is the most powerful and popular multi-user and multi-tasking


Operating System.

Lahore Garrison University


20
OS2

 The name stands for "Operating System/2", because it was introduced as part of the same generation
change release as IBM's "Personal System/2 (PS/2)" line of second-generation personal computers.
The first version of OS/2 was released in December 1987 and newer versions were released until
December 2001.
 OS/2 has many of the same commands as DOS, can read DOS disks, but it is more sophisticated
than DOS.
 In particular, OS/2 is a multi-tasking, multi-threaded operating system.
 S/2 also includes a graphical user interface, or GUI, called Presentation Manager, and which makes
OS/2 look and work something like the Macintosh or Windows.

Lahore Garrison University


21
MAC Operating System

 The Macintosh Operating System (Mac OS) is an operating system (OS) designed by
Apple Inc. to be installed and operated on the Apple Macintosh series of computers.
 Introduced in 1984, it is a graphical user interface (GUI) based OS that has since been
released as multiple different versions.
 Mac OS is a completely capable OS that provides functionality and services like Windows
or Linux OS. Some of the code base and features of Lisa OS have been incorporated in
Mac OS.
 As of 2012, Mac OS released several versions, including Macintosh 128k, Mac OS 7, Mac
OS X and Mac Mountain Lion.

Lahore Garrison University


22
Android Operating System

 Android is an open source and Linux-based Operating System


 The Android operating system is a mobile operating system that was developed by Google (GOOGL​) to be primarily
used for touchscreen devices, cell phones, and tablets.
 Its design lets users manipulate the mobile devices intuitively, with finger movements that mirror common motions,
such as pinching, swiping, and tapping.
 Google also employs Android software in televisions, cars, and wristwatches—each of which is fitted with a unique
user interface.
 Android applications are usually developed in the Java language using the Android Software Development Kit.
 Once developed, Android applications can be packaged easily and sold out either through a store such as Google
Play, SlideME, Opera Mobile Store, Mobango, F-droid and the Amazon Appstore.

Lahore Garrison University


23
iOS

 iOS is a mobile operating system developed by Apple. It was originally named


the iPhone OS but was renamed to the iOS in June 2009.
 The iOS currently runs on the iPhone, iPod touch, and iPad. Like modern desktop
operating systems, iOS uses a graphical user interface, or GUI.
 iOS, an acronym for iPhone Operating System, is a Unix-derived operating
system powering all of Apple’s mobile devices
 The iPhone combined many functions within a single device, including a camera,
internet browser, and media player alongside the phone and messaging, and the
world would never be the same

Lahore Garrison University


Course Outline
◼ Operating system concepts
◼ Operating system structures
◼ Introduction to UNIX/Linux user interface
◼ Processes and threads—scheduling, synchronization, etc.
◼ Deadlocks
◼ Memory management
◼ Virtual memory
◼ File system
◼ Secondary storage management
Introduction to UNIX/Linux

 Directory structure
 Browsing directory structure
 Useful commands
Processes
 Process concept (process, states 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.)
Processes (continued)
 Cooperating processes
 Interprocess communication (IPC)
 IPC in UNIX/Linux (pipe, FIFO, socket, message queue, etc.)
 Sample code
 Managing UNIX/Linux processes (ps, top, fg, bg, <Ctrl-Z>, <Ctrl-C>, etc.)
Threads

 Thread concept (thread, states etc.)


 User- and kernel-level threads
CPU Scheduling

 Basic concepts
 Scheduling criteria
 Scheduling triggers
 Scheduling algorithms
 UNIX System V scheduling algorithm
 Optimal scheduling
 Algorithm evaluation
Process Synchronization
 Basic concept
 The Critical Section Problem
 Solutions for the Critical Section Problem
 Software-based solutions—the Bakery Algorithm
 Hardware-based solutions
 Semaphores
 Binary and counting semaphores
Process Synchronization …
 Classic problems of synchronization
 Deadlocks and starvation
 Synchronization tools used in Solaris, Linux, and Windows
Deadlocks
 Basic concept
 Deadlock characterization
 Deadlock handling (prevention, avoidance, detection and recovery)
 Banker’s algorithm
Memory Management

 Basic concepts
 Various techniques for memory management
 Logical to physical address translation
 Swapping
 Contiguous memory allocation
 External fragmentation
 Paging
 Hardware support for paging
 Internal fragmentation
Memory Management …
 Performance of paging
 Protection and sharing
 Page table issues: Multi-level paging, Hashed page tables, Inverted page
tables
 Segmentation
 Protection and sharing
 Segmentation with paging
 Intel P4 example
Virtual Memory

 Basic concept
 Demand paging
 Page fault
 Performance of demand paging
 Page replacement
 Allocation of frames
 Thrashing
 Operating-system examples
 Other considerations (I/O locking, page size, …)
File System Interface
 Basic concepts (file attributes, operations, types, structure, etc.)
 Access methods (sequential, random, etc.)
 Directory structure
 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.)
File System Implementation
 Basic concepts (overview of disk structure, file structure, boot control block,
super block, per process file descriptor table, system-wide open-file table, etc.)
 Directory implementation
 Free space management methods
 Space Allocation Methods
 Time and space performance of allocation methods
 Brief introduction to Network File System (NFS)
Mass Storage Structure and Scheduling

 Disk structure and scheduling


 Disk management (formatting, boot block, bad blocks,
etc.)
 Course Recap
Summary

Today we learnt about


 Operating System Basics
 Course Outline

39

You might also like