SGG 3

This is an key chapter and you should read it from beginning to end. I’ll try to highlight some of the most important points you should be learning from it.

3.1 Process concept

  • You should be able to define what a process is.
  • While the OS is executing a process, it takes a certain “footprint” in memory: you should be able to explain the four sections (or loosely speaking, “segments”) of memory that exist for each process.
  • A process changes states, as it executes. You should have a solid understand of what each of the possible states are and explain what makes a process transition from one state to another.
  • What is a process control block, why does the OS need it, how is it used?

3.2 Process scheduling

  • What is the role of a scheduler? In what circumstance(s) should an OS have a scheduler?
  • What is the difference between scheduler and dispatcher?
  • Some processes can be CPU-bound others I/O-bound. How might you be able to distinguish them? Why should the OS care about the type of processes it runs?
  • When do context switches happen? What happens during a context switch?

3.3 Operations on processes

  • How is a Unix process created or terminated? In terms of bookkeeping, what does the system need to at process creation and process termination?
  • Learn to work with fork(2)exit(3)exec(3), wait(2), waitpid(2).
  • What happens to the memory footprint of a process when fork() is invoked? Which memory structures might be shared between a parent and a child process?
  • Describe the information that Unix can give you upon the invocation of commands ps and pstree.
  • What are the differences between fork(2) and exec(3)?
  •  What is a zombie process?

3.4 Interprocess communication

  • Compare shared-memory to message passing. What the most important conceptual differences?
  • Learn to work with pipe(2).
  • Take a look at Stevens/Rago 15.1, 15.2, 15.4, 15.5. Working through this material will make you very well prepared for lab. Very.
  • IPC systems can be categorized by characteristics such as naming, synchronization, and buffering. Compare the design options for each of these from the perspective of ease of use in writing programs.

3.7 Examples of IPC systems

This section has interesting examples and provides source code to illustrate practice. I would read it, but without stressing out about the material, with one exception: 3.7.4 Pipes.

3.7.4 Pipes

Definitely go through this carefully. It is a substantial part of Lab 2.

3.8 Communication in Client-Server Systems

3.8.1 Sockets

This is really cool material. For now, it is sufficient to understand the conceptual similarities and differences between pipes and TCP sockets. Later on, we will study TCP sockets in detail for a future lab assignment.

3.8.2 Remote procedure calls

Read carefully. This is an interesting IPC paradigm that introduces some heavy challenges, but which can make the programmer’s life incredibly easier.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.