Review for Quiz 2 of COMP 310

Review for Quiz 2 of COMP 310 - Review for Quiz 2 1 Chapter...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Review for Quiz 2: 1. Chapter 3: Processes Starting from slide 3.37 inter-process communication mailbox sharing solutions link: only two processes? only one process can execute receive operation at a time? round-robin scheme - sender throws it out randomly, some receiver gets it, sender gets notified as to who message passing: blocking or not, on part of sender or receiver queue of messages attached to link zero capacity: sender waits for receiver (rendez-vous) bounded (finite) capacity: sender waits if queue full unbounded (infinite) capacity: sender never waits, is this even possible? Examples POSIX shared memory process creates shared memory segment, returns an ID processes wanting access to that segment must attach to it by ID (call returns pointer) can write to that memory segment (using the pointer) can detach it from its address space when done Mach: message-based (everything! even system calls) all tasks are created with 2 mailboxes (which are created with port_allocate(): kernel, and notify three system calls: msg_send, msg_receive, msg_rpc (remote procedure call, to execute something elsewhere) Windows XP: message-based using "local procedure call" (can only be used by local processes) communication channels established using ports (sort of like mailboxes) client opens handle to subsystem's connection port, sends a connect request server creates two private communication ports, sends one to client, keeps the other one corresponding ports are used by server and client to send/receive messages INSERT DIAGRAM LATER client-server communication sockets (endpoints for communication) IP address + port different services listen on different ports, e.g. ssh on 22, typical web servers on 80, etc
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
remote-procedure calls allows clients to invoke a procedure on a remote host as if it were local client-side stub locates server, marshalls parameters, sends them over (underlying details abstracted) server-side stub receives messages, unmarshalls parameters, performs procedure INSERT DIAGRAM LATER (or describe it at least) remote method invocation (java only) java program on one machine can call a method on a remote java object basically the same as RMI except there are objects involved THERE IS A DIAGRAM HERE. it doesn't really say much though. look it over anyway 2. Chapter 4: Threads Thread: unit of CPU utilisation, forms basis of multithreaded computers things unique to each thread: thread ID, program counter, register set, stack things threads from the same process share: code, data (statically-created variables), OS resources (open files, signals) single-threaded process: code + data + files, then registers + stack multi-threaded: code + data + files, then each thread gets its own registers and stack Benefits of threading
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern