Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
Unix operating system
Unix operating system
Wird geladen in …3
×

Hier ansehen

1 von 31 Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Anzeige

Ähnlich wie Os concepts (20)

Anzeige

Os concepts

  1. 1. 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.
  2. 2. OS Concepts A Computer System:
  3. 3. 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.
  4. 4. • RISC (reduced instruction set computer) is a microprocessor that is designed to perform a smaller number of types of computer instructions so that it can operate at a higher speed (perform more millions of instructions per second, or MIPS). • A new microprocessor can be developed and tested more quickly if one of its aims is to be less complicated. • Operating system and application programmers who use the microprocessor's instructions will find it easier to develop code with a smaller instruction set. • The simplicity of RISC allows more freedom to choose how to use the space on a microprocessor. • Higher-level language compilers produce more efficient code than formerly because they have always tended to use the smaller set of instructions to be found in a RISC computer.
  5. 5. 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.
  6. 6. 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.)
  7. 7. 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)
  8. 8. An early batch system
  9. 9. Structure of a FMS job (Fortran Monitor System)
  10. 10. • The third generation: ICs and multiprogramming: (1956-1980) •Spooling and time sharing
  11. 11. 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
  12. 12. 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.
  13. 13. 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.
  14. 14. Processes • A process can create child processes and communicate with them (interprocess communication)
  15. 15. 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.
  16. 16. • Root directory and path (INODE in Unix)
  17. 17. 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
  18. 18. 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.
  19. 19. Pipe • Pipe is the way to make the communication between two processes looks like file read and write.
  20. 20. 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
  21. 21. 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.
  22. 22. 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)
  23. 23.
  24. 24. • In monolithic model for system calls there are service procedures using utility procedures
  25. 25. OS Structure 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)
  26. 26. • Structure of THE operating system
  27. 27. OS Structure 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.
  28. 28. OS Structure 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.
  29. 29. OS Structure • 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.
  30. 30. OS Structure 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)

Hinweis der Redaktion

  • RISC (reduced instruction set computer) is a microprocessor that is designed to perform a smaller number of types of computer instructions so that it can operate at a higher speed (perform more millions of instructions per second, or MIPS).
    A new microprocessor can be developed and tested more quickly if one of its aims is to be less complicated.
    Operating system and application programmers who use the microprocessor&amp;apos;s instructions will find it easier to develop code with a smaller instruction set.
    The simplicity of RISC allows more freedom to choose how to use the space on a microprocessor.
    Higher-level language compilers produce more efficient code than formerly because they have always tended to use the smaller set of instructions to be found in a RISC computer.

×