OPERATING SYSTEM and UNIX Syllabus Unit 1 Introduction

OPERATING SYSTEM and UNIX Syllabus Unit 1 Introduction

IV SEM B Sc CS4T1: OPERATING SYSTEM AND UNIX syllabus unit 1 Introduction: Definition, Types of Operating Systems, Functions of Operating System, services, system components System call. Process Management: Process Concept, Process Scheduling, Inter process communication, CPU Scheduling Criteria, Scheduling algorithm, Multiple Processor Scheduling, Real time Scheduling, Algorithm evolution. Unit – II Process Synchronization and deadlocks: The Critical Section Problem, Synchronization hardware, Semaphores, Classical problems of synchronization, Critical regions, monitors, Dead locks – system model, Characterization, Dead lock prevention, avoidance and detection, Recovery from dead lock, Combined approach to deadlock handling. Unit - III Memory management: Functions, single contiguous, Partitioned memory management: multiple relocatable partitioned memory management, paging segmentation, demand paging virtual memory management. File Management: Concept, access methods, directory structures, allocation methods, free space management, secondary storage structure. Disk Management: Disk Structure & Scheduling methods, Disk management, Swap – Space management. Unit-IV History of Unix, salient features, Unix Components, types of shell, Internal and External commands, Files and File Organization- Categories of files, Unix file system, directories, file related commands, Directory related commands, wild cards, Printing and Comparing files. Ownership of files, File attributes File permissions and Manipulations, Standard I/O, Redirection, pipe, filter. Unit-V Introduction to vi editor, The three modes of the vi editor, Invoking vi editor, Configuring the vi environment, Regular expressions, the grep command, The process - parent and child process, process creation, process related commands, Shell Programming - shell script features, shell variables, writing and executing a shell script, positional parameters, Branching control structures- if, case etc., Loop control structures– while, until, for, etc., Jumping control structures – break, continue, exit, etc., Integer and Real arithmetic in shell programs, Debugging scripts. 1 CM_aps 1. A Brief History of UNIX In the late 1960s, researchers from General Electric, MIT and Bell Labs launched a joint project to develop an ambitious multi-user, multi-tasking OS for mainframe computers known as MULTICS (Multiplexed Information and Computing System). MULTICS failed, but it did inspire Ken Thompson, who was a researcher at Bell Labs, to have a go at writing a simpler operating system himself. He wrote a simpler version of MULTICS on a PDP7 in assembler and called his attempt UNICS (Uniplexed Information and Computing System). Because memory and CPU power were at a premium in those days, UNICS (eventually shortened to UNIX) used short commands to minimize the space needed to store them and the time needed to decode them - hence the tradition of short UNIX commands we use today. Ken Thompson then teamed up with Dennis Ritchie, the author of the first C compiler in 1973. They rewrote the UNIX kernel in C - this was a big step forwards in terms of the system's portability - and released the Fifth Edition of UNIX to universities in 1974. The Seventh Edition, released in 1978, marked a split in UNIX development into two main branches: SYSV (System 5) and BSD (Berkeley Software Distribution). BSD arose from the University of California at Berkeley where Ken Thompson spent a sabbatical year. Its development was continued by students at Berkeley and other research institutions. SYSV was developed by AT&T and other commercial companies. UNIX flavors based on SYSV have traditionally been more conservative, but better supported than BSD-based flavors. Until recently, UNIX standards were nearly as numerous as its variants. In early days, AT&T published a document called System V Interface Definition (SVID). X/OPEN (now The Open Group), a consortium of vendors and users, had one too, in the X/Open Portability Guide (XPG). In the US, yet another set of standards, named Portable Operating System Interface for Computer Environments (POSIX), were developed at the behest of the Institution of Electrical and Electronics Engineers (IEEE). In 1998, X/OPEN and IEEE undertook an ambitious program of unifying the two standards. In 2001, this joint initiative resulted in a single specification called the Single UNIX Specification, Version 3 (SUSV3), that is also known as IEEE 1003.1:2001 (POSIX.1). In 2002, the International Organization for Standardization (ISO) approved SUSV3 and IEEE 1003.1:2001. Some of the commercial UNIX based on system V are: IBM's AIX Hewlett-Packard's HPUX SCO's Open Server Release 5 Silicon Graphics' IRIS DEC's Digital UNIX Sun Microsystems' Solaris 2 Some of the commercial UNIX based on BSD are: 2 CM_aps SunOS 4.1.X (now Solaris) DEC's Ultris BSD/OS, 4.4BSD Some Free UNIX are: LINUX 2 Features of Unix 1) Multiuser • UNIX is a multiprogramming system. • Multiple users can access the system by connecting to points known as terminals. • Several users can run multiple programs simultaneously on one system. 2) Multitasking • UNIX is a multitasking system. • A single user can also run multiple tasks concurrently. • For example: At the same time, a user can → edit a file → print another file one on the printer → send email to a friend and → browse www • The kernel is designed to handle a user's multiple needs. • In a multitasking environment, a user sees one job running in the foreground; the rest run in the background. • User can switch jobs between background and foreground, suspend, or even terminate them. 3) Pattern Matching • UNIX has very sophisticated pattern matching features. • Regular Expressions are a feature of UNIX. • Regular Expressions describe a pattern to match, a sequence of characters, not words, within a line of text. 4) Portable • UNIX can be installed on many hardware platforms. • Unix operating system is written in C language, hence it is more portable than other operating systems. 5) UNIX Toolkit • UNIX offers facility to add and remove many applications as and when required. • Tools include → general purpose tools → text manipulation tools → compilers/interpreters 3 CM_aps → networked applications and → system administration tools 6) Programming Facility • The UNIX shell is also a programming language; it was designed for programmer, not for end user. • It has all the necessary ingredients, like control structures, loops and variables, that establish powerful programming language. • This features are used to design shell scripts – programs that can also invoke UNIX commands. • Many of the system's functions can be controlled and automated by using these shell scripts. 7) Documentation • The principal on-line help facility available is the man command, which remains the most important references for commands and their configuration files. • Apart from the man documentation, there's a vast ocean of UNIX resources available on the Internet. 3 Unix Architecture (Components) • The UNIX operating system (OS) consists of a kernel layer, a shell layer , an application layer & files. Figure 1.2 : Unix Architecture Kernel • The kernel is the heart of the operating system. • It interacts with the machine’s hardware. • It is a collection of routines written in C. • It is loaded into memory when the system is booted. • Main responsibilities: 1) Memory management 2) Process management (using commands: kill, ps, nohup) 3) File management (using commands: rm, cat, ls, rmdir, mkdir) • To access the hardware, user programs use the services of the kernel via system calls. System Call ➢ A system call is a request for the operating system to do something on behalf of the user's program. ➢ The system calls are functions used in the kernel itself. ➢ To the programmer, the system call appears as a normal C function call. 4 CM_aps ➢ UNIX system calls are used to manage the file system and control processes. ➢ Example: read(), open(), close(), fork(), exec(), exit() • There can be only one kernel running on the system. Shell • The shell interacts with the user. • The shell is a command line interpreter (CLI). • Main responsibilities: 1) interprets the commands the user types in and 2) dispatches the command to the kernel for execution • There can be several shells in action, one for each user who’s logged in. • There are multiple shells that are used by the UNIX OS. • For example: Bourne shell (sh), the C shell (csh), the Korn shell (ksh) and Bourne Again shell (bash). Application • This layer includes the commands, word processors, graphic programs and database management programs. File • A file is an array of bytes that stores information. • All the data of Unix is organized into files. • All files are then organized into directories. • These directories are further organized into a tree-like structure called the filesystem. 4 TYPES OF SHELL The shell provides you with an interface to the UNIX system. It gathers input from you and executes programs based on that input. When a program finishes executing, it displays that program's output. A shell is an environment in which we can run our commands, programs, and shell scripts. There are different flavors of shells, just as there are different flavors of operating systems. Each flavor of shell has its own set of recognized commands and functions. Shell Prompt: The prompt, $, which is called command prompt, is issued by the shell. While the prompt is displayed, you can type a command. The shell reads your input after you press Enter. It determines

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    35 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us