1- OS Basics
1- OS Basics
CSC351-Operating Systems
Week-1 Lecture-1
Semester #05
2
Instructor Contact Details
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
Processor
System Bus
HD
Mem
Bus
◼ 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.
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.
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,
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.
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.
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.
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
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
39