代写代考 CMPUT 379: Operating System Concepts

CMPUT 379: Operating System Concepts
Ehab S. Elmallah

http://eclass.srv.ualberta.ca/

Copyright By PowCoder代写 加微信 powcoder

 Assignments, Exams, and Final Grades
 Introduction: A Networking and Operating Systems Perspective
 Course Objectives
 About Course Slides
CMPUT 379 (E.S. Elmallah)
Assignments, Exams, and Letter Grades
 CMPUT 379 has two substantial components:
o conceptual component: delivered in the lectures,
examinable
o a hands-on programming component: developed in the assignments, not very examinable
 Assignments (4): 40%
o Mainly C/C++ programming assignments (in the Unix
environment)
o done individually (unless otherwise stated)
 Midterm exam: 15%
 Final exam: 45%
 Assigning letter grades
CMPUT 379 (E.S. Elmallah)

Introduction: A Networking and Operating
Systems Perspective
 We live in a networked world. Networked applications are used daily, e.g.
o peer to peer file sharing o streaming multimedia
 How to grasp the architecture of such applications?
o CMPUT 313: Computer Networks
o CMPUT 379: Operating System Concepts
CMPUT 379 (E.S. Elmallah)
 In C313, we use the “Internet Layering Architecture” concept to understand the Internet.
o A useful analogy: the airline system:
 Layers: each layer implements a service
o via its own internal-layer actions
o relying on services provided by layer below
 Each layer takes data from above
o adds header information to create new data unit
o passes new data unit to layer below CMPUT 379 (E.S. Elmallah)

 The Internet Protocol Stack has 5 (well defined) layers:
o application: FTP, HTTP
o transport: process-to-process
data transfer (TCP, UDP)
o network: host-to-host data transfer (IP)
o link: data transfer between neighbouring network elements
o physical: “bits on the wire”
CMPUT 379 (E.S. Elmallah)
PDUs Message
Segment Datagram
Frame 1-PDU
[KR 3/E] 5
application
 Each node at the edge of the Internet implements the full protocol stack:
CMPUT 379 (E.S. Elmallah)
[KR 3/E] 6

 The transport layer is a distinguished layer for client- server application developers:
application
network data link physical
network data link physical
network data link physical
network data link physical
network data link physical
application
network data link physical
CMPUT 379 (E.S. Elmallah)
network data link physical
 At the edge of the Internet, we have “intelligent nodes”: each node can be:
o a system on a chip: microcontroller, memory, wireless modem
o a personal communication device o a laptop or desktop (with dual core
CPU) o …
o a high end multiprocessor system CMPUT 379 (E.S. Elmallah)

 In each case, an OS is needed to:
o Act as an intermediary between the user(s) and the hardware
o Allocate and manage system resources
o Execute user programs in a safe way
We’ll focus on multitasking (multiprocessing) operating systems (mostly, Unix based systems) working in a single CPU system
CMPUT 379 (E.S. Elmallah)
 OS’s main components provide: o Process management
o Memory management
o I/O management
o File system management o Networking
o Protection
o User Interfacing
 The OS’s Kernel:
o the one part of the OS running at all times o the resident part of the OS
o runs in the “supervisor’ (privileged) mode
CMPUT 379 (E.S. Elmallah)

 Recall: CPUs typically have two modes of operation: user mode and supervisor mode.
o Example: In MIPS architecture, the Status Register has the following fields:
o Switching from user mode to supervisor mode occurs when an exception happens.
o Exceptions: events that disrupt the normal flow of program execution.
CMPUT 379 (E.S. Elmallah)
o Classification: • Internal:
– Execution error: address alignment error, reserved instruction operation code, arithmetic overflow
– Instruction: system call, breakpoint, trap
• External: bus error, interrupt request, reset, soft reset
CMPUT 379 (E.S. Elmallah)

 Operating System Roles [AD 2/E]: o Referee:
• Resource allocation among users, applications
• Isolation of different users, applications from each other
• Communication between users, applications o Illusionist
• Each application appears to have the entire machine to itself
• Infinite number of processors, (near) infinite amount of memory, reliable storage, reliable network transport
• Libraries, user interface widgets, …
CMPUT 379 (E.S. Elmallah)
 No standard layering scheme.
o Example 1: a (rather old) UNIX kernel
CMPUT 379 (E.S. Elmallah)

o Example 2: Windows 2000
CMPUT 379 (E.S. Elmallah)
 System Calls: provide means of accessing OS services from user programs
CMPUT 379 (E.S. Elmallah)

 Examples of system call groups
o Process control
• fork(), exec (), wait (), abort ()
o File manipulation
• chmod(), link(), stat(), creat()
o Communications
• socket(), accept(), send(), recv()
CMPUT 379 (E.S. Elmallah)
 Interrupts: provide means of serving I/O devices
CMPUT 379 (E.S. Elmallah)

 Topics of interest in C379:
o Processes and threads
o Inter-process communications
o Process synchronization and deadlocks o Virtual memory
o CPU scheduling
o File systems
o Protection and security
CMPUT 379 (E.S. Elmallah)
Course Objectives
 Enhance your knowledge and skills in developing programs that
o utilize advanced OS services,
o support concurrent operations,
o provide inter-process communications, and/or
o interact with the Internet (client-server programs).
 Introduce fundamental ideas underlying the design of modern OS (e.g., virtual memory systems, CPU scheduling, security and protection).
CMPUT 379 (E.S. Elmallah)

About Course Slides
 Not intended to be a textbook replacement at all
 Expected to contain errors (please let me know about
 Use material (figures, sentences, key equations) from different sources:
o Silberschatz, Galvin, and Gagne, Operating System Concepts, , 8/E
o Anderson and Dahlin, Operating Systems Principles and Practice, Recursive Books, 2/E
o Kurose and Ross, Computer Networking: A Top-Down Approach Featuring the Internet, , 5/E
o Stallings, Operating Systems: Internals and Design Principles, , 5/E
o Leffler and McKusick, The Design and Implementation of the 4.3 BSD Operating System, , 1990
o other sources
CMPUT 379 (E.S. Elmallah)

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com