Homework Assignment #1 J. H. Wang Oct. 2, 2015.

Slides:



Advertisements
Similar presentations
3.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Process An operating system executes a variety of programs: Batch system.
Advertisements

IPC (Interprocess Communication)
Lab 9 CIS 370 Umass Dartmouth.  A pipe is typically used as a one-way communications channel which couples one related process to another.  UNIX deals.
1 CMSC421: Principles of Operating Systems Nilanjan Banerjee Principles of Operating Systems Assistant Professor, University of Maryland Baltimore County.
Chap 4 Multithreaded Programming. Thread A thread is a basic unit of CPU utilization It comprises a thread ID, a program counter, a register set and a.
Zhang Hongyi CSCI2100B Data Structures Tutorial 2
Lesson 10-Controlling User Processes. Overview Managing and processing processes. Managing jobs. Exiting/quitting when jobs have been stopped.
Day 10 Threads. Threads and Processes  Process is seen as two entities Unit of resource allocation (process or task) Unit of dispatch or scheduling (thread.
1 Processes and Pipes COS 217 Professor Jennifer Rexford.
Processes CSCI 444/544 Operating Systems Fall 2008.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
3.5 Interprocess Communication
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Processes.
Silent Dismissal Administrator Quick Start Guide.
The Programming Interface. Main Points Creating and managing processes – fork, exec, wait Performing I/O – open, read, write, close Communicating between.
Unix Processes Slides are based upon IBM technical library, Speaking Unix, Part 8: Unix processes Extended System Programming Laboratory (ESPL) CS Department.
Agenda What is Computer Programming? The Programming Process
Chapter 9 Message Passing Copyright © Operating Systems, by Dhananjay Dhamdhere Copyright © Operating Systems, by Dhananjay Dhamdhere2 Introduction.
1 Lecture 4: Threads Operating System Fall Contents Overview: Processes & Threads Benefits of Threads Thread State and Operations User Thread.
Process Management. Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication.
Chapter 3: Processes Process Concept Process Scheduling Operations on Processes Interprocess Communication Examples of IPC Systems Communication in Client-Server.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Homework Assignment #2 J. H. Wang Nov. 1, 2013.
IR Homework #2 By J. H. Wang Mar. 31, Programming Exercise #2: Query Processing and Searching Goal: to search relevant documents for a given query.
Homework Assignment #1 J. H. Wang Oct. 13, Homework #1 Chap.1: 1.24 Chap.2: 2.13 Chap.3: 3.5, 3.13* (or 3.14*) Chap.4: 4.6, 4.12* –(*: optional.
Threads G.Anuradha (Reference : William Stallings)
System calls for Process management
Homework Assignment #1 J. H. Wang Oct. 6, 2011.
CS212: OPERATING SYSTEM Lecture 2: Process 1. Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 3: Process-Concept.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Silberschatz, Galvin and Gagne  Operating System Concepts Process Concept An operating system executes a variety of programs:  Batch system.
IR Homework #1 By J. H. Wang Mar. 16, Programming Exercise #1: Vector Space Retrieval - Indexing Goal: to build an inverted index for a text collection.
IR Homework #1 By J. H. Wang Mar. 5, Programming Exercise #1: Indexing Goal: to build an index for a text collection using inverted files Input:
IR Homework #3 By J. H. Wang May 10, Programming Exercise #3: Text Classification Goal: to classify each document into predefined categories Input:
Advanced Programming in the UNIX Environment Hop Lee.
Basic UNIX Concepts. Why We Need an Operating System (OS) OS interacts with hardware and manages programs. A safe environment for programs to run is required.
Homework #1 J. H. Wang Oct. 2, 2013.
Homework #1: C++ Basics, Flow of Control, and Function Basics
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Homework Assignment #1 J. H. Wang Oct. 11, 2013.
Processes. Process Concept Process Scheduling Operations on Processes Interprocess Communication Communication in Client-Server Systems.
Lecture 4: Processes & Threads. Lecture 4 / Page 2AE4B33OSS Silberschatz, Galvin and Gagne ©2005 Contents The concept of Process Process states and life-cycle.
Cooperating Processes The concurrent processes executing in the operating system may be either independent processes or cooperating processes. A process.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Homework Assignment #1 J. H. Wang Sep. 22, Homework #1 Chap.2: 2.10 Chap.3: 3.1, 3.4, 3.5* (or 3.6*) Chap.4: 4.6, 4.8* (Optional: End-of-chapter.
IR Homework #1 By J. H. Wang Mar. 25, Programming Exercise #1: Indexing Goal: to build an index for a text collection using inverted files Input:
Project 3. “System Call and Synchronization” By Dongjin Kim
System calls for Process management Process creation, termination, waiting.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Homework #2 J. H. Wang Oct. 31, 2012.
IR Homework #2 By J. H. Wang Apr. 13, Programming Exercise #2: Query Processing and Searching Goal: to search for relevant documents Input: a query.
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Chapter 3: Process Concept
Homework Assignment #1 J. H. Wang Oct. 11, 2016.
Homework #2 J. H. Wang Oct. 19, 2017.
Process Management Presented By Aditya Gupta Assistant Professor
Big Data Analytics: HW#3
Threads and Cooperation
Applied Operating System Concepts
Threads and Data Sharing
Operating System Concepts
Tutorial: The Programming Interface
Homework #1 Chap. 1, 3, 4 J. H. Wang Oct. 2, 2018.
Homework #2 J. H. Wang Oct. 18, 2018.
Processes Creation and Threads
Presentation transcript:

Homework Assignment #1 J. H. Wang Oct. 2, 2015

Homework #1 Chap.1: 1.4 Chap.2: 2.7 Chap.3: 3.2, 3.11, 3.14*, 3.20* (*: optional programming exercises) Extra bonus: End-of-chapter programming projects for Chaps. 2-3 Due: two weeks (Oct. 16, 2015)

Chap.1 1.4: Describe the differences between symmetric and asymmetric multiprocessing. What are the advantages and disadvantages of multiprocessor systems?

Chap. 2 2.10: What are the two models of interprocess communication? What are the strengths and weaknesses of the two approaches?

Chap. 3 3.2: Describe the actions taken by a kernel to context-switch between processes. 3.11: What are the benefits and the disadvantages of each of the following? Consider both the system level and the programmer level. (a) Synchronous and asynchronous communication (b) Automatic and explicit buffering (c) Send by copy and send by reference (d) Fixed-sized and variable-sized messages

3.14*: The Collatz conjecture concerns what happens when we take any positive integer n and apply the following algorithm: The conjecture states that when this algorithm is continually applied, all positive integers will eventually reach 1. For example, if n=35, the sequence is 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1 (…to be continued…)

Write a C program using the fork() system call that generates this sequence in the child process. The starting number will be provided from the command line. For example, if 8 is passed as a parameter on the command line, the child process will output 8, 4, 2, 1. Because the parent and child processes have their own copies of the data, it will be necessary for the child to output the sequence. Have the parent invoke the wait() call to wait for the child process to complete before exiting the program. Perform necessary error checking to ensure that a positive integer is passed on the command line.

3.20*: Design a file-copying program named filecopy using ordinary pipes. This program will be passed two parameters: the name of the file to be copied and the name of the copied file. The program will then create an ordinary pipe and write the contents of the file to be copied to the pipe. The child process will read this file from the pipe and write it to the destination file. For example, if we invoke the program as follows: filecopy input.txt copy.txt the file input.txt will be written to the pipe. The child process will read the contents of this file and write it to the destination file copy.txt. You may write this program using either UNIX or Windows pipes.

Homework Submission For hand-written exercises, please hand in your homework on paper in class For programming exercises, please upload your source code to the program submission site as follows: URL: http://mslin.ee.ntut.edu.tw/ User account/Password: (your student ID) Please change your password as soon as possible Program uploading: a compressed file (in .zip format) including source codes and compilation instructions if it needs special environment to compile or run Please clearly name your program files using your ID Note: the uploaded file size must be less than 5MB

More on Optional End-of-Chapter Projects Programming Project for Chap. 2: Linux Kernel Modules Creating kernel modules Kernel data structures Programming Project for Chap. 3: Project 1: UNIX Shell and History Feature Creating a child process Creating a history feature Project 2: Linux Kernel Module for Listing Tasks Iterating over tasks linearly Iterating over tasks with a depth-first search tree

Thanks for Your Attention!