Linux intro to advance
-
Upload
nil65 -
Category
Technology
-
view
403 -
download
5
description
Transcript of Linux intro to advance
![Page 1: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/1.jpg)
11-1
THE LINUX SYSTEMTHE LINUX SYSTEM
Designed by:Nilesh Jaiswar
gdfdgdfdhfhfjdfhjgfhgfgjdfhgjdhffkkfjgkfj
![Page 2: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/2.jpg)
11-2
INDEXINDEX
• History
• Design principals
• Components of linux system
• Kernel modules
• Process management
• Process and threads
• Scheduling in linux
• Process scheduling
• Memory management
• File systems
• I/O in linux
• Interprocess communication
• Linux networking structure
• Security
• Conclusion
![Page 3: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/3.jpg)
11-3
HISTORYHISTORY
![Page 4: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/4.jpg)
11-4
DESIGN PRINCIPLESDESIGN PRINCIPLES
LINUX: A Multitasking, Multiuser and full set of UNIX compatible tools.
It is capable of operating under 4Mb of RAM
It contains POSIX standards. It act as a interface for both the
programmer and the user.
![Page 5: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/5.jpg)
11-5
USER INTERFACEUSER INTERFACE
Users operate linux through CLI and GUI.
On desktop systems: KDE Plasma Desktop,GNOME and Xfce.
Linux kernel and other components are free and open source software.
![Page 6: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/6.jpg)
11-6
COMPONENTS OF LINUX SYSTEMCOMPONENTS OF LINUX SYSTEM
Linux system consists of three main bodies:
• The kernel
• The system libraries
• The system utilities
![Page 7: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/7.jpg)
11-7
KERNEL MODULESKERNEL MODULES
Three components of the module:
• Module management
• Driver Registration
• Conflict Resolution
![Page 8: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/8.jpg)
11-8
PROCESS MANAGEMENTPROCESS MANAGEMENT
Two different operations:•The creation of process•Running of new program
Terms in linux:•Fork-a new process is created by fork system call.•Execve-a new program is run after a execve call•Clone-creates a new process sharing parent data structure having it’s own identity.
![Page 9: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/9.jpg)
11-9
PROCESS MANAGEMENTPROCESS MANAGEMENT
Process properties:
• Process identity:
a. Process ID(PID):
b. Credentials:
c. Personality:
• Process environment:
• Process context: a. Scheduling context:
b. Accounting:
c. File table:
d. File system context:
e. Single handler table:
f. Virtual memory context:
![Page 10: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/10.jpg)
11-10
Processes and ThreadsProcesses and Threads
• Threads are light weight processes(LWPs)
• Processes are heavy weight processes(HWPs)
• Fundamental parts of process:
a. code(text)
b. data(vm)
c. stack
d. file I/O
e. signal table
• Threads: user level and kernel level
![Page 11: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/11.jpg)
11-11
PROCESSES AND THREADSPROCESSES AND THREADS
1. REPRESENT THE EXECUTION OF SINGLE PROGRAM
2. TWO SEPARATE PROCESSES WILL HAVE THEIR OWN INDEPENDENT ADDRESS SPACE
1. REPRESENT SEPARATE , CONCURRENT EXECUTION WITHIN SINGLE PROCESS
2. TWO THREADS WITHIN A PROCESS SHARE SAME ADDRESS SPACE
![Page 12: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/12.jpg)
11-12
SCHEDULINGSCHEDULING
• The linux scheduler is a pre-emptive , priority-based algorithm
• Two separate priority ranges :
1. Real-time range( 0 to 99)
2. ice-value range (100 to 140)
• Once kernel code start running , then it is the only kernel code till the following event occurs.
1. An interrupt
2. A page fault
3. A kernel code call to the scheduler function itself
![Page 13: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/13.jpg)
11-13
PROCESS SCHEDULINGPROCESS SCHEDULING
Linux supports two process scheduling algorithms• Time- sharing algorithm
• Real- time task algorithm
1.First-in first-out (FIFO)
2.Round Robin
![Page 14: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/14.jpg)
11-14
MEMORY MANAGEMENTMEMORY MANAGEMENT
Two components in Memory management:• Physical memory management
• Virtual memory
Physical memory management: This deals with allocation and deallocation of pages, group of pages and blocks of memory.
Virtual memory: it is the memory mapped into the address
space of running process.
![Page 15: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/15.jpg)
11-15
PHYSICAL MEMORY MANAGEMENT
•Physical memory manager is a page allocator, which uses “buddy heap” algorithm in order to keep track of available address space . Ex. Splitting of memory in buddy heap.
16 KB
8KB
8 KB
8 KB
4 KB
4 KB
![Page 16: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/16.jpg)
11-16
VIRTUAL MEMORYVIRTUAL MEMORY
• Virtual memory is responsible for maintaining the address space visible to each process.
• There are two situations where the kernel creates a new virtual address space
a) when a process runs a new program with the “exec” system call.
b) When a new process is created by the “fork” system call.
![Page 17: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/17.jpg)
11-17
FILE SYSTEMSFILE SYSTEMS
• Linux file system retains UNIX’s features. here file can be anything capable of handling I/O of stream of data.
• The virtual file system is designed using object oriented principles. It consists of two components,
i. A set of definition which define what a file object is allowed to look like.
ii. A layer of software to manipulate those objects.
3 main object defined by VTS are
i. Inode object
ii. File object structure
iii. File system object
![Page 18: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/18.jpg)
11-18
I/O IN LINUXI/O IN LINUX
Linux splits all the I/O devices into three groups
a. Block devices
b. Character devices
c. Network devices
• Block devices include all devices that allow random access like HDD, floppy disk & CD-ROMS.
• Character devices include other devices with the main exception of network devices like Magnetic tap devices.
• Network devices are dealt differently from both devices.
user cannot transfer directly data to network devices
but communicate indirectly. Ex. Tty discipline.
![Page 19: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/19.jpg)
11-19
Inter-Process Communication
VARIOUS types of MECHANISM
• SIGNAL
• PIPES
• FISOS
• Message Queues
• Semaphores
• Shared Memory
![Page 20: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/20.jpg)
11-20
LINUX NETWORK STRUCTURE
Linux kernel is implemented using the three layers of software internally-
• System call interface
• Protocol agnostic interface
• Network protocols
![Page 21: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/21.jpg)
11-21
SECURITY
In Linux, Security issues can be classified in two group-
• AUTHENTICATION
• ACCESS CONTROL
![Page 22: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/22.jpg)
11-22
Conclusion
“When is it best to use Linux and when should some other operating system be preferred?”
It all depends on the user
![Page 23: Linux intro to advance](https://reader036.fdocuments.net/reader036/viewer/2022081413/54625fffb4af9f581c8b474f/html5/thumbnails/23.jpg)
11-23
REFERENCES
•www. Wikipedia.com•www.trimble.com•www.wiley.com•Book: Operating system concepts