SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Scaling FreeSWITCH Performance
Scaling FreeSWITCH PerformanceScaling FreeSWITCH Performance
Scaling FreeSWITCH PerformanceMoises Silva
 
MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)JuHwan Lee
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingMichelle Holley
 
FreeBSD and Drivers
FreeBSD and DriversFreeBSD and Drivers
FreeBSD and DriversKernel TLV
 
Brkarc 3470 - cisco nexus 7000-7700 switch architecture (2016 las vegas) - 2 ...
Brkarc 3470 - cisco nexus 7000-7700 switch architecture (2016 las vegas) - 2 ...Brkarc 3470 - cisco nexus 7000-7700 switch architecture (2016 las vegas) - 2 ...
Brkarc 3470 - cisco nexus 7000-7700 switch architecture (2016 las vegas) - 2 ...kds850
 
FD.io VPP事始め
FD.io VPP事始めFD.io VPP事始め
FD.io VPP事始めtetsusat
 
OpenStack with SR-IOV
OpenStack with SR-IOVOpenStack with SR-IOV
OpenStack with SR-IOVHideki Saito
 
ELF(executable and linkable format)
ELF(executable and linkable format)ELF(executable and linkable format)
ELF(executable and linkable format)Seungha Son
 
Demystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the HostDemystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the HostCumulus Networks
 
Open Source MANO(OSM)
Open Source MANO(OSM)Open Source MANO(OSM)
Open Source MANO(OSM)Eggy Cheng
 
IMS Core Elements
IMS Core ElementsIMS Core Elements
IMS Core ElementsKent Loh
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practicalMoabi.com
 
5G Network Slicing Using Mininet
5G Network Slicing Using Mininet5G Network Slicing Using Mininet
5G Network Slicing Using MininetMohammed Abuibaid
 
Brkarc 3454 - in-depth and personal with the cisco nexus 2000 fabric extender...
Brkarc 3454 - in-depth and personal with the cisco nexus 2000 fabric extender...Brkarc 3454 - in-depth and personal with the cisco nexus 2000 fabric extender...
Brkarc 3454 - in-depth and personal with the cisco nexus 2000 fabric extender...kds850
 

Tendances (20)

Scaling FreeSWITCH Performance
Scaling FreeSWITCH PerformanceScaling FreeSWITCH Performance
Scaling FreeSWITCH Performance
 
MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)
 
DPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet ProcessingDPDK: Multi Architecture High Performance Packet Processing
DPDK: Multi Architecture High Performance Packet Processing
 
FreeBSD and Drivers
FreeBSD and DriversFreeBSD and Drivers
FreeBSD and Drivers
 
Brkarc 3470 - cisco nexus 7000-7700 switch architecture (2016 las vegas) - 2 ...
Brkarc 3470 - cisco nexus 7000-7700 switch architecture (2016 las vegas) - 2 ...Brkarc 3470 - cisco nexus 7000-7700 switch architecture (2016 las vegas) - 2 ...
Brkarc 3470 - cisco nexus 7000-7700 switch architecture (2016 las vegas) - 2 ...
 
FD.io VPP事始め
FD.io VPP事始めFD.io VPP事始め
FD.io VPP事始め
 
第31回「今アツい、分散ストレージを語ろう」(2013/11/28 on しすなま!)
第31回「今アツい、分散ストレージを語ろう」(2013/11/28 on しすなま!)第31回「今アツい、分散ストレージを語ろう」(2013/11/28 on しすなま!)
第31回「今アツい、分散ストレージを語ろう」(2013/11/28 on しすなま!)
 
Userspace networking
Userspace networkingUserspace networking
Userspace networking
 
OpenStack with SR-IOV
OpenStack with SR-IOVOpenStack with SR-IOV
OpenStack with SR-IOV
 
ELF(executable and linkable format)
ELF(executable and linkable format)ELF(executable and linkable format)
ELF(executable and linkable format)
 
Asamatrx
AsamatrxAsamatrx
Asamatrx
 
Openflow実験
Openflow実験Openflow実験
Openflow実験
 
Demystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the HostDemystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the Host
 
Bgp
BgpBgp
Bgp
 
Open Source MANO(OSM)
Open Source MANO(OSM)Open Source MANO(OSM)
Open Source MANO(OSM)
 
IMS Core Elements
IMS Core ElementsIMS Core Elements
IMS Core Elements
 
[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical[Defcon] Hardware backdooring is practical
[Defcon] Hardware backdooring is practical
 
5G Network Slicing Using Mininet
5G Network Slicing Using Mininet5G Network Slicing Using Mininet
5G Network Slicing Using Mininet
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
Brkarc 3454 - in-depth and personal with the cisco nexus 2000 fabric extender...
Brkarc 3454 - in-depth and personal with the cisco nexus 2000 fabric extender...Brkarc 3454 - in-depth and personal with the cisco nexus 2000 fabric extender...
Brkarc 3454 - in-depth and personal with the cisco nexus 2000 fabric extender...
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus 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
 

Plus 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...
 

Dernier

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
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
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
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
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 

Dernier (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
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
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.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...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
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
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 

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