Os concepts
Download
1 / 30

OS Concepts - PowerPoint PPT Presentation


  • 124 Views
  • Updated On :

OS Concepts. Computer Software: 1-system programs ( OS ) 2-application programs Os controls all computer resources and provides the base upon which the application programs can be written

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 'OS Concepts' - qabil


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
Os concepts l.jpg

OS Concepts

Computer Software:

1-system programs (OS)

2-application programs

Os controls all computer resources and provides the base upon which the application programs can be written

Os is the software layer that is on top of the hardware to manage all parts of the system, and present the user with interface or virtual machine that is easier to understand and program.


Os concepts2 l.jpg
OS Concepts

A Computer System:


Os concepts3 l.jpg
OS Concepts

  • The Macroprogram is located in the ROM and directly control the hardware

  • Some Computers such as RISC does not have microprogram and hardware executes the machine languages directly.

  • OS hides the hardware complexity:

    READ BLOCK FROM FILE hides

    all details of moving heads, and so on…

  • OS runs in the kernel mode or supervisor mode. User can change his password but can not write his/her own disk interrupt handler.


Os as a virtual machine l.jpg
OS as a virtual machine

OS present a user with the extended machine that hides the truth about hardware. For example reading/writing from a floppy disk requires to know:

  • 16 commands

  • 13 parameters packed in 9 bytes

  • Address of disk block

  • Recording mode, gap spacing, deleted data address mark

  • Whether the motor is on or off and etc.


Os as a resource manager l.jpg
OS as a Resource Manager

  • Managing processors, memories , timers , disks, mice, network interfaces, laser printers and other devices.

  • Bringing the order to the chaos: for example buffering all output of three programs before sending them to the printer.

  • Managing multiple users when sharing hardware and information (files, database and etc.)


History of operating systems l.jpg
History of Operating Systems

OS historically have been closely tied to the architecture of the computers on which, they run. So looking at generation of the computers enables us to see what their OS were like.

  • The first generation: Vacuum tubes and plugboards (1945-55)

  • The second generation: Transistors and batch systems (1955-65)





History of os l.jpg
History of OS

The forth generation: Personal Computers (1980- present)

  • Workstations and network operating systems and distributed systems

  • MSDOS, UNIX (supports IEEE POSIX standard system calls interface), WINDOWS

  • MINIX is Unix like operating system written in C for educational purposes (1987)

  • Linux is the extended version of MINIX


Os concepts review l.jpg
OS concepts “review”

  • System calls: Interface between user and Os. Extended instructions provided by OS.

    For example Minix system calls:

  • Dealing with processes

  • Dealing with file system

  • Processes: are used to get the work done. A program in execution. Associated with address space, program counters , stack pointers and hardware registers.


Processes l.jpg
Processes

  • Process table: A link list for each existing process that contains all information about the process, other than the contents of its own address.

  • When the process is suspended all of its information is saved in process table.

  • Command interpreter (Shell) reads the user commands from terminal to create a process.


Processes13 l.jpg
Processes

  • A process can create child processes and communicate with them (interprocess communication)


Files l.jpg
Files

  • The main method for storing data. Directory is used to keep the files and FFS uses it for cylinder grouping technique in Unix ( we will study in great details).

  • In spite of process hierarchy, file hierarchy can be deep and long-lived

  • Typically parent process can access the child process but files and directories can be read by others not just the owner.



Files16 l.jpg
Files

  • Files and directories are protecting by assigning each a protection code

    9 bit in Minix/Unix for example: rwxr-x—x

    means

    owner can read, write or execute

    other group members can read or execute

    everyone else can only execute

  • If access to a file is permitted system returns an integer (file descriptor) otherwise an error code


Files17 l.jpg
Files

  • Mounting the files is the ways to deal with the files in removable medias (floppy and CDs).

  • Floppy in mounted to b. If b had files they would not be accessible. So b should be empty.


Slide18 l.jpg
Pipe

  • Pipe is the way to make the communication between two processes looks like file read and write.


Shell l.jpg
Shell

  • Shell is a command interpreter (not part of OS) such as sh, csh in Unix to process the user commands like:

    sort < file1 > file2

    or cat file1 file2 file3 | sort > /dev/lp &

    to concatenate file1&2& 3 and sort and put the result at /dev/lp. & makes the job to run in the background mode


System calls l.jpg
System Calls

  • Can be called from C or other programming language to enter the kernel (API in Windows)

  • For example when a user program is in the user mode and needs a system service such as reading form a file by count=read(fd,buffer,nbytes) switches to kernel mode

  • The system calls provide process mng. , file mng., directory and file system management and other services.


Os structure l.jpg
OS structure

If we look inside OS, there are four designs:

1- Monolithic systems:

  • Collection of the procedures each of which calling other ones (The Big Mess)

  • No information hiding. Ever procedure is visible to other procedures.

  • System calls switch to kernel mode (see below)


Slide24 l.jpg


Os structure25 l.jpg
OS Structure procedures using utility procedures

2- Layered systems

  • It is generalization of monolithic approach

  • In the user level , they should not worry about process, memory, console or I/O managements. These jobs are done by lower layers.

  • “THE “ was the first layered system developed in the Netherlands by Digestra(1968)


Slide26 l.jpg


Os structure27 l.jpg
OS Structure procedures using utility procedures

3- Virtual machines

  • Several virtual machines are simulated in this model (providing virtual 8086 on Pentium to be able to run MSDOS programs)

  • VM provides several virtual OSs such as single user, interactive and etc. all run on Bare hardware.


Os structure28 l.jpg
OS Structure procedures using utility procedures

4- Client-Server Model

  • Moving most of the code up into the higher layers made the kernel to be minimal and only responsible for communication between clients and servers.


Os structure29 l.jpg
OS Structure procedures using utility procedures

  • Advantage of this system is adaptability to use in distributed systems.

  • Disadvantage is doing OS functions ( e.g. loading physical I/O device registers) in the user space is difficult.


Os structure30 l.jpg
OS Structure procedures using utility procedures

There are two ways to solve this problem

  • To have some critical server processes run in the kernel with complete access to hardware but still communicating with other normal processes.

  • Enhance the kernel to provides these tasks but server decides how to use it (Splitting policy and mechanism)


ad