SlideShare una empresa de Scribd logo
1 de 19
NeXTBSD
AKA FreeBSD X
Basic Architecture
FreeBSD-current kernel
+ Mach IPC
Common Object Runtime (create/delete/retain/release)
Libdispatch / ASL / Libnotify
launchd
launchctl legacy rc system cooperating daemons
json
config
files
Basic Architecture
FreeBSD-current kernel
+ Mach IPC
Common Object Runtime (create/delete/retain/release)
Libdispatch / ASL / Libnotify
launchd
launchctl legacy rc system cooperating daemons
json
config
files
Introduction to Mach
IPC
A Sympathetic Glance
Mach Kernel Abstractions
• Tasks. The units of resource ownership; each task consists of a virtual address space, a port
right namespace, and one or more threads. (Implemented as an extension to a process.)
• Threads. The units of CPU execution within a task. Simple extension to kthreads.
• Address space. In conjunction with memory managers, Mach implements the notion of a
sparse virtual address space and shared memory. (No modifications)
• Memory objects. The internal units of memory management. Memory objects include named
entries and regions; they are representations of potentially persistent data that may be mapped
into address spaces. (Unsupported)
• Ports. Secure, simplex communication channels, accessible only via send and receive
capabilities (known as port rights).
• IPC. Message queues, remote procedure calls, notifications, semaphores, and lock sets.
(Mach semaphores and lock sets are not supported).
• Time. Clocks, timers, and waiting - (rudimentary shims).
What is a port?
• A port is an endpoint of a unidirectional communication channel between a client who requests
a service and a server who provides the service.
• If a reply is to be provided to such a service request, a second port must be used.
• Tasks have permissions to access ports in certain ways (send, receive, send-once); these are
called port rights.
• A port can be accessed only via a right. (Akin to a file descriptor).
• Port rights can be copied and moved between tasks via IPC. Doing so, in effect, passes
capabilities to some object or server.
• Ports and port rights do not have systemwide names that allow arbitrary ports or rights to be
manipulated directly.
• Ports can be manipulated by a task only if the task has a port right in its port namespace.
• A port right is specified by a port name, an integer index into a 32-bit port namespace. Each
task has associated with it a single port namespace.
What can Mach ports do that
Unix domain sockets can’t?
• Separate namespace for services (doesn’t rely on file system naming or permissions)
• Message boundaries
• Kernel as peer
• Pre-existing well defined RPC interface
• Receive messages directly in call to kevent()
• OOL (out of line) messages (arbitrarily sized with zero copy for large messages)
• Port send rights - can only send to a port for which the process has explicitly received
the right to send
• Provenance - Yes, PROVENANCE, receiver can have the kernel append an audit
trailer containing full set of credentials of sender
Basic Architecture
FreeBSD-current kernel
+ Mach IPC
Common Object Runtime (create/delete/retain/release)
Libdispatch / ASL / Libnotify
launchd
launchctl legacy rc system cooperating daemons
json
config
files
Common Runtime Benefits
• Internal objects in multi-threaded world to share some
common semantics (retain / release)
• Examples: dispatch_object_t, asl_object_t,
xpc_object_t, etc
• Provides a rendezvous point for higher-level languages
like ObjC and C++ (which also have objects they
would like to share across language boundaries)
• One reason why “this stuff can’t just be in ports”
Basic Architecture
FreeBSD-current kernel
+ Mach IPC
Common Object Runtime (create/delete/retain/release)
Libdispatch / ASL / Libnotify
launchd
launchctl legacy rc system cooperating daemons
json
config
files
• An intelligent thread pool (with optional
cooperative thread resource management
between multiple tasks)
• Task-parallelism made easy: Everything is a
queue, and queues can be arbitrarily nested
• Used by many other parts of the system (ASL,
notify, etc) and provides “common runloop for
unix processes” (this is actually a really big deal)
• Apache licensed and highly portable (Linux,
BSD, Windows, etc)
Libdispatch: What the hell is it?
• All objects use common runtime (so retain/release
controls object lifetimes and thread safety)
• Queues, sources, semaphores and groups
provide basic building blocks
• Data objects provide higher-level memory
management semantics for allocating / passing
and managing data between processes
• Way too much functionality to go into here; many
tutorials on the net, many thousands of OS X / iOS
apps using it
Libdispatch: Types of functionality
• Structured Log Output: Everything is a key/value
pair, and highly extensible
• Supports multi-threaded logging out of the box
• Unifies character encoding (UTF-8 everywhere),
event sources and post-processing plug-ins, etc.
etc.
• Can be used as a building-block for telemetry
and higher-level logging / debugging needs
ASL: What the hell is it?
• Global asynchronous event management system
(publish / subscribe)
• Supports many different “notification delivery”
methods (fds, mach ipc, signals, shared
memory)
• Cooperates nicely with libdispatch (events can
cause automatic enqueuing of handler
blocks/functions on queues)
• Very useful for light-weight cache invalidation
Libnotify: What the hell is it?
Basic Architecture
FreeBSD-current kernel
+ Mach IPC
Common Object Runtime (create/delete/retain/release)
Libdispatch / ASL / Libnotify
launchd
launchctl legacy rc system cooperating daemons
json
config
files
• A merger of init, mach_init (which FreeBSD never
had), [x]inetd, cron, and rc/rc.d
• Provides a clear chain of custody for all
processes and a single point of control for
security policy implementation and debugging
• Handles dependencies implicitly through
communication requests / events (both HW and
SW)
• Provides per system / session / application
service management for XPC (when present)
Launchd: What the hell is it?
• Launchd speaks XML fluently (and will force you to
as well)
• Launchd’s implementation is really complicated
• Launchd clubs UNIX’s “keep it simple” philosophy
like a baby harp seal
Launchd: Popular Myths
Hint: The world has changed!
Resources & Next Steps
• https://github.com/kmacy/NextBSD
• Fork of FreeBSD -current with all this stuff
added. Builds under FreeBSD 10.1 or later.
• Nightly builds coming soon, but for now
http://www.optimcloud.com/disc1.iso is
installable image
• Merging HardenedBSD work as well
Q&A

Más contenido relacionado

La actualidad más candente

Finding the Right Primers: Using NCBI for RT-PCR Primer Design
Finding the Right Primers: Using NCBI for RT-PCR Primer DesignFinding the Right Primers: Using NCBI for RT-PCR Primer Design
Finding the Right Primers: Using NCBI for RT-PCR Primer DesignIntegrated DNA Technologies
 
Recombinant DNA Technology
Recombinant  DNA TechnologyRecombinant  DNA Technology
Recombinant DNA TechnologyHeliOza1
 
DNA protein interaction.pptx
DNA protein interaction.pptxDNA protein interaction.pptx
DNA protein interaction.pptxshwetaliprajapati
 
Translation In Eukaryotes
Translation In EukaryotesTranslation In Eukaryotes
Translation In EukaryotesUmer Farooq
 
Metabolic network mapping for metabolomics
Metabolic network mapping for metabolomicsMetabolic network mapping for metabolomics
Metabolic network mapping for metabolomicsDinesh Barupal
 
DNA Repair Mechanisms
DNA Repair MechanismsDNA Repair Mechanisms
DNA Repair MechanismsAmitTiwari512
 
Crispr cas9 technology
Crispr cas9 technology Crispr cas9 technology
Crispr cas9 technology AshrafAlhamod
 
Translation in prokaryotes and eukaryotes
Translation in prokaryotes and eukaryotesTranslation in prokaryotes and eukaryotes
Translation in prokaryotes and eukaryotesANUSHIKA2
 
Ap Chap 18 Pp
Ap Chap 18 PpAp Chap 18 Pp
Ap Chap 18 Ppsmithbio
 
Current trends in pseduogene detection and characterization
Current trends in pseduogene detection and characterizationCurrent trends in pseduogene detection and characterization
Current trends in pseduogene detection and characterizationShreya Feliz
 
Engineering plant immunity using crispr cas9 to generate virus resistance
Engineering plant immunity using crispr cas9 to generate virus resistanceEngineering plant immunity using crispr cas9 to generate virus resistance
Engineering plant immunity using crispr cas9 to generate virus resistanceSheikh Mansoor
 
Physical maps and their use in annotations
Physical maps and their use in annotationsPhysical maps and their use in annotations
Physical maps and their use in annotationsSheetal Mehla
 

La actualidad más candente (20)

Finding the Right Primers: Using NCBI for RT-PCR Primer Design
Finding the Right Primers: Using NCBI for RT-PCR Primer DesignFinding the Right Primers: Using NCBI for RT-PCR Primer Design
Finding the Right Primers: Using NCBI for RT-PCR Primer Design
 
OMIM Database
OMIM DatabaseOMIM Database
OMIM Database
 
Recombinant DNA Technology
Recombinant  DNA TechnologyRecombinant  DNA Technology
Recombinant DNA Technology
 
Biological networks
Biological networksBiological networks
Biological networks
 
DNA protein interaction.pptx
DNA protein interaction.pptxDNA protein interaction.pptx
DNA protein interaction.pptx
 
Translation In Eukaryotes
Translation In EukaryotesTranslation In Eukaryotes
Translation In Eukaryotes
 
Metabolic network mapping for metabolomics
Metabolic network mapping for metabolomicsMetabolic network mapping for metabolomics
Metabolic network mapping for metabolomics
 
DNA Repair Mechanisms
DNA Repair MechanismsDNA Repair Mechanisms
DNA Repair Mechanisms
 
Crispr cas9 technology
Crispr cas9 technology Crispr cas9 technology
Crispr cas9 technology
 
Clathrin coated vesicle
Clathrin coated vesicleClathrin coated vesicle
Clathrin coated vesicle
 
Translation in prokaryotes and eukaryotes
Translation in prokaryotes and eukaryotesTranslation in prokaryotes and eukaryotes
Translation in prokaryotes and eukaryotes
 
HMM (Hidden Markov Model)
HMM (Hidden Markov Model)HMM (Hidden Markov Model)
HMM (Hidden Markov Model)
 
Transcription in Prokaryotes
Transcription in ProkaryotesTranscription in Prokaryotes
Transcription in Prokaryotes
 
Ap Chap 18 Pp
Ap Chap 18 PpAp Chap 18 Pp
Ap Chap 18 Pp
 
Ribozyme
RibozymeRibozyme
Ribozyme
 
Current trends in pseduogene detection and characterization
Current trends in pseduogene detection and characterizationCurrent trends in pseduogene detection and characterization
Current trends in pseduogene detection and characterization
 
Engineering plant immunity using crispr cas9 to generate virus resistance
Engineering plant immunity using crispr cas9 to generate virus resistanceEngineering plant immunity using crispr cas9 to generate virus resistance
Engineering plant immunity using crispr cas9 to generate virus resistance
 
Tetrad analysis
Tetrad analysisTetrad analysis
Tetrad analysis
 
Cell division
Cell divisionCell division
Cell division
 
Physical maps and their use in annotations
Physical maps and their use in annotationsPhysical maps and their use in annotations
Physical maps and their use in annotations
 

Destacado

FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)iXsystems
 
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)iXsystems
 
FreeNAS 10: Challenges of Building a Modern Storage Appliance based on FreeBS...
FreeNAS 10: Challenges of Building a Modern Storage Appliance based on FreeBS...FreeNAS 10: Challenges of Building a Modern Storage Appliance based on FreeBS...
FreeNAS 10: Challenges of Building a Modern Storage Appliance based on FreeBS...iXsystems
 
History of ZFS (MeetBSD California 2016)
History of ZFS (MeetBSD California 2016)History of ZFS (MeetBSD California 2016)
History of ZFS (MeetBSD California 2016)iXsystems
 
BayLISA - FreeNAS 10 by Jordan Hubbard
BayLISA - FreeNAS 10 by Jordan HubbardBayLISA - FreeNAS 10 by Jordan Hubbard
BayLISA - FreeNAS 10 by Jordan HubbardiXsystems
 
CDays14 - CPP05 - Standard Library: STL e boost, la BCL di C++
CDays14 - CPP05 - Standard Library: STL e boost, la BCL di C++CDays14 - CPP05 - Standard Library: STL e boost, la BCL di C++
CDays14 - CPP05 - Standard Library: STL e boost, la BCL di C++Alessio Gogna
 
Il sistema di gestione documentale e di gestione processi per Drive Service
Il sistema di gestione documentale e di gestione processi per Drive ServiceIl sistema di gestione documentale e di gestione processi per Drive Service
Il sistema di gestione documentale e di gestione processi per Drive Serviceit Consult
 
Create Brand Evangelists with CNAM
Create Brand Evangelists with CNAMCreate Brand Evangelists with CNAM
Create Brand Evangelists with CNAMFlowroute
 
02 Modern Customer Service Infographic
02 Modern Customer Service Infographic02 Modern Customer Service Infographic
02 Modern Customer Service InfographicKen Prokopec
 
The 50 best pieces of entrepreneurial advice you will ever hear
The 50 best pieces of entrepreneurial advice you will ever hear The 50 best pieces of entrepreneurial advice you will ever hear
The 50 best pieces of entrepreneurial advice you will ever hear WebAble Digital
 
6 Steps to SIP trunking security
6 Steps to SIP trunking security6 Steps to SIP trunking security
6 Steps to SIP trunking securityFlowroute
 
Case Study Musei Vaticani
Case Study Musei VaticaniCase Study Musei Vaticani
Case Study Musei Vaticaniit Consult
 
Edgar J Ortiz II Prubea Int. a la Ing. Civil
Edgar J Ortiz II Prubea Int. a la Ing. CivilEdgar J Ortiz II Prubea Int. a la Ing. Civil
Edgar J Ortiz II Prubea Int. a la Ing. CivilEdgar Ortiz
 
Presentazione -the postmodern explained to managers
  Presentazione -the postmodern explained to managers  Presentazione -the postmodern explained to managers
Presentazione -the postmodern explained to managersSamuele Molon
 
Cara membuat email dengan gmail
Cara membuat email dengan gmailCara membuat email dengan gmail
Cara membuat email dengan gmailJ-Min Jeo Fungsi X
 
Case study Scavolini
Case study ScavoliniCase study Scavolini
Case study Scavoliniit Consult
 

Destacado (20)

FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)
 
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
 
FreeNAS 10: Challenges of Building a Modern Storage Appliance based on FreeBS...
FreeNAS 10: Challenges of Building a Modern Storage Appliance based on FreeBS...FreeNAS 10: Challenges of Building a Modern Storage Appliance based on FreeBS...
FreeNAS 10: Challenges of Building a Modern Storage Appliance based on FreeBS...
 
History of ZFS (MeetBSD California 2016)
History of ZFS (MeetBSD California 2016)History of ZFS (MeetBSD California 2016)
History of ZFS (MeetBSD California 2016)
 
BayLISA - FreeNAS 10 by Jordan Hubbard
BayLISA - FreeNAS 10 by Jordan HubbardBayLISA - FreeNAS 10 by Jordan Hubbard
BayLISA - FreeNAS 10 by Jordan Hubbard
 
CDays14 - CPP05 - Standard Library: STL e boost, la BCL di C++
CDays14 - CPP05 - Standard Library: STL e boost, la BCL di C++CDays14 - CPP05 - Standard Library: STL e boost, la BCL di C++
CDays14 - CPP05 - Standard Library: STL e boost, la BCL di C++
 
Il sistema di gestione documentale e di gestione processi per Drive Service
Il sistema di gestione documentale e di gestione processi per Drive ServiceIl sistema di gestione documentale e di gestione processi per Drive Service
Il sistema di gestione documentale e di gestione processi per Drive Service
 
Presentation chief minister part ii
Presentation chief minister part iiPresentation chief minister part ii
Presentation chief minister part ii
 
Create Brand Evangelists with CNAM
Create Brand Evangelists with CNAMCreate Brand Evangelists with CNAM
Create Brand Evangelists with CNAM
 
02 Modern Customer Service Infographic
02 Modern Customer Service Infographic02 Modern Customer Service Infographic
02 Modern Customer Service Infographic
 
The 50 best pieces of entrepreneurial advice you will ever hear
The 50 best pieces of entrepreneurial advice you will ever hear The 50 best pieces of entrepreneurial advice you will ever hear
The 50 best pieces of entrepreneurial advice you will ever hear
 
Fitria utami redhat
Fitria utami redhatFitria utami redhat
Fitria utami redhat
 
6 Steps to SIP trunking security
6 Steps to SIP trunking security6 Steps to SIP trunking security
6 Steps to SIP trunking security
 
Case Study Musei Vaticani
Case Study Musei VaticaniCase Study Musei Vaticani
Case Study Musei Vaticani
 
Staying on Target
Staying on TargetStaying on Target
Staying on Target
 
March 2015
March 2015March 2015
March 2015
 
Edgar J Ortiz II Prubea Int. a la Ing. Civil
Edgar J Ortiz II Prubea Int. a la Ing. CivilEdgar J Ortiz II Prubea Int. a la Ing. Civil
Edgar J Ortiz II Prubea Int. a la Ing. Civil
 
Presentazione -the postmodern explained to managers
  Presentazione -the postmodern explained to managers  Presentazione -the postmodern explained to managers
Presentazione -the postmodern explained to managers
 
Cara membuat email dengan gmail
Cara membuat email dengan gmailCara membuat email dengan gmail
Cara membuat email dengan gmail
 
Case study Scavolini
Case study ScavoliniCase study Scavolini
Case study Scavolini
 

Similar a NeXTBSD aka FreeBSD X

Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Vivian Vhaves
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Linux internal
Linux internalLinux internal
Linux internalmcganesh
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPrashant Rane
 
Driver Programming Report
Driver Programming ReportDriver Programming Report
Driver Programming ReportShivek Khurana
 
Introduction to linux containers
Introduction to linux containersIntroduction to linux containers
Introduction to linux containersGoogle
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating SystemSharad Pandey
 
OpenNebulaConf2017EU: Hyper converged infrastructure with OpenNebula and Ceph...
OpenNebulaConf2017EU: Hyper converged infrastructure with OpenNebula and Ceph...OpenNebulaConf2017EU: Hyper converged infrastructure with OpenNebula and Ceph...
OpenNebulaConf2017EU: Hyper converged infrastructure with OpenNebula and Ceph...OpenNebula Project
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2mona_hakmy
 
Operating System 4
Operating System 4Operating System 4
Operating System 4tech2click
 
Processes and Threads in Windows Vista
Processes and Threads in Windows VistaProcesses and Threads in Windows Vista
Processes and Threads in Windows VistaTrinh Phuc Tho
 
Operating Systems 1 (5/12) - Architectures (Unix)
Operating Systems 1 (5/12) - Architectures (Unix)Operating Systems 1 (5/12) - Architectures (Unix)
Operating Systems 1 (5/12) - Architectures (Unix)Peter Tröger
 

Similar a NeXTBSD aka FreeBSD X (20)

Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Linux internal
Linux internalLinux internal
Linux internal
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
ubantu ppt.pptx
ubantu ppt.pptxubantu ppt.pptx
ubantu ppt.pptx
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
 
Ubuntu OS Presentation
Ubuntu OS PresentationUbuntu OS Presentation
Ubuntu OS Presentation
 
Driver Programming Report
Driver Programming ReportDriver Programming Report
Driver Programming Report
 
Introduction to linux containers
Introduction to linux containersIntroduction to linux containers
Introduction to linux containers
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
olibc: Another C Library optimized for Embedded Linux
olibc: Another C Library optimized for Embedded Linuxolibc: Another C Library optimized for Embedded Linux
olibc: Another C Library optimized for Embedded Linux
 
Chapter 6 os
Chapter 6 osChapter 6 os
Chapter 6 os
 
OpenNebulaConf2017EU: Hyper converged infrastructure with OpenNebula and Ceph...
OpenNebulaConf2017EU: Hyper converged infrastructure with OpenNebula and Ceph...OpenNebulaConf2017EU: Hyper converged infrastructure with OpenNebula and Ceph...
OpenNebulaConf2017EU: Hyper converged infrastructure with OpenNebula and Ceph...
 
Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2Operating System 4 1193308760782240 2
Operating System 4 1193308760782240 2
 
Operating System 4
Operating System 4Operating System 4
Operating System 4
 
Processes and Threads in Windows Vista
Processes and Threads in Windows VistaProcesses and Threads in Windows Vista
Processes and Threads in Windows Vista
 
Operating Systems 1 (5/12) - Architectures (Unix)
Operating Systems 1 (5/12) - Architectures (Unix)Operating Systems 1 (5/12) - Architectures (Unix)
Operating Systems 1 (5/12) - Architectures (Unix)
 
Studies
StudiesStudies
Studies
 
Libra Library OS
Libra Library OSLibra Library OS
Libra Library OS
 
Bglrsession4
Bglrsession4Bglrsession4
Bglrsession4
 

Más de iXsystems

The True Story of FreeNAS
The True Story of FreeNASThe True Story of FreeNAS
The True Story of FreeNASiXsystems
 
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)iXsystems
 
Netflix Update (MeetBSD California 2014 Lightning Talk)
Netflix Update (MeetBSD California 2014 Lightning Talk)Netflix Update (MeetBSD California 2014 Lightning Talk)
Netflix Update (MeetBSD California 2014 Lightning Talk)iXsystems
 
600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)
600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)
600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)iXsystems
 
PBI v10: Application Management Made Easy by Ken Moore
PBI v10: Application Management Made Easy by Ken MoorePBI v10: Application Management Made Easy by Ken Moore
PBI v10: Application Management Made Easy by Ken MooreiXsystems
 
Introduction to FreeNAS development by John Hixson
Introduction to FreeNAS development by John HixsonIntroduction to FreeNAS development by John Hixson
Introduction to FreeNAS development by John HixsoniXsystems
 
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...iXsystems
 

Más de iXsystems (7)

The True Story of FreeNAS
The True Story of FreeNASThe True Story of FreeNAS
The True Story of FreeNAS
 
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)UCL All of the Things (MeetBSD California 2014 Lightning Talk)
UCL All of the Things (MeetBSD California 2014 Lightning Talk)
 
Netflix Update (MeetBSD California 2014 Lightning Talk)
Netflix Update (MeetBSD California 2014 Lightning Talk)Netflix Update (MeetBSD California 2014 Lightning Talk)
Netflix Update (MeetBSD California 2014 Lightning Talk)
 
600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)
600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)
600M+ Unsuspecting FreeBSD Users (MeetBSD California 2014)
 
PBI v10: Application Management Made Easy by Ken Moore
PBI v10: Application Management Made Easy by Ken MoorePBI v10: Application Management Made Easy by Ken Moore
PBI v10: Application Management Made Easy by Ken Moore
 
Introduction to FreeNAS development by John Hixson
Introduction to FreeNAS development by John HixsonIntroduction to FreeNAS development by John Hixson
Introduction to FreeNAS development by John Hixson
 
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
 

Último

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 

Último (20)

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 

NeXTBSD aka FreeBSD X

  • 2. Basic Architecture FreeBSD-current kernel + Mach IPC Common Object Runtime (create/delete/retain/release) Libdispatch / ASL / Libnotify launchd launchctl legacy rc system cooperating daemons json config files
  • 3. Basic Architecture FreeBSD-current kernel + Mach IPC Common Object Runtime (create/delete/retain/release) Libdispatch / ASL / Libnotify launchd launchctl legacy rc system cooperating daemons json config files
  • 4. Introduction to Mach IPC A Sympathetic Glance
  • 5. Mach Kernel Abstractions • Tasks. The units of resource ownership; each task consists of a virtual address space, a port right namespace, and one or more threads. (Implemented as an extension to a process.) • Threads. The units of CPU execution within a task. Simple extension to kthreads. • Address space. In conjunction with memory managers, Mach implements the notion of a sparse virtual address space and shared memory. (No modifications) • Memory objects. The internal units of memory management. Memory objects include named entries and regions; they are representations of potentially persistent data that may be mapped into address spaces. (Unsupported) • Ports. Secure, simplex communication channels, accessible only via send and receive capabilities (known as port rights). • IPC. Message queues, remote procedure calls, notifications, semaphores, and lock sets. (Mach semaphores and lock sets are not supported). • Time. Clocks, timers, and waiting - (rudimentary shims).
  • 6. What is a port? • A port is an endpoint of a unidirectional communication channel between a client who requests a service and a server who provides the service. • If a reply is to be provided to such a service request, a second port must be used. • Tasks have permissions to access ports in certain ways (send, receive, send-once); these are called port rights. • A port can be accessed only via a right. (Akin to a file descriptor). • Port rights can be copied and moved between tasks via IPC. Doing so, in effect, passes capabilities to some object or server. • Ports and port rights do not have systemwide names that allow arbitrary ports or rights to be manipulated directly. • Ports can be manipulated by a task only if the task has a port right in its port namespace. • A port right is specified by a port name, an integer index into a 32-bit port namespace. Each task has associated with it a single port namespace.
  • 7. What can Mach ports do that Unix domain sockets can’t? • Separate namespace for services (doesn’t rely on file system naming or permissions) • Message boundaries • Kernel as peer • Pre-existing well defined RPC interface • Receive messages directly in call to kevent() • OOL (out of line) messages (arbitrarily sized with zero copy for large messages) • Port send rights - can only send to a port for which the process has explicitly received the right to send • Provenance - Yes, PROVENANCE, receiver can have the kernel append an audit trailer containing full set of credentials of sender
  • 8. Basic Architecture FreeBSD-current kernel + Mach IPC Common Object Runtime (create/delete/retain/release) Libdispatch / ASL / Libnotify launchd launchctl legacy rc system cooperating daemons json config files
  • 9. Common Runtime Benefits • Internal objects in multi-threaded world to share some common semantics (retain / release) • Examples: dispatch_object_t, asl_object_t, xpc_object_t, etc • Provides a rendezvous point for higher-level languages like ObjC and C++ (which also have objects they would like to share across language boundaries) • One reason why “this stuff can’t just be in ports”
  • 10. Basic Architecture FreeBSD-current kernel + Mach IPC Common Object Runtime (create/delete/retain/release) Libdispatch / ASL / Libnotify launchd launchctl legacy rc system cooperating daemons json config files
  • 11. • An intelligent thread pool (with optional cooperative thread resource management between multiple tasks) • Task-parallelism made easy: Everything is a queue, and queues can be arbitrarily nested • Used by many other parts of the system (ASL, notify, etc) and provides “common runloop for unix processes” (this is actually a really big deal) • Apache licensed and highly portable (Linux, BSD, Windows, etc) Libdispatch: What the hell is it?
  • 12. • All objects use common runtime (so retain/release controls object lifetimes and thread safety) • Queues, sources, semaphores and groups provide basic building blocks • Data objects provide higher-level memory management semantics for allocating / passing and managing data between processes • Way too much functionality to go into here; many tutorials on the net, many thousands of OS X / iOS apps using it Libdispatch: Types of functionality
  • 13. • Structured Log Output: Everything is a key/value pair, and highly extensible • Supports multi-threaded logging out of the box • Unifies character encoding (UTF-8 everywhere), event sources and post-processing plug-ins, etc. etc. • Can be used as a building-block for telemetry and higher-level logging / debugging needs ASL: What the hell is it?
  • 14. • Global asynchronous event management system (publish / subscribe) • Supports many different “notification delivery” methods (fds, mach ipc, signals, shared memory) • Cooperates nicely with libdispatch (events can cause automatic enqueuing of handler blocks/functions on queues) • Very useful for light-weight cache invalidation Libnotify: What the hell is it?
  • 15. Basic Architecture FreeBSD-current kernel + Mach IPC Common Object Runtime (create/delete/retain/release) Libdispatch / ASL / Libnotify launchd launchctl legacy rc system cooperating daemons json config files
  • 16. • A merger of init, mach_init (which FreeBSD never had), [x]inetd, cron, and rc/rc.d • Provides a clear chain of custody for all processes and a single point of control for security policy implementation and debugging • Handles dependencies implicitly through communication requests / events (both HW and SW) • Provides per system / session / application service management for XPC (when present) Launchd: What the hell is it?
  • 17. • Launchd speaks XML fluently (and will force you to as well) • Launchd’s implementation is really complicated • Launchd clubs UNIX’s “keep it simple” philosophy like a baby harp seal Launchd: Popular Myths Hint: The world has changed!
  • 18. Resources & Next Steps • https://github.com/kmacy/NextBSD • Fork of FreeBSD -current with all this stuff added. Builds under FreeBSD 10.1 or later. • Nightly builds coming soon, but for now http://www.optimcloud.com/disc1.iso is installable image • Merging HardenedBSD work as well
  • 19. Q&A