TC 670 Review Session - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

TC 670 Review Session

Description:

FS contains an index to a particular field of each record in a file ... mouse. keyboard. graphics. tape. printer. modem. network. 6. I/O Software System ... – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 38
Provided by: shudo
Category:
Tags: review | session

less

Transcript and Presenter's Notes

Title: TC 670 Review Session


1
TC 670Review Session
2
All Topics
  • Processes and threads, scheduling policies
  • Inter-process communication, concurrency
  • Memory management
  • Secondary storage management
  • File Systems
  • Device management
  • Multimedia operating systems
  • Multimedia network protocols
  • Computer security
  • Network security
  • Wireless sensor networks

3
File Systems
  • The concept of a file system is simple
  • Storage abstraction the implementation of the
    abstraction for secondary storage
  • abstraction files
  • Organizational structure logical organization of
    files into directories
  • the directory hierarchy
  • Access interface a set of operations that can be
    used by users to manipulate the info
  • You can retrieve what you store
  • Access control sharing/protection of data
    between users, processes, and machines
  • access control, consistency,

4
File Access Methods
  • Some file systems provide different access
    methods that specify ways the application will
    access data
  • sequential access
  • read bytes one at a time, in order
  • direct access
  • random access given a block/byte
  • record access
  • file is array of fixed- or variable-sized records
  • indexed access
  • FS contains an index to a particular field of
    each record in a file
  • apps can find a file based on value in that
    record (similar to DB)
  • Why do we care about distinguishing sequential
    from direct access?
  • what might the FS do differently in these cases?

5
Device Management
keyboard
graphics
printer
CPU
mouse
tape
Memory
modem
network
6
I/O Software System
User Level Software
Device Independent Software
Device Drivers
Interrupt Handlers
Hardware
7
Multimedia Operating Systems
  • Real-time requirements!
  • A real-time process is a process which delivers
    the results of the processing in given time-span.
  • The system must enforce externally-defined time
    constraints.
  • Speed and efficiency are not the main
    characteristics of a real-time system.
  • The playback of a video sequence is only
    acceptable when it is presented neither too
    quickly nor too slowly.
  • Timing and logical dependencies among different
    related tasks, processed at the same time, also
    must be considered.
  • Audio data sometimes must be synchronized with
    video data.

8
Multimedia Process Scheduling
  • Rate Monotonic Scheduling
  • Earliest Deadline First Scheduling

9
Multimedia Storage Management
  • Disk scheduling
  • File placement

10
Admission Controls
Video files
11
Multimedia network Protocols
  • RTP/RTCP
  • RTSP
  • RSVP
  • Can you describe a typical streaming process
    using these protocols?

12
Computer System Security
  • Basics of Cryptography
  • Digital signature
  • Authentication

13
Computer System Security
  • Attacks from inside the system
  • Trojan Horses
  • Trap Doors
  • Login Spoofing
  • Buffer Overflow
  • Attacks from outside the system
  • Virus

14
Computer System Security
  • Protection mechanisms
  • Protection Domains
  • Access control lists

15
Network Security
  • Routing Attacks
  • DDoS and Traceback
  • Intrusion Detection Systems
  • Firewalls
  • IP Security
  • Web Security
  • Examples
  • What are the tradeoffs between different
    architectures of firewalls?
  • What are the tradeoffs between different modes
    (transport/tunnel) of IP security?

16
Wireless Sensor Networks
  • Physical constraints and unique requirements
  • Scheduling (interrupt, tasks, etc).
  • Message passing
  • Topology
  • Routing algorithms
  • Security in WSN.

17
Sensor Node Hardware
Transceiver
Embedded Processor
Memory
Sensors
Battery
18
TinyOS Solutions
  • Support concurrency event-driven architecture
  • Modularity application scheduler graph of
    components
  • Compiled into one executable
  • Efficiency Get done quickly and sleep
  • Event function calls
  • Less context switch FIFO/non-preemptable
    scheduling
  • No kernel/application boundary

19
TinyOS Two-level Scheduling
  • Tasks do computation
  • Un-preemtable FIFO scheduling
  • Bounded number of pending tasks
  • Events handle interrupts
  • Interrupts trigger lowest-level events
  • Events can signal events, call commands, or post
    tasks
  • Two priorities
  • Event/command
  • Tasks

20
Active Message
  • Every message contains the name of an event
    handler
  • Sender
  • Declaring buffer space in a frame
  • Naming a handler
  • Requesting transmission exit
  • Done completion signal
  • Receiver
  • The event handler is fired automatically in a
    target node
  • No blocked or waiting threads on sender or
    receiver
  • Behaves like any other events
  • Single buffering

21
Adaptive Topology Problem Description
  • Simple Formulation (Geometric Disk Covering)
  • Given a distribution of N nodes in a plane.
  • Place a minimum number of disks of radius r
    (centered on the nodes) to cover them.
  • Disk represents the radio connectivity (simple
    circle model).
  • The problem is NP-hard.

22
Routing
  • Problem Given a topology, how to route data?
  • Different from Internet (wired) routing.

23
Midterm
24
Problem 1 Processes
0xFFFFFFFF
stack (dynamic allocated mem)
3 points
i
SP
address space
heap (dynamic allocated mem)
static data (data segment)
4 points
hello
code (text segment)
ilt100
3 points
PC
0x00000000
  • main()
  • int i
  • for(i 0 i lt 100 i) printf(hello)

25
Problem 2 CPU Scheduling
  • First part easy (5 points)
  • Second part 2 possibilities
  • New job is put in the ready queue first
  • New job immediately runs

26
Problem 3 Synchronization
  • Solution
  • Spin-locks is a low-level locking mechanism to
    synchronize processes. In spin-locks, the caller
    busy-waits or spins for a lock to be released
    (2 points). Spin-locks is not appropriate for
    uniprocessor systems, mainly because it is
    implemented in a less efficient way. One process
    will run at any time. However in a multiprocessor
    system, efficiency is less critical since often
    there are idle processors. On the other hand, the
    simplicity of spin-locks is very desirable (3
    points).
  •  
  • Monitor is software module that encapsulates
    thread data structure and procedures in an
    exclusive fashion. Monitor protects the data from
    unstructured access (2 points). With Hoare
    monitor, the waiter runs immediately and its
    condition is guarantee. Hence, it is efficient
    since the waiter does not have to re-check the
    condition. However, the signaler must do extra
    work to restore monitor invariant before
    signaling. With Mesa monitor, the signaler
    continues. Therefore it is possible that when the
    waiter runs again, the condition is changed again
    (so it needs to re-check the condition). Mesa
    monitor is easy for the signaler since it does
    not have to restore invariant. The signaler may
    simply run until out of the monitor session (3
    points).

27
Problem 4 Deadlocks
  • Solution
  • Four conditions of deadlocks are (1) Mutual
    exclusion, (2) hold-and-wait, (3) no preemption,
    and (4) circular wait (5 points). In this
    example, condition (1) holds as two vehicles
    cannot take the same slot. Condition (2) holds as
    every vehicle holds a slot and is waiting for the
    slot ahead to be released. Condition (3) holds as
    no vehicle can be removed. Condition (4) hold as
    there is a circular wait (5 points). Note you may
    also argue that the circle can be broken and
    there is no deadlock.
  • There are many examples of deadlocks in
    telecommunication applications. One example is
    teleconferencing you should pick a reasonable
    one (5 points).

28
Problem 5 Memory hierachy
  • Solution On average access to main memory takes
    110ns 0.1ns (3 points). On average access to
    disk takes 10.25ms 0.1ns (3 points). The
    expected time to get a word is 0.30.10.1
    0.5us (2 points). On average the CPU can access
    1sec/0.5us 2M words (2 points).

29
Problem 6 Memory Addressing
  • Please see the homework 2 (problem 1) for a
    simple draw of the addressing mechanisms (5
    points). The virtual address space has 32 bits,
    but really only 30 bits are useful. See the
    follows
  •  
  • For the virtual address 0x83A4C234, binary 1000
    0011 1010 0100 1100 0010 0011 0100, its segment
    is 2, its page is 0x3A4C, its offset is 0x234.
    Let us assume in the page table of segment 2,
    page 0x3A4C contains 0xDDDD. Then the physical
    address is 0xDDDD234 (5 points).
  •  
  • For the virtual address 0x94A4D234, binary 1001
    0100 1010 0100 1101 0010 0011 0100, it is invalid
    since two useless bits are set (5 points).
    Therefore it causes overflow. Note if you ignore
    this you may still get an answer.

30
Problem 7 Replacement Algorithms
  • Part one easy 5 points
  • Part two new algorithms, table (5 points)
  • The new algorithm is better. This example shows
    the new algorithm tries to keep the hot items
    (items 1 and 2) in the cache, and it pays off
    eventually. It does so by remembering the number
    of accessed to the items (using a count for each
    item). This algorithm is a more complicated than
    the LRU algorithm. You may also argue that the
    new algorithm may not work well for other access
    patterns. (5 points)

31
Problem 8 File Access
  • Solution First the root directory / is open,
    and checked for its sub-directory ssh. Then
    ssh is open, and checked for the file
    ssh_config. Finally, ssh_config is open (5
    points). There are at least 2 disk read
    operations, one to read / and one to read ssh
    (2 points). It is possible that the system needs
    more disk reads, for example if either the
    directory / or ssh is very large and needs
    several disk pages (3 points).

32
Problem 9 File Organization
File pointer
  • (1) There are 4 record pages and an index page.
    The index page contains many pairs of (phone,
    page). Each pair shows that the records with
    phone in a specific range are stored in that
    page. (5 points)
  • (2) To search a record with key 617-353-8924, we
    first compare this with those in the index
    page. Then we know which record page potentially
    contains the record. Then we can read that record
    page to find the record. (4 points). Two disk I/O
    are required to get the record, one for the index
    and one for the record page. (1 point)
  • (3) If there are 256000 records in the file,
    then a single index page will not work, instead
    we need more index pages (probably need up to
    dozens). One simple solution is to link these
    index pages together (5 points). But then if we
    have two many index pages, possibly we need to go
    through all of them to find a record! A better
    solution is to create a higher-level index page
    for the index pages. (It is ok if you do not
    answer in this way).

Index
64 records
64 records
64 records
64 records
33
Problem 10 Disk Scheduling
  • The Elevator algorithm is better in term of
    efficiency (it finishes all jobs in 23 units of
    time while FCFS needs 29 units. FCFS is better in
    terms of fairness in that it finishes the jobs in
    order, while with Elevator, some earlier jobs may
    wait for a longer time. (5 points)

34
Format of Final
  • Open book, 3 hours
  • Everything is allowed
  • 20 multiple-choice questions
  • Choose one or two
  • 2 points each
  • Problem solving
  • Solve 5 of 6 problems
  • Total 60 points

35
Topic Coverage
Multiple choices
Problem solving

  • Processes and threads, scheduling policies
  • Inter-process communication, concurrency
  • Memory management
  • Secondary storage management
  • File Systems
  • Device management
  • Multimedia operating systems
  • Multimedia network protocols
  • Computer security
  • Network security
  • Wireless sensor networks

36
Good luck!
37
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com