03 05 Processes Part 5 — Transcript
Full transcript
- 0:08[Music]
- 0:20next would be synchronization
- 0:23okay
- 0:24so synchronization either the sending or
- 0:26receiving of messages or neither or both
- 0:30me either blocking or not blocking
- 0:34okay
- 0:37next so
- 0:39the producer consumer message passing
- 0:42okay
- 0:43so what do we have here the producer
- 0:46produce an item
- 0:48in the next produced
- 0:50and then send next produced on the
- 0:52consumer side
- 0:54okay so while true same thing with that
- 0:56of the producer receive
- 0:59next consumed
- 1:00okay
- 1:02and then of course they consume the item
- 1:04in the next consume
- 1:07okay so that's the implementation of
- 1:09pesos passing
- 1:11on
- 1:13that problem
- 1:15okay
- 1:16so next would be buffering
- 1:18okay so queue up messages attached to
- 1:20the link
- 1:21implemented in one of three ways so
- 1:23you've got the zero
- 1:24capacity bounded capacity
- 1:27and unbounded capacity
- 1:31okay so with a zero capacity messages
- 1:34cannot be stored in the queue or senders
- 1:37must block until receivers accept the
- 1:39message
- 1:41okay
- 1:42or the bounded capacity there is a
- 1:44certain predetermined
- 1:46infinite capacity in the queue
- 1:50senders must block if the queue is full
- 1:52until the space becomes available in the
- 1:55in the queue
- 1:57but maybe either blocking or
- 1:58non-blocking otherwise
- 2:01okay so unbounded capacity the queue has
- 2:04a theoretical infinite capacity so
- 2:06senders can never force to block
- 2:10okay
- 2:14next
- 2:15so
- 2:16we have here an example of inter process
- 2:18communications in unix okay
- 2:21so the posix
- 2:24so for the implementation of the shared
- 2:26memory the the process first creates a
- 2:29shared memory segment
- 2:30also used to open an existing segment
- 2:33and then set the size of the object okay
- 2:37so we use
- 2:38uh mnap
- 2:40to memory map okay so a file pointer to
- 2:43a shared memory object so reading and
- 2:45writing to shared memory is done
- 2:48by using the pointer returned memory map
- 2:50or map
- 2:52okay
- 2:53so this is the
- 2:56complete program implementing the shared
- 2:58memory and opposing systems
- 3:02okay
- 3:06this is the continuation
- 3:08earlier this is the posix implementation
- 3:11on the producer
- 3:12and the posix implementation on the
- 3:14consumer
- 3:16okay
- 3:17now how about on other operating systems
- 3:19like mac
- 3:21okay
- 3:23so mac communication is message based
- 3:27so even system calls are messages
- 3:31each task gets two ports at creation so
- 3:35get kernel and notify
- 3:37okay
- 3:38so the kernel sends notification of
- 3:40events to the notify mail box
- 3:43three system calls are used for message
- 3:45transfer you've got message send
- 3:48sends a message to a mailbox
- 3:50message received receives a message
- 3:53and
- 3:54message rpc
- 3:56sends a message and waits for exactly
- 3:58one message and response from the sender
- 4:01so the port allocate
- 4:03creates a new mailbox an associated
- 4:06queue for holding messages so the
- 4:08default size is eight
- 4:11all right
- 4:15next
- 4:17only one task at a time can own or
- 4:20receive message from any given mailbox
- 4:23but this are transferable so messages
- 4:27from the same sender
- 4:30to the same receiver are guaranteed to
- 4:32arrive in the first in first off order
- 4:35but no guarantees are made regarding
- 4:38messages from multiple senders
- 4:40okay
- 4:41so messages consists of a fixed length
- 4:45header followed by a variable length
- 4:47data
- 4:48the header contains mailbox number
- 4:51okay
- 4:52or just the address of the receiver and
- 4:55the sender
- 4:56so the section or data section consists
- 4:58of a list of type data items
- 5:01it's containing a type
- 5:04size and value
- 5:06okay
- 5:08now here's the implementation of message
- 5:11passing on the client okay client code
- 5:14on mac
- 5:16okay so if the receiver's mailbox is
- 5:18full the sender has four choices
- 5:20okay
- 5:21so wait indefinitely until there is a
- 5:23room
- 5:24in the mailbox
- 5:26wait at most 10 milliseconds
- 5:29okay so or do not wait at all
- 5:32okay
- 5:33so temporarily
- 5:35cache the message with the kernel for
- 5:37delivery when the mailbox becomes
- 5:39available
- 5:40so only one such message can be pending
- 5:42at any given time
- 5:44from any given sender to any given
- 5:46receiver so normally
- 5:49only used by certain system tasks such
- 5:52as the prince pooler
- 5:53which must notify the client
- 5:56for the completion of their job
- 5:58but cannot wait around for the mailbox
- 6:01to become available
- 6:03okay so we have a lot of technical terms
- 6:07and technical discussions here
- 6:09okay
- 6:11next
- 6:13so receive calls must specify the
- 6:16mailbox
- 6:17or mailbox set from which they wish to
- 6:20receive message
- 6:22okay
- 6:23so port status
- 6:25okay so the purge status reports the
- 6:28number of messages waiting at any given
- 6:30mailbox so if there are no messages
- 6:32available in the mailbox so we're using
- 6:34sept
- 6:35the receiver can either block for n
- 6:38milliseconds
- 6:39or not block at all so in order to avoid
- 6:41delays caused by capping messages
- 6:44multiple times
- 6:45okay mac remaps the memory space
- 6:49for the message from the sender address
- 6:51space to the receiver's address space
- 6:54so using virtual memory techniques
- 6:56to be covered
- 6:58on the next chapter that we have
- 7:00okay so it does not actually move the
- 7:02message
- 7:04anywhere at all so when the sending and
- 7:06receiving tasks are both on the same
- 7:09computer
- 7:10okay
- 7:12so that's the implementation for mac how
- 7:14about implementation for windows
- 7:17okay
- 7:19so for windows
- 7:20message passing centric via advanced
- 7:23local procedures call or the lpc
- 7:25facility
- 7:26okay it only works between processes on
- 7:30the same system
- 7:34okay
- 7:35so
- 7:35it uses ports
- 7:37like mailbox
- 7:39supports here
- 7:41pertains to the socket okay socket or
- 7:45communication socket okay so in other
- 7:48operating systems that we discussed they
- 7:50call it mailboxes to establish and
- 7:52maintain communication channels
- 7:55all right so communication works as
- 7:57follows so the client open a handle to
- 8:00subsystems connection port object
- 8:02the client sends a connection request
- 8:04the server creates two private
- 8:07communication ports and returns the
- 8:08handle to one of the client
- 8:12so the client and server use a
- 8:15corresponding port handle to send
- 8:17message or callbacks and to listen for
- 8:20replies
- 8:22okay
- 8:23now in here
- 8:25we have the local procedure calls in
- 8:27windows
- 8:28okay
- 8:29so if you will observe here
- 8:31it establishes connections from the
- 8:33client going to the server
- 8:36okay so and it uses
- 8:39a different procedure calls to do the
- 8:41tasks
- 8:43all right
- 8:54[Music]
- 9:01you
About this transcript
This page contains the full transcript of 03 05 Processes Part 5 by Santelmo, generated from the public captions YouTube serves with the video. The transcript has 997 words across 225 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.