15
OPERTATING SYSTEM CONCEPT CODE4VN.COM

Code4vn linux day1 operating system concept

Embed Size (px)

Citation preview

Page 1: Code4vn linux day1 operating system concept

OPERTATING SYSTEMCONCEPT

CODE4VN.COM

Page 2: Code4vn linux day1 operating system concept

TEXT

WHAT IS OPERATING SYSTEM

▸ Computer, without its software, a is basically a useless lump of metal.

▸ With its software, a computer can:▸ store, process, and retrieve information;▸ play music and videos;▸ send e-mail, search the Internet;▸ and engage in many other valuable activities to

earn its keep.

Page 3: Code4vn linux day1 operating system concept

TEXT

WHAT IS OPERATING SYSTEM

▸ Computer software can be divided roughly into two kinds:

▸ System programs, which manage the operation of the computer itself

▸ Application programs, which perform the actual work the user wants.

▸ The most fundamental system program (OS) is the operating system, whose job is to control all the computer's resources and provide a base upon which the application programs can be written.

Page 4: Code4vn linux day1 operating system concept

TEXT

COMPUTER IS A COMPLEX MACHINE

Page 5: Code4vn linux day1 operating system concept

TEXT

COMPUTER IS A COMPLEX MACHINE

▸ A modern computer system consists of:▸ One or more processors, ▸ Some main memory, ▸ Disks, printers, a keyboard, a display, network

interfaces, and other input/output devices. ▸ Computer is A COMPLEX SYSTEM.

Page 6: Code4vn linux day1 operating system concept

TEXT

MACHINE NEEDS OPERATING SYSTEM

▸ Writing programs that keep track of all these components and use them correctly, let alone optimally, is an extremely difficult job.

▸ It is unlikely that many programs could be written at all.▸ Is there some way that:

▸ Shields programmers from the complexity of the hardware.

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

▸ This layer of software is the OPERATING SYSTEM.

Page 7: Code4vn linux day1 operating system concept

TEXT

THE OPERATING SYSTEM AS AN EXTENDED MACHINE▸ The Operating System as an Extended Machine:

▸ OS is to present the user with the equivalent of an extended machine or virtual machine that is easier to program than the underlying hardware.

▸ The Operating System as a Resource Manager:

Page 8: Code4vn linux day1 operating system concept

TEXT

OPERATING SYSTEM CONCEPTS

▸ System call: The interface between the operating system and the user programs is defined by the set of "extended instructions" that the operating system provides.

Page 9: Code4vn linux day1 operating system concept

TEXT

OS CONCEPT: PROCESS - A PROGRAM IN EXECUTION▸ Process: is basically a program in execution.▸ Associated with each process is:

▸ Its address space, ▸ A list of memory locations from some minimum (usually 0) to some maximum,

which the process can read and write. ▸ The address space contains the executable program, the program's data, and

its stack. ▸ Also associated with each process is some set of registers, including the

▸ program counter, ▸ stack pointer, ▸ and other hardware registers,

▸ And all the other information needed to run the program.

Page 10: Code4vn linux day1 operating system concept

TEXT

OS CONCEPT: FILE

▸ OS hides the peculiarities of the disks and other I/O devices and present the programmer with a nice, clean abstract model of device-independent FILES.

▸ “A File is a resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is "durable" in the sense that it remains available for other programs to use after the program that created it has finished executing.”

▸ To provide a place to keep files, a DIRECTORY as a way of grouping files together.

Page 11: Code4vn linux day1 operating system concept

TEXT

DIRECTORY TREE

Page 12: Code4vn linux day1 operating system concept

TEXT

DIRECTORY

▸ ROOT DIRECTORY: top of the directory hierarchy.▸ PATHNAME : Every file within the directory hierarchy can

be specified by giving its PATHNAME from ROOT DIRECTORY.▸ Absolute path: ex: /Faculty/Prof.Brown/Courses/CS101▸ Current working directory: ex /Faculty/Prof.Brown/▸ Relation path: ex Courses/CS101

▸ Unix/Linux path separator: “/”▸ Windows path separator: “\”

Page 13: Code4vn linux day1 operating system concept

TEXT

MOUNT

(a) Before mounting, the files on drive 0 are not accessible. (b) After mounting, they are part of the file hierarchy.

▸ mount system call allows the file system on the CD-ROM to be attached to the root file system wherever the program wants it to be.

Page 14: Code4vn linux day1 operating system concept

TEXT

THE SHELL

▸ Primary interface between a user sitting at his terminal and the operating system.

▸ Ex: csh, ksh, zsh, and bash … and original shell (sh).

Page 15: Code4vn linux day1 operating system concept

TEXT

THANK YOU!