basic concepts of os os structures n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Basic concepts of OS OS Structures PowerPoint Presentation
Download Presentation
Basic concepts of OS OS Structures

Loading in 2 Seconds...

play fullscreen
1 / 38

Basic concepts of OS OS Structures - PowerPoint PPT Presentation


  • 204 Views
  • Uploaded on

Basic concepts of OS OS Structures. G.Anuradha. Basic concepts of OS. Processes Deadlocks Memory management Input/output Files Security. Processes. Process is a program in execution Associated with each process we have Address space (executable program+data+stack)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Basic concepts of OS OS Structures' - shayla


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
basic concepts of os
Basic concepts of OS
  • Processes
  • Deadlocks
  • Memory management
  • Input/output
  • Files
  • Security
processes
Processes
  • Process is a program in execution
  • Associated with each process we have
    • Address space (executable program+data+stack)
    • List of memory locations (with max and min memory locations)
    • Registers(stack pointer, program counter, hardware registers)
    • Eg: Time Sharing System
processes contd
Processes Contd.
  • Whenever a process is suspended temporarily the current state of the process is stored in a process table.
  • Interprocess communication is the Communication between different interrelated process
  • When communicating between processes of different computers a alarm signal is send to notify lost messages.
processes contd1
Processes Contd.
  • In UNIX processes, every user who logs in has a Unique Identification (UID).
  • Every process started has the UID of the person who started it
  • A child process has the UID as that of parent
  • Members of the same group can have Group Identification(GID)
  • One UID called Superuser has all the administrative powers.
deadlocks contd
Deadlocks Contd…
  • When two or more processes are interacting, they can sometimes get themselves into a stalemate situation they cannot get out of. Such a situation is called a deadlock.
  • Processes in a computer can experience an analogous situation in which they cannot make any progress
memory management
Memory Management
  • Main memory holds the executing program
  • In simple OS only one executing program resides in the main memory
  • In sophisticated OS more than one executing program can reside in memory
  • To prevent them from interfering with each our some protection mechanism has to be provided by the OS
memory management contd
Memory Management Contd…
  • Managing the address space of the processes.
  • The executable program address space is less than the main memory address space for the program to reside in the memory
  • If the program address space is more than main memory address space a concept of virtual memory is used
  • Virtual Memory-OS keeps part of address space in memory and part in disk and shuttles between both
input output
Input/Output
  • OS has to manage the input output devices like keyboards, monitors, printers….
  • Every OS has I/O subsystem for managing the I/O devices
  • Some I/O software are device independent but some device drivers are specific to particular I/O devices
files
Files
  • One major function of the OS is to hide the peculiarities of the disks and other I/O devices and present the programmer with a nice, clean abstract model of device-independent files
  • System calls are needed
    • create files
    • remove files
    • read files
    • write files.
files contd
Files Contd…
  • OS has a concept of directory for grouping files together(UNIX)

the path for file CS101 is /Faculty/Prof.Brown/Courses/CS101.

files contd1
Files Contd…
  • Every file within the directory hierarchy is specified by its path name from the root directory.
  • Each process has a current working directory
  • Before a file can be read or written, it must be opened, at which time the permissions are checked
  • If permitted the system returns a file descriptor else an error code is returned
special files
Special Files
  • Special files are provided in order to make I/O devices look like files.
  • Two kinds of special files exist
    • block special files :- used to model devices that consist of a collection of randomly addressable blocks (disks)
    • character special files:-used to model printers, modems, and other devices that accept or output a character stream.
pipes
Pipes
  • A pipe is a sort of pseudofile that can be used to connect two processes
  • If processes A and B wish to talk using a pipe, they must set it up in advance.
  • When process A wants to send data to process B, it writes on the pipe as though it were an output file.
  • Process B can read the data by reading from the pipe as though it were an input file.
security
Security
  • OS has to manage the system security so that files, are accessible to authorized users.
  • In UNIX security is provided by 9-bit binary protection code
  • The protection code consists of three 3-bit fields
    • Owner
    • Members of the owner’s group
    • Everyone
  • rwxr-x--x
    • r read
    • w write
    • x execute
shells exclusive for unix
Shells(exclusive for UNIX)
  • OS carries out system calls
  • Although Shells are not part of OS it makes use of many OS Features
  • When user logs in a shell is started
  • Shell has terminal as standard input and standard output
  • It starts out by typing the prompt, a character such as a dollar sign, which tells the user that the shell is waiting to accept a command
os structure
OS-Structure
  • Simple structure
  • Layered approach
  • Microkernels
  • modules
simple structure
Simple Structure
  • Do not have a well-defined structure
  • MS-DOS – written to provide the most functionality in the least space
    • Not divided into modules
    • Although MS-DOS has some structure, its interfaces and levels of functionality are not well separated
ms dos layer structure simple structure
MS-DOS Layer Structure(Simple Structure)

initially written to provide the most functionality in the least space

started small and grew beyond its original scope

levels not well separated: programs could access I/O devices directly

excuse: the hardware of that time was limited (no dual user/kernel mode)

simple layered approach unix
Simple Layered Approach(UNIX)
  • Enormous functionality crammed into the kernel below the system call interface
  • No encapsulation but total visibility across system
  • Made of thick monolithic layers

More functionality combined into one level system call interface to the kernel

fully layered approach
Fully Layered Approach
  • The operating system is divided into a number of layers (levels), each built on top of lower layers.
  • The bottom layer (layer 0), is the hardware; The highest (layer N) is the user interface.
  • With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers
  • THE system (by Dijkstra), MULTICS, GLUnix, VAX/VMS
solaris modular approach
Solaris Modular Approach
  • Advantages :-
  • More flexible than a layered system
  • More efficient than the micro kernel approach because there is no message passing
mac os x structure
Mac OS X Structure
  • Uses a hybrid structure
  • Mach provides
    • Memory management
    • Remote Procedure Calls
    • Interprocess communication facilities
    • Thread Scheduling
  • BSD(Berkeley Software Distribution) provides
    • Command line interface
    • Support for networking and file systems
    • Implementation of POSIX API
types of os
Types of OS:

Operating System can also be classified as,-

  • Single User Systems
  • Multi User Systems
single user systems
Single User Systems:
  • Provides a platform for only one user at a time.
  • They are popularly associated with Desk Top operating system which run on standalone systems where no user accounts are required.
  • Example: DOS
multi user systems
Multi-User Systems:
  • Provides regulated access for a number of users by maintaining a database of known users.
  • Refers to computer systems that support two or more simultaneous users.
  • Another term for multi-user is time sharing.
  • Ex: All mainframes and  are multi-user systems.
  • Example: Unix
university questions
University Questions
  • What are system calls and its types
  • Difference between monolithic and micro kernel
  • What is kernel and how do u design it?
  • Short notes on monitor
  • What is shared memory? Difference between shared memory and message passing
  • What are the various system calls for process management
  • Services provided by OS