Questions tagged [os161]

OS/161 is a simplified operating system Harvard uses for teaching the undergraduate operating systems class. It includes a standalone kernel and a simple userland, all written in C. It runs on a machine simulator, System/161, that offers simplified but still realistic hardware devices. (Neither OS/161 nor System/161 is in any way affiliated with IBM.) [Copied with slight modification from http://www.eecs.harvard.edu/~syrah/os161/]

OS/161 is a simplified operating system Harvard uses for teaching the undergraduate operating systems class. It includes a standalone kernel and a simple userland, all written in C. It runs on a machine simulator, System/161, that offers simplified but still realistic hardware devices. (Neither OS/161 nor System/161 is in any way affiliated with IBM.)

Copied with slight modification from Harvard's Syrah homepage on OS/161.

38 questions
1
vote
1 answer

System Calls in OS/161

I'm been walking through the code in OS/161 with respect to how systems calls are executed. From what I can see, a system call (e.g. reboot()) is actually translated by the OS/161 kernel into a call to sys_reboot(). Similarly, a call to fork() would…
User137481
  • 223
  • 1
  • 4
  • 14
1
vote
2 answers

declare memory to struct in c

I have a struct abc in one file struct abc { some variaables and functions } I am using this struct in other file as follows : struct abc *t = kmalloc(sizeof(struct abc)); kmalloc is equivalent to malloc then following errors occur:…
user1079065
  • 2,085
  • 9
  • 30
  • 53
1
vote
0 answers

os161 commiting changes via cvs

While I was committing to cvs my connection to the server got reset and I had to close my window now after getting back the connection, I am again trying to commit my changes to cvs and it keeps on saying cvs commit: [14:18:31] waiting for…
user1079065
  • 2,085
  • 9
  • 30
  • 53
1
vote
1 answer

Add debugging info to os161

I'm trying to debug os161 and am having trouble due to a lack of debug information. None of my functions have line number information, so I'm capable of doing something like "b lock_acquire" but then when I do "s" it says "Single stepping until exit…
Joshua Snider
  • 705
  • 1
  • 8
  • 34
1
vote
1 answer

what's the relationship between address space and page table in os161?

What is the relationship between address space and page table? I know that each process should have a page table which maps between virtual address to physical address. But what does an address space do? in os161, address space looks like: struct…
nuynait
  • 1,912
  • 20
  • 27
1
vote
1 answer

How to add a new system call in OS/161?

I am trying to add a new system call in my OS/161 code, but I am having trouble figuring out where to add the prototypes. I believe you're supposed to add it to the kernel space and user space, but I'm not sure exactly which files to put the…
omega
  • 40,311
  • 81
  • 251
  • 474
1
vote
0 answers

Inline data extension for sfs_inode (OS161)

Hi I'm working with OS161 and I'm trying to extend my inode structures so that when I write to disk, I write the first chunk of file data into the actual inode structure, because currently it's set up such that a large chunk of the structure is…
ddnm
  • 187
  • 1
  • 10
0
votes
2 answers

OS161 expected '=', ',', ';', 'asm' or '__attribute__' before error

I am working on the os161 project. I create a file which include the array.h provide in src/kern/include. When I compile, I had the error like this: ./../include/array.h:85: error: expected '=', ',', ';', 'asm' or 'attribute' before…
eric li
  • 1
  • 1
0
votes
0 answers

Problem with OS161: Panic - Fatal exception 11 (Coprocessor unusable)

I was writing a First Come First Serve scheduling algorithm for OS161 on ubuntu 16 #FCFS code #include #include #include #include #include //custom header made by me void enqueue(Queue *queue,…
0
votes
1 answer

What is the use of the argument num in this code?

The "os161" operating system contains the following code. Specifically, where the syscalls are defined: ... #include ... #define SYSCALL(sym, num) \ .set noreorder ; \ .globl sym ; \ .type sym,@function …
StackExchange123
  • 1,871
  • 9
  • 24
0
votes
1 answer

Incompatible pointer type warning in os161

I am implementing a fork system call in os161 kernel. I am trying to create a new process and for its thread creation I used thread_fork. I am using the function md_forkentry to allocate heap and stack to the trapframe of the new thread and switch…
Ruby
  • 413
  • 1
  • 4
  • 16
0
votes
2 answers

how to have a child process forked through sys_fork() to have its kernel stack contain the trap frame?

I am working on the implementation of system call sys_fork() on the kernel level. I did the copying of the parent process to the child process as per requirements. The problem is how to copy the child's trapframe (copy of the parent trapframe) onto…
Ankur Goyal
  • 31
  • 1
  • 4
0
votes
0 answers

Setting up GDB with DDD for OS-161

I'm setting up gdb for debugging OS-161 and I'm planning to use DDD as a visual front-end. I'm following instructions from the official CS-161 course page: http://www.eecs.harvard.edu/~cs161/resources/eclipse.html (scroll down to DDD). After…
cloudy_eclispse
  • 313
  • 4
  • 16
0
votes
1 answer

Why is the pointer changing for no reason?

I am working on Assignment 2 of ops-class. The following function bootstraps a file handler array for the process that is being created (eg. user processes for test programs provided here). int _fh_bootstrap(struct fharray *fhs){ /* Initialize the…
Deepak
  • 341
  • 4
  • 15
0
votes
1 answer

***missing separator. Stop. While eclipse trying to run OS/161

In line 13 .include "$(TOP)/mk/os161.config.mk" I've installed OS161 tools and is trying to run OS161 over eclipse and was compiling the dependencies. # Automatically generated by config; do not edit. # # Top of the kernel tree KTOP=../.. # Top of…
legokangpalla
  • 495
  • 5
  • 20