SlideShare una empresa de Scribd logo
1 de 60
Linux in Detail
Damian Gordon
Linux in Detail
Damian Gordon
This is “Tux”, the
Linux mascot. It was
originally created as
an entry to a Linux
logo competition.
Tux is the most
commonly used
icon for Linux.
Linux in Detail
• Let’s look at:
– Processor Management
– File Management
– Memory Management
– Device Management
– Command Line Interface
Processor Management
Linux: Processor Management
Process Scheduler
Job Scheduler
Process
2
Process
3
Process
4
Process
5
Process
1
PROCESS SCHEDULER
JOB SCHEDULER
Linux: Processor Management
HOLD
READY
WAITING
RUNNING
FINISHED
Linux: Processor Management
• fork()
• Linux uses the same parent-child process
management found in Unix, centring on the
fork() command.
• fork() gives the user to create a copy of an
executing program.
• This command gives the second program all the
attributes of the first program, such as any open
files, and saves the first program in its original
form.
Linux: Processor Management
Linux: Processor Management
• The system call fork() splits a program into
two copies, which are both running from the
statement after the fork command.
• The original process (Process A) is called the
parent process and the resulting process (Process
B) is the child process. A child inherits the
parent’s open files.
• When fork() is executed, the child process
gets a new process id (called pid for short), this is
done in a way that ensures that each process has
its own unique ID number.
Linux: Processor Management
• exec()
• Alternatively, the exec family of commands—
execl(), execv(), execle(), execlp(),
and execlvp()—is used to start execution of a
new program from another program, but unlike
fork(), which results in two processes running
the same program in memory, a successful
exec() call will lay the second program over the
first, leaving only the second program in memory.
• So exec() changes what the program is doing,
but doesn’t change the process id (pid).
Linux: Processor Management
• So often you do a fork() followed by an exec()
on the child process…
Linux: Processor Management
Linux: Processor Management
Linux: Processor Management
• The Linux process scheduler typically scans
the list of processes in the READY state and,
using predefined criteria, chooses which
process to execute.
• The scheduler has three different scheduling
types: two for real-time processes and one for
normal processes.
Linux: Processor Management
Name Priority
Level
Process
Type
Scheduling
Policy
SCHED_FIFO Highest Priority For non-pre-
emptable real-
time processes.
First In, First Out
(FIFO)
SCHED_RR Medium Priority For pre-emptable
real-time
processes.
Round Robin and
priority
SCHED_OTHER Lowest Priority For normal
processes.
Priority only
Linux: Processor Management
• SCHED_FIFO
• From among the processes with the highest priority,
the scheduler selects the process with the highest
priority and executes it using the first in, first out
algorithm. This process is normally not pre-emptible
and runs to completion.
Linux: Processor Management
• SCHED_RR
• When executing a process of the second type, the
scheduler chooses from this group with the highest
priority and uses a round robin algorithm with a
small time quantum, and when the time expires,
other processes (such as a FIFO or another RR type
with a higher priority) may be selected and executed
before the first process is allowed to run to
completion.
Linux: Processor Management
• SCHED_OTHER
• The third type of process has the lowest priority and
is executed only when there are no processes with
higher priority in the READY queue.
File Management
Linux: File Management
• Linux is case sensitive, so the following are
different files:
–README.TXT
–ReadMe.TXT
–readMe.TXT
–readme.TXT
Linux: File Management
• A typical Linux file structure is:
Linux: File Management
• Filenames can be up to 255 characters long and can contain
alphabetic characters, underscores, and numbers.
• File suffixes (which is the Linux term for file extensions) are
optional.
• Filenames can include a space; however, this can cause
complications if you’re running programs from the command
line because a program named interview notes would be
viewed as a command to run two files: interview and notes. To
avoid confusion, the two words can be enclosed in quotes:
“interview notes.”
• The full filename includes path information:
/Office/Powerpoint/LinuxInDetail.ppt
Linux: File Management
Filename suffixpathroot
• In Linux the Access Controls are:
– R: Read
– W: Write
– X: Execute
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• User
• User Group
• World
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• User -you
• User Group – everyone in your group
• World – everyone with a login to the system
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• -rwxrwxrwx
• User User Group World
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• -rwxrwxrwx
•-111111111
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• -rwxr-xr-x
•-111101101
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• -rwx--x--x
•-101001001
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• -rwxrwxrwx
•-111111111
•- 7 7 7
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• -rwxr-xr-x
•-111101101
•- 7 5 5
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
• -rwx--x--x
•-111001001
•- 7 1 1
Linux: File Management
• If we want to grant permissions to file, e.g.
MakeABackup.bat, we do:
• chmod 755 MakeABackup.sh
• chmod 777 MakeABackup.sh
• chmod 700 MakeABackup.sh
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
-rwxrwxrwx
• User User Group World
Linux: File Management
• In Linux access to a file can assigned to one of
three groups:
drwxrwxrwx
• User User Group World
Linux: File Management
Access Control Matrix
Memory Management
Linux: Memory Management
• Linux allocated 1GB for the kernel, and 3GB
for executing processes.
• The 3GB address space is divided into:
– Process code
– Process data
– Shared library data used by processes
– Stack used by process
• When thinking
about virtual
memory we’ll
remember that the
operating system
divides a process
into pages, and it
divides main
memory into page
frames.
Linux: Memory Management
Main
Memory
Operating
System
Memory
Page 2
Page 0
Page 1
Page 3
Page 3
Program 4:
350 bytes
Page 0
Page 1
Page 2
Linux: Memory Management
• When a process requests pages, Linux loads
them into memory.
• When the kernel needs memory space, the
pages are released on a Least-Recently Used
(LRU) basis.
• To keep track of free and busy pages, Linux
uses a system of page tables.
Linux: Memory Management
• Each virtual address in memory is stored as
four elements:
– Main Directory
– Middle Directory
– Page Table Directory
– Page Frame
Linux: Memory Management
• Each virtual address in memory is stored as
four elements:
– Main Directory
– Middle Directory
– Page Table Directory
– Page Frame
Example
Page 1
Table 3
Page Table 2
Location of Line 214
Linux: Memory Management
• As a diagram:
Device Management
Linux: Device Management
• Linux is device independent, which improves
its portability from one system to another.
• Device drivers supervise the transmission of
data between main memory and the
peripheral unit.
Linux: Device Management
• Linux treats devices as if they are files, and
you can access devices the same way you
access files in Linux.
• Devices are assigned not only a name but also
descriptors that further identify each device
and are stored in the device directory.
Linux: Device Management
Linux: Device Management
• A device driver (or driver) is a computer
program that operates or controls a particular
type of device that is attached to a computer.
• A driver provides a software interface to
hardware devices, enabling operating systems
and other computer programs to access
hardware functions without needing to know
precise details of the hardware being used.
Linux: Device Management
• Linux identifies each device by a major device
number and a minor device number.
– the major device number identifies the driver
associated with the device.
– the minor device number is used by the kernel to
determine exactly which device is being referred
to.
Linux: Device Management
Linux: Device Management
Major device number Minor device number
Linux: Device Management
• Standard versions of Linux often provide a
comprehensive collection of common device
drivers; but if the computer system should
include hardware or peripherals that are not
on the standard list, their device drivers can
be retrieved from another source and installed
separately.
• Alternatively, a computer programmer can
write a device driver and install it for use.
Linux: Device Management
• Classes of device drivers:
Linux: Device Management
• Char Devices: Character devices are those that can
be accessed as a stream of bytes, such as a
communications port, monitor, or other byte-stream-
fed device.
• Block Devices: Similar to char devices except that
they can host a file system, such as a hard disk.
• Network Devices: Their function is to send and
receive packets of information as directed by the
network subsystem of the kernel.
Linux: Device Management
• A notable feature of Linux is its ability to
accept new device drivers on the fly, while the
system is up and running.
• That means administrators can give the kernel
additional functionality by loading and testing
new drivers without having to reboot each
time to reconfigure the kernel.
Command Line Interface
Linux: Command Line Interface
Linux: Command Line Interface
http://www.masswerk.at/jsuix/
ls
ls –la
pwd
cd .
cd ..
man man
Linux: Command Line Interface
http://www.masswerk.at/jsuix/
#!/bin/sh
mkdir BackUpFolder
cp *.txt BackUpFolder
ls -la BackUpFolder

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Linux OS presentation
Linux OS presentationLinux OS presentation
Linux OS presentation
 
What is Ubuntu - presentation
What is Ubuntu - presentationWhat is Ubuntu - presentation
What is Ubuntu - presentation
 
Raspberry Pi - Lecture 2 Linux OS
Raspberry Pi - Lecture 2 Linux OSRaspberry Pi - Lecture 2 Linux OS
Raspberry Pi - Lecture 2 Linux OS
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Linux File System
Linux File SystemLinux File System
Linux File System
 
Linux Basic commands and VI Editor
Linux Basic commands and VI EditorLinux Basic commands and VI Editor
Linux Basic commands and VI Editor
 
Linux os and its features
Linux os and its featuresLinux os and its features
Linux os and its features
 
Linux ppt
Linux pptLinux ppt
Linux ppt
 
Introduction 2 linux
Introduction 2 linuxIntroduction 2 linux
Introduction 2 linux
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Unix Operating System
Unix Operating SystemUnix Operating System
Unix Operating System
 
Disk and File System Management in Linux
Disk and File System Management in LinuxDisk and File System Management in Linux
Disk and File System Management in Linux
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Linux seminar
Linux seminarLinux seminar
Linux seminar
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Linux installation
Linux installationLinux installation
Linux installation
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Operating Systems 1: Introduction
Operating Systems 1: IntroductionOperating Systems 1: Introduction
Operating Systems 1: Introduction
 
File system
File systemFile system
File system
 

Destacado

Operating Systems: Versions of Linux
Operating Systems: Versions of LinuxOperating Systems: Versions of Linux
Operating Systems: Versions of LinuxDamian T. Gordon
 
Operating Systems: Virtual Memory
Operating Systems: Virtual MemoryOperating Systems: Virtual Memory
Operating Systems: Virtual MemoryDamian T. Gordon
 
Operating Systems: File Management
Operating Systems: File ManagementOperating Systems: File Management
Operating Systems: File ManagementDamian T. Gordon
 
Operating Systems: A History of MacOS
Operating Systems: A History of MacOSOperating Systems: A History of MacOS
Operating Systems: A History of MacOSDamian T. Gordon
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device ManagementDamian T. Gordon
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to PseudocodeDamian T. Gordon
 

Destacado (7)

Operating Systems: Versions of Linux
Operating Systems: Versions of LinuxOperating Systems: Versions of Linux
Operating Systems: Versions of Linux
 
Operating Systems: Virtual Memory
Operating Systems: Virtual MemoryOperating Systems: Virtual Memory
Operating Systems: Virtual Memory
 
Operating Systems: File Management
Operating Systems: File ManagementOperating Systems: File Management
Operating Systems: File Management
 
Operating Systems: A History of MacOS
Operating Systems: A History of MacOSOperating Systems: A History of MacOS
Operating Systems: A History of MacOS
 
Operating Systems: Device Management
Operating Systems: Device ManagementOperating Systems: Device Management
Operating Systems: Device Management
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 
The Scrum Model
The Scrum ModelThe Scrum Model
The Scrum Model
 

Similar a Operating Systems: Linux in Detail

Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Chander Pandey
 
LinuxTraining_26_Sept_2021.ppt
LinuxTraining_26_Sept_2021.pptLinuxTraining_26_Sept_2021.ppt
LinuxTraining_26_Sept_2021.pptmuraridesai2
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-serviceRohit Sansiya
 
12-introductiontolinuxos-190907073928
12-introductiontolinuxos-19090707392812-introductiontolinuxos-190907073928
12-introductiontolinuxos-190907073928SahilNegi60
 
12 introduction to Linux OS
12 introduction to Linux OS12 introduction to Linux OS
12 introduction to Linux OSHameda Hurmat
 
Introduction, Features, Basic Commands and Distribution of LINUX
Introduction, Features, Basic Commands and Distribution of LINUXIntroduction, Features, Basic Commands and Distribution of LINUX
Introduction, Features, Basic Commands and Distribution of LINUXDeeksha Verma
 
How to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNHow to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNGene Kartavtsev
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfIxtiyorTeshaboyev
 
Linux intro to advance
Linux intro to advanceLinux intro to advance
Linux intro to advancenil65
 
Linux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxLinux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxbemnitekalegn
 
Linux Administrator - The Linux Course on Eduonix
Linux Administrator - The Linux Course on EduonixLinux Administrator - The Linux Course on Eduonix
Linux Administrator - The Linux Course on EduonixPaddy Lock
 
KMSUnix and Linux.pptx
KMSUnix and Linux.pptxKMSUnix and Linux.pptx
KMSUnix and Linux.pptxGanesh Bhosale
 
ITCP PRACTICAL-1.pptx
ITCP PRACTICAL-1.pptxITCP PRACTICAL-1.pptx
ITCP PRACTICAL-1.pptxHemantJadhao3
 
Linux operating system
Linux operating systemLinux operating system
Linux operating systemITz_1
 
Linux week 2
Linux week 2Linux week 2
Linux week 2Vinoth Sn
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介lclsg123
 
Linux@assignment ppt
Linux@assignment pptLinux@assignment ppt
Linux@assignment pptRama .
 

Similar a Operating Systems: Linux in Detail (20)

Unix/Linux
Unix/Linux Unix/Linux
Unix/Linux
 
Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
LinuxTraining_26_Sept_2021.ppt
LinuxTraining_26_Sept_2021.pptLinuxTraining_26_Sept_2021.ppt
LinuxTraining_26_Sept_2021.ppt
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
12-introductiontolinuxos-190907073928
12-introductiontolinuxos-19090707392812-introductiontolinuxos-190907073928
12-introductiontolinuxos-190907073928
 
12 introduction to Linux OS
12 introduction to Linux OS12 introduction to Linux OS
12 introduction to Linux OS
 
Introduction, Features, Basic Commands and Distribution of LINUX
Introduction, Features, Basic Commands and Distribution of LINUXIntroduction, Features, Basic Commands and Distribution of LINUX
Introduction, Features, Basic Commands and Distribution of LINUX
 
How to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MNHow to Audit Linux - Gene Kartavtsev, ISACA MN
How to Audit Linux - Gene Kartavtsev, ISACA MN
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
 
Linux intro to advance
Linux intro to advanceLinux intro to advance
Linux intro to advance
 
Linux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxLinux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptx
 
Linux Administrator - The Linux Course on Eduonix
Linux Administrator - The Linux Course on EduonixLinux Administrator - The Linux Course on Eduonix
Linux Administrator - The Linux Course on Eduonix
 
Linux os
Linux osLinux os
Linux os
 
KMSUnix and Linux.pptx
KMSUnix and Linux.pptxKMSUnix and Linux.pptx
KMSUnix and Linux.pptx
 
ITCP PRACTICAL-1.pptx
ITCP PRACTICAL-1.pptxITCP PRACTICAL-1.pptx
ITCP PRACTICAL-1.pptx
 
Linux operating system
Linux operating systemLinux operating system
Linux operating system
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
 
Linux@assignment ppt
Linux@assignment pptLinux@assignment ppt
Linux@assignment ppt
 

Más de Damian T. Gordon

Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Damian T. Gordon
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesDamian T. Gordon
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud ComputingDamian T. Gordon
 
Evaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSEvaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSDamian T. Gordon
 
Evaluating Teaching: MERLOT
Evaluating Teaching: MERLOTEvaluating Teaching: MERLOT
Evaluating Teaching: MERLOTDamian T. Gordon
 
Evaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricEvaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricDamian T. Gordon
 
Designing Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDesigning Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDamian T. Gordon
 
Designing Teaching: ASSURE
Designing Teaching: ASSUREDesigning Teaching: ASSURE
Designing Teaching: ASSUREDamian T. Gordon
 
Designing Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDesigning Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDamian T. Gordon
 
Designing Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDesigning Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDamian T. Gordon
 
Designing Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDesigning Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDamian T. Gordon
 
Universally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsUniversally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsDamian T. Gordon
 

Más de Damian T. Gordon (20)

Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.Universal Design for Learning, Co-Designing with Students.
Universal Design for Learning, Co-Designing with Students.
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
REST and RESTful Services
REST and RESTful ServicesREST and RESTful Services
REST and RESTful Services
 
Serverless Computing
Serverless ComputingServerless Computing
Serverless Computing
 
Cloud Identity Management
Cloud Identity ManagementCloud Identity Management
Cloud Identity Management
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Introduction to Cloud Computing
Introduction to Cloud ComputingIntroduction to Cloud Computing
Introduction to Cloud Computing
 
Introduction to ChatGPT
Introduction to ChatGPTIntroduction to ChatGPT
Introduction to ChatGPT
 
How to Argue Logically
How to Argue LogicallyHow to Argue Logically
How to Argue Logically
 
Evaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONSEvaluating Teaching: SECTIONS
Evaluating Teaching: SECTIONS
 
Evaluating Teaching: MERLOT
Evaluating Teaching: MERLOTEvaluating Teaching: MERLOT
Evaluating Teaching: MERLOT
 
Evaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson RubricEvaluating Teaching: Anstey and Watson Rubric
Evaluating Teaching: Anstey and Watson Rubric
 
Evaluating Teaching: LORI
Evaluating Teaching: LORIEvaluating Teaching: LORI
Evaluating Teaching: LORI
 
Designing Teaching: Pause Procedure
Designing Teaching: Pause ProcedureDesigning Teaching: Pause Procedure
Designing Teaching: Pause Procedure
 
Designing Teaching: ADDIE
Designing Teaching: ADDIEDesigning Teaching: ADDIE
Designing Teaching: ADDIE
 
Designing Teaching: ASSURE
Designing Teaching: ASSUREDesigning Teaching: ASSURE
Designing Teaching: ASSURE
 
Designing Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning TypesDesigning Teaching: Laurilliard's Learning Types
Designing Teaching: Laurilliard's Learning Types
 
Designing Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of InstructionDesigning Teaching: Gagne's Nine Events of Instruction
Designing Teaching: Gagne's Nine Events of Instruction
 
Designing Teaching: Elaboration Theory
Designing Teaching: Elaboration TheoryDesigning Teaching: Elaboration Theory
Designing Teaching: Elaboration Theory
 
Universally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some ConsiderationsUniversally Designed Learning Spaces: Some Considerations
Universally Designed Learning Spaces: Some Considerations
 

Último

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 

Último (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 

Operating Systems: Linux in Detail

  • 2. Linux in Detail Damian Gordon This is “Tux”, the Linux mascot. It was originally created as an entry to a Linux logo competition. Tux is the most commonly used icon for Linux.
  • 3. Linux in Detail • Let’s look at: – Processor Management – File Management – Memory Management – Device Management – Command Line Interface
  • 5. Linux: Processor Management Process Scheduler Job Scheduler Process 2 Process 3 Process 4 Process 5 Process 1
  • 6. PROCESS SCHEDULER JOB SCHEDULER Linux: Processor Management HOLD READY WAITING RUNNING FINISHED
  • 7. Linux: Processor Management • fork() • Linux uses the same parent-child process management found in Unix, centring on the fork() command. • fork() gives the user to create a copy of an executing program. • This command gives the second program all the attributes of the first program, such as any open files, and saves the first program in its original form.
  • 9. Linux: Processor Management • The system call fork() splits a program into two copies, which are both running from the statement after the fork command. • The original process (Process A) is called the parent process and the resulting process (Process B) is the child process. A child inherits the parent’s open files. • When fork() is executed, the child process gets a new process id (called pid for short), this is done in a way that ensures that each process has its own unique ID number.
  • 10. Linux: Processor Management • exec() • Alternatively, the exec family of commands— execl(), execv(), execle(), execlp(), and execlvp()—is used to start execution of a new program from another program, but unlike fork(), which results in two processes running the same program in memory, a successful exec() call will lay the second program over the first, leaving only the second program in memory. • So exec() changes what the program is doing, but doesn’t change the process id (pid).
  • 11. Linux: Processor Management • So often you do a fork() followed by an exec() on the child process…
  • 14. Linux: Processor Management • The Linux process scheduler typically scans the list of processes in the READY state and, using predefined criteria, chooses which process to execute. • The scheduler has three different scheduling types: two for real-time processes and one for normal processes.
  • 15. Linux: Processor Management Name Priority Level Process Type Scheduling Policy SCHED_FIFO Highest Priority For non-pre- emptable real- time processes. First In, First Out (FIFO) SCHED_RR Medium Priority For pre-emptable real-time processes. Round Robin and priority SCHED_OTHER Lowest Priority For normal processes. Priority only
  • 16. Linux: Processor Management • SCHED_FIFO • From among the processes with the highest priority, the scheduler selects the process with the highest priority and executes it using the first in, first out algorithm. This process is normally not pre-emptible and runs to completion.
  • 17. Linux: Processor Management • SCHED_RR • When executing a process of the second type, the scheduler chooses from this group with the highest priority and uses a round robin algorithm with a small time quantum, and when the time expires, other processes (such as a FIFO or another RR type with a higher priority) may be selected and executed before the first process is allowed to run to completion.
  • 18. Linux: Processor Management • SCHED_OTHER • The third type of process has the lowest priority and is executed only when there are no processes with higher priority in the READY queue.
  • 20. Linux: File Management • Linux is case sensitive, so the following are different files: –README.TXT –ReadMe.TXT –readMe.TXT –readme.TXT
  • 21. Linux: File Management • A typical Linux file structure is:
  • 22. Linux: File Management • Filenames can be up to 255 characters long and can contain alphabetic characters, underscores, and numbers. • File suffixes (which is the Linux term for file extensions) are optional. • Filenames can include a space; however, this can cause complications if you’re running programs from the command line because a program named interview notes would be viewed as a command to run two files: interview and notes. To avoid confusion, the two words can be enclosed in quotes: “interview notes.”
  • 23. • The full filename includes path information: /Office/Powerpoint/LinuxInDetail.ppt Linux: File Management Filename suffixpathroot
  • 24. • In Linux the Access Controls are: – R: Read – W: Write – X: Execute Linux: File Management
  • 25. • In Linux access to a file can assigned to one of three groups: • User • User Group • World Linux: File Management
  • 26. • In Linux access to a file can assigned to one of three groups: • User -you • User Group – everyone in your group • World – everyone with a login to the system Linux: File Management
  • 27. • In Linux access to a file can assigned to one of three groups: • -rwxrwxrwx • User User Group World Linux: File Management
  • 28. • In Linux access to a file can assigned to one of three groups: • -rwxrwxrwx •-111111111 Linux: File Management
  • 29. • In Linux access to a file can assigned to one of three groups: • -rwxr-xr-x •-111101101 Linux: File Management
  • 30. • In Linux access to a file can assigned to one of three groups: • -rwx--x--x •-101001001 Linux: File Management
  • 31. • In Linux access to a file can assigned to one of three groups: • -rwxrwxrwx •-111111111 •- 7 7 7 Linux: File Management
  • 32. • In Linux access to a file can assigned to one of three groups: • -rwxr-xr-x •-111101101 •- 7 5 5 Linux: File Management
  • 33. • In Linux access to a file can assigned to one of three groups: • -rwx--x--x •-111001001 •- 7 1 1 Linux: File Management
  • 34. • If we want to grant permissions to file, e.g. MakeABackup.bat, we do: • chmod 755 MakeABackup.sh • chmod 777 MakeABackup.sh • chmod 700 MakeABackup.sh Linux: File Management
  • 35. • In Linux access to a file can assigned to one of three groups: -rwxrwxrwx • User User Group World Linux: File Management
  • 36. • In Linux access to a file can assigned to one of three groups: drwxrwxrwx • User User Group World Linux: File Management
  • 39. Linux: Memory Management • Linux allocated 1GB for the kernel, and 3GB for executing processes. • The 3GB address space is divided into: – Process code – Process data – Shared library data used by processes – Stack used by process
  • 40. • When thinking about virtual memory we’ll remember that the operating system divides a process into pages, and it divides main memory into page frames. Linux: Memory Management Main Memory Operating System Memory Page 2 Page 0 Page 1 Page 3 Page 3 Program 4: 350 bytes Page 0 Page 1 Page 2
  • 41. Linux: Memory Management • When a process requests pages, Linux loads them into memory. • When the kernel needs memory space, the pages are released on a Least-Recently Used (LRU) basis. • To keep track of free and busy pages, Linux uses a system of page tables.
  • 42. Linux: Memory Management • Each virtual address in memory is stored as four elements: – Main Directory – Middle Directory – Page Table Directory – Page Frame
  • 43. Linux: Memory Management • Each virtual address in memory is stored as four elements: – Main Directory – Middle Directory – Page Table Directory – Page Frame Example Page 1 Table 3 Page Table 2 Location of Line 214
  • 46. Linux: Device Management • Linux is device independent, which improves its portability from one system to another. • Device drivers supervise the transmission of data between main memory and the peripheral unit.
  • 47. Linux: Device Management • Linux treats devices as if they are files, and you can access devices the same way you access files in Linux. • Devices are assigned not only a name but also descriptors that further identify each device and are stored in the device directory.
  • 49. Linux: Device Management • A device driver (or driver) is a computer program that operates or controls a particular type of device that is attached to a computer. • A driver provides a software interface to hardware devices, enabling operating systems and other computer programs to access hardware functions without needing to know precise details of the hardware being used.
  • 50. Linux: Device Management • Linux identifies each device by a major device number and a minor device number. – the major device number identifies the driver associated with the device. – the minor device number is used by the kernel to determine exactly which device is being referred to.
  • 52. Linux: Device Management Major device number Minor device number
  • 53. Linux: Device Management • Standard versions of Linux often provide a comprehensive collection of common device drivers; but if the computer system should include hardware or peripherals that are not on the standard list, their device drivers can be retrieved from another source and installed separately. • Alternatively, a computer programmer can write a device driver and install it for use.
  • 54. Linux: Device Management • Classes of device drivers:
  • 55. Linux: Device Management • Char Devices: Character devices are those that can be accessed as a stream of bytes, such as a communications port, monitor, or other byte-stream- fed device. • Block Devices: Similar to char devices except that they can host a file system, such as a hard disk. • Network Devices: Their function is to send and receive packets of information as directed by the network subsystem of the kernel.
  • 56. Linux: Device Management • A notable feature of Linux is its ability to accept new device drivers on the fly, while the system is up and running. • That means administrators can give the kernel additional functionality by loading and testing new drivers without having to reboot each time to reconfigure the kernel.
  • 58. Linux: Command Line Interface
  • 59. Linux: Command Line Interface http://www.masswerk.at/jsuix/ ls ls –la pwd cd . cd .. man man
  • 60. Linux: Command Line Interface http://www.masswerk.at/jsuix/ #!/bin/sh mkdir BackUpFolder cp *.txt BackUpFolder ls -la BackUpFolder

Notas del editor

  1. https://en.wikipedia.org/wiki/Linux_kernel
  2. https://en.wikipedia.org/wiki/Linux_kernel
  3. https://en.wikipedia.org/wiki/Linux_kernel
  4. https://en.wikipedia.org/wiki/Linux_kernel
  5. https://en.wikipedia.org/wiki/Linux_kernel
  6. https://en.wikipedia.org/wiki/Linux_kernel
  7. https://en.wikipedia.org/wiki/Linux_kernel
  8. https://en.wikipedia.org/wiki/Linux_kernel
  9. https://en.wikipedia.org/wiki/Linux_kernel
  10. https://en.wikipedia.org/wiki/Linux_kernel
  11. https://en.wikipedia.org/wiki/Linux_kernel
  12. https://en.wikipedia.org/wiki/Linux_kernel
  13. https://en.wikipedia.org/wiki/Linux_kernel
  14. https://en.wikipedia.org/wiki/Linux_kernel
  15. https://en.wikipedia.org/wiki/Linux_kernel
  16. https://en.wikipedia.org/wiki/Linux_kernel
  17. https://en.wikipedia.org/wiki/Linux_kernel
  18. https://en.wikipedia.org/wiki/Linux_kernel
  19. https://en.wikipedia.org/wiki/Linux_kernel
  20. https://en.wikipedia.org/wiki/Linux_kernel
  21. https://en.wikipedia.org/wiki/Linux_kernel
  22. https://en.wikipedia.org/wiki/Linux_kernel
  23. https://en.wikipedia.org/wiki/Linux_kernel
  24. https://en.wikipedia.org/wiki/Linux_kernel
  25. https://en.wikipedia.org/wiki/Linux_kernel
  26. https://en.wikipedia.org/wiki/Linux_kernel
  27. https://en.wikipedia.org/wiki/Linux_kernel
  28. https://en.wikipedia.org/wiki/Linux_kernel
  29. https://en.wikipedia.org/wiki/Linux_kernel
  30. https://en.wikipedia.org/wiki/Linux_kernel
  31. https://en.wikipedia.org/wiki/Linux_kernel
  32. https://en.wikipedia.org/wiki/Linux_kernel
  33. https://en.wikipedia.org/wiki/Linux_kernel
  34. https://en.wikipedia.org/wiki/Linux_kernel
  35. https://en.wikipedia.org/wiki/Linux_kernel