Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:31 UTC Jan Schaumann Jan Schaumann

    Advanced #Programming in the #UNIX Environment

    Week 8, Pipes and FIFOs

    With this video lecture, we continue our discussion of Interprocess Communication and dive into two of the oldest and most ubiquitous forms of Unix #IPC: pipes (the basis of the Unix Philosophy) and FIFOs. We also discuss popen(3) and the dangers of shelling out to unverified commands.

    https://youtu.be/mq5G33Sbc_o

    #apue

    In conversation about 6 months ago from mstdn.social permalink

    Attachments


    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:19 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 12, syslogd(8)

      This week we are covering a number of small, miscellaneous topics. We start with a look at the standard Unix central logging facility, syslogd(8), illustrated below, and the syslog(3) library function. We show examples of system logs and how to separate messages by priority and level.

      https://youtu.be/YfdAJ8rhG-I

      #apue

      In conversation about 6 months ago permalink

      Attachments


    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:20 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Additional reading relating to shared libraries and ELF:

      Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification:
      https://refspecs.linuxbase.org/elf/elf.pdf

      How to write shared libraries:
      https://www.akkadia.org/drepper/dsohowto.pdf

      Ian Lance Taylor's 20 part linker posts:
      https://lwn.net/Articles/276782/

      #apue

      In conversation about 6 months ago permalink

      Attachments



      1. A ToC of the 20 part linker essay [LWN.net]
      jartigag repeated this.
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:21 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 11, Shared Libraries

      In this video, we cover shared libraries themselves. We'll discuss just what exactly a shared library is, how you create one, and how we can influence the behavior of dynamically linked executables due to the way the link-editor works by, e.g., setting the LD_LIBRARY_PATH variable or using the "-rpath" flag for the linker.

      https://youtu.be/eloJO0ssrfc

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:22 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 11, The Executable and Linkable Format

      We begin our exploration of shared libraries. We start with a look at the Executable and Linkable Format (#ELF) for binary files such as executables, object files, core files and shared libraries. We'll use the hexdump(1) and readelf(1) utilities to better understand the format.

      https://youtu.be/i1UDF05iZPU

      #apue

      In conversation about 6 months ago permalink

      Attachments


      1. https://media.mstdn.social/media_attachments/files/113/471/280/601/945/887/original/f8b28ab131517d1a.png

      2. https://media.mstdn.social/media_attachments/files/113/471/288/657/695/733/original/81ed8717dbb7b223.png
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:22 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 11, Of Linkers and Loaders

      Building on top of what we discussed in Week 5 in the context of the compiler chain, we take a look at how a relocatable object file is turned into an executable by the dynamic linker (ld) and how an executable is loaded into memory by the run-time link-editor (ld.so or ld.elf_so).

      https://youtu.be/8KWuz7gLycc

      #apue

      In conversation about 6 months ago permalink

      Attachments


      1. https://media.mstdn.social/media_attachments/files/113/482/486/510/675/618/original/d1b6f9af35a52956.png

      2. https://media.mstdn.social/media_attachments/files/113/482/488/268/493/488/original/65d2dc9e505d800e.png
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:23 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 10, Daemon processes

      We take a quick look at processes intended to run continuously and in the background: daemon processes. We'll also brush upon system start scripts and daemon/service conventions.

      https://youtu.be/YbYQqVMv7b8

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:25 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Side-quest: IPC Buffer Sizes

      In our discussion of IPC, we noticed that each form must use some sort of buffer. But what is the actual size of those buffers? Is it the same across #NetBSD, #Linux, #FreeBSD and other Unix versions?

      https://www.netmeister.org/blog/ipcbufs.html

      #apue

      In conversation about 6 months ago permalink
      jartigag repeated this.
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:26 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 9, I/O Multiplexing using select(2)

      We complete our discussion of interprocess communication and move from one-to-one communications towards a more typical client-server model with a server side process capable of handling multiple simultaneous clients. We accomplish this by using the select(2) syscall to handle synchronous I/O multiplexing.

      https://youtu.be/Y5PiHboUctw

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:26 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      The #NetBSD operating system comes with a number of historical Unix research papers found in /usr/share/doc: Marshall Kirk McKusick on the Fast File System, Robert Morris and Ken Thompson on Password Security, a shell tutorial by Stephen R. Bourne, a guide to using vi(1) by Bill Joy, and the well known BSD IPC tutorials (linked below) that we used in our last videos!

      https://stevens.netmeister.org/631/ipc.pdf
      https://stevens.netmeister.org/631/ipctut.pdf

      https://youtu.be/XqhOUqi4fc0

      #apue

      In conversation about 6 months ago permalink

      Attachments


    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:27 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 9, socket(PF_INET6, SOCK_STREAM, 0)

      In this video, we demonstrate the use of STREAM sockets in the INET6 domain, meaning we'll use TCP to establish a sequenced, reliable, two-way byte stream over an #IPv6 network. We use our good friend #tcpdump to inspect the packets on the wire, observing the TCP three-way handshake, data being pushed, the connection tear down or reset (RST) packets from the server.

      https://youtu.be/qKMXw76Dk1o

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:28 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 9, socket(PF_INET, SOCK_DGRAM, 0)

      In this video lecture, we show how to communicate between hosts across the internet using datagram sockets in the PF_INET domain (i.e., #UDP). We also observe the packets as they are sent by using the #tcpdump utility.

      https://youtu.be/MMQ50PADnrY

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:29 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 9, socket(PF_LOCAL, SOCK_DGRAM, 0)

      In this segment, we introduce the #sockets API by an example of datagram connections in the PF_LOCAL (formerly AF_UNIX) domain.

      These “Unix domain sockets” appear in the filesystem (S_ISSOCK), but serve only as rendezvous point. I/O can be done using read(2)/write(2) or recv(2)/send(2).

      https://youtu.be/7LoLt49oB9A

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:30 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 9, socketpair(2)

      We continue our discussion of IPC with a look at the socketpair(2) system call and compare its functionality with that of the pipe(2) call. We also introduce the concept of sockets, domains, and protocols.

      https://youtu.be/w6Au54pVt-8

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:58 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 13, POSIX.1e ACLs

      In this week, we look at the various ways in which processes can be restricted from impacting one another, beginning with methods we've already discussed to some degree (e.g., unix file access semantics, resource limits) and ultimately leading up to #containers.

      In the first video, we show how POSIX.1e Access Control Lists (ACLs) can be used for more fine-grained file system access control.

      https://youtu.be/lCACl3NE058

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:58:59 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Coding mistakes using strncat(3) are common - better: use strlcat(3).

      https://www.netmeister.org/blog/strlcat.html

      #apue

      In conversation about 6 months ago permalink
      jartigag repeated this.
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:59:00 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 12, Asynchronous and Memory Mapped I/O

      We conclude our series on a set of mixed advanced I/O topics with a quick summary of asynchronous (aio(7)) and memory mapped I/O (mmap(2)).

      https://youtu.be/_R_t0d5BzEk

      #apue

      In conversation about 6 months ago permalink
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:59:01 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 12, Resource Locking

      In this video lecture, we discuss "advisory" resource- and record locking between cooperating processes using flock(2), lockf(3), and fcntl(2).

      (We will look at many other methods of restricting (non-cooperating) processes in more general terms in the next week.)

      https://youtu.be/017DtsMRHjg

      #apue

      In conversation about 6 months ago permalink

      Attachments

      1. Advanced Programming in the UNIX Environment: Week 12, Segment 3 - Resource Locking
        from cs631apue
        In this video lecture, we discuss resource- and record locking using flock(2), lockf(3), and fcntl(2).Slides for this lecture: https://stevens.netmeister.org...
    • Jan Schaumann (jschauma@mstdn.social)'s status on Tuesday, 26-Nov-2024 15:59:02 UTC Jan Schaumann Jan Schaumann
      in reply to

      Advanced #Programming in the #UNIX Environment

      Week 12, Non-blocking I/O

      In this video lecture, we briefly cover non-blocking I/O, whereby a system call that would normally block, waiting for I/O, returns immediately with an errno of EAGAIN or EWOULDBLOCK. This reaches back into some previous lectures, such as Week 7's discussion of interrupted and reentrant functions.

      https://youtu.be/_hOLO_27L7U

      #apue

      In conversation about 6 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.